Mongodb health checks via HTTP with auth enabled

854 Views Asked by At

I am looking to add a check in monit to test if the server can ping the remote mongodb instance which has auth enabled. Is it possible to do a standard http check like this with mongo?

1

There are 1 best solutions below

0
On

What I have ended up doing is using the inbuilt ping inside monit like below.

check host <%= mongoHost %> with address <%= mongoHost %>
        if failed icmp type echo count 3 with timeout 5 seconds
                then alert