Follow

How do I Move a Collector to a Different Hub

Applies To

  • Zenoss 4.1.1

Summary

If you have multiple collectors on one hub, it might be useful for you to move one or more of the collectors to a different hub to conserve resources or to reflect changes in your topology.

If multiple hub processes are running on one server, for example 'Hub1', 'Hub2' and 'Hub3', and you attempt to move some of the collectors onto a remote hub server, only Hub1 graphs display, the graphs for the other relocated collectors no longer display.

Procedure

The following procedures describe how to move a collector to a different hub and how to configure the collector to display the appropriate graphs in Zenoss.

Move a Collector to Another Hub

Perform the following steps to move a collector from one hub to a different hub:

  1. Create a new hub on the remote device
  2. Put the list of collectors to be moved into the top of the sample script (included below)
  3. Place the original hub designation name in this script for the currentHub variable
  4. Place the new hub designation name in this script for the new hub
  5. Run the script

    Note: This ONLY updates the database. It does not update the collector configs

  6. From the Zenoss Resource Manager UI, push the updates to the remote collector(s). 
    This updates the remote collector config(s) and restarts the daemons

Example ZenDMD Script

Edit the following example script to meet your requirements:

collectors=[

    'brasfield-zenoss',
    'mcgh-zenoss',
    'numara-zenoss',
    'psta-zenoss',
    'sanibel-zenoss',
    'simplex-zenoss',
    'telov-zenoss',
    'isg-zenoss',
    ]

currentHub = dmd.Monitors.Hub._getOb('aus-zenhub-06')

newHub = dmd.Monitors.Hub._getOb('aus-zenhub-03')

for collector in collectors:
    collector = dmd.Monitors.Performance._getOb(collector)
    collector.hub.removeRelation()
    newHub.collectors.addRelation(collector)

commit()

Display Graphs for Collectors Moved to a different Hub

To enable graphs for the relocated collectors to display in Zenoss Resource Manager, perform the following configuration changes:

  1. Edit the file /opt/zenoss/etc/nginx.conf
  2. Search for the following lines:
    proxy_pass http://127.0.0.1:8090$1;
    }
    
    location /hub_collector_graphs {
    proxy_pass http://172.17.135.43:8090$1;
    }
    
    
  3. Replace those lines with the following lines:
    location /collector {
    rewrite ^/collector/(.*) /$1 break;
    }
    
    location /collector/przencollld1001 {
    proxy_pass http://ip_address_of_collector:8091;
    }
    
    location /collector/przencollva1001 {
    proxy_pass http://ip_address_of_collector:8091;
    }
    
    
  4. Save and exit the file.
  5. As zenoss, restart zenwebserver:

    $ zenwebserver restart

    This restart rereads and implements the configuration file and its changes.

Was this article helpful?
0 out of 0 found this helpful

Comments

Powered by Zendesk