galmonomonon alerts

main
Jeff Moe 2022-06-15 17:29:11 -06:00
parent 98e4d9fb3b
commit a9e2442aec
2 changed files with 8 additions and 2 deletions

View File

@ -331,6 +331,9 @@ F/NAV CRC error, skipping
I/NAV CRC error, skipping
```
# Alerts
See the script `scripts/galmonmonmon` to check ground station status.
# Status
Three ground stations running.

View File

@ -26,9 +26,9 @@
# ./galmonmonmon --id=192 --sec=3600
import argparse
import os
import pandas as pd
import time
from datetime import datetime, date
from datetime import datetime
# Live URL
observer_url=('https://galmon.eu/observers.json')
@ -77,6 +77,9 @@ def observer_alert(observer_id, observer_owner, observer_sec):
print('ALERT: ', end='')
print('Station ', observer_id, ', ', observer_owner, end='', sep='')
print(', last seen', '{:.0f}'.format(observer_sec), 'seconds ago.')
# Put a shell command you want to run here, perhaps.
#os.system('echo OMG down | mail -s"Galmon alert" foo@barmail')
#os.system('/usr/local/bin/my-chat-alert-script.sh')
def observer_ok(observer_id, observer_owner, observer_sec):
print('OK: ', end='')