zenoss监控安装

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 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 4 – Zenoss Dashboard

 

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 tochange the SNMP community name accordingly but also configure this when adding clients to Zenoss!

你可能感兴趣的:(zenoss监控安装)