Configure NGINX status API input
NGINX Plus provides a real-time live activity monitoring interface that shows key load and performance metrics of your server infrastructure. These metrics are represented as a RESTful JSON interface and this live data can be ingested into Splunk as NGINX Status API input.
Configure NGINX Status API input through Splunk Web.
- Identify whether your NGINX deployment uses encrypted or unencrypted communication. See the Switch between encrypted and unencrypted communication section of this topic for more information.
- Log in to Splunk Web.
- Select Settings > Data inputs > Splunk Add-on for NGINX.
- Click New.
- On the NGINX Status API Input page, enter the following fields:
- Name: A unique name that identifies the NGINX Status API input
- Log level: One of these log levels (with decreasing verbosity): debug, info, warning, error
- NGINX URL: Location of the NGINX status JSON REST interface. For example,
127.0.0.1/api
- NGINX API Types: Enter comma-separated Nginx Plus Types for which data needs to be fetched.
Allowed values are processes, connections, slabs, http, stream, resolvers, ssl - NGINX Username (Optional) Add the NGINX username you use to access the NGINX status JSON REST interface.
- NGINX Password (Optional) Add the NGINX password you use to access the NGINX status JSON REST interface.
- Optionally, select More settings and modify the detailed settings field values as needed.
- Click Next.
- Click Review.
- After you review the information, click Submit.
Switch between encrypted and unencrypted communication
Switch between encrypted and unencrypted communication. By default, all the communications from the Splunk Add-on for NGINX to your NGINX servers are encrypted via HTTPS with SSL certificate validation enabled. If your NGINX server is configured with HTTPS and a valid CA signed certificate, then communications with your NGINX server work with the default configurations.
Configure the Splunk Add-on for NGINX to use a self-signed certificate
If your NGNIX server is configured with HTTPS using a self-signed certificate, follow the below steps.
- Download the CA certificate of the NGINX server in PEM format.
- Move the CA certificate to the
$SPLUNK_HOME/etc/apps/Splunk_TA_nginx/local
directory. - Navigate to
$SPLUNK_HOME/etc/apps/Splunk_TA_ngnix/default/
. - Copy
splunk_ta_nginx_settings.conf
and paste in your deployment's$SPLUNK_HOME/etc/apps/Splunk_TA_nginx/local
folder. - In
$SPLUNK_HOME/etc/apps/Splunk_TA_nginx/local
, opensplunk_ta_nginx_settings.conf
, and enter the path of the CA certificate file (including the file name) under thessl_settings
stanza. - Save your changes.
- Restart the Splunk platform.
Switch from HTTPS to HTTP communications
Switch from HTTPS to HTTP communications when your NGINX server is configured with HTTP communications.
- Navigate to
$SPLUNK_HOME/etc/apps/Splunk_TA_nginx/local/
, and opensplunk_ta_nginx_settings.conf
in a text editor. - Under the ssl_settings stanza, change the value of the
http_scheme
field fromHTTPS
toHTTP
. - Save your changes.
- Restart your Splunk platform instance.
Validate data collection
After you configure monitoring, run one of the following searches to check that you are ingesting the data that you expect.
sourcetype=nginx:plus:api
Configure monitor inputs for the Splunk Add-on for NGINX | Troubleshoot the Splunk Add-on for NGINX |
This documentation applies to the following versions of Splunk® Supported Add-ons: released
Feedback submitted, thanks!