Ad Widget

Collapse

trigger prototype, only one alert for multiple items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Takaya
    Junior Member
    • Jan 2024
    • 7

    #1

    trigger prototype, only one alert for multiple items

    Hello,
    On a network device, I have created a LLD with an item prototype that discovers a few number of fans. I get all my objetcs and their associated speed, but when I create a trigger prototype, I wish to check if one or multiple fans are under a certain value by using this expression:
    last(/FAN_r5600/fan_r5600.fan[{#SNMPINDEX}],#3)<30000
    The trigger works and creates 8 alerts if 8 fans are under 30000 rpm. I'd like to have only one alert instead of multiples.
    Could you help me on that please ?
    Thank you!
    Last edited by Takaya; 30-01-2024, 10:07.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    As prototypes are created one by one based on discovered items, you cannot have a prototype of a trigger, what considers more discovered items.. Discovery does not know how many items you want to consider, it may not find enough etc etc..

    PS. last(/host/key,#3) refers to 3rd value from last... not "3 last values"...
    Just a common mistake, people do...​

    Comment

    • Takaya
      Junior Member
      • Jan 2024
      • 7

      #3
      Thanks for the tip, I will use last #3 and last #2 and last if I want the last 3 values in default. So, as today there is no way to calculate a trigger prototype that will only create one alert whatever the number of items returned by the item prototype. A way to get around would be to create an item taking a min on all items prototype min(last_foreach//test[*)]) and create a simple trigger.
      Am I right ?

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        yep, calculated item it is...

        Comment

        Working...