Promethues configure node_exporter and rocketmq_exporter

background

I have built a set of rocketmq clusters, and now I want to monitor the rocketmq clusters shown in the following table. The node_exporter and rocketmq_exporter have been introduced here, so today I will configure the corresponding exporter on Promethues.

Machine node ip Remarks
promethues 192.168.0.5 promethues service node (rocketmq_exporter)
nameserver1 192.168.0.6  nameserver node (node_exporter)
broker-a 192.168.0.7  broker node (node_exporter)
broker-a-s 192.168.0.8  broker node (node_exporter)

Node_exporter needs to be installed on both nameserver and broker

Rocketmq_exporter can be installed on a fixed machine node (such as promethues node)

Node_exporter installation reference: Promethues: initial installation of rocketmq_exporter

rocketmq_exporter installation reference: Promethues: node_exporter initial installation

Configure promethues

Configuration file: promethues.yml

Location: /usr/local/prometheus/prometheus.yml

If you cannot find the location, you can use the following methods:

ps to | grep prometheus

The --config.file in the figure is the location of the configuration file

Configure node_exporter

Execution: vim /usr/local/prometheus/prometheus.yml

Add the following bold content in the scrape_configs field .

scrape_configs:
    #nameserver machine node monitoring-job_name: nameserver

Configure rocketmq_exporter

Execution: vim /usr/local/prometheus/prometheus.yml

Add the following bold content in the scrape_configs field .

scrape_configs:

Load configuration

1) Restart prometheus

service prometheus restart

2) Confirm whether rocketmq_exporter is OK

curl http://localhost:5557/metrics

3) Confirm whether node_exporter is OK

curl http://192.168.0.6:9100/metrics
curl http://192.168.0.7:9100/metrics
curl http://192.168.0.8:9100/metrics

4) Check the promethues log for errors

systemctl status prometheus -l

At this point, the node-exporter and rocketmq-exporterr of promethues have been configured, and the grafana panel will be configured later. 

Blogger: Test to make money

Motto: Use testing to complete the original accumulation, and use investment to move towards financial freedom

csdn:https://blog.csdn.net/ccgshigao

Blog Park: https://www.cnblogs.com/qa-freeroad/

51cto :https://blog.51cto.com/14900374


Guess you like

Origin blog.51cto.com/14900374/2543010