Ad Widget

Collapse

How to use item preprocessing regex to enrich trigger name?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gijs007
    Member
    • Oct 2017
    • 40

    #1

    How to use item preprocessing regex to enrich trigger name?

    I'd like to use the item preprocessing to capture a certain string from a eventlog.
    How can I add this capture group to my trigger name?

    Example:

    Click image for larger version

Name:	afbeelding.png
Views:	482
Size:	24.1 KB
ID:	460974
    task "updating application xyz"
    . Should result in a trigger name that contains: task updating application xyz.

    Regex:
    Code:
    task\s+"([^"]+)"
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    You cannot do it directly, as item preprocessing has nothing to do with the trigger or its name. Item preprocessing takes your check result and preprocesses it and stores the data what is a result of all that preprocessing...

    Trigger name can use macros like {ITEM.VALUE} or {ITEM.LASTVALUE} which refer to the value(s) of the item(s) that is used in trigger expression... So first you need to construct a suitable trigger (based on your item values) and then you can use them...

    Comment

    Working...