Ad Widget

Collapse

Find String in LLD Macro Value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dangelovich
    Junior Member
    • Nov 2016
    • 5

    #1

    Find String in LLD Macro Value

    I have a script that populates {#LOCATION} which is used to create items which end up being like websitepulse.latency[{#LOCATION}] and various related stats.
    I wanted to add some cleverness to a trigger based on the latency that applies a different rule to locations containing the string "china", because they're typically much worse performing.

    Is there a method to perform the equivalent of: {#LOCATION}.str(china)
    This trigger function doesn't work against the macro and so far I haven't thought of a way to do this.

    I want the end result trigger to be along the lines of:
    Code:
    ({Template_WebSite_Discovery:websitepulse.latency[{#WEBPULSE.LOCATION}].last()}>{$REMOTE_TIMEOUT} and {#LOCATION}.str(china) = 0)
    or ({Template_WebSite_Discovery:websitepulse.latency[{#WEBPULSE.LOCATION}].min(2h)>{$REMOTE_TIMEOUT} and {#LOCATION}.str(china) = 1)
Working...