CentOS部署Prometheus监控

Prometheus是一套开源的系统监控报警框架。Prometheus作为新一代的云原生监控系统,相比传统监控监控系统(Nagios或者Zabbix)拥有众多有点。

下载安装启动exporte

[root@localhost ~]# wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
[root@localhost ~]# tar zxf node_exporter-0.18.1.linux-amd64.tar.gz 
[root@localhost ~]# mv node_exporter-0.18.1.linux-amd64 /usr/local/node_exporte
[root@localhost ~]# /usr/local/node_exporte/node_exporter &

下载安装Prometheus

[root@localhost ~]# wget https://github.com/prometheus/prometheus/releases/download/v2.10.0/prometheus-2.10.0.linux-amd64.tar.gz
[root@localhost ~]# tar -zxf prometheus-2.10.0.linux-amd64.tar.gz
[root@localhost ~]# mv prometheus-2.10.0.linux-amd64 /usr/local/prometheus
配置Prometheus
[root@localhost ~]# vim /usr/local/prometheus/prometheus.yml
# 修改如下
  - job_name: 'node'
    static_configs:
    - targets: ['localhost:9100','localhost:9090']
启动Prometheus
[root@localhost ~]# /usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml &
访问
http://1.1.1.5:9009

CentOS部署Prometheus监控_第1张图片

你可能感兴趣的:(开发环境)