Enhancement: Nagios alert should return UNKNOWN instead of CRITICAL when temporary file can't be created
GoogleCodeExporter opened this issue · 2 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Attempt to run check_logwarn on a system that can't create temporary files
in /tmp
What is the expected output? What do you see instead?
Here's the snippit of code from check_logwarn that returns CRITICAL when mktemp
fails. I think it would be more appropriate to return UNKNOWN since we abort
before running logwarn due to a outside factor.
# Create temporary file for stderr output
ERROUT_FILE=`mktemp -q /tmp/check_logwarn.XXXXXX`
if [ $? -ne 0 ]; then
echo "CRITICAL - Can't create temporary file"
exit ${STATE_CRITICAL}
fi
What version of the product are you using? On what operating system?
logwarn-1.0.7-1.el6.x86_64, RHEL6
Please provide any additional information below.
Please see attached patch.
Original issue reported on code.google.com by bhouri...@gmail.com
on 5 Sep 2014 at 3:21
Attachments:
GoogleCodeExporter commented
This has already been fixed (in version 1.0.9).
Original comment by archie.c...@gmail.com
on 5 Sep 2014 at 4:03
- Changed state: Fixed
GoogleCodeExporter commented
I should of checked first. Thanks. :)
Original comment by bhouri...@gmail.com
on 5 Sep 2014 at 4:42