System Environment:centos7.2zabbix-3.4
first, the principleView the status of MongoDB with the following command: Echo "Db.serverstatus ()" | MONGO Adminecho "Db.serverstatus (). Opcounters" | MONGO Admin
Second, the configuration process
1. Add the MongoDB path to the system environment:Vim/etc/profileexport Path=/usr/local/mongodb/bin: $PATH Save Exit Source/etc/profile
2. Add mongodb corresponding key file:Cat >/etc/zabbix/zabbix_agentd.conf.d/userparameter_mongodb.conf << enduserparameter=mongodb.status[*],/ Bin/echo "Db.serverstatus (). $" | /usr/bin/mongo Admin | grep "\<$2\>" | Awk-f: ' {print $$2} ' |awk-f, ' {print $$1} ' end restart AGENTD service:/etc/init.d/zabbix-agentd restart
3. Download the MongoDB Template:Access in Browser:https://github.com/linux503/zabbix_temple/blob/master/Templates_Mongodb.xml Click "Clone or Download"-"Download ZIP" to download all the template XML files to the Windows disk:
4. Import the Zabbix Template:Click "Select File"-"Import the MongoDB template XML file:
5. Add host to Template:
6. "Configuration"-"template"-"MongoDB template"-" monitoring Item "-"All selected monitoring item "--" batch update " --" type: Zabbix client "--" update "
7. Add to the aggregation graph:
:
ZABBIX 3.0 Monitoring MongoDB performance "OK"