Remote mongodb host

Sar Haidar <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <[email protected]>
I’m trying to use monit to verify the connection between a host running monit and another host running mongodb. I was successfully able to write a rule to do that for mysql, however, when I try it for mongodb, it fails and I’m not sure what the correct syntax should be. This is what I have so far:

check host mongodb-host with address mongodb-server.example.com
if failed port 27017 protocol mongodb username “monit" password “test" then exec "/bin/sh -c /usr/local/bin/slack.sh”

When I run monit -t I get a syntax error ‘username’

I tried a few different ways and nothing seemed to work. Only way I was able to make it work was by not using a username and password, but that only works in a test case and not anywhere else.

-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
smime.p7s (application/pkcs7-signature, 1.8 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.