Version 4

    DESCRIPTION

    The attached Python script copies an existing Solarwinds node to one or more new nodes. The script copies the polling method (ICMP, SNMP, Agent) and custom properties from the source node. The script assigns the new node to the polling engine with the smallest load (as measured by the number of monitored nodes).

    SYNTAX

    copy-solarwinds-node.py [-S|--server solarwinds_server] -s|--sourceNodeIP source_node_IP -t|--targetNodeName target_node_FQDN [-t|--targetNodeName target_nodeN_FQDN]* [-w|--wait seconds_to_wait] [--help]

    COMMAND LINE PARAMETERS

    -S|--server (Optional, default = localhost): The FQDN or IP address of the Solarwinds server. If omitted, defaults to "localhost"

     

    -s|--sourceNodeIP (Required): The IP address of the Solarwinds managed node you want to copy. I've specified that this must be an IP address because my users not infrequently create multiple nodes with the same caption but different IPs for load balancer nodes, cluster members, etc.

     

    -t|--targetNodeName (Required, can specify 1 or more): The FQDN of the node(s) to create. The FQDN must be resolvable by the device where the Python script is running.

     

    -w|--wait (Optional): The number of seconds to pause between creating the target node and populating its custom properties from the source node. If your installation needs time to perform actions when a new node is added, you may need to wait between creating the node and updating any properties on it.

     

    --help (Optional): Print help/syntax info

    DEPENDENCIES

    Python modules:

    requests

    socket

    argparse

    ipaddress

    re

    getpass

    time

    orionsdk

     

    TCP port 17778 open on your Solarwinds server

     

    EXAMPLES

    Example 1

    Copy the configuration of the managed server with IP address 10.10.10.100 to create new managed servers server1, server2, and server3

    python.exe copy-solarwinds-node.py -S solarwinds.mycompany.com -s 10.10.10.100 -t server1.mycompany.com -t server2.mycompany.com -t server3.mycompany.com

    Example 2

    Copy the configuration of the managed server with IP address 10.10.10.100 to create new managed servers server1, but force the script to wait 60 seconds between creating server1 and populating its custom properties. If your installation needs time to perform actions when a new node is added, you may need to wait between creating the node and updating any properties on it.

    python.exe copy-solarwinds-node.py -S solarwinds.mycompany.com -s 10.10.10.100 -t server1.mycompany.com -w 60