Ad Widget

Collapse

Update items in response to trigger?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Silas.Z
    Junior Member
    • Nov 2023
    • 2

    #1

    Update items in response to trigger?

    Hello,

    Is there any possibilty to change values of certain items of a host, if there was a trigger from this host?

    In my case I have active agents which have an item Zabbix agent ping which is my way of tracking the status of the host.
    If this item wasn't updated for 3 minutes, there is a trigger saying the host is not available. But the last values of this item and other status items of this host are still 1 which is an issue for me because I am calling the api to check status of these items.

    So if the host suddenly stop working, the items of this host are still 1, so they will be recognized as working.

    Is there a way to make that if the trigger happens, selected values will be changed to 0.

    I would greatly appreciate any help.​
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    I suppose you are talking about agent.ping item, which does not record anything in case of failure?
    as a workaround.. create a calculated item, which value is calculated every minute with "nodata(/host/agent.ping,3m)" ... So its value will be 1,when there is no data and 0 if there is data for 3m... Kind of opposite for agent.ping own value, but at least you get a value in case of no incoming data... And then you can use that item instead of agent.ping...​

    Comment

    Working...