Ad Widget

Collapse

CPU trigger based on number of cores

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dreas
    Member
    • Aug 2007
    • 89

    #1

    CPU trigger based on number of cores

    Hi all,

    We have different servers with different CPUs. Based on the number of cores of the machines I'd like to set the trigger for system.cpu.load[,avg5]. Is there any trick for that without manually defining the trigger per server?
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    You can't do conditionals in a trigger, but you might be able to get there using dependencies.

    TrgA = CPU cores =1 or =2
    TrgB = CPU cores =3 or =4
    TrgC = CPU cores >4

    TrgHighA = TrgA and Procload > 2
    TrgHighB = TrgB and Procload > 4
    TrgHighC = TrgC and Procload > 5

    It's kinda messy, but with the subject and trigger text being the same the user shouldn't know the difference.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    Working...