passenger-exporter

command module
v0.0.0-...-5534be4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 15 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL