Ad Widget

Collapse

Docker Container Monitoring (Discovery Auto Disabling Triggers)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chrisfromdevso
    Junior Member
    • Aug 2025
    • 3

    #1

    Docker Container Monitoring (Discovery Auto Disabling Triggers)

    I am trying to configure Zabbix to monitor docker containers. I have a couple running as a test and I want to have triggers and alerts if certain contains aren't running for some reason. I could see the each container auto discovered and they had various items and triggers for health status and running status etc so all seemed good so far.

    However, when I then try and stop a container to check that a problem is triggered nothing happens, and then when you go back to the items/triggers everything appears to get disabled with a note saying "The item is not discovered anymore and has been disabled, will be deleted in 6d 23h 42s"

    Am I missing something as this doesn't make sense to me, zabbix auto detects a container has triggers for health status and running status, but when you stop it, it no longer is discoverable so disables all triggers doesn't seem right. Is there a way to do this a different way, or is there a way to disable discovery once its been discovered, so it doesn't get auto deleted.

    If this is the expected behaviour, the auto disabling and deletion I don't think should happen as soon as a container is stopped, it should be only if its been stopped for some period of time. If its been stopped for a period of time and maybe if the trigger has been disabled, then it should auto delete to avoid this kind of problem.

    Thanks
    Chris
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4806

    #2
    I think (I am not using that docker template myself), that shutting down a container, is totally normal behaviour and template just considers it as changed situation, no need to monitor that one any more etc. If you could kill that container somewhat abnormally, then it might trigger something..

    Comment

    • chrisfromdevso
      Junior Member
      • Aug 2025
      • 3

      #3
      Originally posted by cyber
      I think (I am not using that docker template myself), that shutting down a container, is totally normal behaviour and template just considers it as changed situation, no need to monitor that one any more etc. If you could kill that container somewhat abnormally, then it might trigger something..
      I ended up creating a trigger like below, works consistently and avoids the weirdness of the auto discovery

      Click image for larger version

Name:	image.png
Views:	98
Size:	113.5 KB
ID:	506299

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4806

        #4
        Thats the item, not trigger.. Just as it says in top left corner..

        Comment

        • chrisfromdevso
          Junior Member
          • Aug 2025
          • 3

          #5
          Originally posted by cyber
          Thats the item, not trigger.. Just as it says in top left corner..
          Very true, missed that one, its the item that's useful in this case though, the trigger is the result of this item == 0 means the container is not running. but for completeness the trigger is below
          Click image for larger version

Name:	image.png
Views:	92
Size:	57.6 KB
ID:	506366

          Comment

          Working...