Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

prometheus passenger exporter for nginx and apache integration

License

Notifications You must be signed in to change notification settings

jgrancell/passenger_exporter

 
 

Repository files navigation

************************
passenger_exporter
------------------------

This is a Prometheus exporter for passenger with nginx or apache 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:
  -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 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:latest /passenger_exporter

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

About

prometheus passenger exporter for nginx and apache integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.8%
  • Makefile 2.9%
  • Dockerfile 0.3%