The monitoring data of the Prometheus monitoring service is collected through a pull model. Prometheus periodically scrapes metrics data from configured targets, which are typically services or applications running in the cloud or on-premises. These targets expose their metrics via an HTTP endpoint, usually on port 9090, known as the Prometheus endpoint.
For example, if you have a web application running on a server, you can configure Prometheus to scrape metrics from this application every 15 seconds. The application needs to expose its metrics in a format that Prometheus can understand, typically using the Prometheus text-based format.
Once Prometheus collects the data, it stores it in a time-series database and provides a powerful query language (PromQL) to allow users to query and visualize the data.
In the context of cloud services, Tencent Cloud offers a managed Prometheus service called Tencent Cloud Monitor, which simplifies the deployment, operation, and maintenance of Prometheus. It integrates with various Tencent Cloud services and provides a unified monitoring solution for cloud-based applications.