Passenger Exporter
Passenger exporter is a Prometheus metrics exporter for Phusion Passenger 6.0.
Usage
Running locally
Start Passenger with a known instance registry:
$ PASSENGER_INSTANCE_REGISTRY_DIR=/tmp/passenger passenger start
Run the exporter, specifying the same instance registry:
$ PASSENGER_INSTANCE_REGISTRY_DIR=/tmp/passenger ./bin/passenger-exporter
Note: You must specify the PASSENGER_INSTANCE_REGISTRY_DIR
environment variable. It is used by the passenger-status
command to query Passenger information. Without it, the exporter cannot retreve metrics from your Passenger instance.
Flags
The following flags are available:
Flag |
Description |
Default Value |
-passenger.command string |
Passenger command for querying passenger status. |
"passenger-status --show=xml" |
-passenger.command.timeout-seconds float |
Timeout for passenger.command. |
5 |
-web.listen-address string |
Address to listen on for web interface and telemetry. |
":9149" |
-web.telemetry-path string |
Path under which to expose metrics. |
"/metrics" |
Building
- Clone the repository.
- Install the
promu
build tool.
- Install application dependencies via
make dependencies
(they'll be placed in ./vendor
).
- Build and install the binary with
make build
.
- Run the command e.g.
./bin/passenger-exporter -h
.
Testing
- Install the
golangci-lint
, see instructions here.
- Run linter using
make lint
and test using make test
.
The scrape output can be regenerated by passing the --golden
flag to go test
.
Credits
We would like to acknowledge and express our gratitude to @stuartnelson3 for their work on the upstream version of Passenger Exporter.