Skip to content

A Python script that occasionally checks (i.e., "watchdogs") OneBusAway REST API responses for valid real-time transit data and alerts admins if something is wrong.

Notifications You must be signed in to change notification settings

Hillsborough-Transit-Authority/onebusaway-watchdog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

onebusaway-watchdog

onebusaway-watchdog is a Python-based watchdog application for your OneBusAway (OBA) REST API server that occasionally checks API responses for valid real-time transit data. It keeps an eye on your OBA server so you don't have to.

onebusaway-watchdog performs the following tasks:

  1. Tests for the success of various API queries on OBA.
  2. Tests that there is realtime data available for >50% of buses currently running.
  3. Tests that unrealistic results (e.g.,100% ontime performance) aren't being returned

If an issue is detected, an email is generated with an Alert # and a description of the problem. The watchdog will then stop running until that Alert is addressed (to prevent emails would keep piling up). When someone replies back to the email, the Alert is closed and the watchdog resumes.

Setup

Since onebusaway-watchdog generates email alerts, it requires the email addresses of the people to contact when there are problems, as well as the credentials for an email server. Currently, this information is hard-coded in the script, so you'll need to edit this to meet your needs.

Similarly, the script requires a OneBusAway REST API server address. This also currently needs to be edited manually.

You'll also need a Python interpreter to run the script.

Usage

At the command-line, execute:

check_oba.py

About

A Python script that occasionally checks (i.e., "watchdogs") OneBusAway REST API responses for valid real-time transit data and alerts admins if something is wrong.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published