Compare Name with FirstDnsName

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

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

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”)))