[xymon] RE: RHEL5 client

Lennon, Padraig Padraig.Lennon at pioneerinvestments.com
Tue Jul 27 10:48:48 CEST 2010


This might be of some use to people:

<ENDSCRIPT>

#!/bin/bash
#set -xv
#
# xymon      This shell script takes care of starting and stopping xymon client
#
# chkconfig: 5 20 80
# description: Manages the Xymon client processes
#
### BEGIN INIT INFO
# Short-Description: start and stop Xymon Client
### END INIT INFO

#set -x
HOSTNAME=`hostname`
DOMAINNAME=your.domain.com

if [ `echo ${HOSTNAME} | grep -ic "${DOMAINNAME}"` -eq 0 ]
then
    FQNAME=${HOSTNAME}"."${DOMAINNAME}
else
    FQNAME=${HOSTNAME}
fi

FQNAME=`echo $FQNAME | tr '[A-Z]' '[a-z]'`

case $1 in
'start')
        su - itsysmon -c "/path/to/hobbit/client/runclient.sh --hostname=${FQNAME} start"
        ;;
'stop')
        su - itsysmon -c "/path/to/hobbit/client/runclient.sh --hostname=${FQNAME} stop"
        pkill hobbitlaunch
        pkill vmstat
        pkill iostat
        ;;
'restart')
        $0 stop
        $0 start
        ;;
*)
        echo "usage: $0 {start|stop|restart}"
        ;;
esac

<ENDSCRIPT>


You should obviously replace your domain name (if required at all) and your install path..

I had to add the lines:
pkill hobbitlaunch
pkill vmstat
pkill iostat

As I found that they were not always stopped cleanly..

To add it to automatically restart

#chkconfig --add xymon
#chkconfig --level 5 xymon on



 


Padraig Lennon 
Senior Systems Integration Engineer

Pioneer Investments Management Ltd
5th Floor |Georges Quay Plaza | Georges Quay | Dublin 2 | Rep. of Ireland
Tel.  +353 (0)1 480.2081 

padraig.lennon at pioneerinvestments.com | www.pioneerinvestments.com

Please consider the environment before printing this e-mail

-----Original Message-----
From: Smith, Cathy [mailto:cathy.smith at pnl.gov] 
Sent: 26 July 2010 23:49
To: xymon at xymon.com
Subject: RE: [xymon] RE: RHEL5 client

Thanks everyone for your suggestions.  Adding the hostname to the startup script works nicely.

I didn't include it in my original posting, but the host name was included in the /etc/hosts file.  I tried changing the order of the entries in the hosts file, but that didn't seem to affect anything.   The box was configured in the hobbit's server's bb-hosts file.   


Cathy
---
Cathy L. Smith
IT Engineer
Pacific Northwest National Laboratory

Phone:  509.375.2687
Fax:        509.375.2330
Email:     cathy.smith at pnl.gov



-----Original Message-----
From: Tim McCloskey [mailto:tm at freedom.com] 
Sent: Monday, July 26, 2010 2:44 PM
To: xymon at xymon.com
Subject: RE: [xymon] RE: RHEL5 client

Cathy, 

When you start the client, runclient.sh will get the client name from the MACHINEDOTS="`uname -n`"  var.  As Ryan mentioned, perhaps you don't have a hostname / ip configured in /etc/hosts on the RHEL5 box.

Whatever the output of hostname is (from the RHEL5 box) should have a matched entry in rhel5:/etc/hosts that is not localhost.

You can cheat and define your own hostname in runclient.sh but it would be better to stick with the standard setup and properly configure the RHEL5 client AND the server.  The server expects to see the same hostname defined in bb-hosts as reported by the client's `hostname`/$MACHINDOTS var.

Hope that makes some sense...

Regards, 

Tim
________________________________________
From: Ryan Novosielski [novosirj at umdnj.edu]
Sent: Monday, July 26, 2010 2:28 PM
To: xymon at xymon.com
Subject: Re: [xymon] RE: RHEL5 client

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, that is true, but the client should not be reporting 127.0.0.1 as
its IP address either. Maybe the RHEL5 client has no hostname with a
valid IP in its /etc/hosts, or the hostname is listed on the 127.0.0.1 line.

On 07/26/2010 05:17 PM, Tim McCloskey wrote:
> The IP/host of the rhel5 client would normally be added to the Xymon server (rhel4) bb-hosts file.
>
> http://www.xymon.com/hobbit/help/hobbit-config.html
> http://www.xymon.com/hobbit/help/manpages/man5/bb-hosts.5.html
>
>
>
> ________________________________________
> From: Smith, Cathy [cathy.smith at pnl.gov]
> Sent: Monday, July 26, 2010 1:43 PM
> To: xymon at xymon.com
> Subject: [xymon] RHEL5 client
>
> Folks
>
> I installed the Xymon client on a Red Hat 5 server.  It is showing up in the Ghost report with the 127.0.0.1 IP address.  I don't see where in the configuration files to set the IP address and/or the host name for the client.  Can someone point me to the right place?
>
> We run Hobbit on a Red Hat 4 server. If I should be running a different client for the RHEL5 box, I'd appreciate a link to where I can get it.
>
> Thanks for your help.
>
>
> Best regards,
>
> Cathy
> ---
> Cathy L. Smith
> IT Engineer
> Pacific Northwest National Laboratory
>
> Phone:  509.375.2687
> Fax:        509.375.2330
> Email:     cathy.smith at pnl.gov
>
>
>
>
> To unsubscribe from the xymon list, send an e-mail to
> xymon-unsubscribe at xymon.com
>
>
>


- --
- ---- _  _ _  _ ___  _  _  _
|Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Sr. Systems Programmer
|$&| |__| |  | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxN/eUACgkQmb+gadEcsb6/qgCdH5QPC1n12PlQzN+IpiFVD/q6
WW0AoMls45CghCJwah1sqU3QKgKk1Wyu
=IBjR
-----END PGP SIGNATURE-----


To unsubscribe from the xymon list, send an e-mail to
xymon-unsubscribe at xymon.com



-------------- next part --------------



"The information in this e-mail and in any attachments is confidential and intended solely 
for the attention and use of the named addressee(s). This information may be subject to legal, 
professional or other privilege and further distribution of it is strictly prohibited without 
our authority. If you are not the intended recipient, you are not authorised to and must not 
disclose, copy, distribute, or retain this message or any part of it, and should notify us 
immediately.

This footnote also confirms that this email has been automatically scanned for the presence 
of computer viruses, profanities and certain file types."

Pioneer Investment Management Limited.

1 George?s Quay Plaza, George?s Quay, Dublin 2, Ireland. 

Registered in Ireland no. 287793.


More information about the Xymon mailing list