Merge branch 'master' of ssh://git.fedoraproject.org/git/hosted/fedora-infrastructure
This commit is contained in:
commit
096f548021
1 changed files with 22 additions and 0 deletions
22
scripts/nagios/check_koji
Executable file
22
scripts/nagios/check_koji
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
CHECK='/usr/bin/wget -qO- http://publictest8.fedora.phx.redhat.com/koji/builds | /bin/grep -c failed.png'
|
||||
WARNING=7
|
||||
CRITICAL=15
|
||||
|
||||
FAILURES=$(/usr/bin/wget -qO- http://publictest8.fedora.phx.redhat.com/koji/builds | /bin/grep -c failed.png)
|
||||
|
||||
|
||||
if [ $FAILURES -gt $CRITICAL ]
|
||||
then
|
||||
echo "Koji: CRITICAL failed builds: $FAILURES"
|
||||
exit 2
|
||||
elif [ $FAILURES -gt $WARNING ]
|
||||
then
|
||||
echo "Koji: WARNING failed builds: $FAILURES"
|
||||
exit 1
|
||||
else
|
||||
echo "Koji: OK failed builds: $FAILURES"
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue