1
0

- 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:
Ruediger Oertel 2016-01-07 18:30:39 +00:00 committed by Git OBS Bridge
parent c094959502
commit de23550453
2 changed files with 8 additions and 1 deletions

View File

@ -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"

View File

@ -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