Strange NRPE issue

Andreas Ericsson ae at op5.se
Wed Oct 8 20:00:02 CEST 2008


Francis Dube wrote:
> Hi,
> 
> I'm using Nagios nagios-2.12_1 with NRPE nrpe2-2.11_1 to check if my 
> display is working properly. I'm taking a screenshot every 4 minutes and 
> then i compare it with the last screenshot. My script is working very 
> well when it's ran locally but when i'm calling it from the server the 
> screenshot isn't taken.

Are you running it as the user NRPE is running as when you're taking the
screenshot locally?

> I tought it was a right problem on the Xorg 
> server, but i tried with "xhost +" (which do "access control disabled, 
> clients can connect from any host"). Both ways i run the script with the 
> user 'nagios'. The rest of the commands in the scripts work fine, the 
> only problem is with the screenshot which is taken using this command : 
> import -display :0 -window root /afolder/myscreenshot.png
> 
> I also tried to run the script over shh (ssh nagios at 1.2.3.4 
> /usr/local/libexec/nagios/check_news) and this method is working as fine 
> as locally. So i think there's something wrong with the way NRPE execute 
> my script.
> 
> Anyone got an idea of the reason why the screenshot isn't working when i 
> run the script with NRPE ?
> 

The only thing I can imagine is access problems. By default, only root
can snoop on other user's X sessions, so for that to work for nrpe the
X session ought to be owned by the nrpe user. I'm not well-versed in X
enough to give a definite answer though, so don't trust my word on it.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list