Ad Widget

Collapse

Item key in count expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grenzlaeufer
    Junior Member
    • Nov 2010
    • 24

    #1

    Item key in count expression

    Hallo,

    I had a simple trigger expression in my template which should alert me, when the CPU-load raises above the number of CPU-cores;
    Code:
    {Linux-Server:system.cpu.load[,avg5].last()}>{Linux-Server:system.cpu.num.last()}
    Because the alarm triggered to often I wanted to use the number of CPU-cores in a count statement but neither of this is syntactically ok:
    Code:
    {Linux-Server:system.cpu.load[,avg5].count(#3,{Linux-Server:system.cpu.num.last()},ge)}=3
    {Linux-Server:system.cpu.load[,avg5].count(#3,Linux-Server:system.cpu.num.last(),ge)}=3
    {Linux-Server:system.cpu.load[,avg5].count(#3,last("Linux-Server:system.cpu.num),ge)}=3
    Is is possible to use an item key in such way in a trigger-expression or am I using simply a wrong syntax?
    PS: In this last way it would be great if anyone could post me an working example.

    Thank you in advance!
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    According to the documentation one could think it should work, since simple macros appear to be supported in "Trigger expressions".

    I suggest to create a bug-report to either fix the lack of functionality or to point it out more clearly what exactly is meant by "Trigger expression" there.

    Edit:
    ZBX-9097 asks for a clearer documentation.
    Last edited by BDiE8VNy; 01-12-2014, 19:35.

    Comment

    • Sasha
      Zabbix developer
      • Sep 2007
      • 60

      #3
      Zabbix generaly doesn't support macros inside macros except special cases. For example: {{HOST.HOST}.key.last()}. But these cases are described in the documentation.
      Also Zabbix doesn't support macros in the trigger function's parameters.

      PS from version 2.0.0 Zabbix supports "percpu" as first parameter in system.cpu.load item. I think it can help you. See documentation.
      Last edited by Sasha; 02-12-2014, 16:53.
      ZABBIX Developer
      Riga, Latvia

      Comment

      Working...