Ad Widget

Collapse

How to trigger on web.page.regexp connection error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brambo
    Senior Member
    • Jul 2023
    • 245

    #1

    How to trigger on web.page.regexp connection error

    I got an Active Agent which retrieves data for a LLD rule
    Code:
    web.page.regexp[http://localhost,/api,8080,^({.*)$,,]
    And that LLD is working just fine, however when I stop the process which generates the API data I get the following error on the item:
    Code:
    Cannot get content of web page: Get "http://localhost:8080/api": dial tcp :0->[::1]:8080: connectex: No connection could be made because the target machine actively refused it.
    The error is expected but how can I trigger on the "nodata" issue
    I tried it with the following trigger but nothing happens. (I guess the error message is still data? )
    Code:
    nodata(//web.page.regexp[http://localhost,/api,8080,^({.*)$,,],2)=1
    Could it be related that when you don't save any history this last 2 data points isn't working?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    No, that error message is not the data. It will not be saved as data. it is saved as error, why your item is in "not supported" state.

    nodata(//item,2) it is essentially a no data for 2 seconds.. nodata does not take "count of checks" as paramater. and that number should not be less than 30s, as thats the time when history syncer calculates it, every 30 seconds... So you should set this to double the checking time maybe?

    Comment

    Working...