Warning: This plugin must be either run as root or setuid

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ajayy
Posts: 20
Joined: Fri Jul 15, 2011 5:14 am

Warning: This plugin must be either run as root or setuid

Post 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 ?
You do not have the required permissions to view the files attached to this post.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Warning: This plugin must be either run as root or setui

Post by agriffin »

What version of XI are you using? Did you upgrade from any previous versions?
ajayy
Posts: 20
Joined: Fri Jul 15, 2011 5:14 am

Re: Warning: This plugin must be either run as root or setui

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Warning: This plugin must be either run as root or setui

Post by lmiltchev »

Can you run the following command in terminal and post the output?

# ls -l /usr/local/nagios/libexec
Be sure to check out our Knowledgebase for helpful articles and solutions!
ajayy
Posts: 20
Joined: Fri Jul 15, 2011 5:14 am

Re: Warning: This plugin must be either run as root or setui

Post by ajayy »

hi lmiltchev,

please find the output below
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Warning: This plugin must be either run as root or setui

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Warning: This plugin must be either run as root or setui

Post 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.
Nicholas Scott
Former Nagios employee
ajayy
Posts: 20
Joined: Fri Jul 15, 2011 5:14 am

Re: Warning: This plugin must be either run as root or setui

Post 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
ajayy
Posts: 20
Joined: Fri Jul 15, 2011 5:14 am

Re: Warning: This plugin must be either run as root or setui

Post 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..
You do not have the required permissions to view the files attached to this post.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Warning: This plugin must be either run as root or setui

Post 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.
Nicholas Scott
Former Nagios employee
Locked