【zabbix】Zabbix监控Mariadb性能状态

本文介绍了如何利用Zabbix内置的Mysql监控模板来监控Mariadb服务性能。首先需要在Mariadb中创建一个无权限的账户供Zabbix登录获取状态。接着在服务器上安装Zabbix Agent,并配置相关文件以包含Mariadb的信息。最后,重启mariadb和Zabbix Agent服务以使监控生效。
摘要由CSDN通过智能技术生成

Zabbix 监控Mariadb 性能状态

Zabbix 内置Mysql 的监控模版,因为Mariadb 和Mysql 两者的相关性,所以这个模版也能用在Mariadb Services上

Mariadb

首先要在mariadb新建一个账户,这个账户不需要有任何权限。这个账户只是用来登入mariadb获取服务状态。

GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY 'passwd';
FLUSH PRIVILEGES;

Zabbix Agent

完成mariadb的用户添加后,还要在mariadb服务器安装Zabbix Agent。通过以下文件可以得知还需要新建一个文件,并在这个文件内填入mariadb的信息:

/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf 

# For all the following commands HOME should be set to the directory that has .my.cnf file with password information.

# Flexible parameter to grab global variables. On the frontend side, use keys like mysql.status[Com_insert].
# Key syntax is mysql.status[variable].
UserParameter=mysql.status
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值