NGINX Exporter Metrics
NGINX Exporter Metrics input plugin scrapes metrics from the NGINX stub status handler.
Configuration Parameters
The plugin supports the following configuration parameters:
Getting Started
NGINX must be configured with a location that invokes the stub status handler. Here is an example configuration with such a location:
Configuration with NGINX Plus REST API
Another metrics API is available with NGINX Plus. You must first configure a path in NGINX Plus.
Command Line
From the command line you can let Fluent Bit generate the checks with the following options:
To gather metrics from the command line with the NGINX Plus REST API we need to turn on the nginx_plus property, like so:
Configuration File
In your main configuration file append the following Input & Output sections:
And for NGINX Plus API:
Testing
You can quickly test against the NGINX server running on localhost by invoking it directly from the command line:
Exported Metrics
This documentation is copied from the NGINX Prometheus Exporter metrics documentation on GitHub.
Common metrics:
Metrics for NGINX OSS:
Metrics for NGINX Plus:
Note: for the
state
metric, the string values are converted to float64 using the following rule:"up"
->1.0
,"draining"
->2.0
,"down"
->3.0
,"unavail"
–>4.0
,"checking"
–>5.0
,"unhealthy"
->6.0
.
Note: for the
state
metric, the string values are converted to float64 using the following rule:"up"
->1.0
,"down"
->3.0
,"unavail"
–>4.0
,"checking"
–>5.0
,"unhealthy"
->6.0
.
Last updated