Zenoss is an Open Source IT infrastructure monitoring
package that can identify a large number of devices on a network. The software
can monitor availability, performance, events and configuration changes of
devices as well as applications. It allows you to monitor multiple subnets,
servers and apps. The information regarding all the resources is collected via
SNMP, WMI, Telnet, SSH and Syslog components, which run as daemons. Here, we
show you how you can setup Zenoss, to monitor your enterprise IT infrastructure.
|
Pre-requisites
Before installing this software, you need to configure a few basic things on
your Zenoss machine. The software runs on Linux, UNIX or Mac platforms. On top
of it, you need MySQL 5.0.x which can be downloaded from http://dev.mysql.com/downloads/
mysql/ 5.0.html. You also need Python ver. 2.3.5 or higher which can be
downloaded from http://www.python.org. Make sure you have assigned password to
user in MySQL. You can do this by giving this command 'mysqladmin —u root
—p password'. The existing password will be replaced by a password that you
want to set for MySQL root user.
The Zenoss dashboard gives you a summary of your network infrastructure, system events and SNMP alerts |
Installing Zenoss
In our setup we used Redhat Enterprise Server 4 that included development
components. If you are using some other Unix flavor OS , then make sure you have
its development component installed.
First of all copy the 'zenoss-0.19.4.tar.tar' in /root
folder. After this create a user named 'zenoss' by issuing command
'adduser zenoss'. Then you have to increase the size of the net buffer, so
that Zenoss can work perfectly.
In order to do so, open /etc/sysctl.conf in an editor and
add the following lines:
net.core.rmem_default=1048576
net.core.rmem_max=1048576
net.core.wmem_default=1048576
net.core.wmem_max=1048576
After this reboot your machine and login as root user and
copy 'zenoss-0.19.4.tar.tar' /home/zenoss folder. Now, logout from root and
login from Zenoss user. You will have to unpack the zenoss-0.19.4.tar.tar
tarball inside Zenoss home directory. To unpack the tarball issue this command
'tar —zxvf zenoss-0.19.4.tar.tar'.
This will extract all the files from tarball to \zenoss\zenoss-0.19.4
folder. Before installing Zenoss, you need to give full permission to Zenoss
user on /usr/local folder. To do so, use 'su' to get root permission and
issue command 'chmod 777 /usr/local.' Then exit from 'su' (super user
mode) and open /home/zenoss/.bashrc file in a text editor and add the following
line:
export ZENHOME=/usr/local/zenoss
export PYTHONPATH=$ZENHOME/lib/python
This will add Zenoss home path to Zenoss user, so that it
can run the Zenoss daemon from its home path. To start the installation process,
login as Zenoss user and issue the following command
$ python zenossinst.py
install -p
Here
you want to give to Zenoss monitoring system. The process will take some time,
because the installer compiles source files first and then installs the
software.
Once the device is disconnected from the network, Zenoss raises an error on its dashboard which is escalated to the system administrator |
Configuring the database
After successful installation, you need to configure the database, so that
Zenoss monitoring system can store its data. In order to do so, first start the
database, if it's not already started. Issue the command given below:
# service mysql start
(start it from the root only)
Now you need to add the Zenoss data model and event data
structures into the database, to do this issue the following commands.
$ /ZENHOME/bin/zeneventbuild
MYSQLUSER MYSQLPASS
$ $ZENHOME/bin/zenbuild -u MYSQLUSER -p MYSQLPASS
Here MYSQLUSER and MYSQLPASS will be replaced by user name
and password of the MYSQL database.
After this you have to configure Zope object database in to
Zenoss configuration database. For this issue the command 'ZENHOME/bin/zeoctl
start.' With this your database configuration part is over and you can start
the Zenoss monitoring system Web portal. To do so, give the command
'ZENHOME/bin/zopectl start.'
You can access the zenoss portal from your Web browser by
typing http://127.0.0.1:8080/zport/dmd. You would require a username and
password to get inside the portal. Give 'admin' as username while the
password would be same that you gave during installation. This will open a web
interface of your Zenoss monitoring system.
Configuring daemons
Now, your Zenoss monitoring system web portal is ready, but you need some
daemons that will monitor the systems on the network and provide information to
web portal. For this, first log in as root and issue the following command on
your terminal window
#/home/zenoss/zenoss-0.19.4/bin/zenping
run
#/home/zenoss/zenoss-0.19.4/bin/zenping start
#/home/zenoss/zenoss-0.19.4/bin/zensyslog start
#/home/zenoss/zenoss-0.19.4/bin/zendisc start
After this logout from root, login as Zenoss and follow the
steps given below:
Step 1: Open $ZENHOME/etc/zensnmp.conf file
and configure the username and password for these monitors (Zenoss as a username
and password would be the same that you have given while creating Zenoss user).
Step 2: Now you need to activate the zensnmp
daemon, which will collect information about connected devices. Issue the
command given below
$ZENHOME/bin/zensnmp run
If the above command works, start the following
as a daemon
$ZENHOME/bin/zensnmp start
$ZENHOME/bin/zenmodeler start
$ZENHOME/bin/zenactions star
Step 3: Finally you need to check that all the
daemons are working or not, for this issue the command '$ZENHOME/bin/zenoss
status.' This will show you the list of daemons and their status as given
below.
Daemon:
zeoctl program running; pid=XYZ
Daemon: zopectl program running; pid=XYZ
Daemon: zensnmp.py program running;
pid=XYZ
Daemon: zenmodeler.py program
running; pid=XYZ
Daemon: zencrkbld.py program running;
pid=XYZ
Daemon: zenping.py program running;
pid=XYZ
Daemon: zensyslog.py program running;
pid=XYZ
Daemon: zenactions.py program
running; pid=XYZ
With this your Zenoss monitoring system is up and ready to
serve your organization.
Here the system administrator can see the status of all the devices that Zenoss has detected from the network |
Using Zenoss
To start using Zenoss, open its Web portal and add all the devices that you
want to monitor. For example, as a test we added a router to it. This router
provides Internet connectivity to our labs network.
On adding the devices, you can select the model of the
device, OS and other device details from its drop down menu. Once you have added
the device it will automatically be monitored by the Zenoss monitoring system.
In order to test the reaction by the Zenoss system we purposefully plugged out
the router LAN cable. Within 10 secs, Zenoss monitoring system started showing
critical fault on its dashboard.
You can even configure alert and event so that in
case a known fault comes, the system is able to restart the service
automatically without human intervention. Overall it's a good monitoring
system, but configuring is a pain.
Sanjay Majumder