Page 1 of 2
Warning: This plugin must be either run as root or setuid
Posted: Wed Jul 27, 2011 9:41 am
by ajayy
Hi there,
I got this error on nagios xi server after following the instructions to set up NRPE
http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf
now after finishing the set up i get this error on nagios xi server "Warning: This plugin must be either run as root or setuid root"
Can anyone let me know what have I done wrong possibly ?
Re: Warning: This plugin must be either run as root or setui
Posted: Wed Jul 27, 2011 12:41 pm
by agriffin
What version of XI are you using? Did you upgrade from any previous versions?
Re: Warning: This plugin must be either run as root or setui
Posted: Thu Jul 28, 2011 4:20 am
by ajayy
hi there ,
Please see below and I havent upgraded nagiosxi .. I am working on vmware player and installing plugins one by one to see how nagios actually works
Re: Warning: This plugin must be either run as root or setui
Posted: Thu Jul 28, 2011 10:25 am
by lmiltchev
Can you run the following command in terminal and post the output?
# ls -l /usr/local/nagios/libexec
Re: Warning: This plugin must be either run as root or setui
Posted: Fri Jul 29, 2011 5:29 am
by ajayy
hi lmiltchev,
please find the output below
Re: Warning: This plugin must be either run as root or setui
Posted: Fri Jul 29, 2011 10:55 am
by lmiltchev
Can you run the following command and post the output?
# /usr/local/nagios/libexec/check_nrpe -H XXX.XXX.X.XXX
where XXX.XXX.X.XXX is the IP address of the remote box you want to monitor
Re: Warning: This plugin must be either run as root or setui
Posted: Fri Jul 29, 2011 10:58 am
by nscott
ajayy,
It looks like something got mixed up when NRPE was installed. What you'll have to do is (on your Nagios XI server) download a source tarball. Here is a line-by-line of what you'll need to do. You must be root to do this.
cd /tmp
wget
http://assets.nagios.com/downloads/nagi ... 1.6.tar.gz
tar xf xi-2011r1.6.tar.gz
cd nagiosxi
touch installed.mrtg
./A-subcomponents
This should fix your issue. If I had to guess it was that you installed the plugins for the remote host on your actual Nagios server.
Re: Warning: This plugin must be either run as root or setui
Posted: Mon Aug 01, 2011 3:42 am
by ajayy
hi lmiltchev,
when I run the command you have posted on here with IP address of the remote host it gives me
" Connection refused by host "
NRPE version i am using on my nagios xi server is NRPE v2.12
Re: Warning: This plugin must be either run as root or setui
Posted: Mon Aug 01, 2011 4:17 am
by ajayy
hi nscott,
I need to thank you for giving those step by step guidelines of what i need to do and it worked and fixed my issue perfectly ...also I would like to know what has caused that issue with my nagiosxi server for complete understanding .. Yes you are right, I am installing the plugins to monitor required hosts on actual nagiosxi server
Now another issue when I try to monitor our Linux box running the monitoring wizard of NRPE..
Can you please see below and tell me what went wrong .. we run solaris OS on your Linux box and I chose the relevant OS while setting up NRPE wizard on nagios xi server..
Re: Warning: This plugin must be either run as root or setui
Posted: Mon Aug 01, 2011 10:35 am
by nscott
ajayy,
The NRPE install script (to be run on the remote server) creates a user account nagios (which is already created on your server) and then tries to create a /usr/local/nagios/libexec (which is already created on your server) and then puts a bunch of plugins into that directory. Finally, this is why it breaks if you try to do it on your server, it sets the permissions of the files to chown root.root in which they are not accessible to nagios.
A quick description of NRPE, look at the first picture of this doc:
http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf
Nagios uses NRPE in this way. Nagios tells NRPE, I want to run this check string on this host. NRPE goes with that check string and tries to run it on the remote machine. If there is no command defined on the remote machine then NRPE will fail as well. The doc I sent you give more in depth analysis of the process.
What you'll need to do is run that NRPE install script on the actual computer you want to monitor. You should not run anymore NRPE scripts on your Nagios XI server, but do run them on the remote server. I see you're using Solaris, which I haven't worked with much before, and we don't have any wizards for. But there is this site which looks intense:
http://www.utahsysadmin.com/2008/03/14/ ... olaris-10/
Or you could try to go the SNMP route, by installing Net-SNMP, opening a port on the firewall, and then using the new Linux SNMP wizard.