Ad Widget

Collapse

{ITEM.VALUE} returns one line too early on logfiles

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gaspode
    Junior Member
    • Mar 2010
    • 7

    #1

    {ITEM.VALUE} returns one line too early on logfiles

    Hi,

    I've been setting up an action to send me an e-mail whenever a logfile contains "ERROR" by first setting up a logfile item, then a trigger on that

    Code:
    logfile ({hostname:log[/var/log/logfile.log,,"UTF-8",25].regexp("ERROR")}=0 & {hostname:log[/var/log/logfile.log,,"UTF-8",25].nodata(180)}=0)
    and finally an action e-mailing me with the message:

    Code:
    {STATUS}
    
    Monitoring node: {NODE.ID}
    Environment: {PROFILE.LOCATION}
    Host: {HOSTNAME}
    Severity: {TRIGGER.SEVERITY}
    Issue: {TRIGGER.NAME}
    Value: {ITEM.VALUE}
    Started: {EVENT.TIME}
    Additional information:
    {TRIGGER.COMMENT}
    It all works great except whenever it triggers it reports the line of the logfile that happened just before on what the trigger triggered on rather than the actual error message.

    Any idea of what macro I should use in place of {ITEM.VALUE} to get the error message whenever the trigger triggers?
  • gaspode
    Junior Member
    • Mar 2010
    • 7

    #2
    Oh, probably worth mentioning, Zabbix version 1.8.5

    Comment

    • Davidus
      Senior Member
      • Dec 2010
      • 281

      #3
      try {ITEM.LASTVALUE}
      list of built in MACROs can be found here http://www.zabbix.com/documentation/.../config/macros

      Comment

      • gaspode
        Junior Member
        • Mar 2010
        • 7

        #4
        I did, sadly it returns the same value (that is, one row too early).

        Comment

        Working...