Ad Widget

Collapse

Behaviour of last() or diff() function on unreachable device

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • b52
    Junior Member
    • Nov 2019
    • 15

    #1

    Behaviour of last() or diff() function on unreachable device

    Hi

    I created these link-down triggers in zabbix:
    Problem: {Host:net.if.adminstatus[ifAdminStatus.XY].last()}=1 and {Host:net.if.operstatus[ifOperStatus.XY].last(#2)}=1 and {Host:net.if.operstatus[ifOperStatus.XY].diff()}=1
    Recovery: {Host:net.if.adminstatus[ifAdminStatus.XY].last()}<>1 or {Host:net.if.operstatus[ifOperStatus.XY].last()}=1

    My intention with this trigger was to raise an alert, if the interface is admin enabled, has been operational up in the past, and the interface operational state changed. The alert should recover if the interface goes admin down or operational up. I need to evaluate the operational state in the past, because some interfaces are admin enabled and operational down and are not in use yet. Thus they have not been up in the past and I don't care about these interfaces.

    These triggers worked quite well, but today I discovered one drawback. If the device is unreachable while the interface switches from up to down and stays unreachable for some time, I do not get an alert if the device is reachable again and the interface is still down. It seems {Host:net.if.operstatus[ifOperStatus.XY].last(#2)}=1 or {Host:net.if.operstatus[ifOperStatus.XY].diff()}=1 doesn't work if the device has been unrechable for some time.

    So, what is exactly the behaviour of last and diff functions it the device is unreachable? Is there any possibility to get the last "known" value from last(), which means the value before the device was unreachable? I did not find a clear statement in the documentation. Further, do you have an idea how to redesign these link triggers?
    Thank you!
    Holger
    Last edited by b52; 01-03-2021, 16:54.
  • Hernandes Martins
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Apr 2011
    • 900

    #2
    Hello there,

    try test the function nodata, can be more intertesting then last ou diff.
    __

    Att.
    Hernandes Martins - Zabbix Trainer

    Zabbix Brazil Partner - www.luniobr.com

    Zabbix Brazil Community - www.zabbixbrasil.org

    Blog: hernandesmartins.blogspot.com.br

    Skype: hernandss
    Telegram: @MrHernandes

    Español
    Facebook: facebook.com/groups/zabbixlatam
    Telegram: https://t.me/ZabbixEspañol

    Português
    Facebook: facebook.com/groups/zabbixbrasil/
    Telegram: https://t.me/ZabbixBrasil

    Comment

    • b52
      Junior Member
      • Nov 2019
      • 15

      #3
      Hi Hernandes

      The nodata() function is interesting and thus I could catch the situation of an unreachable device in trigger evaluation. But actually it did not solve my problem since I still need to get the last "known" value as the device was reachable the last time.

      Is there any way to get this last "known" value and what is exactly the behaviour of last() and diff() functions it the device is unreachable?

      Thank you!
      Holger

      Comment

      Working...