nightw / mikoomi-zabbix-mongodb-monitoring

Forked from the mikoomi-templates project from here: https://code.google.com/p/mikoomi but only containing the MongoDB Zabbix Plugin
MIT License
58 stars 68 forks source link

php-script: failed: 56 #21

Open Piknik1990 opened 7 years ago

Piknik1990 commented 7 years ago

Hello!

Thank for you Template of Zabbix.

I try install his in the CentOS 7 and Zabbix 3.2.

# yum install php-devel php-pear gcc make git openssl-devel
# pecl install mongo
# vi /etc/php.ini
...
extension=mongo.so

# cd /usr/lib/zabbix/externalscripts
# wget https://raw.githubusercontent.com/nightw/mikoomi-zabbix-mongodb-monitoring/master/mongodb-3.2/mikoomi-mongodb-plugin-32.sh
# wget https://raw.githubusercontent.com/nightw/mikoomi-zabbix-mongodb-monitoring/master/mongodb-3.2/mikoomi-mongodb-plugin-32.php

# chmod 755 mikoomi-mongodb-plugin-32.*

# vi /etc/crontab
...
ZABBIX_HOSTNAME=$(hostname -f)
* * * * * root /usr/lib/zabbix/externalscripts/mikoomi-mongodb-plugin-32.sh -z $ZABBIX_HOSTNAME

Download https://raw.githubusercontent.com/nightw/mikoomi-zabbix-mongodb-monitoring/master/mongodb-3.2/MongoDB_Plugin_template_export-32.xml

*Import Template*

But Web-Graphics view of "No Data" and cron logging follow messeges: Subject: Cron root@localhost /usr/lib/zabbix/externalscripts/mikoomi-mongodb-plugin-32.sh -z $ZABBIX_HOSTNAME Content-Type: text/plain; charset=UTF-8 Auto-Submitted: auto-generated Precedence: bulk X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: <ZABBIX_HOSTNAME=$(hostname -f)> X-Cron-Env: X-Cron-Env: X-Cron-Env: Message-Id: 20170712092201.D0EA2C8FF54@localhost.localdomain Date: Wed, 12 Jul 2017 12:22:01 +0300 (MSK)

mikoomi-mongodb-plugin-32.php: Successfully connected to mongoDB using connect string localhost:27017 mikoomi-mongodb-plugin-32.php: O: zabbix_sender [3713]: DEBUG: answer [{"response":"success","info":"processed: 0; failed: 56; total: 56; seconds spent: 0.000572"}] mikoomi-mongodb-plugin-32.php: O: info from server: "processed: 0; failed: 56; total: 56; seconds spent: 0.000572" mikoomi-mongodb-plugin-32.php: O: sent: 56; skipped: 0; total: 56 0

# php -v
PHP 5.4.16 (cli) (built: Nov  6 2016 00:29:02) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
# mongo -version
MongoDB shell version: 2.6.12

Tall me, what is failed in my zabbix-system?

nightw commented 7 years ago

The Zabbix server says that all the 56 values which were sent in were wrong in some way. I only have guesses about the problem: