f5-ansible icon indicating copy to clipboard operation
f5-ansible copied to clipboard

Existing SNMP Configuration Lookups

Open rgonzal1 opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

If the SNMP configuration changes and there is a conflict with the existing configuration (name = community_1 ip=ip2, change to name=community_2) the conflicting entry will cause a failure of the bigip_snmp_trap or bigip_snmp_community modules.

Describe the solution you'd like

Utilize the API endpoints for viewing existing SNMP traps, communities, and global configuration to provide information with the bigip_device_info that can be referenced to remove configuration prior to pushing new configuration

Describe alternatives you've considered

Currently, I am utilizing the bigip_command module to delete all trap destinations and community configurations before reconfiguring the trap destinations and community strings.

Additional context

Existing API endpoints available to retrieve the information:

mgmt/tm/sys/snmp/traps

  • return['items']
  • Interested in the name, host, network, port, and version fields in the items returned

mgmt/tm/sys/snmp/communities

  • return['items']
  • Interested in the name, access, community name, oidSubsets and source fields in the items

rgonzal1 avatar Sep 24 '21 15:09 rgonzal1