Follow

How To Setup One or More Distributed ZenEventD Daemons

Prerequisites

  • It is very important that the system(s) running ZenEventD have low latency connections to the system(s) running RabbitMQ, ZenDS, and memcached.
  • The fully qualified domain names (FQDNs) of the Zenoss master server, the remote server, and the system(s) running RabbitMQ, ZenDS, and memcached must all resolve correctly on the master server and the remote server. This can be done through DNS or the /etc/hosts file on each server.
  • The remote server must be able to able to open connections to the RabbitMQ, ZenDS, and memcached daemons. By default, they all are run on the Zenoss master server, but may have been deployed to other systems. Refer to the $ZENHOME/etc/global.conf file on the Zenoss master server for a definitive list of host names and port numbers.

Applies To

  • Zenoss 4.2.3

Summary

The ZenEventD daemon processes incoming events and applies any applicable event transformations. Each instance of ZenEventD spawns a configurable number of child worker processes (two by default). Under normal circumstances, a single ZenEventD worker can process 30 – 100 events per second. Many factors affect event processing including database latency, the number and complexity of event transforms, and event uniqueness.

By default, ZenEventD is run only on the Zenoss master server. If the master server's resources are limited, ZenEventD can be configured to run on one or more remote systems.

This article provides instructions for two scenarios: deploying ZenEventD to a dedicated server, and configuring an existing remote collector to run ZenEventD in addition to its current set of daemons.

Scenario I: Deploying ZenEventD to a dedicated server

Note: In this scenario, the target server is added to Zenoss as a remote collector solely to streamline the installation process. As no collector daemons will be run on the server, you should not add or move any devices to the resulting collector instance.

Procedure

A. Configure the Zenoss master server

  1. On the Zenoss master server as the root user, check for the presence of the NTP daemon:
    service ntpd status

    If the command returns “ntpd: unrecognized service”, install the NTP service, set the system time, and start the daemon:

    yum -y install ntp
    ntpdate pool.ntp.org
    service ntpd start
    chkconfig ntpd on

    If the command returns “ntpd is stopped”, set the system time and start the NTP daemon:

    ntpdate pool.ntp.org
    service ntpd start
    chkconfig ntpd on
  2. Switch to the zenoss user:
    su - zenoss
  3. Restrict the set of daemons that will be configured and started on the new remote collector:

    echo zeneventd > $ZENHOME/etc/collectordaemons.Collector-ID.txt

    where Collector-ID is the identifier (label) you will specify when adding the new remote collector through the Zenoss UI. We recommend that you include “zeneventd” in the ID to distinguish this instance from your standard collectors.

    Note that the remote collector installation will always start the ZenRender daemon without respect to the contents of the collectordaemons.Collector-ID.txt file. Section C includes instructions for overriding this behaviour when the collector installation is complete.

B. Add the target server as a remote collector

  1. On the target server as the root user, install net-snmp and NTP:
    yum -y install net-snmp net-snmp-utils ntp
  2. Configure and start the NTP daemon:
    ntpdate pool.ntp.org
    service ntpd start
    chkconfig ntpd on
  3. Compete the installation of the target server by following the instructions detailed in the Deploying Remote Collectors section of the appropriate Zenoss Resource Manager Installation document.

    When you add the collector through the Zenoss Web UI, be sure to specify the same Collector ID that you used in step A.3 above.

C. Complete configuration of the target server

  1. On the target server, switch to the zenoss user:
    su - zenoss
  2. Change to the Zenoss configuration directory:
    cd $ZENHOME/etc
  3. Stop the default collector daemons:
    zenoss stop
  4. Edit the global.conf file to specify the instance of memcached running on the master server: if the zodb-cacheservers line refers to 127.0.0.1 or localhost, change the reference to the FQDN of the master server (while preserving the port number).
  5. Update the Zenoss startup configuration to run ZenEventD only:
    echo zeneventd > daemons.txt

D. Update and copy the ZenEventD configuration to the target server

  1. On the master server, switch to the zenoss user:
    su - zenoss
  2. Optionally edit the $ZENHOME/etc/zeneventd.conf file. Add or update the workers line with the number of worker processes each instance of zeneventd should start. For example:
    workers 4
    Note: If you wish to run a different number of ZenEventD workers on the target server and the master server, edit the $ZENHOME/etc/zeneventd.conf file on the target server after it's been copied by the next step.
  3. Copy the ZenEventD configuration file from the master to the new remote collector:
    scp $ZENHOME/etc/zeneventd.conf Target-Server-Hostname:$ZENHOME/etc

E. Start ZenEventD on the target server

  1. On the target server, switch to the zenoss user:
    su - zenoss
  2. Start ZenEventD:
    zenoss start

F. Optional: Configure the master server to stop running ZenEventD

  1. On the master server, switch to the zenoss user:
    su - zenoss
  2. Stop the ZenEventD daemon:
    zeneventd stop
  3. Change to the Zenoss configuration directory:
    cd $ZENHOME/etc
  4. Check for the existence of the DAEMONS_TXT_ONLY file:
    ls DAEMONS_TXT_ONLY

    If the DAEMONS_TXT_ONLY file exists, edit the daemons.txt file and remove the line containing zeneventd

    If the DAEMONS_TXT_ONLY file does not exist, run the following commands to create the daemons.txt and DAEMONS_TXT_ONLY files:

    mv daemons.txt daemons.txt.bak
    zenoss -r list > daemons.txt
    touch DAEMONS_TXT_ONLY

G. Note: Remote collector updates

Whenever the (target server) remote collector is updated — for example, after applying a patch — you will need to repeat the steps in sections C – E above.

Scenario II: Configuring an existing Zenoss remote collector to run ZenEventD

Procedure

A. Configure the Zenoss master server

  1. On the Zenoss master server as the root user, check for the presence of the NTP (Network Time Protocol) daemon:
    service ntpd status
    

    If the command returns “ntpd: unrecognized service”, install the NTP service, set the system time, and start the daemon:

    yum -y install ntp
    ntpdate pool.ntp.org
    service ntpd start
    chkconfig ntpd on

    If the command returns “ntpd is stopped”, set the system time and start the NTP daemon:

    ntpdate pool.ntp.org
    service ntpd start
    chkconfig ntpd on
  2. Switch to the zenoss user:
    su - zenoss
  3. Optionally edit the $ZENHOME/etc/zeneventd.conf file. Add or update the workers line with the number of worker processes each instance of zeneventd should start. For example:
    workers 4.

    Note: If you wish to run a different number of zeneventd workers on the remote collector and the master server, edit the $ZENHOME/etc/zeneventd.conf file on the remote collector after it's been copied by the next step.

  4. Copy the zeneventd configuration file from the master to the new remote collector:
    scp $ZENHOME/etc/zeneventd.conf Collector-Hostname:$ZENHOME/etc

B. Configure the existing remote collector

  1. On the remote collector as the root user, check for the presence of the NTP (Network Time Protocol) daemon:
    service ntpd status.

    If the command returns “ntpd: unrecognized service”, install the NTP service, set the system time, and start the daemon:

    yum -y install ntp
    ntpdate pool.ntp.org
    service ntpd start
    chkconfig ntpd on

    If the command returns “ntpd is stopped”, set the system time and start the NTP daemon:

    ntpdate pool.ntp.org
    service ntpd start
    chkconfig ntpd on
    
  2. Switch to the zenoss user:
    su - zenoss
  3. Change to the Zenoss configuration directory:
    cd $ZENHOME/etc
  4. Edit the global.conf file to specify the instance of memcached running on the master server: if the zodb-cacheservers line refers to 127.0.0.1 or localhost, change the reference to the FQDN of the master server (while preserving the port number).
  5. Update the Zenoss startup configuration to include ZenEventD
    grep -q zeneventd daemons.txt || echo zeneventd >> daemons.txt
  6. Start ZenEventD:
    zeneventd start

C. Optional: Configure the master server to no longer run ZenEventD

  1. On the master server, switch to the zenoss user:
    su - zenoss
  2. Stop the zeneventd daemon:
    zeneventd stop
  3. Change to the Zenoss configuration directory:
    cd $ZENHOME/etc
  4. Check for the existence of the DAEMONS_TXT_ONLY file:
    ls DAEMONS_TXT_ONLY

    If the DAEMONS_TXT_ONLY file exists, edit the daemons.txt file and remove the line containing zeneventd.

    If the DAEMONS_TXT_ONLY file does not exist, run the following commands to create the daemons.txt and DAEMONS_TXT_ONLY files:

    mv daemons.txt daemons.txt.bak
    zenoss -r list > daemons.txt
    touch DAEMONS_TXT_ONLY

D. Note: Remote collector updates

Whenever the remote collector is updated — for example, after applying a patch — you will need to repeat steps B2 – B5 above.

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

Comments

Powered by Zendesk