Change the Primary IP Address for a Device

The primary IP address is the IP address that capm uses to monitor a device. When a device is first discovered with the IP ranges discovery profile, capm tries to use the IP address that maps to the hostname as the primary IP address.
capm370
The primary IP address is the IP address that
CA Performance Management
uses to monitor a device. When a device is first discovered with the IP ranges discovery profile, 
CA Performance Management
tries to use the IP address that maps to the hostname as the primary IP address.
If the primary IP address on a devices item changes, an event is generated on that device item.
Automatic Change Detection
By default, when the IP address that maps to a hostname on the physical device changes, the primary IP on the device item does not change. To update the primary IP automatically, enable IP change detection.
CA Performance Management
tries to detect the IP address change only after two consecutive polling failures. The data collector uses a reverse hostname lookup to find the new IP address.
If your DNS is not up to date, automatic change detection may cause errors.
Use the following REST to enable or disable IP change detection:
URL:
  http://{da-host}:8581/rest/discoverydefaultconfig/{itemID}
Method:
PUT
Body:
  • Enable:
    <DiscoveryDefaultConfig  version="1.0.0">
       <DetectIPChange>
    true
    </DetectIPChange>
    </DiscoveryDefaultConfig>
  • Disable:
    <DiscoveryDefaultConfig  version="1.0.0">
       <DetectIPChange>false</DetectIPChange>
    </DiscoveryDefaultConfig>
Change the Primary IP Address
Situations may arise when you want to change the primary IP address of a device. For example, you want to change the hostname IP address to the loopback IP address, or the IP address is no longer reachable on the device.
Follow these steps:
  1. Click Monitored Devices from the Monitored Inventory menu for a Data Aggregator data source.
    The Tree View tab displays.
  2. Select
    Device by Collection
    or
    Device by Monitoring Profile
    from the drop-down list, and select a specific device.
    Alternatively, select the Search tab to search by host name, device name, or IP address. You can enter a partial name or IP address to return a list of devices that contain that partial match. Wildcards and regular expressions are not supported.
  3. Change the primary IP address by taking one of the following steps:
    • Edit the IP Address field and then click Save.
    • Right-click an IP address in the IP Addresses table, select
      Set this IP as the device's primary IP
      , and click Save.
    The primary IP address is changed.
Change the Primary IP Address Through REST
If you change the primary IP address of a device to an IP address that another devices uses, the REST call returns and error.
To change the primary IP address of a device with a REST client or HTTP tool, enter the following criteria:
  • URL:
    http://
    da-hostname
    :8581/rest/devices/
    deviceitemID
    deviceitemID
    specifies the target device.
  • Method:
    PUT
  • Enter the changed primary IP address in the Body tab of the HTTP Request pane.
    For example:
    <Device version="1.0.0">
          <PrimaryIPAddress>
    IP
    </PrimaryIPAddress>
    </Device>
  • IP
    specifies the new primary IP address of the device.
Example:
In this example, you change the primary IP address on the device to 1.2.3.4:
<Device version="1.0.0">
      <PrimaryIPAddress>
1.2.3.4
</PrimaryIPAddress>
</Device>