Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the logic used in conjunction with Prometheus+Grafana?

Shulou Source: shulou.com Published: 2022-06-02 00:34:41 10月01日 Update

This article introduces to you what is the logic of the use of Prometheus+Grafana, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Both Prometheus and Grafana provide binary packages for each platform, which can be obtained from their respective official websites. It should be noted that the domestic download network speed may be a little slow, you need to live fq patiently.

It's easy to use these two things together, and the simplest logic is:

Download Prometheus (can be thought of as server)

Download address: https://prometheus.io/download/

Download the Prometheus monitoring metrics collector (which can be thought of as agent), such as kafka_exporter

Can be obtained from https://prometheus.io/download/

If not, you can get it by searching on github, such as kafka exporter: https://github.com/danielqsj/kafka_exporter/tree/v1.2.0

Some three-party exporter addresses: https://prometheus.io/docs/instrumenting/exporters/#messaging-systems

Download Grafana (can be thought of as the web side shown at the front end)

Download address: https://grafana.com/grafana/download

Start exporter according to the parameters of kafka_exporter. At this time, agent is already collecting data of monitoring targets.

We can check whether the data can be collected normally by accessing the ip:port/metrics at startup, for example: http://192.168.0.122:9308/metrics

Register the ip and port of the above exporter into the configuration file of Prometheus

Start Prometheus

The default access address for Prometheus is: ip:9090

After accessing the address, you can click Status-- > Targets to see if the registered exporter can receive data normally.

Start Grafana

The default access address for Grafana is: ip:3000

When you log in for the first time, the username and password is admin/admin. After logging in, you will be asked to change your password.

Import grafana json metrics items corresponding to kafka exporter into Grafana

I believe it is not difficult to find the corresponding grafana json, as follows:

Bingo-complete.

So much for sharing the logic of Prometheus+Grafana co-use. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.

Tags: Address logic data content password indicator more help monitoring good patient tripartite thing two binary interest front end parameters boy buddy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Microsoft Docker Huawei OPPO Reno