A monitor is simply a client which executes the initial call to an OA4MP server. This works solely from the command line -- no web server is needed. This is exactly the analog of the ping command in that it shows the server up and active. Since a full test of the lifecycle requires that the client be able to accept callbacks i.e. be running a web server, it is not possible to test more than the first call. The intent of the monitor is not to show that everything about configuring a client still works.

To get a functional monitor, you would get oa2-monitor.jar with the script at oa2-monitor The default setup is like any other command line tool with an identical directory layout and it will try to use the configuration found in the default location of /opt/oa4mp/etc/admin-cfg.xml.

Steps to set up a monitor are

  1. Register it with a server
    OAuth 2.0 based servers.
  2. Write a configuration file. This should have mail configured.

A quick comment about the callback: The callback supplied must match one of the ones given at registration time or the initial request will be rejected. The comparison is done as strings as per the specification, so logically equivalent callbacks (such as having parameters switched) will fail. 3. Run it once from the command line to see if it works by using the oa4mp-monitor script.

4. Setup a chron job or use monit or whatever tool you prefer to invoke oa4mp-server at some specific interval, e.g. every 5 minutes. The monitor will send an email notification whenever an attempt to contact the server fails.