Skip to content

Intellection/passenger-exporter

 
 

Repository files navigation

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

  1. Clone the repository.
  2. Install the promu build tool.
  3. Install application dependencies via make dependencies (they'll be placed in ./vendor).
  4. Build and install the binary with make build.
  5. Run the command e.g. ./bin/passenger-exporter -h.

Testing

  1. Install the golangci-lint, see instructions here.
  2. 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.

About

Prometheus exporter for Phusion Passenger

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 92.8%
  • Dockerfile 6.0%
  • Makefile 1.2%