Set up Prometheus monitoring
This topic contains instructions to install and configure Prometheus. Prometheus is a time series-based, open-source monitoring system. It collects data by sending HTTP requests to hosts and services on metrics endpoints, which it then makes available for analysis and alerting using a powerful query language. In short, the Prometheus server collects time series data, stores it, makes it available for querying, and sends alerts based on it.
Install Prometheus
You can install Prometheus in several ways. You can use Prometheus Docker image or configuration management systems like Ansible, chef, puppet, and salt stack. For more information, see the official installation guide.
Configure Prometheus
You can edit the prometheus.yml
file to configure the Prometheus server. It contains various settings for the Prometheus tool. For more information, see the configuration guide.
Start Prometheus
Enter the following command to expose Prometheus metrics on a specific port (for example, 9190).
chr start -p metrics.prometheus.port=9190
The command line provides details on the startup process and other services. It should also indicate that the service is listening on port 9190.
You can also use the following command:
chr start -np node.properties
In this case, you need to make sure that metrics.prometheus.port=9190
attribute is available in the node.properties
file.
You can verify that Prometheus serves metrics by navigating to its metrics endpoint: localhost:9190/metrics.