SNMP - PDU Sensor

Version 1

    The other day I was going through Hardware Models table trying to clean-up any old records that weren't necessary anymore. Models associated to multiple unrelated classes, duplicates, the whole nine yards of it all; and then I saw "APC null." Not only did I see it once, I saw it dozens of records like this. I ran to the PDU section and grouped by Model ID, and yep, there truly were multiple records of the same bad name. Thinking it was so weird error from the previous Discovery/CMDB admin, I condensed down all the CIs onto one "APC null" and removed all other records.


    "I'll fix the real problem another day," I told myself.


    Two weeks later, I went back into the Model table to fix a couple of things and BAM! 40+ records of "APC null" were back! Now I'm thinking something is really wrong here with the PDU sensor. So I take a quick glance at it and try to read into what it's doing: pulling values and shoving them right into the CI without any thought that SNMP doesn't always send every thing every single time. Looking at the audit history of one of the PDU records: a massive series of null to a value to null again on almost a dozen fields, including Model ID.


    So, 20 minutes later of adding if (notNil) statements and testing I haven't had any more issues. Could it be condensed down into something cleaner, sure, but it works well for now. I hope this helps someone else out seeing the same problem.