forked from stuartnelson3/passenger_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
71 lines (52 loc) · 1.97 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
************************
passenger_exporter_nginx
------------------------
This is a Prometheus exporter for passenger with nginx integration.
https://www.phusionpassenger.com/
*********************
Building the Exporter
---------------------
The default Makefile target creates a statically linked binary for Linux.
A Dockerfile and Makefile target are also supplied:
make build-docker
********************
Running the Exporter
--------------------
Usage of passenger_exporter_nginx:
-log.format value
If set use a syslog logger or JSON logging.
Example: logger:syslog?appname=bob&local=7 or logger:stdout?json=true.
Defaults to stderr.
-log.level value
Only log messages with the given severity or above.
Valid levels: [debug, info, warn, error, fatal]. (default info)
-passenger.command string
Passenger command for querying passenger status.
(default "passenger-status --show=xml")
-passenger.pid-file string
Optional path to a file containing the passenger/nginx PID for additional metrics.
-passenger.command.timeout duration
Timeout for passenger.command. (default 500ms)
-web.listen-address string
Address to listen on for web interface and telemetry. (default ":9149")
-web.telemetry-path string
Path under which to expose metrics. (default "/metrics")
To run the Docker image:
docker run -p 9106:9106 -v $PATH_TO_PASSENGER_STATUS:/bin \
passenger_exporter_nginx:latest /passenger_exporter_nginx
Notes for running the Docker container:
- You must mount the passenger-status binary within the container to
have access.
- You must expose the -web.listen-address port on the container to be scraped.
**********
Collectors
----------
An example of the metrics exported can be seen in testdata/scrape_output.txt
*************
Running Tests
-------------
Tests can be run with:
go test .
Additionally, the testdata/scrape_output.txt can be regenerated by passing the
--golden flag:
go test -v . --golden