Ad Widget

Collapse

Linux discovered service dependencies.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • olliecampbell
    Junior Member
    • Aug 2024
    • 6

    #1

    Linux discovered service dependencies.


    Hi,

    I'm relatively new at Zabbix but have been working through a lot of the initial setup niggles. I'm a little stumped with the current hurdle....

    I get problem/recovery alerts when I restart Linux hosts for every discovered service on the device.

    This doesn't happen for my windows devices so I'm presuming it's something to do with the "Systemd by Zabbix agent 2" template I've applied. I've dug a little further and because it's a discovery template, I presume it's something to do with the 'Trigger prototypes'.

    It's here that I get a little stuck...
    • I don't know how to apply a dependency at the template level to see if the host has restarted before alerting,
    • I don't really want to manually edit every discovered service across all my linux hosts to set the dependency. I can't use the Mass Update option for discovered services, it errors out.

    Can someone give me some pointers as to what to do?
  • olliecampbell
    Junior Member
    • Aug 2024
    • 6

    #2
    Just bumping to see if anyone can help....

    Comment

    • t00m1G
      Junior Member
      • Jan 2024
      • 26

      #3
      Hey,
      could you please provide a screenshot for better understanding of the issue? And what version of Zabbix do you use?

      Comment

      • jhboricua
        Senior Member
        • Dec 2021
        • 113

        #4
        You don't see it on the Windows side because there's no trigger for a service restart. My suggestion, assuming you cloned the original templates in question:
        1. On the cloned "Linux by Zabbix Agent" template, link the cloned "SystemD" template.
        2. Go to the trigger prototype in question and add a dependency on the "host has been restarted trigger". Should look like this.
          Click image for larger version  Name:	image.png Views:	0 Size:	7.0 KB ID:	489886
        3. This would now apply to all hosts using the cloned "Linux by Zabbix Agent" template.

        Comment

        • olliecampbell
          Junior Member
          • Aug 2024
          • 6

          #5
          Originally posted by jhboricua
          You don't see it on the Windows side because there's no trigger for a service restart. My suggestion, assuming you cloned the original templates in question:
          1. On the cloned "Linux by Zabbix Agent" template, link the cloned "SystemD" template.
          2. Go to the trigger prototype in question and add a dependency on the "host has been restarted trigger". Should look like this.
            Click image for larger version Name:	image.png Views:	0 Size:	7.0 KB ID:	489886
          3. This would now apply to all hosts using the cloned "Linux by Zabbix Agent" template.
          Brilliant thank you. I'll give it a go and report back.

          Comment

          • olliecampbell
            Junior Member
            • Aug 2024
            • 6

            #6

            Well so far after some quick testing (and unlink/clearing and re-applying templates to test hosts) this is working.

            Thank you very much.

            Comment

            • olliecampbell
              Junior Member
              • Aug 2024
              • 6

              #7
              Unfortunately it doesn't seem to quite work....The device was restarted normally during our maintenance window, and the alerts were muted as expected.

              It was then restarted again at 06:50 (or there abouts) and we received this (and only this) for this host...any other pointers?


              Click image for larger version

Name:	Untitled.png
Views:	102
Size:	443.3 KB
ID:	490066

              Comment

              • jhboricua
                Senior Member
                • Dec 2021
                • 113

                #8
                Looks like the system restart alert resolved before the 10 minute mark and that allowed the other alerts to come out. The first question I have is, how important is for you to know if a linux service restarted? As you can see they are informational in nature and most of these are of the generic nature. You should be discovering only the services you truly care about.

                But back to the triggers. They both alert if the uptime for the system or service is less than 10 minutes. Services start after systems so their uptime will always be less than the system on a restart which might cause these false positives. Maybe lower the time value on the service trigger to 5 minutes instead of ten to ensure they are not triggered during the 10 minute window of the system uptime trigger.

                Comment

                Working...