forked from pool/monitoring-plugins
f8d9ee89c9
FIXES + Fix check_ntp's jitter checking + Fix check_ntp's handling of invalid server responses + Fix check_apt's handling of invalid regular expressions + Fix check_real's server response processing + Fix backslash escaping in check_tcp's --help output + Fix check_jabber to work with Openfire servers + Fix check_oracle bad string matching when testing TNS server + Fixed check_ifstatus performance data output + Fixed expire time output for sslutils + check_dns now verifies if the answer is returning from the queried server + Fix check_by_ssh to accept --hostname as argument ENHANCEMENTS + New check_hpjd -p option for port specification (abrist) + New ./configure --with-qmail-qstat-command option to specify the path to qmail-qstat(8) + New check_ifstatus -n option to ignore interfaces by name + check_ntp_peer has now specific state output for each metric + New check_mysql -n option to ignore authentication failures + Added IP and port or socket name to error messages + New check_ntp_time -o option to add expected offset + check_disk shows now troubled partions in verbose mode + check_dig has now support for drill and dig + check_dig has now support for -6 option + Add performance data to check_file_age - removed upstreamed patches: + monitoring-plugins-1.4.14-ntpd.patch + monitoring-plugins.check_ntp.c-64bit-portability-issue.patch OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=12
91 lines
2.4 KiB
Diff
91 lines
2.4 KiB
Diff
Index: monitoring-plugins-2.1.1/plugins-scripts/check_log.sh
|
|
===================================================================
|
|
--- monitoring-plugins-2.1.1.orig/plugins-scripts/check_log.sh
|
|
+++ monitoring-plugins-2.1.1/plugins-scripts/check_log.sh
|
|
@@ -115,27 +115,27 @@ while test -n "$1"; do
|
|
exit $STATE_OK
|
|
;;
|
|
--filename)
|
|
- logfile=$2
|
|
+ logfile="$2"
|
|
shift
|
|
;;
|
|
-F)
|
|
- logfile=$2
|
|
+ logfile="$2"
|
|
shift
|
|
;;
|
|
--oldlog)
|
|
- oldlog=$2
|
|
+ oldlog="$2"
|
|
shift
|
|
;;
|
|
-O)
|
|
- oldlog=$2
|
|
+ oldlog="$2"
|
|
shift
|
|
;;
|
|
--query)
|
|
- query=$2
|
|
+ query="$2"
|
|
shift
|
|
;;
|
|
-q)
|
|
- query=$2
|
|
+ query="$2"
|
|
shift
|
|
;;
|
|
-x)
|
|
@@ -157,10 +157,10 @@ done
|
|
|
|
# If the source log file doesn't exist, exit
|
|
|
|
-if [ ! -e $logfile ]; then
|
|
+if [ ! -e "$logfile" ]; then
|
|
echo "Log check error: Log file $logfile does not exist!"
|
|
exit $STATE_UNKNOWN
|
|
-elif [ ! -r $logfile ] ; then
|
|
+elif [ ! -r "$logfile" ] ; then
|
|
echo "Log check error: Log file $logfile is not readable!"
|
|
exit $STATE_UNKNOWN
|
|
fi
|
|
@@ -169,8 +169,8 @@ fi
|
|
# we're running this test, so copy the original log file over to
|
|
# the old diff file and exit
|
|
|
|
-if [ ! -e $oldlog ]; then
|
|
- cat $logfile > $oldlog
|
|
+if [ ! -e "$oldlog" ]; then
|
|
+ cat "$logfile" > "$oldlog"
|
|
echo "Log check data initialized..."
|
|
exit $STATE_OK
|
|
fi
|
|
@@ -184,20 +184,20 @@ if [ -x /bin/mktemp ]; then
|
|
else
|
|
tempdiff=`/bin/date '+%H%M%S'`
|
|
tempdiff="/tmp/check_log.${tempdiff}"
|
|
- touch $tempdiff
|
|
- chmod 600 $tempdiff
|
|
+ touch "$tempdiff"
|
|
+ chmod 600 "$tempdiff"
|
|
fi
|
|
|
|
-diff $logfile $oldlog | grep -v "^>" > $tempdiff
|
|
+diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff"
|
|
|
|
# Count the number of matching log entries we have
|
|
-count=`grep -c "$query" $tempdiff`
|
|
+count=`grep -c "$query" "$tempdiff"`
|
|
|
|
# Get the last matching entry in the diff file
|
|
-lastentry=`grep "$query" $tempdiff | tail -1`
|
|
+lastentry=`grep "$query" "$tempdiff" | tail -1`
|
|
|
|
-rm -f $tempdiff
|
|
-cat $logfile > $oldlog
|
|
+rm -f "$tempdiff"
|
|
+cat "$logfile" > "$oldlog"
|
|
|
|
if [ "$count" = "0" ]; then # no matches, exit with no error
|
|
echo "Log check ok - 0 pattern matches found"
|