The Now Platform® Washington DC release is live. Watch now!
on 12-31-2020 12:33 PM
Introduction
This article contains a recently developed and anonymized update set containing the following:
Note: Use this example to possibly extend the attributes for the Wireless Access Point or WAP Controller tables. Add the associated logic in the script include to configure these additional attributes for the JSON payload prior to the IRE invocation.
Required Manual Configuration (post Update Set Installation)
Create the custom 'Discovery Source':
/*A new discovery_source value for 'CiscoPrimeAPI' is required for the IRE call
(don't manually edit the sys_choice table)...
From System Definition -> Scripts - Background execute the below*/
var dsUtil = new global.CMDBDataSourceUtil();
dsUtil.addDataSource("CiscoPrimeAPI");
Discovery Source (sys_choice.list > match discovery_source) for the cmdb_ci Table:
Create authentication profile:
A default anonymized configuration is provided as an example.
Identify Cisco Prime End Point and MID Server
A default anonymized configuration is provided as an example. All 'end point' records must be modified for the particular site.
Create the scheduled job:
The main function in the script include can be 'called' from a scheduled job, i.e.
new CiscoPrimeIntegration().run();
//new CiscoPrimeIntegration().getWANControllers();
//new CiscoPrimeIntegration().getWirelessAPs();
Example Screen Captures
Log File Entries:
WAP Controller Log Entries (includes IRE input JSON payload):
Wireless Access Point Log Entries (includes IRE input JSON payload):
System Web Services > Outbound > REST Message Records:
REST Message Main Record
REST Message Main Record (default all payloads from Cisco Prime to JSON)
HTTP Methods - GET WLAN Controllers
HTTP Methods - GET WLAN Controller Details
HTTP Methods - GET Access Points (with pagination)
HTTP Methods - GET Access Points (with pagination) #2
HTTP Methods - GET Access Point Details
HTTP Methods - GET Access Point Details #2
Example Cisco Prime JSON payloads:
GET WLAN Controllers Payload (0 to 29 count of EntityIds): An EntityId is required for the WAN Controller Details method.
Note: A similar logic is also applied for a 'page' (1000 EntityIds) of Access Points (APs) whereas each AP EntityId us used to query for the AP's 'full' details. The APs are 'paginated' at 1000 entries per 'Get Access Points' method until all AP EntityIds from the Cisco Prime AP EntityIds table are exhausted.
Resultant JSON payload to create WAP Controller CI via IRE call (script include):
Resultant JSON payload to create Wireless Access Point CI via IRE call and the relation/reference to the AP's WAP Controller (script include):
Hi
You list the version as Paris, is there anything in your integration example that is dependent on that version or could this be done on older versions of SN like Orlando or NewYork ?
Thanks
Leland.
Hi John,
Script Include 'IdentificationEngineScriptableApi' is neither available OOB nor in the provided Update Set. Kindly provide the XML file for the same.
Appreciate your help.
Hi John, Thanks for this and I have got it up and running.
I have come across one small issue though. The Json im getting back has the following for IP Address and Mac Address:
"ipAddress":{"address":"<IP HERE>"},
"macAddress":{"octets":"<MAC HERE>"},
As such, the data that is added to the ci is as follows: [object Object]
So it would suggest that it is unable to read it from the array.
Have I missed something here, or maybe the Cisco API has changed since you authored this?
Figured it out. Needed to update the script:
Hi John!
Thanks a lot.
Question about your 2 screenshots related to log entries: is it the logs of the connection/sync or of the logfile of the Cisco Prime itself (what I'm expecting for Event Management)
Best regards!!
Cedric