Ad Widget

Collapse

Trigger using perf_counter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pontus
    Junior Member
    • Sep 2024
    • 3

    #1

    Trigger using perf_counter

    I have an item defined as
    perf_counter[\Process(fmscwpc)\Thread Count]
    and a trigger defined as
    last(/host.domain/perf_counter[\Process(fmscwpc)\Thread Count])=0

    For some reason this does not trigger a problem when the agent can't get any perf counter as ZBX_NOTSUPPORTED: Cannot obtain performance information from collector.

    Shouldn't this trigger a problem?I have an item defined as
  • ISiroshtan
    Senior Member
    • Nov 2019
    • 324

    #2
    No, it should not. The last() function evaluates data, when item switches into unsupported state it does not generate any new values -> trigger would not be reevaluated -> trigger will not fire.

    You would want to use nodata() function instead. It will fire if no new values for item received for X amount of time. Set it like
    nodata(/host.domain/perf_counter[\Process(fmscwpc)\Thread Count], X)=1
    , where X is double or triple or the collection time of item or more (so if item collets every 60 seconds, set X to 120 at least, meaning item failed at least two consecutive checks and it's not just a restart of service or some other brief hiccup)
    You can set it as alternative condition to existing one, so something like
    last(/host.domain/perf_counter[\Process(fmscwpc)\Thread Count])=0 or nodata(/host.domain/perf_counter[\Process(fmscwpc)\Thread Count], 5m)=1

    Comment

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

      #3
      Or add preprocessing "check for not supported value", Custom on fail -> set value to 0. In that case, item will not tuirn to not supported and your trigger will work also.

      Comment

      Working...