wiki:howto/SetupXymonServer

Version 2 (modified by fclaire@…, 14 years ago) (diff)

--

<- Back to the HOWTO section

How to setup Xymon server

  • Audience: Advanced sysadmins
  • Requires: MacPorts >= 1.9, xymon-server

Introduction

Xymon is a tool for monitoring servers, applications and networks. It collects information about the health of your computers, the applications running on them, and the network connectivity between them. All of this information is presented in a set of simple, intuitive webpages that are updated frequently to reflect changes in the status of your systems.

The Xymon client software (port name "xymon") is collecting information on the host you want to monitor. It gathers everything into a report and sends it towards the Xymon server (port name "xymon-server") over TCP. The destination port to connect to the Xymon server is 1984 in reference to big brother http://en.wikipedia.org/wiki/Big_Brother_(Nineteen_Eighty-Four).

Installation

Install Xymon server:

sudo port install xymon-server

Configuration

Note: Configuration of Xymon server implies several changes of your system and will probably require a reboot of your system. Make sure you understand every step before executing it.

Step 1: Tune the number of shared message queues

Xymon server needs at least 9 IPC message queues to run. Unfortunately Mac OS X ships with a default max of 8.

Check how much shared segments a process can use on your system:

$ sysctl kern.sysv.shmseg

And the max number of shared segments system-wide:

$ sysctl kern.sysv.shmmni

If the first number is < 9, you need to tune your system before trying to start xymon server (doing so will make the whole system to crash).

Run the following commands to increase your shared segments:

$ sudo echo "kern.sysv.shmmni=64" >> /etc/sysctl.conf
$ sudo echo "kern.sysv.shmseg=12" >> /etc/sysctl.conf

Reboot your system to activate the change.

More information about shared memory segments on Mac OS X can be found here: http://support.apple.com/kb/HT4022

Step 2: Configure your apache web server

Xymon "make install" ends with:

You must configure your webserver for the Hobbit webpages and CGI-scripts. A sample Apache configuration is in /opt/local/lib/xymon/server/etc/hobbit-apache.conf If you have your Administration CGI scripts in a separate directory, then you must also setup the password-file with the htpasswd command.

So the following commands should do it:

$ sudo mv /opt/local/lib/xymon/server/etc/hobbit-apache.conf /etc/apache2/(other|sites)/
$ sudo /usr/sbin/apachectl restart

The apache2 configuration directory should be /etc/apache2/other/ on Mac OS X and /etc/apache2/sites/ on Mac OS X Server.

Step 3: Make Xymon user part of the admin group

We achieve this with the Directory Service command line utility:

$ sudo dscl . -append /Groups/admin GroupMembership _xymon

Note: on old Mac OS the Xymon user should be "xymon"

Step 4: Start Xymon server

A startup item has been generated that will aid in starting xymon with launchd. It is disabled by default. Execute the following command to start it, and to cause it to launch at startup:

$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.xymon-server.plist

Step 5: Allow incoming connections on Xymon port 1984

If your Mac OSX firewall is enabled, you'll be asked to allow xymon -> accept.

On Mac OSX Server, make sure your ipfw rules will allow incoming TCP connections to port 1984.

Step 6: Check the status of your Xymon server

To view the Xymon webpages, wait 5 minutes to give Xymon time to generate the index page, open your web browser and go to http://localhost/xymon/

<- Back to the HOWTO section