forked from pool/monitoring-plugins-repomd
- only check for revision/date if there is a suseinfo entry
in the repomd.xml file OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-repomd?expand=0&rev=4
This commit is contained in:
parent
c094959502
commit
de23550453
@ -110,6 +110,7 @@ if $GREP -q "Error 404" "$RESULTFILE" ; then
|
||||
fi
|
||||
|
||||
REVISION=$($GREP revision "$RESULTFILE" | $CUT -d "<" -f2 | $CUT -d ">" -f2)
|
||||
HAS_INFO=$($GREP "type.*suseinfo" "$RESULTFILE")
|
||||
NOW=$(date +'%s')
|
||||
let DIFFERENCE=(${NOW}-${REVISION})
|
||||
let SECONDS=${DAYS}*24*60*60
|
||||
@ -123,7 +124,7 @@ if [ "$DEBUG" != "0" ]; then
|
||||
echo
|
||||
fi
|
||||
|
||||
if [[ $DIFFERENCE -gt $SECONDS ]]; then
|
||||
if [[ -n "$HAS_INFO" && $DIFFERENCE -gt $SECONDS ]]; then
|
||||
cleanup_and_exit "$STATE_CRITICAL" "CRITICAL: repomd.xml from $URL is older than $DAYS days"
|
||||
else
|
||||
cleanup_and_exit "$STATE_OK" "OK: repomd.xml from $URL is younger than $DAYS days"
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 7 19:29:47 CET 2016 - ro@suse.de
|
||||
|
||||
- only check for revision/date if there is a suseinfo entry
|
||||
in the repomd.xml file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 30 19:20:35 UTC 2014 - lars@linux-schulserver.de
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user