GAEAPIMonitor is written in Python. It runs in AppEngine every 10 minutes with a cron job (configurable). Every time a check is initiated, it fetches all the API from DataStore, and dispatches each of them into separate Task Queues to ensure that all API checks are completed regardless of number of APIs required for checking. If a particular criteria is fulfilled, the application sends out a Twitter DM using Tweepy. If you are using Twitter for iPhone, you will probably get the alert immediately as a PUSH message. Content change alerts includes percentage change, calculated from Levenshtein distance using google-diff-match-patch library.
Features
- form to enter information about the API
- API parameters entered in a form in JSON format
- support HTTP GET and POST
- sends alert when:
- API request exceeds an x number of seconds
- maximum age of the API content is exceeded (after which something is probably malfunctioning)
- content has changed, with percentage of changes
- content is not a valid JSON format
- request status is not 200 or 301
- set twitter username that will receive the DM for each API. Separate with commas if you need to notify more than one users
- set the message title in the DM when an alert is sent out
Usage cases
- an API that is supposed to send out dynamic content, sends old content because of a broken parser
- an API that is supposed to send the same content, suddenly sends a different content because of an accidental change in code
- monitor if server is down from a separate server
- monitor server performance based on API request time
- monitor website for changes, for example monitor shipment status
- you want to do all of the above, but you want to keep your API private
- you want to do all of the above, but do not want to write your own monitor :)
This is an open source project hosted on GitHub. You can try it out here, or get the code here.