cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
853
Views
0
Helpful
6
Replies
raindrop18
Beginner

cwcli for rme device report

I am looking for a "cwcli"  to export detail device report on CSV on RME 4.3.1  is there any one can give me the command. some reason I couldn't locate the command on manual. thanks in advance

3 ACCEPTED SOLUTIONS

Accepted Solutions
Martin Ermel
Collaborator

something like this

NMSROOt\bin\cwcli invreport -u cmduser -p cmdpasswd -reportname "Detailed Device Report" -device % -file C:\tmp\DDRexport.csv

with cmduser being a valid LMSuser and cmdpasswd is the password of this user

% is used to export the detailed device report (DDR) for all devices

have a look here for command details and options:

http://www.cisco.com/en/US/docs/net_mgmt/ciscoworks_resource_manager_essentials/4.3/user/guide/cwcli.html#wp1157412

View solution in original post

no I haven't used that before. I dump the output of cwcli locally to a file and transfer that with sftp to the target server. I prefer this method because the cwcli command is independent from any network congestion that could occure. With sftp I can assure that I transfer the complete file.

Also, I do some post-processing of the output of cwcli, e.g  the interface speed is not given as 10 or 100 Mbps but something like 9.535107 and 95.35107 Mbps which is not very handy. If you further want to process the csv file, your parser should be able to parse a "CR" or any kind of new-line inside a value field as well as double qutoes inside a value which is sourounded with double quotes. There were some things I had to learn while doing all this with perl....

Depending on what you want to do the XML dump of the DDR could be easier to further process ...

View solution in original post

for csv, if you have perl knowledge it is feasible if you are experienced it definitely will be easier

If you are not responsible for the CMDB you should provide the XML dump along with the detaild schema information contained in the last link I provided. Now the CMDB team can pull out the data they need to feed the CMDB - sometimes they have a "scripting guy";

To pull the data from a remote server, there is also the serverlet option which can be used to access this data, see the section "cwcli invreport Remote Access" here:

http://www.cisco.com/en/US/docs/net_mgmt/ciscoworks_resource_manager_essentials/4.3/user/guide/cwcli.html#wp1110766

View solution in original post

6 REPLIES 6
Martin Ermel
Collaborator

something like this

NMSROOt\bin\cwcli invreport -u cmduser -p cmdpasswd -reportname "Detailed Device Report" -device % -file C:\tmp\DDRexport.csv

with cmduser being a valid LMSuser and cmdpasswd is the password of this user

% is used to export the detailed device report (DDR) for all devices

have a look here for command details and options:

http://www.cisco.com/en/US/docs/net_mgmt/ciscoworks_resource_manager_essentials/4.3/user/guide/cwcli.html#wp1157412

Thanks Martin, works great..my last question is, I want to run the command from remote server and the out put file to be written on that server instead of CW server. is that possible!?  for UT cli I did by using private key without password     /usr/bin/ssh user@server1 /opt/CSCOpx/campus/bin/ut -u XXXX -pXXXXX -cli -query page -layout DEVICES > /server2/outPut        so the out put written on server 2 -have you used that? I didn't see on the command.     thanks.

no I haven't used that before. I dump the output of cwcli locally to a file and transfer that with sftp to the target server. I prefer this method because the cwcli command is independent from any network congestion that could occure. With sftp I can assure that I transfer the complete file.

Also, I do some post-processing of the output of cwcli, e.g  the interface speed is not given as 10 or 100 Mbps but something like 9.535107 and 95.35107 Mbps which is not very handy. If you further want to process the csv file, your parser should be able to parse a "CR" or any kind of new-line inside a value field as well as double qutoes inside a value which is sourounded with double quotes. There were some things I had to learn while doing all this with perl....

Depending on what you want to do the XML dump of the DDR could be easier to further process ...

thanks so much for detail answer. I need this output to create CMDB file which suppose to be on csv. but the point you mentioned like speed result with 9.535.. something like that didn't work for me. let me see other option if I can find. appreciated your help!!

for csv, if you have perl knowledge it is feasible if you are experienced it definitely will be easier

If you are not responsible for the CMDB you should provide the XML dump along with the detaild schema information contained in the last link I provided. Now the CMDB team can pull out the data they need to feed the CMDB - sometimes they have a "scripting guy";

To pull the data from a remote server, there is also the serverlet option which can be used to access this data, see the section "cwcli invreport Remote Access" here:

http://www.cisco.com/en/US/docs/net_mgmt/ciscoworks_resource_manager_essentials/4.3/user/guide/cwcli.html#wp1110766

I am responsible for CMDB and I am ok with perl . appears to be the CSV can be doable. thank you so much for your time.