Ad Widget

Collapse

Macro functions in actions - list please, causing crashes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • YuriV
    Junior Member
    • Feb 2006
    • 16

    #1

    Macro functions in actions - list please, causing crashes

    When using {IPADDRESS} in actions i get this in my zabbix_server.log

    ---------------------------------------
    0005026:20060208:162314 Expression [{11253}=1] cannot be evaluated [Unable to get value for functionid [11253]]
    005026:20060208:162317 Query::select distinct h.ip from triggers t, functions f,items i, hosts h where t.triggerid=12228 and f.triggerid=t.triggerid and f.itemid=i.itemid and h.hostid=i.hostid and i.useip=1
    005026:20060208:162317 Query failed:Unknown column 'i.useip' in 'where clause' [1054]
    005020:20060208:162317 One server process died. Shutting down...
    005020:20060208:162317 ZABBIX server is down.
    ---------------------------------------

    Can anyone provide me with

    A) A solution to the {IPADDRESS} problem
    B) A list of macros that work in this field.

    I would *Love* to be able to print a bunch of host stats when an event is triggered, i.e.

    Date/Time (e-mail can lag)
    CPU Utilization
    HD Utilization etc.

    I can of course check these parameters as an item, but how can i include them in the action e-mail?

    Please and thanks!
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    In functions.c, replase i.useip by h.useip to makeit work. Sorry for the problem! Will be fixed.

    You may use all macros from trigger expressions in messages (subject, message itself), for example: {host:system.system.cpu.load[,avg5].last(0)} or even {{HOSTNAME}:system.system.cpu.load[,avg5].last(0)}.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • YuriV
      Junior Member
      • Feb 2006
      • 16

      #3
      BTW i recompiled, changing the sourcecode as mentioned in your post and its now doing the same thing.


      001082:20060210:092552 Query::select distinct h.ip from triggers t, functions f,items i, hosts h where t.triggerid=12228 and f.triggerid=t.triggerid and f.itemid=i.itemid and h.hostid=i.hostid and i.useip=1
      001082:20060210:092552 Query failed:Unknown column 'i.useip' in 'where clause' [1054]
      001077:20060210:092552 One server process died. Shutting down...
      001077:20060210:092552 ZABBIX server is down.

      Comment

      Working...