Ad Widget

Collapse

Display historical data for items in trigger notification

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • klaauser
    Junior Member
    • Apr 2016
    • 18

    #1

    Display historical data for items in trigger notification

    Hi -

    I'm looking to display the last say 5 values that for an Item in the trigger notification email that goes past. The 'Macros supported by location' page says that simple macros are supported, and I'm trying to do something like this:
    Code:
    {{HOST.NAME}:{ITEM.KEY}.last(#1)}
    But all it ends up resolving to is {SRV-DC0:service.info[VMTools,state].last(#1)} (note that it doesn't actually get the last value.

    Not sure if this is even possible, or if there's a better way to go about this, but it would be really helpful, specifically in terms of forecast triggers (on hard drive space, for example) to know the last values reported.

    Thanks,
    Kyle
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    Originally posted by klaauser
    Hi -

    I'm looking to display the last say 5 values that for an Item in the trigger notification email that goes past. The 'Macros supported by location' page says that simple macros are supported, and I'm trying to do something like this:
    Code:
    {{HOST.NAME}:{ITEM.KEY}.last(#1)}
    But all it ends up resolving to is {SRV-DC0:service.info[VMTools,state].last(#1)} (note that it doesn't actually get the last value.

    Not sure if this is even possible, or if there's a better way to go about this, but it would be really helpful, specifically in terms of forecast triggers (on hard drive space, for example) to know the last values reported.

    Thanks,
    Kyle

    try
    Code:
    {{HOST.NAME}:{ITEM.KEY}.{ITEM.LASTVALUE}

    Comment

    • klaauser
      Junior Member
      • Apr 2016
      • 18

      #3
      Yeah I know that that will work, but I'm trying to get, for example, the last FIVE values, and you can't do .lastvalue(#2) or something.

      Comment

      • batchenr
        Senior Member
        • Sep 2016
        • 440

        #4
        Originally posted by klaauser
        Yeah I know that that will work, but I'm trying to get, for example, the last FIVE values, and you can't do .lastvalue(#2) or something.
        {ITEM.LASTVALUE<1-9>}
        try

        {ITEM.LASTVALUE1}.{ITEM.LASTVALUE2}.{ITEM.LASTVALU E3} etc...

        Comment

        • glebs.ivanovskis
          Senior Member
          • Jul 2015
          • 237

          #5
          Originally posted by klaauser
          Hi -

          I'm looking to display the last say 5 values that for an Item in the trigger notification email that goes past. The 'Macros supported by location' page says that simple macros are supported, and I'm trying to do something like this:
          Code:
          {{HOST.NAME}:{ITEM.KEY}.last(#1)}
          But all it ends up resolving to is {SRV-DC0:service.info[VMTools,state].last(#1)} (note that it doesn't actually get the last value.

          Not sure if this is even possible, or if there's a better way to go about this, but it would be really helpful, specifically in terms of forecast triggers (on hard drive space, for example) to know the last values reported.

          Thanks,
          Kyle
          You mixed up {HOST.NAME} with {HOST.HOST} (and probably old deprecated {HOSTNAME}). Valid examples are:
          Code:
          {{HOST.HOST}:{ITEM.KEY}.last(#1)}
          {{HOST.HOST}:{ITEM.KEY}.last(#2)}
          {{HOST.HOST2}:{ITEM.KEY}.last(#3)}
          {{HOST.HOST}:{ITEM.KEY3}.last(#4)}
          {{HOST.HOST4}:{ITEM.KEY5}.last(#5)}
          {{HOST.HOST}:{ITEM.KEY}.sum(#10)}
          ...

          Comment

          • klaauser
            Junior Member
            • Apr 2016
            • 18

            #6
            This did it! Thank you so much!


            Originally posted by glebs.ivanovskis
            You mixed up {HOST.NAME} with {HOST.HOST} (and probably old deprecated {HOSTNAME}). Valid examples are:
            Code:
            {{HOST.HOST}:{ITEM.KEY}.last(#1)}
            {{HOST.HOST}:{ITEM.KEY}.last(#2)}
            {{HOST.HOST2}:{ITEM.KEY}.last(#3)}
            {{HOST.HOST}:{ITEM.KEY3}.last(#4)}
            {{HOST.HOST4}:{ITEM.KEY5}.last(#5)}
            {{HOST.HOST}:{ITEM.KEY}.sum(#10)}
            ...

            Comment

            Working...