Newsletter:5/Quis Custodiet Ipsos Custodes

From Zenoss Wiki
Jump to: navigation, search

Quis Custodiet Ipsos Custodes

You’ve finished the install script and you have a Zenoss installation that works… or do you? How do you prove it? How do you know it’s doing everything you ever wanted it to do?

Monitoring Zenoss with Zenoss

Thank you for using Zenoss. Happy monitoring!  

You’ve finished the install script and you have a Zenoss installation that works… or do you? How do you prove it? How do you know it’s doing everything you ever wanted it to do? If you are like many of our new users, you often have a sneaking suspicion that you are not quite done. And you would be right! There is still more you could do. In this article, we’ll explore the Open Source MySQL, RabbitMQ, and Memcached ZenPacks, and then configure each one to monitor Zenoss. Essentially, I’ll tell you how you can monitor Zenoss with Zenoss, with Zenoss (with Zenoss?).

What Do You Get Out of the Box?

After you’ve installed Zenoss, you’ll see a single device in /Server/Linux. It’s probably not actually being monitored at this point, because you need to set up SNMP communities. However, if you configure these options and model the device, you will end up with something similar to this:


This is the basic monitoring that you get from the Linux SNMP ZenPack. But wait – there’s more!


Under the Advanced > Settings > Daemons, there is a Daemons Status tab, which lists the status and health of every component of Zenoss. Of course, there’s other things besides those daemons that Zenoss depends on, so let go monitor those, too!

MySQL Monitor ZenPack

Of the three ZenPacks that we are going to be discussing in this article, the MySQL ZenPack is the only one installed by default, so let’s start with this one.

First off, you’ll want to get the latest version, which is available at the ZenPack Catalog. Install it, and restart Zenoss.

Create a MySQL user with global select privileges only. From there, follow the MySQL ZenPack install instructions:

  • Navigate to the Configuration Properties page of the device containing your MySQL servers
  • Set user name, password and port in the appropriate fields of zMySQLConnectionString property . For non-root users please make sure to grant all privileges to avoid access denied errors. Note that user name is required.
  • Navigate to the Modeler plugins page of the device containing your MySQL servers, add the MySQL Collector modeler plugin and remodel the device. This will automatically find the MySQL servers and databases and begin monitoring them immediately.


Remodel your Zenoss Server and look for “Changes in configuration applied”. If you don’t see this, check your credentials or refer to MySQL troubleshooting.

RabbitMQ ZenPack

The event management system in Zenoss 4 makes extensive use of RabbitMQ to accelerate event throughput. This creates another daemon for us to monitor, so let’s do it!

First download and install the ZenPack.

$ wget
$ zenpack --install ZenPacks.zenoss.RabbitMQ-1.0.7.egg
$ zenoss restart

To start monitoring your RabbitMQ server, you will need to set up SSH access so that your Zenoss collector server will be able to SSH into your RabbitMQ server(s) as a user who has permission to run the rabbitmqctl command. This almost always means the root user. The goal of this article is to quickly get you going. I strongly recommend you set up a non-root user to run rabbitmqctl. Please see the more extensive instructions.

Configure the following zProperties appropriately for your system:

For Password auth:

  • zCommandUsername
  • zCommandPassword

Or for ssh key auth:

  • zKeyPath

Next you need to enable rabbitmqadmin. This is simple. As root, set your ‘zenoss’ user as an administrator.

# rabbitmqctl set_user_tags zenoss administrator
Enable the management plugin and restart rabbit:
 # rabbitmq-plugins enable rabbitmq_management#service rabbitmq-server restart
Next download the script. To do this you will need your rabbit password for the Zenoss user. This can be found in $ZENHOME/etc/globals.conf (note the difference between 2.x and 3.x):
# cd /usr/local/bin

RabbitMQ 2.x:

# wget http://{your-rabbitmq-user}:{your-rabbitmq-user-password}@{your-rabbitmq-server}:55672/cli/rabbitmqadmin

RabbitMQ 3.x:

# wget http://{your-rabbitmq-user}:{your-rabbitmq-user-password}@{your-rabbitmq-server}:15672/cli/rabbitmqadmin

You will also need to set your RabbitMQ username/password in Zenoss. In the Zenoss UI, set your zProperties, zRabbitMQAdminUser and zRabbitMQAdminPassword for RabbitMQ appropriately.

You should then add the zenoss.ssh.RabbitMQ modeler plugin to the device or device class containing your RabbitMQ servers and remodel the device(s). This will automatically find the node, vhosts, exchanges and queues and begin monitoring them immediately. As usual look for the magical “Changes in configuration applied.” Rabbitmodel.png

Isn’t it great when things work the way they’re supposed to?

Memcached ZenPack

Welcome to the last and easiest ZenPack, Memcached. This one’s quick! Download it and install it:

$ zenpack --install ZenPacks.zenoss.Memcached-1.0.0.egg$ zenoss restart

Next, bind the template using the gear menu, and model the device. You’ll find the Memcached graphs under “graphs”.


We’ve come a long way, and I’m going to prove it to you. Go back and look at that first component list now:


You’re now monitoring three of the crucial components that Zenoss 4.x relies heavily upon to function, and they’re hopefully all “in the green”.

Now you are monitoring Zenoss, and you know “Quis Custodiet Ipsos Custodes?” Or, “Who Is Watching the Watchers?”