cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3111
Views
16
Helpful
1
Replies

Prime 3.1 - Inventory CSV

Stefan Honeder
Cisco Employee
Cisco Employee

Hi,

in order to easily export a list of all devices/modules within a network containing the product ID and serial number we have the option to leverage the reports available within Prime Infrastructure. However sometimes it is easier to just go through the API and extract the relevant information.

Below you will find a short example doing exactly this. It will create a CSV containing device name, IP, product id, serial number of your inventory.

Requirements:

- python 2

- requests, jsonpath, logging (pip2 install requests jsonpath logging)

Tested with Prime 3.1.4

Execute:

python GenericReportRunner.py -u root -p password mypiserverip

Result will be a deviceInventory<timestamp>.csv file in the subfolder 'reports' with following content

deviceId,productFamily,deviceName,ipAddress,modelNr,udiSerialNr

123123,"Switches and Hubs","lab6880-core","10.10.10.1","C6800IA-48FPD","FOC1234567"

...

1 Reply 1

Kram
Level 1
Level 1

Hi All

May I know how to export all scheduled report CSV file via CLI is there any step by step guide on it.

Thanks