[Nagiosplug-help] Xen VM Monitor plugin problem
Hydropone
hydropone at free.fr
Wed Feb 13 17:20:41 CET 2008
Thomas Guyot-Sionnest a écrit :
> On 08/02/08 10:39 AM, Hydropone wrote:
>> Hi all,
>
>> I just found this cool plugin :
>> http://www.novell.com/communities/node/2640/xen-virtual-machine-monitor-plugin-nagios
>
>
>> to monitor VM on a Xen Host.
>
>> I followed the readme (and add user "nagios" to /etc/sudoers) ...
>
>> The plugin seems to work correctly on the Xen Host :
>
>> [root at host plugins]# su nagios
>> sh-3.1$ /usr/lib64/nagios/plugins/check_xen -w 0 -c 0
>> OK: Xen Hypervisor "host" is running Xen VMs: testvm
>
>> But on the nagios server, it report a wrong result :
>
>> root at nagios~ #/usr/lib/nagios/plugins/check_nrpe -H host -c check_xen
>> Critical Xen VMs Usage - Total NB: 0 - detected VMs:
>
>> What did i miss ?
>
> Make sure:
>
> 1. Check_nrpe is runnig as the nagios user (it the user even created?)
Yes :
ps aux | grep nrpe
nagios 21896 0.0 0.1 39876 1040 ? Ss Feb08 0:00 nrpe -c
/etc/nagios/nrpe.cfg -d
and
# cat /etc/passwd | grep nagios
nagios:x:100:101:nagios:/var/log/nagios:/bin/sh
> 2. The nrpe check definition includes the sudo command
Yes...
> RUNNING=$(sudo /usr/sbin/xm list | awk '!/[DN]/ {print $1 }')
> NBVMS=$(echo $RUNNING | wc -w)
> HNAME=$(hostname)
> 3. Running the exact command (including sudo) as the nagios user works.
>
Yes it works :
> #su nagios
> sh-3.1$ sudo xm list
> Name ID Mem(MiB) VCPUs State Time(s)
> Domain-0 0 1013 2 r----- 3150.8
> testvm 2 2999 2 -b---- 10267.9
Thanks for your help...
--
H.
More information about the Help
mailing list