Configuration & Administration

Expand all | Collapse all

Automate Resetting of IP Address for Device

  • 1.  Automate Resetting of IP Address for Device

    Posted 01-13-2020 10:43 PM
    Zenoss has a menu command to "Reset/Change IP Address" for a device. We have several devices that change IP addresses on a regular basis. What is the actual command which is doing the "reset"? We want to create a notification to automatically run when this condition is detected.

    We are running Zenoss 6.2.1.

    Thanks in advance,


  • 2.  RE: Automate Resetting of IP Address for Device

    Posted 01-14-2020 01:36 AM
    Hello Larry,

    You could launch a reset command through the API. This is exactly what the Web UI is doing.

    Here is the definition of this command in the DeviceRouter:

    resetIp(self, uids, hashcheck, uid=None, ranges=(), params=None, sort='name', dir='ASC', ip='')

    source code 

    Reset IP address(es) of device(s) to the results of a DNS lookup or a manually set address

    • uids ([string]) - List of device uids with IP's to reset
    • hashcheck (string) - Hashcheck for the devices (from getDevices())
    • uid (string) - (optional) Organizer to use when using ranges to get additional uids (default: None)
    • ranges ([integer]) - (optional) List of two integers that are the min/max values of a range of uids to include (default: None)
    • params (dictionary) - (optional) Key-value pair of filters for this search. Can be one of the following: name, ipAddress, deviceClass, or productionState (default: None)
    • sort (string) - (optional) Key on which to sort the return result (default: 'name')
    • dir (string) - (optional) Sort order; can be either 'ASC' or 'DESC' (default: 'ASC')
    • ip (string) - (optional) IP to set device to. Empty string causes DNS lookup (default: '')
    Returns: DirectResponse
    Success or failure message
    I tested it on one of my devices and here was the payload:

    action: "DeviceRouter",
    method: "resetIp",
    data: [
        {ip: "",
         uids: [
         hashcheck: null}],

    type: "rpc",
    tid: 1}

    Kind regards,

    Laurent Hemeryck
    Monitoring Engineer

  • 3.  RE: Automate Resetting of IP Address for Device

    Posted 01-14-2020 04:02 PM
    Thanks Laurent! I will give that a shot.