Zenoss

Mandatory Packages

 * >=MySQL 5.0.22
 * net-analyzer/net-snmp
 * mail-mta/sendmail
 * dev-python/twisted
 * dev-python/twistedsnmp
 * net-zope/zope
 * net-zope/zopeinterface
 * dev-python/pysnmp
 * net-analyzer/rrdtool
 * dev-lang/swig

Zenoss Install Notes
If you installed mysql from scratch, then perform the following:


 * emerge --config mysql


 * Create user for zenoss
 * 1) useradd -m zenoss
 * 2) passwd zenoss


 * Modify .bashrc
 * 1) echo 'export ZENHOME=/usr/local/zenoss' >> /home/zenoss/.bashrc
 * 2) echo 'export PYTHONPATH=$ZENHOME/lib/python' >> /home/zenoss/.bashrc
 * 3) echo 'export PATH=$ZENHOME/bin:$PATH' >> /home/zenoss/.bashrc


 * modify sudoers using visudo, add following lines:
 * 1) visudo -f /etc/sudoers


 * add to the defaults block of the file
 * 1) Defaults        env_keep += "PYTHONPATH ZENHOME"
 * at the bottom of the line
 * 1) zenoss          ALL=NOPASSWD:/usr/local/zenoss/bin/python,/bin/kill,/usr/sbin/sendmail
 * Create directory where to install zenoss
 * 1) mkdir /usr/local/zenoss
 * Give appropriate user rights for the directory
 * 1) chown zenoss /usr/local/zenoss
 * Login as zenoss to do the install and stuff
 * 1) su - zenoss
 * Download latest release package from here, you want the source tarball


 * Extract the package and move into it and run the install script


 * zenoss-2.4.5.tar.gz had some install issues on my amd-32bit gentoo (synced to latest as of this writing). Using zenoss svn r15366 resolved those issues.
 * 1) tar -xzf zenoss- .tar.gz
 * 2) cd zenoss-
 * IMPORTANT NOTE BEFORE STARTING INSTALL: *


 * You need to modify install-functions.sh, since it does a bad call to mysql and comment following line (78-80):
 * 1) attempt to login to the database using the mysql user
 * 2) mysql -h ${MYSQLHOST} -u ${MYSQLUSER} --port=${MYSQLPORT} -p"${MYSQLPASS}" < /dev/null >/dev/null || \
 * 3) fail "During the MySQL install, the supplied MySQL user (${MYSQLUSER}) or password is incorrect "

./install.sh


 * Answer the questions during install and you're done.

chown root:zenoss /usr/local/zenoss/bin/zensocket chmod 04750 /usr/local/zenoss/bin/zensocket

zenoss start


 * To get Zenoss to start at boot:

cp /usr/local/zenoss/bin/zenoss /etc/init.d


 * You will then need to edit /etc/init.d/zenoss:

nano /etc/init.d/zenoss


 * Add the following line to the script after the comment block:

export ZENHOME=/usr/local/zenoss


 * And finally, add zenoss to your default runlevel (this will be different if you are non-Gentoo):

rc-update add zenoss default


 * zenoss added to runlevel default

rc-update -a mysql default rc-update -a snmpd default
 * Add mysql as well:

Zenoss Upgrade Notes

 * Sudo into zenoss user
 * Download tar.gz source files from zenoss site


 * Fix install-functions.sh:


 * IMPORTANT NOTE BEFORE STARTING INSTALL: *


 * You need to modify install-functions.sh, since it does a bad call to mysql and comment following line (78-80):


 * attempt to login to the database using the mysql user
 * 1) mysql -h ${MYSQLHOST} -u ${MYSQLUSER} --port=${MYSQLPORT} -p"${MYSQLPASS}" < /dev/null >/dev/null || \


 * 1) fail mysql install, user or password is incorrect


 * ./install.sh


 * All should proceed without problems

chown root:zenoss /usr/local/zenoss/bin/zensocket chmod 04750 /usr/local/zenoss/bin/zensocket
 * Set zensocket permissions:

/etc/init.d/zenoss start
 * Restart zenoss

Migrate Zenoss to a new server

 * Use the Zenoss admin panel to create a backup of the old zenoss instance.


 * This is stored in /usr/local/zenoss/backups, move this file to your new server.


 * Create a new installation of Zenoss on new server. For some reason the Mysql root password must be blank until after the first startup of Zenoss.

zenpack -list
 * Ensure all Zenpacks are installed on the new server, you must have the identical Zenpack on the new server as the old server. Run the command below as the zenoss user.


 * Copy the backup file your created from the old server to new server and put it in /usr/local/backups folder


 * Ensure the new server Zenoss is shutdown.

/etc/init.d/zenoss stop

ps aux | grep zenoss
 * Use ps to make sure

zenrestore -v --no-eventsdb --file /usr/local/zenoss/backups/youroldserverzenossbackup zenrestore --dbuser=zenoss --dbpass=zenoss --file /usr/local/zenoss/backups/youroldserverzenossbackup
 * use zenrestore to restore zenoss to the new server.

zenrestore -help
 * If you get stuck you can get all the options for zenrestore with

vi /usr/local/zenoss/etc/zeo.conf
 * Check zeo path

python /usr/local/zenoss/bin/python
 * And make sure it says


 * Use zenmigrate to update everything on the new zenoss instance.

zeoctl start
 * Start zeo as zenoss user

zenmigrate
 * and then run zenmigrate

zendmd
 * Re-register the portlets


 * from Products.ZenWidgets.ZenossPortlets.ZenossPortlets


 * import register_default_portlets
 * register_default_portlets(zport.ZenPortletManager)
 * commit

/etc/init.d/zenoss start
 * Then start zenoss

SNMP on servers
com2sec local    127.0.0.1/32    public com2sec mynetwork 10.10.0.0/16   public group MyRWGroup v1        local group MyRWGroup v2c       local group MyRWGroup usm       local group MyROGroup v1        mynetwork group MyROGroup v2c       mynetwork group MyROGroup usm       mynetwork view all   included  .1                               80 access MyROGroup ""     any       noauth    exact  all    none   none access MyRWGroup ""     any       noauth    exact  all    all    none syslocation admin-box syscontact Ops  proc mountd proc ntalkd 4 proc sendmail 10 1 exec echotest /bin/echo hello world disk / 10000 load 12 14 14
 * /etc/snmp/snmpd.conf:

iptables -A INPUT -s 10.10.0.0/16 -p udp -m udp --dport 161:162 -j ACCEPT
 * IPtables rule:

Logrotation
/usr/local/zenoss/log/*.log \{ size=50M rotate 5 copytruncate

Additional reading
it's also highly recommended to also read Build and Install Zenoss guide

Zenmodeler failures

 * Go "Event Manager". From the Menu Arrow, select "Clear all heartbeats..."