zabbix监控 + grafana

zabbix监控 + grafana

1. Grafana简介

Grafana是一个开源的数据可视化和监控平台。它提供了丰富的图表、图形和面板,可用于实时监控和分析各种数据源,包括指标、日志、事件和数据库等。

Grafana支持多种数据源,包括常见的时序数据库(例如InfluxDB、Prometheus)、关系型数据库(例如MySQL、PostgreSQL)、日志数据(例如Elasticsearch、Splunk)和其他API服务。使用Grafana,您可以轻松地连接到这些数据源,并在直观易懂的仪表板中创建、编辑和共享视觉化图表。

Grafana具有丰富的图表和面板配置功能,可以自定义图表样式、时间范围、警报条件和交互式功能。它还支持多个用户和角色管理,可以根据需要设置不同的用户权限。

Grafana是一个非常受欢迎的工具,广泛应用于软件开发、系统管理、网络监控、物联网和云端监控等领域。它的可扩展性和灵活性使得用户能够快速构建强大的监控和数据分析解决方案。

2. Grafana部署

主机名系统版本ip地址主机zabbix版本Grafana版本
kiwi.server.comCentOS8192.168.234.33服务端zabbix-6.4.6grafana-enterprise-10.1.2
kiwi111.client.comCentOS8192.168.234.22客户端zabbix-6.4.6grafana-enterprise-10.1.2

注:zabbix监控服务部署详细步骤见 Zabbix监控服务部署zabbix监控agent部署步骤,在此不多做赘述。

Grafana官网

Grafana官方文档下载教程

2.1 下载Grafana
[root@kiwi ~]# sudo yum install -y https://dl.grafana.com/enterprise/release/grafana-enterprise-10.1.2-1.x86_64.rpm

································略


  xorg-x11-font-utils-1:7.5-41.el8.x86_64                                                  
  xorg-x11-server-utils-7.7-27.el8.x86_64                                                  

Complete!
2.2 启动grafana服务并设置开机自启
[root@kiwi ~]#  systemctl enable --now grafana-server
Synchronizing state of grafana-server.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable grafana-server
Created symlink /etc/systemd/system/multi-user.target.wants/grafana-server.service → /usr/lib/systemd/system/grafana-server.service.
[root@kiwi ~]# 


## grafana服务用的是3000端口
[root@kiwi ~]# ss -antl
State     Recv-Q    Send-Q       Local Address:Port        Peer Address:Port    Process    
LISTEN    0         128                0.0.0.0:22               0.0.0.0:*                  
LISTEN    0         128                0.0.0.0:10050            0.0.0.0:*                  
LISTEN    0         128                0.0.0.0:10051            0.0.0.0:*                  
LISTEN    0         128              127.0.0.1:9000             0.0.0.0:*                  
LISTEN    0         128                      *:80                     *:*                  
LISTEN    0         128                   [::]:22                  [::]:*                  
LISTEN    0         2048                     *:3000                   *:*                  
LISTEN    0         80                       *:3306                   *:*   
2.3 下载zabbix插件
[root@kiwi ~]# grafana-cli plugins install alexanderzobnin-zabbix-app
✔ Downloaded and extracted alexanderzobnin-zabbix-app v4.4.1 zip successfully to /var/lib/grafana/plugins/alexanderzobnin-zabbix-app

Please restart Grafana after installing or removing plugins. Refer to Grafana documentation for instructions if necessary


## 重启服务
[root@kiwi ~]# systemctl restart grafana-server
2.4 在web端进行配置zabbix插件

image-20230928182339474

注:如果密码不为admin则为Admin,反之亦然,登陆进去之后会让你更新密码。

启用zabbix插件

image-20230928185444157

点击zabbix

image-20230928185519249

将它启用

image-20230928185545461

image-20230928185555294

添加zabbix插件

image-20230928182436637

image-20230928182456054

点击进去

image-20230928182509148

image-20230928182627252

image-20230928183059879

这样就是配置好了

image-20230928183250976

返回上一级,看到有这就表示创建成功

image-20230928183408162

2.5 在web端添加监控图表

点击Dashboards

image-20230928183643078

image-20230928183717853

image-20230928183730780

选择zabbix

image-20230928183750966

image-20230928184006269

image-20230928184033516

可以看到已经有数据了

image-20230928184053552

配置完成

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值