NRPE: Unable to read output; but works when run under strace ...
Eliezer Croitoru
eliezer at ngtech.co.il
Mon Jan 14 16:41:28 CET 2013
I would try to run a basic script which logs the nrpe environment into a
file.
it will make sure what is available to you and what not.
test if:
there are environment vars..
there is a STDOUT\IN\ERR available etc..
#!/usr/bin/env ruby
f = File.open("/tmp/nrpetest.log","a")
f.sync = true
f.puts "ENVIROMENTAR VARS\n==========="
ENV.each {|k,p| f.puts "#{k} = #{p}"}
f.puts "STD DATA\n=========="
f.puts "stdout exists?: #{$stdout}"
if $stdout
f.puts "stdout is tty?: #{$stdout.isatty}"
begin
$stdout.write_nonblock "0"
f.puts "Wrote 0 to stdout"
rescue => e
f.puts "didnt wrote to stdout"
f.puts e.message
f.puts e.backtrace.inspect
end
end
modify the above to make sure what is the cause of this problem.
you can also try to access stdout\err
Regards,
Eliezer
On 1/8/2013 3:53 PM, Florian Ernst wrote:
> Hello all,
>
> following up to myself ...
>
> On Mon, Oct 08, 2012 at 08:31:21PM +0200, Florian Ernst wrote:
>> [...]
>> However, it got weirder: if I strace the nrpe process, everything works
>> as desired:
>> [...]
>> I found no further hints in the strace log, but this led me to assume
>> that there is some NRPE weirdness involved, and thus I'm writing here
>> instead of further digging through the system.
>>
>> Any ideas?
>
> Lacking any further clue as to what peculiarity might be responsible for
> this weird behavior, I decided to simply let the nrpe process
> permanently run under strace like
> strace -f -q -e none -o /dev/null ...
>
> The performance impact is minimal, and I finally get check results. Not
> really a solution, but it'll do.
>
> Cheers,
> Flo
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
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