Plugin check_xenvm.pl

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Plugin check_xenvm.pl

Post by srrhd »

Hi,

I am trying to use the check_xenvm.pl to monitor the virtual machine on a XEN server.
I had a right problem that i have fixed by adding the user nagios to the sudoers. So now the execution of the plugin as nagios on the Xen server works properly:

Code: Select all

[root@xen]# sudo -u nagios /usr/lib/nagios/plugins/check_xenvm.sh -w 1 -c 1
OK: Xen Hypervisor "xen.srrhd.re" is running Xen VMs: vm1, vm2
But when i execute this plugin throught the NRPE agent from the nagiosXI server i got :

Code: Select all

[root@nagiosxi libexec]# ./check_nrpe -H X.X.X.X -n -t 30 -c check_xen -a '-w 1 -c 1'
Critical Xen VMs Usage - Total NB: 0 - detected VMs:
I tryied adding the plugins directory as sudoers for nagios:

Code: Select all

nagios ALL=(ALL) NOPASSWD:/usr/sbin/xm list
nagios ALL=(ALL) NOPASSWD:/usr/lib/nagios/plugins/
But the error remain.

Does anyone got an idea ? When executing the check_nrpe, isn't the user nagios that executes the plugin on the remote server ?

Aurelien.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Plugin check_xenvm.pl

Post by agriffin »

Can you post your nrpe command definition for check_xen? You can also check that the dont_blame_nrpe option is set to 1 in your nrpe.cfg.
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: Plugin check_xenvm.pl

Post by srrhd »

Yes the dont_blame_nrpe is set to 1. The NRPE part works perfectly. I might be wrong, but i always pass the argument throught the check_nrpe to be able to configure everything from the NagiosXI server and all my others checks works.

When NRPE logs are activated i just got any.

Here is the command definition :

Code: Select all

command[check_xen]=/usr/lib/nagios/plugins/check_xenvm.sh $ARG1$
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Plugin check_xenvm.pl

Post by agriffin »

Can you try the steps outlined here? I know he says he's using check_xenvm.sh with SSH instead of NRPE, but it's worth a shot. I have no Xen servers to test this on. You'll need to substitute /check_xenvm.sh with /usr/lib/nagios/plugins/check_xenvm.sh.
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: Plugin check_xenvm.pl

Post by srrhd »

Thanks to force me to check what i have done !!

I forgot to add into /etc/sudoers

Code: Select all

Defaults:nagios !requiretty
Everything works now !
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Plugin check_xenvm.pl

Post by mguthrie »

Good deal, glad it's working for you!
Locked