This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Changing polling method from ICMP to SNMP using SWIS

Hi All,

Working on a PowerShell script to import nodes into NPM but due to a business need i need to add them as ICMP and then update to SNMP once credentials have been added to the device.

Within SWQL studio i can update the ObjectSubType, Community and SNMPVersion for a V2 device but looking for a SWIS call to do this in my script, V3 seems a little more tricky.

Has anyone done this and can share some pointers or code that would help?

Thanks

  • Haven't built it out to do this before, but to pull this off (assuming the application doesn't just choke on it) you'll probably need to be making changes on orion.nodes, orion.nodesettings, and orion.pollers at the very least.

    Check all those tables for a node currently on ICMP, change it to snmpv3, figure out all the bits that changes and what you'll need to do to duplicate those changes.  Hope you don't miss anything and aren't testing it in prod emoticons_wink.png

    Good luck!

  • Thanks,

    Been playing with this on a test system today and cracked the changes for SNMP V2 although was using SWQL studio to updates the necessary tables rather than swis. SNMP V3 is my next task and then need to crack the PowerShell side of it so I can build it into my scripts.

    The business want the device monitored asap with basic ping being an acceptable day 1 solution but once credentials etc have been established switch it to full SNMP, last resort is delete and re-add it but trying for a convert first.

    When updating the node I did discover that you can add the pollers without harm but enabling hardware health causes a few errors on the node until you get the credentials sorted.

  • To be accurate, adding the polling wouldn't be entirely without harm.  Unless that are doing some kind of data validation in the job engine I suspect you would be getting jobs added in for your new pollers and then those jobs would be erroring out, possibly retrying, possibly increasing your polling loads and CPU use.  If you are only doing a small number of nodes for now you likely wouldn't notice it changing much, but if you just blanketed your whole environment turning on pollers that your nodes can't support I bet you run into a world of hurt.

  • Also, you *should* just be able to add your nodes in with ICMP now and then later on when the creds are added you can run a discovery on them all again and it should update them to SNMPv3 as well as add in all the appropriate pollers for each device and their interfaces and volumes. 

    I highlight the *should* because I've had a bunch of customers where this functionality worked fine, and others where it didn't and we never were able to get any good explanation as to why.  I suspected it was something to do with fresh installs having some setting slightly different than older ones that had been upgraded over the years because any time we would stand up a lab to test it the "discover to change polling method" technique works, but then their existing prod environments would just skip any node that they had to change polling methods and we had to come up with workarounds.  In one case I was generating reports of all the nodes the discovery SAID should use a different polling method and then just went to manage nodes and edited them all in bulk to swing them over, but in places with multiple domains and lots of credentials that was a pain.

  • Hi

    I'm trying to add node in ICMP (terraform) to get nodeid, assign template to that nodeid, and then switch to agent polling (installed by puppet) once OS is available.

    With your automation expertise, did you find a way to switch the polling method ? Didn't found a rest API to do that (but found a lot of thread talking about that need)