M
M
Multigame2017-07-03 18:34:53
MongoDB
Multigame, 2017-07-03 18:34:53

How to make zabbix and mongodb friends (authorization problem)?

Good afternoon.
I'm trying to set up mongo monitoring in zabbix, through the template https://share.zabbix.com/databases/mongodb/mongodb...
The problem is that pulling a bash script that logs in and gets status from mongo zabbix gets an authorization error.
I assume that the problem is that instead of a response to a request, we receive a request for a password for the connection. Since the script generates a command like
mongo --host * --port * --authenticationDatabase admin --quiet --username * --password * <<< "db.runCommand( { serverStatus: 1} )"
How to be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
stonemct, 2017-12-25
@stonemct

Good afternoon, have you replaced the asterisks with a real user who has the right to run this command? for example root user or better clusterMonitor he has less rights.
mongo --host 127.0.0.1 --port 27017 --authenticationDatabase admin --quiet --username "OurCreatedUser" --password "PasswordForOurUser" <<< "db.runCommand( { serverStatus: 1} )"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question