Nagios Core

nagios embedded perl p1.pl that lets redirect STDOUT

Description:

This is a modified version of p1.pl used by embedded nagios (usually in nagios/bin) that lets perl plugins redirect STDOUT, but only in perl.

Current Version

Last Release Date

2012-01-10

Compatible With

  • Nagios 2.x
  • Nagios 3.x

License

GPL


Project Files
Project Notes
Normally embedded nagios redirects STDOUT to internal variable and does not let nagios plugins redirect if further. And normally plugins would really not need to do that as they should output status info, etc. However some plugins may use libraries that create separate thread and there want to redirect STDOUT and that is where this modified p1.pl would help. But of course you can also just run those plugins outside of embedded perl. Please note that this DOES NOT redirect STDOUT for external (non-perl) programs that maybe run with exec() or system() from perl script. For that you need to do dup2. I'm considering rewriting this so it would be possible (either doing dup2() instead of how I did it or catching exec) but have not yet decided as it may result in an unexpected behavior. For now I'm not going to submit this as a patch to main nagios tree but may do it later if I get back to this and have time to discuss it on dev list.
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
0 (0)
Favorites
0
Views
79,394