Page 1 of 1

Compare Name with FirstDnsName

Posted: Sat Sep 19, 2020 3:04 pm
by gianmaxfactor
Hello guys,

why doesn't this probe work in your mind?

Name: check_name
Type: Function

Error: if(string_substring(device_property("Name"),0,10)=string_substring(device_property("FirstDnsName"),0,10),"",device_property("FirstDnsName"))

Thanks
Gian

Re: Compare Name with FirstDnsName

Posted: Sun Sep 20, 2020 8:22 am
by gianmaxfactor
Hello Gian,

give it a try:

Name: check_name
Type: Function
Agent: default
Available: not(ping(device_property("FirstAddress")))
Error: if(string_find(device_property("Name"),device_property("FirstDnsName"))=0,"",device_property("FirstDnsName"))
Value: string_find(device_property("Name"),device_property("FirstDnsName")
Unit: #

Let me know!
Max

Re: Compare Name with FirstDnsName

Posted: Sun Jan 09, 2022 5:14 pm
by itsupportschulen
some alternative errorline to check DNS missmatch on devices with SNMP activated:

Error: if(string_find(oid("1.3.6.1.2.1.1.5.0"),device_property("FirstDnsName"))=0,"",concatenate("!DNS-Missmatch! --> ",oid("1.3.6.1.2.1.1.5.0")))