Account Services on the Web

How to install the Xymon client on a Linux machine

Installation

The Xymon client can be installed from an existing (although slightly aged) RPM or compiled from source to get the latest version (recommended).


RPM

Download the rpm using the 'wget' command below or grab the RPM from the Sourceforge download page. Then run the 'rpm' command below.

# wget ftp://195.220.108.108/linux/sourceforge/x/project/xy/xymon/hobbitserver/4.2.0/FC5-hobbit-client-4.2.0-1.i386.rpm
# rpm -i /path/to/FC5-hobbit-client-4.2.0-1.i386.rpm


Skip to Edit Xymon Client Config File.


Source

Since RPMs for the latest Xymon client aren't always available, compiling from source is an alternative option.

Make a directory to compile the source:

mkdir -p /usr/local/src cd /usr/local/src

Fetch the source code with the tar.gz extension from the Xymon Sourceforge download page and save it to /usr/local/src.

wget 'http://sourceforge.net/projects/xymon/files/latest/download?source=files'

Create a user and group called 'xymon':

useradd -u 1984 xymon -m

Untar the Xymon source and configure (version number may have bumped up):

tar -xpf xymon-4.3.12.tar.gz
cd xymon-4.3.12
./configure --client

Configuration script for Xymon client

This script asks a few questions and builds a Makefile to compile Xymon

Checking your make-utility

Xymon normally keeps all of the client configuration files on the Xymon server. If you prefer, it is possible to use a local client configuration file instead - if so, answer 'client' to the next question.
NB: Local configuration requires the PCRE libs on each host.

Server side client configuration, or client side [server] ?
<Return>

Checking for Large File Support ...
Large File Support OK

What userid will be running Xymon [xymon] ?
<Return>

Found passwd entry for user xymon:x:1984:1984::/home/xymon:/bin/bash

Where do you want the Xymon installation [/home/xymon] ?
<Return>

What is the IP-address of your Xymon server [127.0.0.1] ?
129.186.6.14

Using Linux Makefile settings

Created Makefile with the necessary information to build Xymon Some defaults are used, so do look at the Makefile before continuing.
Configuration complete - now run make (GNU make) to build the tools


Before running make, edit Makefile.

Note: LIBRTDEF was added to the stock Makefile somewhere after 4.3.6 and before 4.3.10, so assuming you're using currently Xymon sources you should need to add this manually.

Add the line LIBRTDEF = -lrt so that the top of the makefile looks like:

# Toplevel Makefile for Xymon
BUILDTOPDIR=`pwd`
CLIENTONLY = yes
LOCALCLIENT = no
LIBRTDEF = -lrt


Compile the client:

make
[lots of compiling messages here]

Build complete. Now run 'make install' as root

make install
[lots of install messages here]

Installation complete.

To start the Xymon client, as the xymon user run '/home/xymon/client/runclient.sh start' ⇐ ignore this


Copy the system config init file and set permissions:

cp rpm/xymon-client.init /etc/init.d/xymon-client
chmod 755 /etc/init.d/xymon-client


Modify the DAEMON= line in /etc/init.d/xymon-client to point to /home as follows:

#DAEMON=/usr/lib/xymon/client/runclient.sh
DAEMON=/home/xymon/client/runclient.sh


Ensure that the xymon-client init.d script will run at boot: chkconfig --add xymon-client

Install the Xymon defaults file: cp rpm/xymon-client.default /etc/default/xymon-client

Set up logging directory to point /var/log/xymon: mkdir -p /var/log/xymon
chown xymon:xymon /var/log/xymon
rmdir /home/xymon/client/logs
ln -s /var/log/xymon /home/xymon/client/logs



Edit Xymon Client Config File

Edit /etc/default/xymon-client.

Change the XYMONSERVERS line to set the IP address where updates will be sent:

XYMONSERVERS=“129.186.6.14”


Check Startup Configuration Settings

Use chkconfig to ensure that the client will start automatically at boot.

# chkconfig --list xymon-client
xymon-client 0:off 1:off 2:on 3:on 4:on 5:on 6:off


The presence of '3:on' indicates that the Xymon client is enabled for runlevel 3 (typical default). If your system uses a different default runlevel, check that it's turned on for that runlevel. To display the current runlevel:

# runlevel
N 3


The second value, '3', indicates the current runlevel.


Start the Xymon Client

# service xymon-client start
Starting xymon-client: Xymon client for linux started on shibboleth-2.its.iastate.edu
xymon-client.


Check to see the client is running. There should be at least a couple processing running under the user 'xymon':

# ps auxwww|grep xymon
xymon 2793 0.0 0.0 8428 644 ? Ss 17:18 0:00 /home/xymon/client/bin/xymonlaunch --config=/home/xymon/client/etc/clientlaunch.cfg --log=/home/xymon/client/logs/clientlaunch.log --pidfile=/home/xymon/client/logs/clientlaunch.plato.its.iastate.edu.pid
xymon 5579 0.0 0.0 9248 1256 ? S 22:49 0:00 sh -c vmstat 300 2 1>/home/xymon/client/tmp/xymon_vmstat.plato.its.iastate.edu.5554 2>&1; mv /home/xymon/client/tmp/xymon_vmstat.plato.its.iastate.edu.5554 /home/xymon/client/tmp/xymon_vmstat.plato.its.iastate.edu
xymon 5581 0.0 0.0 6180 636 ? S 22:49 0:00 vmstat 300 2