Discussion:
[Check_mk (english)] NTP on AIX
Dale Stubblefield
2012-03-22 13:46:44 UTC
Permalink
I added the following to my AIX agent to check NTP the same way as the
Linux agent:

if which ntpq > /dev/null 2>&1 ; then
if [ $(lssrc -s xntpd|grep -c active) -gt 0 ] ; then
echo '<<<ntp>>>'
# remote heading, make first column space separated
ntpq -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
fi
fi
Florian Holeczek
2012-03-22 15:53:20 UTC
Permalink
Just want to let you know that it works nicely in my 6100-06 environments!

FYI
Florian


----- Ursprüngliche Mail -----
Von: "Dale Stubblefield" <***@gmail.com>
An: checkmk-***@lists.mathias-kettner.de
Gesendet: Donnerstag, 22. März 2012 14:46:44
Betreff: [Check_mk (english)] NTP on AIX


I added the following to my AIX agent to check NTP the same way as the Linux agent:



if which ntpq > /dev/null 2>&1 ; then
if [ $(lssrc -s xntpd|grep -c active) -gt 0 ] ; then
echo '<<<ntp>>>'
# remote heading, make first column space separated
ntpq -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
fi
fi
Dale Stubblefield
2012-03-22 17:58:16 UTC
Permalink
Florian,

I should note that I had to add a couple of lines like below, else the
Check_MK active check reports that there isn't an NTP section if xntpd is
not running.

if which ntpq > /dev/null 2>&1 ; then
if [ $(lssrc -s xntpd|grep -c active) -gt 0 ] ; then
echo '<<<ntp>>>'
# remote heading, make first column space separated
ntpq -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
else
echo '<<<ntp>>>'
fi
fi

Thanks,
Dale
Post by Florian Holeczek
Just want to let you know that it works nicely in my 6100-06 environments!
FYI
Florian
----- UrsprÃŒngliche Mail -----
Gesendet: Donnerstag, 22. MÀrz 2012 14:46:44
Betreff: [Check_mk (english)] NTP on AIX
if which ntpq > /dev/null 2>&1 ; then
if [ $(lssrc -s xntpd|grep -c active) -gt 0 ] ; then
echo '<<<ntp>>>'
# remote heading, make first column space separated
ntpq -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
fi
fi
_______________________________________________
checkmk-en mailing list
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
--
.˙. Learn more about Dale Stubblefield at http://about.me/dalestubblefield
.˙.
Florian Holeczek
2012-03-23 06:44:58 UTC
Permalink
Hi Dale,

good hint! Actually I'd even move the echo to the very beginning, so that it's as sure as possible for the marker to show up:

echo '<<<ntp>>>'
if which ntpq > /dev/null 2>&1 ; then
if [ $(lssrc -s xntpd|grep -c active) -gt 0 ] ; then
# remote heading, make first column space separated
ntpq -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
fi
fi

Regards
Florian


----- Ursprüngliche Mail -----
Von: "Dale Stubblefield" <***@gmail.com>
An: "Florian Holeczek" <***@holeczek.de>
CC: checkmk-***@lists.mathias-kettner.de
Gesendet: Donnerstag, 22. März 2012 18:58:16
Betreff: Re: [Check_mk (english)] NTP on AIX

Florian,


I should note that I had to add a couple of lines like below, else the Check_MK active check reports that there isn't an NTP section if xntpd is not running.



if which ntpq > /dev/null 2>&1 ; then
if [ $(lssrc -s xntpd|grep -c active) -gt 0 ] ; then
echo '<<<ntp>>>'
# remote heading, make first column space separated
ntpq -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
else
echo '<<<ntp>>>'
fi
fi


Thanks,
Dale





On Thu, Mar 22, 2012 at 10:53 AM, Florian Holeczek < ***@holeczek.de > wrote:


Just want to let you know that it works nicely in my 6100-06 environments!

FYI
Florian


----- Ursprüngliche Mail -----
Von: "Dale Stubblefield" < ***@gmail.com >
An: checkmk-***@lists.mathias-kettner.de
Gesendet: Donnerstag, 22. März 2012 14:46:44
Betreff: [Check_mk (english)] NTP on AIX




I added the following to my AIX agent to check NTP the same way as the Linux agent:



if which ntpq > /dev/null 2>&1 ; then
if [ $(lssrc -s xntpd|grep -c active) -gt 0 ] ; then
echo '<<<ntp>>>'
# remote heading, make first column space separated
ntpq -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
fi
fi






_______________________________________________
checkmk-en mailing list
checkmk-***@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
--
.˙. Learn more about Dale Stubblefield at http://about.me/dalestubblefield .˙.
Loading...