Ad Widget

Collapse

how to auto close a logrt problem

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank523
    Junior Member
    • Mar 2024
    • 9

    #1

    how to auto close a logrt problem

    Sorry if this was asked before but I am new to Zabbix and I am wondering if there is a way to auto close a logrt problem after it sends the email notification about it.

    My config looks like this:
    Click image for larger version

Name:	image.png
Views:	418
Size:	35.4 KB
ID:	481268

    I have tried what was stated in this article: https://blog.zabbix.com/close-proble...bix-api/12461/ But it doesn't actually close the problem. The one mentioned in the article says it executed the scrip, but it never closes the problem. The webhook mentioned in the comments I also tried and i get this message: error: cannot execute script: cannot close event 262017101: syntaxerror: invalid json (at offset 1)

    So not sure where I am going wrong. I am currently using Zabbix 6.0 if that helps. Thanks
  • Answer selected by Frank523 at 26-03-2024, 16:51.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    adding " and nodata(/host/item,5m)=0" to expression keeps it in problem state for 5 minutes (after last incoming data). But if it keeps coming and coming and there is no delay, then it most probably will not work out...

    Or add a tag to event and use event correlation, so each new event will close previous one(s). New event tag equals old event tag, or something like that... and "close old events"..

    Comment


    • Frank523
      Frank523 commented
      Editing a comment
      Thank you so much for the info i was able to find where the event correlation is as i was already Tagging the event. So i configured it to close old events and so far so good.
  • Frank523
    Junior Member
    • Mar 2024
    • 9

    #2
    Here is also my item config is you need it.

    Click image for larger version

Name:	image.png
Views:	329
Size:	32.5 KB
ID:	481284

    Comment

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

      #3
      adding " and nodata(/host/item,5m)=0" to expression keeps it in problem state for 5 minutes (after last incoming data). But if it keeps coming and coming and there is no delay, then it most probably will not work out...

      Or add a tag to event and use event correlation, so each new event will close previous one(s). New event tag equals old event tag, or something like that... and "close old events"..

      Comment


      • Frank523
        Frank523 commented
        Editing a comment
        Thank you so much for the info i was able to find where the event correlation is as i was already Tagging the event. So i configured it to close old events and so far so good.
    Working...