Page 1 of 1

Mongodb monitoring without username & password

Posted: Wed Apr 18, 2018 11:44 am
by lrnnetops
Hi Team,

Server OS = CentOS release 6.8 (x86_64)
Nagios XI Version = 5.4.2

We are testing our Mongo DB monitoring in our test environment. for testing we haven't set any username & password to connect mongo DB instance.

While configuration through Configuration Wizard for monitoring MongoDB Server we kept username & password blank, but configuration wizard not proceeding without username & password.

We tested monitoring without username & password with custom plugin. URL: https://github.com/mzupan/nagios-plugin-mongodb

Can you help us how can we bypass MongoDB Server configuration wizard without putting username & password.

Thanks,

Re: Mongodb monitoring without username & password

Posted: Wed Apr 18, 2018 12:12 pm
by lmiltchev
You could enter a "fake" username and password in order to proceed, however you would need to modify the services in the CCM in order for this to work. Our wizard uses check_mongodb_database command, that uses check_mongodb.py plugin. The "-u" and "-p" flags are passed to the command by default, so you will need to create a custom command that doesn't include these flags, and remove the credentials from the $ARG5$ and $ARG6$ fields.

This involves a lot of manual tweaking, so maybe you would be better off just creating the host/services manually by following the steps, outlined in the document below:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf