Share, , Google Plus, Pinterest,

Print

Posted in:

Install Zenoss Monitoring Server on CentOS 6

Zenoss is a free and open source monitoring solution similar to Nagios. It can be used to monitor all sorts of hardware and in case of failures sends out alerts to recipients. Zenoss Core provides a web interface that allows system administrators to monitor availability, inventory/configuration, performance, and events. Compared to Nagios (my personal opinion) Zenoss has alot higher minimal hardware requirements and it is quite a RAM hog, so be sure you meet the requirements if you want your Zenoss instance to run smoothly.

Install Zenoss Monitoring Server
Install Zenoss Monitoring Server

Minimal Hardware Requirements:

  • Small Deployments (1 to 250 Monitored Devices)
    • 4GB RAM
    • 2 CPU Cores
    • 1x 300GB, 10K RPM Drive
  • Medium Deployments (250 to 500 Monitored Devices)
    • 8GB RAM
    • 4 CPU Cores
    • 1x 300GB, 10K RPM Drive
  • Large Deployments (500 to 1000 Monitored Devices)
    • 16GB – 32GB RAM
    • 8 CPU Cores
    • 1x 300GB, 15K RPM Drive

Let’s Install Zenoss Monitoring Server on CentOS 6!

1. Disable SELinux and IPtables

For this guide SELinux and IPtables were completely disabled and CentOS 6 was up-to-date!

2. Add DNS FQDN Entry and NTP Sync

To ensure proper resolving FQDN entries in DNS or /etc/hosts must exist and please configure NTP time synchronization for services to run properly.

3. Install Following Packages

Install the following packages to make your life a bit easier – especially if you are on CentOS 6 minimal install.

[root@centos1 ~]# yum install openssh-clients wget vim-enhanced

4. Install Zenoss Dependencies Repository

This RPM installs Zenoss Dependency Repository. It will help us resolve all of the dependencies required to install and run Zenoss.

[root@centos1 ~]# rpm -ivh http://deps.zenoss.com/yum/zenossdeps-4.2.x-1.el6.noarch.rpm

5. Install MySQL Repository

Zenoss requires MySQL database server. We will download and install the latest MySQL server version available.

[root@centos1 ~]# rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

6. Download and Install Oracle Sun Java

Download the latest Oracle Sun Java RPM from Java Downloads and transfer it to your server. Zenoss needs Oracle Java to run. Please install Oracle Sun Java RPM as follows.

[root@centos1 ~]# rpm -ivh jre-7u60-linux-x64.rpm 
Preparing... ########################################### [100%]
 1:jre ########################################### [100%]
Unpacking JAR files...
 rt.jar...
 jsse.jar...
 charsets.jar...
 localedata.jar...
 jfxrt.jar...

Remove existing java links and recreate them, pointing to Oracle Sun Java binaries.

[root@centos1 ~]# rm /usr/bin/java /usr/bin/javaws 
rm: remove symbolic link `/usr/bin/java'? y
rm: remove symbolic link `/usr/bin/javaws'? y
[root@centos1 ~]# ln -s /usr/java/latest/bin/java /usr/bin/java
[root@centos1 ~]# ln -s /usr/java/latest/bin/javaws /usr/bin/javaws

Check and make sure you are running Oracle Sun Java.

[root@centos1 ~]# java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

7. Install and Start Latest MySQL Server

Install the latest version of MySQL server and start it but DO NOT set MySQL server root password yet! This will enable Zenoss to automatically populate MySQL database.

[root@centos1 ~]# yum install mysql-community-server
[root@centos1 ~]# /etc/init.d/mysqld start

8. Download and Install Latest Zenoss RPM

Download latest Zenoss RPM to your server and install it via “yum” to resolve dependencies.

[root@centos1 ~]# wget http://downloads.sourceforge.net/project/zenoss/zenoss-4.2/zenoss-4.2.5/zenoss_core-4.2.5-2108.el6.x86_64.rpm
[root@centos1 ~]# yum localinstall zenoss_core-4.2.5-2108.el6.x86_64.rpm

9. Start Postfix Service

Postfix or other mail server needs to run to enable sending of Zenoss emails alerts.

[root@centos1 ~]# /etc/init.d/postfix start

10. Start Zenoss for the First Time

Zenoss first run might take some time. Zenoss has to populate the database and install ZenPacks, please be patient…

[root@centos1 ~]# /etc/init.d/zenoss start
Zenoss not initialized. Performing first-boot initialization...
Fresh install pre steps
Checking RRDtool version >= 1.4.7: [ OK ] 1.4.7
Dropping database: zodb_session
Creating database: zodb_session
Applying schema version: 1
Applying schema version: 2
Applying schema version: 3
Dropping database: zodb
Creating database: zodb
Applying schema version: 1
Applying schema version: 2
Applying schema version: 3
Creating database: zenoss_zep
Applying schema version: 1
Applying schema version: 2
Applying schema version: 3
Applying schema version: 4
Applying schema version: 5
Applying schema version: 6
make zope instance.
Loading initial Zenoss objects into the Zeo database
(this can take a few minutes)
Zenoss initialization complete.
Daemon: zeneventserver starting...
Waiting for zeneventserver to start....................
2014-07-08 10:09:33,487 INFO zen.ZPLoader: Loading /opt/zenoss/ZenPacks/ZenPacks.zenoss.ApacheMonitor-2.1.4-py2.7.egg/ZenPacks/zenoss/ApacheMonitor/objects/objects.xml
2014-07-08 10:09:33,589 INFO zen.AddToPack: End loading objects
2014-07-08 10:09:33,589 INFO zen.AddToPack: Processing links
...
...

Zenpacks were installed. Restarting zenoss.
Daemon: zredis stopping...
already stopped
Daemon: zenprocess stopping...
already stopped
Daemon: zencommand stopping...
already stopped
Daemon: zenperfsnmp stopping...
already stopped
Daemon: zenmodeler stopping...
already stopped
Daemon: zentrap stopping...
already stopped
Daemon: zenactiond stopping...
already stopped
Daemon: zenstatus stopping...
already stopped
Daemon: zensyslog stopping...
already stopped
Daemon: zenping stopping...
already stopped
Daemon: zeneventd stopping...
already stopped
Daemon: zenjobs stopping...
already stopped
Daemon: zenhub stopping...
already stopped
Daemon: zenrrdcached stopping...
already stopped
Daemon: zopectl daemon manager not running
Daemon: zeneventserver stopping...
Daemon: zeneventserver starting...
Waiting for zeneventserver to start........
Daemon: zopectl .
daemon process started, pid=10380
Daemon: zenrrdcached starting...
Daemon: zenhub starting...
Daemon: zenjobs starting...
Daemon: zeneventd starting...
Daemon: zenping starting...
Daemon: zensyslog starting...
Daemon: zenstatus starting...
Daemon: zenactiond starting...
Daemon: zentrap starting...
Daemon: zenmodeler starting...
Daemon: zenperfsnmp starting...
Daemon: zencommand starting...
Daemon: zenprocess starting...
Daemon: zredis starting...
Daemon: zenpython starting...
Daemon: zenjmx starting...

Fresh install post step
--2014-07-08 10:19:06-- http://centos1.geekpeek.net:8080/zport/dmd/DeviceLoader/loadDevice?deviceName=centos1.geekpeek.net&devicePath=/Server/Linux
Resolving centos1.geekpeek.net... 192.168.10.32
Connecting to centos1.geekpeek.net|192.168.10.32|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “/dev/null”

0K .......... 61.2 =2m56s

2014-07-08 10:22:34 (61.2 B/s) - “/dev/null” saved [10772]

Zenoss installation completed.

DEBUGGING:

  • If starting Zenoss fails with “Failed starting rabbitmq — exiting!” please add a line to /etc/hosts with the IP address of the Zenoss server and FQDN and try starting Zenoss again!
  • If when you visit web URL only see HTML only output something went wrong at the first time Zenoss run. Please remove Zenoss “yum remove zenoss-4.2.5-2108.el6.x86_64”, reinstall RPM “yum localinstall zenoss_core-4.2.5-2108.el6.x86_64.rpm” and run Zenoss again for the first time.

UPDATE: Thanks to GeekPeek.Net visitor Sujith if you are having problems when accessing the login page for the first time (HTML only view) you can get it resolved by using script from the link HERE.

11. Visit Zenoss from Web Browser

Visit http://ip_address_or_hostname:8080 with your browser and follow initial Zenoss steps.

Picture 1 - Install Zenoss Monitoring Server - Click on "Get Started"
Picture 1 – Install Zenoss Monitoring Server – Click on “Get Started”

 

Picture 2 - Install Zenoss Monitoring Server - Set administrator password and a new user account
Picture 2 – Install Zenoss Monitoring Server – Set administrator password and a new user account

 

Install Zenoss Monitoring Server - Picture 3 - Specify or auto discover monitored devices
Install Zenoss Monitoring Server – Picture 3 – Specify or auto discover monitored devices

 

Install Zenoss Monitoring Server - Picture 4 - Zenoss Dashboard
Install Zenoss Monitoring Server – Picture 4 – Zenoss Dashboard

 

Install Zenoss Monitoring Server - Picture 5 - Zenoss Infrastructure
Install Zenoss Monitoring Server – Picture 5 – Zenoss Infrastructure

 

12. Make Services Start at Boot

[root@centos1 ~]# chkconfig mysqld on
[root@centos1 ~]# chkconfig zenoss on
[root@centos1 ~]# chkconfig postfix on

13. Start SNMP Service On Clients

If you want to add clients to Zenoss you first need to start the SNMP service on these clients (usually snmpd daemon) and allow Zenoss Monitoring Server to connect to SNMP daemon via firewall (iptables).

The default port SNMP runs on is 161 UDP and if you leave client SNMP configuration default (community name “public”) most of things should be up and running – of course it is advised to change the SNMP community name accordingly but also configure this when adding clients to Zenoss!

  • Sujith

    This is an useful information and I really appreciate your effort on this. I have installed Zenoss for testing and it is running smoothly. After the installation, I got an error while accessing the zenoss web page login and I fixed that using a script by following the link http://community.zenoss.org/message/68779?tstart=0

    So I thought I can share this in here 🙂

    • Mitch

      Hi Sujith! Thanks very much for sharing this information. I have updated the post with it for future readers. Regards, Mitch

  • nottyboy

    tried it but it always show the snmp is down exclamation mark, I have no idea how to get the snmp works

  • MrObscure

    The guide for Zenoss clearly states that you should not use java version 1.7 as its not supported

    2.6. Install Oracle Java

    Install Oracle Java 1.6. (Java 1.7 is not supported.)

    http://www.zenoss.com/documentation/Core_Docs/Zenoss_Core_Installation_Upgrade_01-062014-4.2-v20.pdf

    glad you got this working but for others could be setting themselves up for failure.

  • Pingback: Add Linux Client to Zenoss Monitoring - GeekPeek.Net()

  • Pingback: ZenHub is Down Zenoss Problems - GeekPeek.Net()

  • Pingback: How To Use Zenjmx | Uomino3()

  • pasan

    I have got an error as below,
    can anyone please help me on here.

    [root@zenosshq ~]# /etc/init.d/zenoss start
    Zenoss not initialized. Performing first-boot initialization…
    Fresh install pre steps
    Checking RRDtool version >= 1.4.7: [ OK ] 1.4.7
    Adding RabbitMQ user: zenoss
    Adding RabbitMQ vhost: /zenoss
    Setting RabbitMQ permissions for user: zenoss
    ERROR 1558 (HY000) at line 3: Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50557, now running 50637. Please use mysql_upgrade to fix this error.
    Dropping database: zodb_session
    Creating database: zodb_session
    Failed to create ZODB session database

    • Mitch

      Hi Pasan, Have you tried with what the error suggests? Did you play around with MySQL anyhow? How come your MySQL version changed? Regards, Mitch