Simple HTTP/TCP health check for MongoDB

后端 未结 3 413
轻奢々
轻奢々 2021-02-05 11:16

I need to create a Health Check for a MongoDB instance inside a Docker container.

Although I can make a workaround and use the Mongo Ping using the CLI, the best option

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-05 12:00

    One solution is to use a minimal MongoDB client written in a script language for which there is an interpreter in your container.

    For example, here is a zero-dependency one in Python: mongo_ping_client.py

提交回复
热议问题