cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
555
Views
0
Helpful
1
Replies

getSNMPCommunityString

Cole.Aten
Level 1
Level 1

Good Afternoon,

I am attempting to gather some configuration details from CUCM via AXL. I have the following request, pulled from SOAPUI:

request='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.0">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:getSNMPCommunityString sequence="?">

         <communityName>?</communityName>

      </ns:getSNMPCommunityString>

   </soapenv:Body>

</soapenv:Envelope>'

I am posting using the following:

curl --silent -k -u 'XXXXXXXX:YYYYYYYY' -H 'SOAPAction: CUCM:DB ver=8.0 getSNMPCommunityString' -H "Content-type: text/xml;" -d "$request" "https://X.X.X.X/axl/"

My response appears to be hitting the appropriate endpoint, but nothing it doesn't seem to find any community strings, even though there are some configured:

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

  <soapenv:Body>

    <soapenv:Fault>

      <faultcode>soapenv:Server</faultcode>

      <faultstring>Community String Name Not Found</faultstring>

      <detail>

        <axlError>

          <axlcode>5003</axlcode>

          <axlmessage>Community String Name Not Found</axlmessage>

          <request>getSNMPCommunityString</request>

        </axlError>

      </detail>

    </soapenv:Fault>

  </soapenv:Body>

</soapenv:Envelope>

Any help would be greatly appreciated.

Thanks!

1 Reply 1

dstaudt
Cisco Employee
Cisco Employee

<getSNMPCommunityString> is provided for retrieving details of a single (known) community string, e.g.:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:getSNMPCommunityString>

         <communityName>testSnmpCommunityString</communityName>

      </ns:getSNMPCommunityString>

   </soapenv:Body>

</soapenv:Envelope>

---------------------

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:getSNMPCommunityStringResponse xmlns:ns="http://www.cisco.com/AXL/API/10.5">

         <return>

            <SNMPCommunityString>

               <communityName>testSnmpCommunityString</communityName>

               <version>both</version>

               <accessPrivilege>ReadWriteNotify</accessPrivilege>

               <ArrayOfHosts/>

            </SNMPCommunityString>

         </return>

      </ns:getSNMPCommunityStringResponse>

   </soapenv:Body>

</soapenv:Envelope>

There does not appear to be a corresponding <listSNMPCommunityString> request, unfortunately, for searching/listing for community strings.  It may be possible to retrieve such a list from the CUCM database via the <executeSqlQuery> request, if you can figure out which tables/fields in the database contain the data.  I could not figure out which tables after about a 45 min exploration - it's possible the SNMP config data is not in the DB, and is stored elsewhere on the system...