Zabbix integrated monitoring Alibaba Cloud RDS template sharing

Author: Hope Finance - Martian Liu

Zabbix is ​​a widely used open source monitoring system, and Alibaba Cloud RDS has a large number of users in China. Because of the closed nature of Alibaba RDS, the database cannot be monitored through the standard Mysql monitoring template of Zabbix. It can only be monitored through the cloud monitoring service provided by Alibaba Cloud Monitoring. In this way, centralized monitoring cannot be achieved. Alibaba Cloud's monitoring keeps on cutting back and forth. It is hoped that the financial operation and maintenance team will integrate the monitoring items of Alibaba Cloud RDS through the interface provided by Alibaba Cloud Monitoring, and realize a unified monitoring platform. We use a lot of community products in our daily work, and now we also contribute our templates to give back to the community.

Zabbix monitors Alibaba Cloud rds display Zabbix monitors Alibaba Cloud rds display Zabbix monitors Alibaba Cloud rds display Zabbix monitors Alibaba Cloud rds display

Features:

  1. Connect to Alibaba Cloud rds api to automatically discover Alibaba Cloud's rds server

  2. Automatically add rds to zabbix monitoring list, and obtain monitoring data through api.

  3. Graphical display of data

  4. 48 items of monitoring data supported

  5. Project address: https://github.com/XWJR-Ops/zabbix-RDS-monitor

Environmental requirements:

  1. Since the Alibaba Cloud SDK only supports Python 2.7 and above, this script is developed in the Python 2 environment, so you need to install Python 2.7

Module installation:

/usr/local/python2.7/bin/pip2.7 install aliyun-python-sdk-core aliyun-python-sdk-rds datetime

Instructions:

  1. Get the AccessKey from the Alibaba Cloud console, and modify the ID and Secret in the script

  2. Modify the RegionId in the script

  3. Download scripts and modules

git clone https://github.com/XWJR-Ops/zabbix-RDS-monitor.git
  1. Place the two scripts in the following directories

/etc/zabbix3/script chmod +x /etc/zabbix3/script/* 5. Add the following to zabbix client zabbix-agentd.conf

#rds
UserParameter=rds.discovery,/usr/local/python2.7/bin/python2.7 /etc/zabbix/script/discovery_rds.py
UserParameter=check.rds[*],/usr/local/python2.7/bin/python2.7 /etc/zabbix/script/check_rds.py $1 $2 $3
  1. Restart zabbix-agent

  2. zabbix console import template zbx_AliyunRds_templates.xml

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325472306&siteId=291194637