Ad Widget

Collapse

How to show log content in alert

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mgiammarco
    Junior Member
    • Sep 2008
    • 5

    #1

    How to show log content in alert

    Hello,
    I have written an item like this: logrt["/var/log/syslog(\.[0-9])*","(?i)error"]
    A trigger like this:find(/Linux alerts by logs/logrt["/var/log/syslog(\.[0-9])*","(?i)error"],,"iregexp","error.*backup")=1
    It works but I would like to show log content in trigger, how can I do it?
    Thanks,
    Mario
  • Answer selected by mgiammarco at 04-01-2022, 11:07.
    ISiroshtan
    Senior Member
    • Nov 2019
    • 324

    Hi there mate.

    Macros functions allow you to extract data from macros. And built-in macros list you can find macros {ITEM.VALUE} and {ITEM.LASTVALUE}. Combining those two in Trigger Name lets you extract information from actual value.

    Hope it helps.

    Comment

    • ISiroshtan
      Senior Member
      • Nov 2019
      • 324

      #2
      Hi there mate.

      Macros functions allow you to extract data from macros. And built-in macros list you can find macros {ITEM.VALUE} and {ITEM.LASTVALUE}. Combining those two in Trigger Name lets you extract information from actual value.

      Hope it helps.

      Comment

      • mgiammarco
        Junior Member
        • Sep 2008
        • 5

        #3
        Thank you I was getting crazy using macro {ITEM.LOG} when the right one was {ITEM.LASTVALUE} !

        Comment

        Working...