[Nagiosplug-help] solaris10 running nrpe under SMF. scripts with backticks = no output

Andreas Ericsson ae at op5.se
Wed Sep 3 20:54:58 CEST 2008


Justin Amburn wrote:
> I'm stumped. I have some Solaris 10 servers that I compiled and have 
> running. CPU, disk space and some other plugins are working, as long
> as they don't rely on backticks in the script. If it does, I can't
> get any output back to the nagios host.
> 
> I was troubleshooting the check_oracle plugin and eventually tracked
> it down to being an issue all scripts that contain backticks.
> 
> Even the most simple script returns no output back to the nagios
> host(yet it will work of course if run as user nagios from the ssh
> console on the Solaris server): ie.
> 
> #! /bin/sh test=`ps` echo "$test" exit
> 
> should return (and does while logged on as nagios on the Solaris 10
> box): # ./check_test PID TTY         TIME CMD 24186 pts/2       0:00
> ps 24184 pts/2       0:00 bash 24183 pts/2       0:00 sh 24185 pts/2
> 0:00 check_te
> 
> but this doesn't get back to the Nagios host because something
> between SMF and nrpe is preventing backticks results from being
> stored into variables.
> 
> I have tried changing nrpe service so it doesn't inherit the env, and
>  have tried giving the nagios account extra permissions as a service 
> account. Still no luck.
> 
> Has anyone dealt with this issue before?? The Solaris security model
> is driving me bonkers. Any help would be much apprecated!
> 

Try

test=$(ps)

That's the posix way of writing it and might play nicer with
SMF.

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




More information about the Help mailing list