Just as a Bit of Info for nayone working with SNMP Monitoring - May count as Different Topic - But this was where I found the Idea for my fix.
Just had this issue - Had a Site move from Ubiquiti Airmax gear to Unifi - IP range remained, but Devices were changed. Some of them picked up old IP's, but as they already had a device in XMS previously - that device was updated with the new info - so Templates etc remained.
The problem for me is that while my template was searching for the OID - I had been returning null on it - therefor it was just skipping the check... basically (from what I understand). Changing to False has fixed that.
However the code later has another "if-else" with a false - so not quite sure whats going on here... It certainly picks up the Positive, but doesn't appear to drop the negative. But haven't touched this in months - so not the biggest autority on all this.
Heres some code for a look over (Regarding Ubiquiti Airmax 2ghz devices - this is the edited version with the airMaxFrequency - now returning false...) Hope this helps a fellow forum trawler.
Just had this issue - Had a Site move from Ubiquiti Airmax gear to Unifi - IP range remained, but Devices were changed. Some of them picked up old IP's, but as they already had a device in XMS previously - that device was updated with the new info - so Templates etc remained.
The problem for me is that while my template was searching for the OID - I had been returning null on it - therefor it was just skipping the check... basically (from what I understand). Changing to False has fixed that.
However the code later has another "if-else" with a false - so not quite sure whats going on here... It certainly picks up the Positive, but doesn't appear to drop the negative. But haven't touched this in months - so not the biggest autority on all this.
Heres some code for a look over (Regarding Ubiquiti Airmax 2ghz devices - this is the edited version with the airMaxFrequency - now returning false...) Hope this helps a fellow forum trawler.
Code Select
oid_airMaxFrequency = ".1.3.6.1.4.1.41112.1.4.1.1.4.1";
oid_airMaxSSID = ".1.3.6.1.4.1.41112.1.4.5.1.2.1";
querySNMP = CreateSNMPTransport($node);
if (querySNMP == null)
return null;
airMaxFrequency = SNMPGetValue(querySNMP, oid_airMaxFrequency);
if (airMaxFrequency == null)
return false;
/* airMaxSSID = SNMPGetValue(querySNMP, oid_airMaxSSID); */
/* if (airMaxSSID ~= "HQBH") */
/* return false; */
if (airMaxFrequency == "2412" || airMaxFrequency == "2417" || airMaxFrequency == "2422" || airMaxFrequency == "2427" || airMaxFrequency == "2432" || airMaxFrequency == "2437" || airMaxFrequency == "2442" || airMaxFrequency == "2447" || airMaxFrequency == "2452" || airMaxFrequency == "2457" || airMaxFrequency == "2462" || airMaxFrequency == "2467" || airMaxFrequency == "2472") {
return true;
} else {
return false;
}