B
B
bengur22022-04-12 17:57:25
Docker
bengur2, 2022-04-12 17:57:25

How to monitor the status of containers?

625592a50715f461616313.png
Finally deployed all the containers on the virtual machine

. What are the tools so that if one of the containers falls, it will ping the admin (me)?
A dashboard is not required, a webhook is enough.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Sokolov, 2022-04-13
@bengur2

If without external tools with a free trial and money for use,
you can receive a live stream of events through the Docker API . Filter only those of interest in it, for example, container=<string>when the name of the container of interest is known and constant.
But in general, take a closer look at the option restart- let the container restart automatically after a fall. And maybe, at startup, it somehow sends “Good morning, admin!”

M
mureevms, 2022-04-13
@mureevms

Write a script that checks the running time of each container in a cycle and if it is less than 5 minutes, send an email / web hook / something else, put the script in cron to execute every 4 minutes

V
Vitaly Karasik, 2022-04-13
@vitaly_il1

https://www.site24x7.com/ can also monitor URLs, there is also an agent that can monitor processes and containers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question