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
A much more powerful and flexible metrics API is available with NGINX Plus. A path needs to be configured in NGINX Plus first.
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: [https://github.com/nginxinc/nginx-prometheus-exporter/blob/master/README.md].
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