Nginx
The Prometheus Nginx exporter can be used on a standalone machine to collect metrics from an nginx server.
The OpsVerse single machine agent should be running on this machine. If that's not the case, it can be installed using these steps.
The Nginx server should have the stub_status module enabled for the metrics collection to work. Availability of this module can be checked by running this command:
If this module is not already enabled, it can be enabled by following the steps outlined in this document.
Update the nginx.conf file and add a location for the stub_status module. This enables the nginx server to return metrics on the configured location URI. Here is an example:
For more details, please see - Nginx metrics through stub_status.
The nginx prometheus exporter can be installed using this command:
The agent will begin scraping the metrics automatically. The script will drop the scrape target into /etc/opsverse/targets/, so the agent will begin automatically scraping.