How can we bulk update SNMP profiles

book

Article ID: 220413

calendar_today

Updated On:

Products

DX NetOps CA Performance Management - Usage and Administration

Issue/Introduction

How do I conduct bulk SNMP Community String Changes in Performance Management

 

 

 

 

Environment

Dx NetOps Performance Management any version

Resolution

1. Bring Up SNMP profile list:

  • http://DA:8581/rest/profiles/

2. Note the id's for the various profiles

3. On the DR connect to the database run the following query

  • select item_id, name from dauser.v_item where item_id in (select item_id from dauser.v_attribute_instance where attr_qname = '{http://im.ca.com/inventory}ManageableDevice.SNMPProfileID' and long_value = SNMP_PROFILE_ID from step #2); 
  • This will show the devices associated to the SNMP Profile

4. To do an update run the following command from the command line

  • curl -X PUT -H 'Content-type: application/xml' -d '<ManageableDevice version="1.0.0"><SNMPProfileID>SNMP_PROFILE_ID to change to from step #2</SNMPProfileID></ManageableDevice>' http://DA_HOST:8581/rest/devices/manageable/device item_id from query in step #3
  • To do this in bulk you would have to script this command, passing the device item_id's to the script that you want to change