Prometheus+Grafana的安装添加zabbix监控

网友投稿 235 2022-10-24

Prometheus+Grafana的安装添加zabbix监控

[root@bogon soft]# ll

-rw-r--r-- 1 root root 25710888 Jul 27 11:12 alertmanager-0.21.0.linux-amd64.tar.gz

-rw-r--r-- 1 root root 69491886 Jul 27 11:12 prometheus-2.27.1.linux-amd64.tar.gz

[root@bogon soft]# tar -zxvf prometheus-2.27.1.linux-amd64.tar.gz

[root@bogon soft]# mv prometheus-2.27.1.linux-amd64 /usr/local/prometheus

[root@bogon soft]# cd /usr/local/prometheus/

root@bogon prometheus]# nohup ./prometheus --config.file=prometheus.yml &

在Prometheus中配置mysqld_exporter

exporter启动了,需要在Prometheus中正确的配置。修改prometheus目录中的prometheus.yml,增加配置如下:

- job_name: 'mysql'

static_configs:

- targets: ['localhost:9104']

labels:

instance: mysql

static_configs:

- targets: ['localhost:9090']

- job_name: 'mysql'

安装Grafana

1、配置数据源

操作步骤如下:

4 数据源Type选择“Prometheus”

5 设置Prometheus服务访问地址(例如:bin]# ./grafana-cli plugins install alexanderzobnin-zabbix-app

installing alexanderzobnin-zabbix-app @ 4.1.5

from: /var/lib/grafana/plugins

✔ Installed alexanderzobnin-zabbix-app successfully

Restart grafana after installing plugins .

路径不同,需要拷贝到自己所安装的路径下

[root@bogon grafana-7.3.5]# cd /var/lib/grafana/

[root@bogon grafana]# ll

total 0

drwxr-xr-x 3 root root 40 Jul 27 16:04 plugins

[root@bogon grafana]# cd plugins/

[root@bogon plugins]# ll

total 4

drwxr-xr-x 8 root root 4096 Jul 27 16:04 alexanderzobnin-zabbix-app

[root@bogon plugins]# cp -r alexanderzobnin-zabbix-app /soft/grafana-7.3.5/plugins-bundled/

[root@bogon bin]# ./grafana-server restart

[root@bogon conf]# pwd

/soft/grafana-7.3.5/conf

[root@bogon conf]# more defaults.ini

# The port to use

= 80

[root@bogon bin]# ./grafana-server restart

----------------------end---------------------

推荐阅读:

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:关于feign对x
下一篇:什么是接口 它有哪些特点
相关文章

 发表评论

暂时没有评论,来抢沙发吧~