MongoDB monitoring errors
Posted: Wed Mar 27, 2013 5:25 pm
Hi all, I am running into issues on some of my MongoDB monitors. (stageutil01 is my Nagios server)
Here is what I have:
define command {
command_name check_mongodb
command_line $USER1$/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$
}
These services don't work'
define service {
use generic-service
hostgroup_name stage_mongo,prod_mongo_8083
service_description Mongo_Free_Connections_8083
check_command check_mongodb!connections!8083!70!80
}
define service {
use generic-service
hostgroup_name stage_mongo,prod_mongo_8083
service_description Mongo_Memory_Usage_8083
check_command check_mongodb!memory!8083!cds!mongo2013p!20!28
}
[root@stageutil01 libexec]# ./check_mongodb.py -H stagedb03 -A memory -P 8083 -u cds -p mongo2013p
CRITICAL - General MongoDB Error: command SON([('authenticate', 1), ('user', u'cds'), ('nonce', u'd9ff7ee0be88d9d8'), ('key', u'd74ef08e18a6d533335be236456035aa')]) failed: auth fails
[root@stageutil01 libexec]# ./check_mongodb.py -H stagedb03 -A connections -P 8083 -u cds -p mongo2013p
CRITICAL - General MongoDB Error: command SON([('authenticate', 1), ('user', u'cds'), ('nonce', u'f24ca43bec7e05dd'), ('key', u'f72e9a2bccf05ee7ed113bade42f762b')]) failed: auth fails
These services work
# Check Replication Lag
define service {
use generic-service
hostgroup_name stage_mongo,prod_mongo_8083
service_description Mongo_Replication_Lag_8083
check_command check_mongodb!replication_lag!8083!15!30
}
# Check Replication Lag
define service {
use generic-service
hostgroup_name stage_mongo,prod_mongo_8083
service_description Mongo_Replication_Lag_Percentage_8083
check_command check_mongodb!replication_lag_percent!8083!50!75
}
[root@stageutil01 libexec]# ./check_mongodb.py -H stagedb03 -A replication_lag_percent -P 8083 -W 50
OK - Not running with replSet
[root@stageutil01 libexec]# ./check_mongodb.py -H stagedb03 -A connect -P 8083 -W 50
OK - Connection took 0 seconds
===========
For those services that fail, I'm assuming that I use DB user name/pwd and not server user/pwd combination.
I also tried to update my command definition to explicitly include user and password as arguments. But still didn't help
Thanks in advance
Here is what I have:
define command {
command_name check_mongodb
command_line $USER1$/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$
}
These services don't work'
define service {
use generic-service
hostgroup_name stage_mongo,prod_mongo_8083
service_description Mongo_Free_Connections_8083
check_command check_mongodb!connections!8083!70!80
}
define service {
use generic-service
hostgroup_name stage_mongo,prod_mongo_8083
service_description Mongo_Memory_Usage_8083
check_command check_mongodb!memory!8083!cds!mongo2013p!20!28
}
[root@stageutil01 libexec]# ./check_mongodb.py -H stagedb03 -A memory -P 8083 -u cds -p mongo2013p
CRITICAL - General MongoDB Error: command SON([('authenticate', 1), ('user', u'cds'), ('nonce', u'd9ff7ee0be88d9d8'), ('key', u'd74ef08e18a6d533335be236456035aa')]) failed: auth fails
[root@stageutil01 libexec]# ./check_mongodb.py -H stagedb03 -A connections -P 8083 -u cds -p mongo2013p
CRITICAL - General MongoDB Error: command SON([('authenticate', 1), ('user', u'cds'), ('nonce', u'f24ca43bec7e05dd'), ('key', u'f72e9a2bccf05ee7ed113bade42f762b')]) failed: auth fails
These services work
# Check Replication Lag
define service {
use generic-service
hostgroup_name stage_mongo,prod_mongo_8083
service_description Mongo_Replication_Lag_8083
check_command check_mongodb!replication_lag!8083!15!30
}
# Check Replication Lag
define service {
use generic-service
hostgroup_name stage_mongo,prod_mongo_8083
service_description Mongo_Replication_Lag_Percentage_8083
check_command check_mongodb!replication_lag_percent!8083!50!75
}
[root@stageutil01 libexec]# ./check_mongodb.py -H stagedb03 -A replication_lag_percent -P 8083 -W 50
OK - Not running with replSet
[root@stageutil01 libexec]# ./check_mongodb.py -H stagedb03 -A connect -P 8083 -W 50
OK - Connection took 0 seconds
===========
For those services that fail, I'm assuming that I use DB user name/pwd and not server user/pwd combination.
I also tried to update my command definition to explicitly include user and password as arguments. But still didn't help
Thanks in advance