IBM Support

How do I obtain a list of devices with last modified date older than a certain date?

Question & Answer


Question

I want to check my NCM database for a list of devices with last modified date older than a certain date.
Since I perform frequent configuration update, the result will show me devices that are not updated lately.
How do I achieve that?

Answer

You can make use of any REST API client or the "cURL" command to query NCM =>

curl -u 'username:password' -X GET -H "Accept: application/json" -k -i "https://<ncm-hostname>:<port>/nsm/device/modified/before/<YYYY-MM-DD>"

Eg.

curl -u 'administrator:abc123' -X GET -H "Accept: application/json" -k -i "https://ncm.ibmtest.com:16311/nsm/device/modified/before/2019-11-23"

The query should return you with a list of devices with "lastModifiedData" before 2019-11-23.

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS7UH9","label":"Tivoli Netcool Configuration Manager"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
09 January 2020

UID

ibm11170112