cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
636
Views
0
Helpful
2
Replies

CUCM AXL API - cannot find an API to list existing SNMP info

Mark Dugas
Level 1
Level 1

We have over 100 CUCM clusters and need to query every one to ensure SNMP community string standard compliance.  I see the getSNMPCommunityString API, but it needs a correct community string as a search criteria.  We are trying to discover configured SNMP strings so we won't know.  Thanks.

2 Replies 2

npetrele
Cisco Employee
Cisco Employee

The devices on our lab servers do not have geolocations, so I can't test this out, but I believe you get the community name from your device geolocation. Here's a snippet from the data dictionary.  Note a3 is a string for the community name.

 

2021-12-06_094853.png

I believe the geolocations/community (a geographic community, e.g. 'SoHo') field is different from a configured SNMP community string.

Unfortunately, I can't seem to find a table in the UCM database that stores SNMP configuration.  My suspicion is that the config is stored somewhere in an inaccessible OS configuration file (perhaps snmp.conf) and the CLI and AXL SNMP commands interact with the config data in a special/different way than the usual AXL database interaction.

You can certainly check for the existence of a required community string via <getSNMPCommunityString> - if it fails, it's not present, and you can go ahead and ahead the required one.  However it seems a 'list' variation is not provided by AXL, so it's not possible to get a listing of all the strings, e.g. to check for unauthorized/misconfigured strings.

Perhaps you could use something like Paramiko to access UCM CLI remotely to execute commands, e.g. "utils snmp config 1/2c community-string list" and parse the text output.  However, note this isn't a 'supported' programming interface (it's basically 'scraping' text output) so it may not be super reliable: e.g. an extra-long community string or one with a weird character might change how spaces/tabs/etc. are shown in the CLI, breaking a 'scraping' text parser...