nagios-plugins-linux
nagios-plugins-linux copied to clipboard
[Feature Request] check_container. Possibility to filter by name and check status or health or uptime
🚀 Feature Request
Is your feature request related to a problem? Please describe.
Hi, first of all thank you for these plugins, they are really useful.
Currently, the check_container plugin only allows monitoring based on container images (--image) rather than container names. This makes it difficult to track specific containers when multiple containers share the same image but have different configurations or roles. Additionally, there’s no built-in way to check container health status or uptime using this plugin.
Describe the solution you'd like
-
Container Name Support
- Add a new option (e.g.,
-n, --name <NAME>) to filter containers by name. This would allow users to monitor specific containers without relying on the image name. Multiple name options would verify each container
- Add a new option (e.g.,
-
Status Check
- Implement an option (e.g.,
--status status_name) to return the Docker status for one or more containers by name. This would check if a container is in a specific state (as defined by the Docker status).
- Implement an option (e.g.,
-
Health Status Check
- Implement an option (e.g.,
--health) to return the Docker health status for one or more containers by name. This would check if a container is in ahealthyorunhealthystate (as defined by the Docker healthcheck).
- Implement an option (e.g.,
-
Uptime Check
- Add an option (e.g.,
--uptime) to retrieve and validate the uptime of one or more containers by name. Users could specify warning/critical thresholds based on how long a container has been running.
- Add an option (e.g.,
Describe alternatives you've considered
- Using the
--imageoption to approximate container checks by image, but this doesn’t help distinguish between different containers running the same image nor does it allow health or uptime checks. - For docker i'm using github.com/timdaman/check_docker, but it needs a custom install and it is not really maintained