Monitor API Metrics
API7 Enterprise supports exposing a comprehensive set of metrics to the monitoring system with minimal delay, facilitating ongoing monitoring and diagnostics.
API7 Enterprise's monitoring and alerting framework is built on Prometheus, a widely used system monitoring and alerting toolkit. Prometheus gathers and stores multidimensional time series data, including metrics annotated with key-value labels.
This guide explains how to enable the Prometheus plugin to integrate with the monitoring system, allowing you to collect and visualize HTTP metrics.
Prerequisites
Monitor All Services
It is recommended to enable the prometheus
plugin as a global rule. This ensures that all services and routes are consistently monitored and tracked.
- Dashboard
- ADC
- Select Gateway Groups from the side navigation bar and then select the gateway group you want to monitor.
- Select Plugin Settings from the side navigation bar.
- Select the Plugin Global Rules tab and then search for the
prometheus
plugin in the Plugins field. - Click the Plus icon (+).
- In the dialog box that appeared, click Enable.
- Make some API calls to test the monitoring.
- Select Monitoring from the side navigation bar to view the metrics.
To use ADC to enable monitoring, create the following configuration:
global_rules:
prometheus:
_meta:
disable: false
Synchronize the configuration to API7 Enterprise:
adc sync -f adc.yaml
ADC uses the configuration files as the single source of truth. Make sure to pass all configuration files to the adc sync
command using the -f
flag.
In the API7 Enterprise Dashboard, select Monitoring from the side navigation bar to view the metrics.