Implemented alerting.py which can be run as a cron job to perdiodically collect alerting data and write them to alerting.dat