Mongo Server Health check

820 views
Skip to first unread message

JonW

unread,
May 28, 2010, 2:35:40 PM5/28/10
to mongodb-user
How do I check the health of the mongo server from the command line?
We want to run a bit of code on our load balancers to periodically
check if a mongo server is up and healthy.

thx.

Eliot Horowitz

unread,
May 28, 2010, 2:39:45 PM5/28/10
to mongod...@googlegroups.com
mongostat -n 1
is a good start

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

John Allspaw

unread,
May 28, 2010, 2:51:31 PM5/28/10
to mongod...@googlegroups.com
Is http://host:28017/_status not a reasonable place for a check?  Especially if one can parse the slave or master values in the response?

-j
--
John Allspaw


Eliot Horowitz

unread,
May 28, 2010, 4:20:20 PM5/28/10
to mongod...@googlegroups.com
That would also work well.
Lots of options actually.
Reply all
Reply to author
Forward
0 new messages