-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcheck-service.sh
executable file
·26 lines (26 loc) · 1.2 KB
/
check-service.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Run at 8PM each evening PT
rm -f hrdpswindgram0.png
wget --quiet http://www.canadarasp.com/windgrams-data/oneDay/tomorrow/hrdpswindgram0.png
if [ -f hrdpswindgram0.png ]; then
aws cloudwatch put-metric-data --namespace canadarasp --metric-name hrdps_monitor_tomorrow --value 1
fi
rm hrdpswindgram0.png
wget --quiet http://www.canadarasp.com/windgrams-data/oneDay/dayaftertomorrow/hrdpswindgram0.png
if [ -f hrdpswindgram0.png ]; then
aws cloudwatch put-metric-data --namespace canadarasp --metric-name hrdps_monitor_dayaftertomorrow --value 1
fi
rm hrdpswindgram0.png
rm -f gdpswindgram0.png
wget --quiet http://www.canadarasp.com/windgrams-data/oneDay/dayaftertomorrow/gdpswindgram0.png
if [ -f gdpswindgram0.png ]; then
aws cloudwatch put-metric-data --namespace canadarasp --metric-name gdps_monitor_dayaftertomorrow --value 1
fi
rm gdpswindgram0.png
DATE=`date +%Y-%m-%d`
rm -f windgram-dynamic-test.html
wget --quiet "http://canadarasp.com/windgram?lat=49.07&lon=-122.40&date=$DATE\&interactive=t" -O windgram-dynamic-test.html
if [ -f windgram-dynamic-test.html ]; then
aws cloudwatch put-metric-data --namespace canadarasp --metric-name dynamic_windgram --value 1
fi
rm windgram-dynamic-test.html