Setup Xymon monitor


Selection_007

Xymon is an easy and nice and systems and network monitor tool. It was inspired by the Big Brother system and was called Hobbit. I have set it up in my environment (CentOS 6.5) to monitor some critical web sites and services. Here are my how-to notes:

1) Install Xymon from source code.

2) Change the fping permission.

chown root:root /usr/local/sbin/fping
chmod u+s /usr/local/sbin/fping

3) (Optional) If the Xymon is behide a proxy server, you need to add the –bb-proxy-syntax in the xymonet configuration in the file /home/xymon/server/etc/tasks.cfg.

[xymonnet]
ENVFILE /home/xymon/server/etc/xymonserver.cfg
NEEDS xymond
CMD xymonnet –report –ping –checkresponse –bb-proxy-syntax
LOGFILE $XYMONSERVERLOGS/xymonnet.log
INTERVAL 5m

4) (Optional) If you want to use Xymon to monitor the Domain Name validation, you need to:

– Install whois: yum install bind-utils jwhois

– Create a file /home/xymon/server/ext/dnsreg

– Add the following configurations to /home/xymon/server/etc/tasks.cfg

[dnsreg]
ENVFILE /home/xymon/server/etc/xymonserver.cfg
NEEDS xymond
CMD $XYMONHOME/ext/dnsreg
LOGFILE $XYMONSERVERLOGS/dnsreg.log
INTERVAL 1d

5) Add the targets in the file /home/xymon/server/etc/hosts.cfg.

The format is: <IP Address> <Hostname> # <Services>

There are so many Services you can monitor, check the help file to find out more. Here are just some simple examples:

http: monitor the web server. Add the proxy in front of the web if Xymon works behide the proxy.
noconn: ping check is enabled by default. noconn is to disable it.
sslcert: monitor the SSL certificate validation.
smtp: monitor the smtp service.
dns: monitor the dns service.
ldap: monitor the ldap service.
dnsreg: monitor the public DNS registration expiration date.

Here is the sample:

# WEB PAGE
page webserver WEB

group-compress <font size=”+1″>INTERNAL</font>
192.168.1.1 web-01.my.lab # http://web-01.my.lab/
192.168.1.2 web-02.my.lab # http://web-02.my.lab/

group-compress <font size=”+1″>EXTERNAL</font>
2XX.1XX.1XX.1XX http://www.mypublicweb.com # noconn http://proxy-server:8080/http://www.mypublicweb.com/
2XX.1XX.1XX.1XX www.mysslpublicweb.com # noconn sslcert http://proxy-server:8080/http://www.mysslpublicweb.com/

# SERVICES PAGE
page services SERVICES

subpage internal-service INTERNAL
group-compress <font size=”+1″>XYMON</font>
192.168.1.100 xymon.my.lab # bbd http://xymon.my.lab/

group-compress <font size=”+1″>SMTP</font>
192.168.1.200 smtp.my.lab # smtp

group-compress <font size=”+1″>DNS LDAP</font>
0.0.0.0 ad.my.lab # DNS ldap

subpage external-service EXTERNAL

group-compress <font size=”+1″>DNS</font>
2XX.1XX.1XX.1XX dns.mypublic.com # noconn DNS

page domain DOMAINS

0.0.0.0 mypublic.com # noconn dnsreg

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s