Skip to content

Commit

Permalink
Fixed Site Downtime function for new format of web page
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesletts committed Apr 25, 2015
1 parent fb0d90d commit f4c2bff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dashboard_functions.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash

site_downtimes_from_ssb() {
# this function is broken April 2015

# get the downtimes from SSB, remove any quotes so the output
# is just csv list of [site,downtime string]
#
Expand All @@ -13,8 +11,8 @@ site_downtimes_from_ssb() {

OUTPUTFILE=`mktemp -t DOWNTIMES.csv.XXXXXXXXXX` || return 1
url="http://dashb-ssb.cern.ch/dashboard/request.py/getallshort?view=maint"
curl -ks -H 'Accept:text/csv' $url | awk -F\, '{print $1 "," $3}' \
| tr -d \" | tr -d \' | grep OUTAGE > $OUTPUTFILE || return 1
curl -ks -H 'Accept:text/csv' $url | grep OUTAGE \
| awk -F\, '{print $1 "," $2}' > $OUTPUTFILE || return 1
echo $OUTPUTFILE
return 0
}
Expand Down

0 comments on commit f4c2bff

Please sign in to comment.