Ad Widget

Collapse

Trigger for DNS probe check

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • surgeon_2022
    Member
    • Apr 2022
    • 56

    #1

    Trigger for DNS probe check

    Hi all,

    I have a DNS check done by zabbix-agent: net.dns.record[172.16.0.8,test.org,A,2,1,udp]

    I need to create a trigger to alarm if last 3 in a raw result does not match replied IP address. I created following trigger: find(/DNS check/net.dns.record[172.16.0.8,test.org,A,2,1,udp],#3,"like","172.16.0.7")=0. But it fires straightway​ after getting wrong response.

    What am I doing wrong? How to achieve my goal?

    Thanks in advance
    Last edited by surgeon_2022; 26-05-2023, 14:55.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4806

    #2
    You don't seem to do anything wrong...
    I tested this with trapper item to be able to manipulate values. Works as expected... Trigger fires after 3rd time, when pattern is not found, not after first... tried also with count(/host/item,#3,"like","pattern")=0 .... which performs exactly same...

    v 6.0.16...

    Comment

    • surgeon_2022
      Member
      • Apr 2022
      • 56

      #3
      Originally posted by cyber
      You don't seem to do anything wrong...
      I tested this with trapper item to be able to manipulate values. Works as expected... Trigger fires after 3rd time, when pattern is not found, not after first... tried also with count(/host/item,#3,"like","pattern")=0 .... which performs exactly same...

      v 6.0.16...
      Hi, thanks for update. I need ot upgrade my zbx from 13 to 16 build and test it. Btw, what type of agent are you using, agen or agent2? In my case I have agent2 installed

      Comment

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

        #4
        For a trigger it is quite irrelevant, which way the data comes in. I was just using trapper items with zabbix_sender for testing, so agent type and version are irrelevant here... It was just easier for me to submit the data I needed, instead of creating real dns checks and wait for them to never fail..

        Comment

        • surgeon_2022
          Member
          • Apr 2022
          • 56

          #5
          Originally posted by cyber
          For a trigger it is quite irrelevant, which way the data comes in. I was just using trapper items with zabbix_sender for testing, so agent type and version are irrelevant here... It was just easier for me to submit the data I needed, instead of creating real dns checks and wait for them to never fail..
          I just use incorrect IP in the trigger config to check against response for trigger to fire.

          Comment

          Working...