gatus
gatus copied to clipboard
Define own shell commands in config.yaml
Describe the feature request
Gives the user the possibility to define own shell commands in the config.yaml
to check the health status of services that either do not have a web server or do not have their own IP address/location.
endpoints:
- name: example
command: "docker ps -q --filter name=cloudflare-ddns"
conditions:
- "[RESPONSE] == 490981d83b15"
(where 490981d83b15
= CONTAINER ID
of cloudflare-ddns container)
Why do you personally want this feature to be implemented?
I noticed the following scenario: I have a few Docker containers. Many of them are in shared docker networks, others are not. I also have containers that have to run via network_mode: host
. This means that they cannot join any docker networks.
Another example: Many Docker images simply do not have a web server. They have neither an internet IP address nor a port (let's take cloudflare-ddns as an example).
What I want to get at: In both scenarios, there is no chance to reach the address range of the containers to check the health status. In scenario 1 there is a problem with different networks (the containers simply cannot "see" each other), in scenario 2 there is simply no suitable endpoint.
However, I could, for example, check the status of a docker container with docker ps -q --filter name=cloudflare-ddns
. If it is running I get the CONTAINER ID
back, if it is not running then I get nothing back.
But to do this, you would have to have the option of executing your own shell commands in config.yaml
and checking the return value.
I'm sure there are other scenarios where this makes sense. The above is just my current scenario: I can't monitor services that don't have a web server or otherwise have an independent IP address that differs from my host system.
How long have you been using this project?
No response
Additional information
No response