forked from pool/monitoring-plugins
- added monitoring-plugins-2.3.3-check_icmp.patch
Simple patch to avoid compiler errors with latest gcc - monitoring-plugins-2.1.1-check_log_-_quoting.patch renamed to monitoring-plugins-2.3.3-check_log_-_quoting.patch OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=104
This commit is contained in:
parent
5a538430e0
commit
56f2f155ba
@ -1,90 +0,0 @@
|
|||||||
Index: monitoring-plugins-2.3.1/plugins-scripts/check_log.sh
|
|
||||||
===================================================================
|
|
||||||
--- monitoring-plugins-2.3.1.orig/plugins-scripts/check_log.sh
|
|
||||||
+++ monitoring-plugins-2.3.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"
|
|
12
monitoring-plugins-2.3.3-check_icmp.patch
Normal file
12
monitoring-plugins-2.3.3-check_icmp.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Index: monitoring-plugins-2.3.3/plugins-root/check_icmp.c
|
||||||
|
===================================================================
|
||||||
|
--- monitoring-plugins-2.3.3.orig/plugins-root/check_icmp.c
|
||||||
|
+++ monitoring-plugins-2.3.3/plugins-root/check_icmp.c
|
||||||
|
@@ -1446,6 +1446,7 @@ get_ip_address(const char *ifname)
|
||||||
|
#else
|
||||||
|
errno = 0;
|
||||||
|
crash("Cannot get interface IP address on this platform.");
|
||||||
|
+ return INADDR_NONE;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 13 15:27:12 UTC 2023 - Lars Vogdt <lars@linux-schulserver.de> - 2.3.3
|
||||||
|
|
||||||
|
- added monitoring-plugins-2.3.3-check_icmp.patch
|
||||||
|
Simple patch to avoid compiler errors with latest gcc
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 12 20:54:19 UTC 2023 - Archie Cobbs <archie.cobbs@gmail.com>
|
Wed Apr 12 20:54:19 UTC 2023 - Archie Cobbs <archie.cobbs@gmail.com>
|
||||||
|
|
||||||
@ -10,6 +16,8 @@ Wed Apr 12 17:35:53 UTC 2023 - Lars Vogdt <lars@linux-schulserver.de> - 2.3.3
|
|||||||
|
|
||||||
- finally remove monitoring-plugins-1.4.6-Makefile_-_no_chown.patch:
|
- finally remove monitoring-plugins-1.4.6-Makefile_-_no_chown.patch:
|
||||||
obsoleted by monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch
|
obsoleted by monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch
|
||||||
|
- monitoring-plugins-2.1.1-check_log_-_quoting.patch renamed to
|
||||||
|
monitoring-plugins-2.3.3-check_log_-_quoting.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 2 17:11:00 UTC 2023 - Lars Vogdt <lars@linux-schulserver.de> - 2.3.3
|
Thu Feb 2 17:11:00 UTC 2023 - Lars Vogdt <lars@linux-schulserver.de> - 2.3.3
|
||||||
|
@ -83,6 +83,8 @@ Patch128: monitoring-plugins-2.3.3-check_disk_on_btrfs.patch
|
|||||||
Patch129: monitoring-plugins-2.3.3-check_by_ssh.patch
|
Patch129: monitoring-plugins-2.3.3-check_by_ssh.patch
|
||||||
# PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1862
|
# PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1862
|
||||||
Patch130: monitoring-plugins-2.3.3-check_http-proxy.patch
|
Patch130: monitoring-plugins-2.3.3-check_http-proxy.patch
|
||||||
|
# PATCH-FIX-UPSTREAM - simple fix for compiler error regarding no return value in function get_ip_address
|
||||||
|
Patch 131: monitoring-plugins-2.3.3-check_icmp.patch
|
||||||
BuildRequires: bind-utils
|
BuildRequires: bind-utils
|
||||||
BuildRequires: dhcp-devel
|
BuildRequires: dhcp-devel
|
||||||
BuildRequires: fping
|
BuildRequires: fping
|
||||||
@ -1135,6 +1137,7 @@ done
|
|||||||
%patch128 -p1
|
%patch128 -p1
|
||||||
%patch129 -p1
|
%patch129 -p1
|
||||||
%patch130 -p1
|
%patch130 -p1
|
||||||
|
%patch131 -p1
|
||||||
find -type f -exec chmod 644 {} +
|
find -type f -exec chmod 644 {} +
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user