Forum Discussion

Lewis_Beard's avatar
30 days ago
Solved

Which PropertySource tags categories with "snmp"?

I've got some devices that are definitely "snmp" devices but LM isnt tagging them with "snmp" in system.categories. I can manually do it, or set it on a folder for them to inherit, but I am in a situation where I'll need to mix it with some other devices and I dont want to have the others inherit that, just because I want to leave them untouched.

This raised the question as to where the "snmp" gets set in system.categories .... I expected to find it in the device basicInfo or something similar, but I dont think it gets set there. I've looked through tons of propertysource code and I'm just not finding it.

Wondering if someone could fast track me? I'll prob need to write a custom one that tags just these devices somehow, but need to see what the typical logic is for applying it.

Thanks!

5 Replies

    • Joe_Williams's avatar
      Joe_Williams
      Icon for Expert rankExpert

      Mike is correct, almost all if not all of the ways the snmp category gets added is via the SNMP SysOID Maps. I would suggest creating your own or a PropertySource that works off of something you can key off of to apply it.

  • I feel silly. I've looked at that page before, and completely forgot about it. Thanks Mike! And thanks Joe for the response also.

    I may have missed it, but reading that page, I'm not sure whether or not the first OID Map match is the only one that happens? Or if you can get multiple hits on that table? Or should I try to go as deep and unique as I can for the gear I'm interested in adding to the MAP?

    I'm also wondering, from reading the top of the document, it seems that sysinfo gets pulled and set on the resource, even if nothing else gets set from the map. So I suppose that adding categories via a propertySource could safely be used as well?

    What happens if a propertySource adds categories X,Y but then the OID Map matches something already that would add X and Z? I'm not sure if there is a doc page somewhere that would discuss these interactions.

    Thanks for the help!

    • Stuart_Weenig's avatar
      Stuart_Weenig
      Icon for Mastermind rankMastermind

      The most specific regex match is the one that gets used. If a sysoid matches two, but one matches more of the sysoid, the one that matches more gets used.

      There are a lot of "addCategory_" property sources that also add to the system.categories.

      The sysoid maps are applied first, then any propertysources that add categories just add to the categories already there (unlike every other property a propertysource adds). System.categories is it's own duck. If a sysoid map adds X and Z and a propertysource adds X and Y, the device would end up with X, Y, and Z.

  • I have one more follow-up question, if people don't mind. I read through the OID Map reference that Mike linked. The docs say that the match will happen on the highest in-common OID, if a deeper one is found.

    Someone at some point put \.1\.3\.6\.1\.4\.1\.664\.1 on, back before the audit logs end, so I dont know who, but we have 7k devices that picked up the category the user put in the map. But when I go to any of those devices, none of them have .1.3.6.1.4.1.664.1 or anything deeper. They all have .1.3.6.1.4.1.664.5 and deeper. Why would ANY of the devices match then?

    I mean that if I walk any of the devices from .1.3.6.1.4.1.664, all the responses are under .5 on that instead of .1 so I have no idea how it could match. There are no higher level OIDs in that sequence that it could be matching on.

    I realize thats something you may not be able to help with since its specific to our portal. I'm just wondering if I may be misinterpreting the docs. Because at this point I have 7k devices that somehow picked up the category on .1.3.6.1.4.1.664.1 but they dont technically match. :)

    Anyway, insights or not, thanks to everyone for all the help.