Ad Widget

Collapse

One trigger for multiple keys - systemd

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • valdoltra
    Junior Member
    • Feb 2023
    • 1

    #1

    One trigger for multiple keys - systemd

    Hey guys,

    here's the thing. I need to monitor only certain services on a linux host. I created multiple keys:
    - first I created a key: systemd.unit.is-active[nameofservice]
    - I configured zabbix_agent2.conf on host and added: systemd.unit.is-active[*],systemctl is-active --quiet '$1' && echo 1 || echo 0 (I found this on one of the forums)

    I didn't use systemd template because it is fully automated and it is monitoring services I don't need to monitor. I only need to monitor 42 services ran by our company's application.

    So my question is, is there a way to create a trigger for all 42 items and not doing it for each and every service separately. I only need to be notified if the status changes to 0.

    Thanks for helping me out!

    Cheers,
    Vlad

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

    #2
    You can edit that template, what you don't want to use, to monitor only those services that you need... Hint: macros in template...

    Comment

    Working...