1
0
monitoring-plugins/monitoring-plugins-2.1.1-check_logfile.patch

91 lines
2.4 KiB
Diff
Raw Normal View History

- update to 2.2: Enhancements + The check_http -S/--ssl option now accepts the arguments 1.1 and 1.2 to force TLSv1.1 and TLSv1.2 connections, respectively + The check_http -S/--ssl option now allows for specifying the desired protocol with a + suffix to also accept newer versions + Let check_http check HTTPS web sites via proxies + check_http: add timeout to performance data as max value + check_http: report certificate expiry date in UTC + check_snmp: add IPv6 support + check_snmp's performance data now also includes warning/ critical thresholds + New check_snmp -N option to specify SNMPv3 context name + Let check_smtp's -D option imply -S + Let check_smtp's -e option match against the full SMTP response + check_dig: expected response is now case-insensitive + New check_mailq -s option which tells the plugin to use sudo(8) + New check_nt -l parameters: seconds|minutes|hours|days + New -W/-C option for check_ldap to check number of entries + check_users: add support for range thresholds + check_fping now auto-detects IPv6 addresses + check_radius now supports the radcli library + Support OpenSSL 1.1 Fixes + check_http: fix host header port handling + Let check_real terminate lines with CRLF when talking to the server, as mandated by RFC 2326 + Fix check_procs on HP-UX + check_smtp's -e/--expect option can now be combined with -S/--starttls + Fix incorrect performance data thresholds emitted by check_ups OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=27
2017-01-13 14:54:52 +01:00
Index: monitoring-plugins-2.2/plugins-scripts/check_log.sh
2014-12-27 17:40:34 +01:00
===================================================================
- update to 2.2: Enhancements + The check_http -S/--ssl option now accepts the arguments 1.1 and 1.2 to force TLSv1.1 and TLSv1.2 connections, respectively + The check_http -S/--ssl option now allows for specifying the desired protocol with a + suffix to also accept newer versions + Let check_http check HTTPS web sites via proxies + check_http: add timeout to performance data as max value + check_http: report certificate expiry date in UTC + check_snmp: add IPv6 support + check_snmp's performance data now also includes warning/ critical thresholds + New check_snmp -N option to specify SNMPv3 context name + Let check_smtp's -D option imply -S + Let check_smtp's -e option match against the full SMTP response + check_dig: expected response is now case-insensitive + New check_mailq -s option which tells the plugin to use sudo(8) + New check_nt -l parameters: seconds|minutes|hours|days + New -W/-C option for check_ldap to check number of entries + check_users: add support for range thresholds + check_fping now auto-detects IPv6 addresses + check_radius now supports the radcli library + Support OpenSSL 1.1 Fixes + check_http: fix host header port handling + Let check_real terminate lines with CRLF when talking to the server, as mandated by RFC 2326 + Fix check_procs on HP-UX + check_smtp's -e/--expect option can now be combined with -S/--starttls + Fix incorrect performance data thresholds emitted by check_ups OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=27
2017-01-13 14:54:52 +01:00
--- monitoring-plugins-2.2.orig/plugins-scripts/check_log.sh
+++ monitoring-plugins-2.2/plugins-scripts/check_log.sh
2014-12-27 17:40:34 +01:00
@@ -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"