Skip to content

Instantly share code, notes, and snippets.

@JosefJezek
Last active June 2, 2020 17:01
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save JosefJezek/5547085 to your computer and use it in GitHub Desktop.
Save JosefJezek/5547085 to your computer and use it in GitHub Desktop.
Install & Setup Zenoss

Install & Setup Zenoss Gittip

Author: Josef Jezek

Install

Check Download page for latest version of Zenoss and update VERSION

Ubuntu / Debian

CentOS / Red Hat 64-bit

yum install -y wget git byobu ntpdate htop unzip vim-enhanced fping nmap

echo 'alias vi=vim' > /etc/profile.d/vi-vim.sh

VERSION=4.2.3
wget --no-check-certificate https://github.com/zenoss/core-autodeploy/tarball/$VERSION -O auto.tar.gz
tar xvf auto.tar.gz
cd zenoss-core-autodeploy-* 

Default ZenPacks

Now, you have the option of editing zenpack_actions.txt, which defines all ZenPacks that will be installed by default (all Core ZenPacks). If you would like to avoid installing certain ZenPacks, then remove the corresponding lines from this file and save it.

Install Zenoss Core

./core-autodeploy.sh

Check installed package

http://127.0.0.1:8080

Patch Manager

Setup

Virtual Machine Image

yum update

Set hostname in /etc/sysconfig/network

Setup network in /etc/sysconfig/network-scripts/ifcfg-eth0

BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

Setup DNS in /etc/resolv.conf

nameserver 192.168.1.1
nameserver 192.168.1.2
nameserver 192.168.1.3
domain example.com
service network restart

Set NTP server in /etc/ntp.conf

server 192.168.1.1

Set localtime

rm /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Prague /etc/localtime

Listen to port 80

yum install httpd

Create /etc/httpd/conf.d/zenoss.conf

<VirtualHost *>
    ServerName zenoss.example.com
    ServerAlias zenoss
    
    ProxyRequests Off
    ProxyPreserveHost On

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    
    ProxyPass / http://localhost:8080/ connectiontimeout=5 timeout=30
    ProxyPassReverse / http://localhost:8080/
    
    <Location />
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>
service httpd restart
chkconfig httpd on

Set listen to localhost in /opt/zenoss/etc/zope.conf

Active Directory

Download

yum install gcc python-devel openssl-devel openldap-devel

su - zenoss
wget https://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4.13.tar.gz --no-check-certificate
easy_install python-ldap-2.4.10.tar.gz
easy_install Products.LDAPMultiPlugins-1.14.tar.gz
Configure the LDAP Multi Plugin or ActiveDirectory Multi Plugin
Go to https://YOUR_ZENOSS_SERVER/zport/manage and log in as admin.
Click acl_users in the tree view on the left side of the page.
Select LDAP Multi Plugin from the dropdown list and click Add.
Configure the plugin. (Note: your configuration may vary depending on what you want to do, i.e. if you will be assigning roles based on LDAP groups or not.)
ID: <enter an ID>
Title: <enter a title>
LDAP Server: YOUR_LDAP_SERVER
check Use SSL if necessary
check Read-only
Login Name Attribute, User ID Attribute, RDN Attribute: UID (uid)
Users Base DN: YOUR_BASE_DN
select Groups not stored on LDAP server
Groups Base DN: <blank>
Manager DN: <blank>
User password encryption: SHA
Default User Roles: <blank>

Click acl_users then click the LDAP config you just created from the list.
Check the boxes next to “Authentication”, “User_Enumeration”, and “Role_Enumeration”.
At this point, you should be able to log in to Zenoss using credentials from LDAP.

Email

LDAP Schema Tab:
Add a new item.
LDAP Attribute Name: mail
Friendly Name: email
Map to Name: email

http://zenoss.hosted.jivesoftware.com/message/13218

Bug

WARNING:Init:Class Products.LDAPUserFolder.LDAPUserFolder.LDAPUserFolder has a security declaration for nonexistent method 'getEncryptedPassword'
vi /opt/zenoss/lib/python2.7/site-packages/Products.LDAPUserFolder-2.26-py2.7.egg/Products/LDAPUserFolder/LDAPUserFolder.py

getEncryptedPassword -> getEncryptedBindPassword

https://bugs.launchpad.net/ldapuserfolder/+bug/1221624

MIB

Tweak

Events

RabbitMQ

rabbitmqctl list_queues -p /zenoss

The rabbitmq-server blocks by default every connection, if the memory is over 40% or the filesystem hasn't min. 1gb free space.

rabbitmqctl list_connections

If there is something with "blocked" or "blocking" you have the same problem. You can modify this limitations:

Prepare devices

Setup snmp in Linux

CentOS

/etc/snmp/snmpd.conf

com2sec notConfigUser default zenoss
view systemview included .1
syslocation Rack
syscontact Admin <admin@localhost>

IPtables

iptables -L
iptables -I INPUT -p udp --dport 161 -j ACCEPT
service iptables save
service iptables restart

Dell OpenManage

https://github.com/epuzanov/ZenPacks.community.DellMon

http://web.mit.edu/ebj/Desktop/ebj/MacData/afs.cron/documentation/dell-server-admin/en/Dosa/UG/setup.htm#wp1047161

smuxpeer .1.3.6.1.4.1.674.10892.1

snmpwalk -Os -c public -v 2c 192.168.1.1 1.3.6.1.4.1.674

Setup syslog in Linux

CentOS

vi /etc/syslog.conf
*.warn;mail.none;news.none         @<YourZenossIP>
mail.err                           @<YourZenossIP>

service syslog restart

Ubuntu

sudo vi /etc/rsyslog.d/50-default.conf
*.warn;mail.none;news.none         @<YourZenossIP>
mail.err                           @<YourZenossIP>

sudo service rsyslog restart

Monitoring

Zenpack

su - zenoss
zenpack --list
zenpack --install ?.egg
zenpack --remove ?.egg

Cisco

Dell

HTTP

Java

LibVirt

yum install libvirt-python
su - zenoss
ssh-keygen
ssh-copy-id hostname_from_zenoss
ssh username@hostname_from_zenoss

Nagios NRPE

yum install nagios-plugins-nrpe

Oracle DB

SAR Linux Perf

SNMP Extend

Distributed Collectors

WMI Windows

Issue

http://jira.zenoss.com/jira/browse/ZEN-8719

Uninstall Zenoss

service zenoss stop

yum remove zenoss mysql-server memcached rabbitmq-server

rm -rf /var/lib/mysql/
rm -rf /var/lib/rabbitmq/
rm -rf /opt/zenoss
userdel zenoss
rm -rf /home/zenoss

mysql -u root
show databases;
drop database zenoss_zep;
drop database zodb;
drop database zodb_session;

Resources

Notes

TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment