Prometheus monitoring Software Deployment method

Source: Internet
Author: User

Background: Responsible for the status escalation module design code for a fair project based on Blockchain, two development based on Prometheus

1. Description
Prometheus is an open source service monitoring software that collects data from remote machines via the HTTP protocol and stores it in this
To the time series database on the ground. Prometheus collects monitoring data by exporter installed on a remote machine.

Two exporter are currently used:
A, node exporter, for collecting system data
B, mysqld exporter, used to collect Mysql data
The following local related path, user name, password, parameter configuration for example only.

2, Installation Prometheus
A, download
Wget
https://github.com/prometheus/prometheus/releases/download/v1.6.3/prometheus-
1.6.3.linux-amd64.tar.gz-o prometheus-1.6.3.linux-amd64.tar.gz
B, decompression
Mkdir/usr/local/services/prometheus
Tar zxf prometheus-1.6.3.linux-amd64.tar.gz-c/usr/local/services/prometheus–
Strip-components=1

3, configuration Prometheus
in the installation directory, edit the configuration file Prometheus.yml,host is the host IP, the port corresponds to the exporter supervisor
Listening Ports
Global:
Scrape_interval:
15s
evaluation_interval:15s
Scrape_configs:
-Job_name:xxx1system
Static_configs:
-Targets: [' host:9103 ']
Labels:
instance: XXX1system
-job_name: XXX1mysql
Static_configs:
-Targets: [' host:9104 ']
Labels:
instance: XXX1mysql
-job_name: XXX2system
Static_configs:
-Targets: [' host:9103 ']
Labels:
instance: XXX2system

-Job_name: XXX2mysql
Static_configs:
-Targets: [' host:9104 ']
Labels
Instance: XXX2mysql
Similarly............................

4. Running Prometheus
./prometheus-web.listen-address ": 9092"
5. Deploy exporter
A, download
wgetHttps://github.com/prometheus/node_exporter/releases/download/v0.14.0/node_exporTer-0.14.0.linux-amd64.tar.gz-o node_exporter-0.14.0.linux-amd64.tar.gz
wgethttps://github.com/prometheus/mysqld_exporter/releases/download/v0.10.0/mysqld_eXporter-0.10.0.linux-amd64.tar.gz-o mysqld_exporter-0.10.0.linux-amd64.tar.gz
B, Decompression
tar zxf node_exporter-0.14.0.linux-amd64.tar.gz-c/usr/local/services/prometheus_exporters--strip-components= 1
tar zxf mysqld_exporter-0.10.0.linux-amd64.tar.gz-c/usr/local/services/prometheus_exporters–strip-components=1

C, run
Cd/usr/local/services/prometheus_exporters
Node exporter can be run directly
./node_exporter-web.listen-address ": 9103"
Cd/usr/local/services/prometheus_exporters
Create a. my.cnf file
Cat << EOF >. my.cnf
[Client]
User=root
[Email protected] $RFVyl
Eof
You can now run mysqld exporter
./mysqld_exporter-config.my-cnf= ". My.cnf"

6. Inspection
Prometheus has a built-in web interface that we can access through Http://FBAAR ip:9092. Access interface, in
Status->targets, when you see that the status of Target becomes up, the Prometheus can normally receive exporter data
The

Prometheus monitoring Software Deployment method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.