Ad Widget

Collapse

Trigger for net.dns.get with macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pvsa
    Junior Member
    • Dec 2024
    • 1

    #1

    Trigger for net.dns.get with macros

    Hi,

    Zabbix team since years. Thanks for building reliable monitoring software open source!

    I started to setup a DNS Integrity Check with an item like net.dns.get[1.1.1.1,{HOST.DNS},A,3,1] combined with preprocessing JSONPath "$.answer_section[0].rdata.a"
    and a trigger last(/mails2/net.dns.get[1.1.1.1,{HOST.DNS},A,3,1],#1)<>"{HOST.IP}" - in the assumption that it would work like example 16 here https://www.zabbix.com/documentation...ers/expression
    But this is not the case.

    Latest data shows the right value, but the trigger does not alert correctly. I've tried text and character and even last and find function without success.
    Another thing that surprises me, was that when importing a pre-generated template - i can use
    Code:
    triggers:
    - uuid: e345742d3a1b4bbe8c2a83a4ac4db28a
    expression: 'find(/Template DNS Integrity Check/net.dns.get[,{HOST.DNS},A,3,1],#1,"like","{HOST.IP}")=0'
    name: 'DNS Mismatch [System DNS]: Forward lookup of {HOST.DNS} returned wrong IP'
    opdata: 'Expected: {HOST.IP} | Got: {ITEM.LASTVALUE}'
    priority: HIGH
    description: 'System DNS resolved {HOST.DNS} to an IP that does not match {HOST.IP}.'
    But i didn't find a way to configure this with the dialog.

    zabbix server 7.4.6 and agent version 2 (7.4.2)

    I'm was not sure it net.dns.get is already officially supported as it is not in the "Standard items" list from item key drop down. Of course i could use the net.dns.record but I think it's worth to ask.

    BrP
Working...