The Panl Watchdog Monitor API

A Watchdog Monitor is a monitor that expects to receive periodic updates from one of your systems.

It can generate alerts:

  • when the monitor status changes
  • when a monitored value goes out of range
  • when the monitor fails to "check in"
You define a Watchdog monitor on the main Dashboard page, but you must also arrange to send updates to that monitor using the api described here.


Server and Authentication

The API server url is https://api.panl.com/. Unencrypted connections will be rejected.

The Panl API uses Simple HTTP Authentication. Your username for authentication is a unique, secret 8 character code that was generated when your account was created. You can find this username hash on your profile page. Credentials can either included in the URL or encoded in the authorization header.

GET https://{username}:{your password}@api.panl.com/{endpoint}/ GET https://api.panl.com/{endpoint}/ Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

The APIs on this page can be accessed using a custom monitor's secret key instead of Simple Authentication. See the examples below.

Testing

Since all these APIs are simple GET request you can test from the browser.


Custom Monitor Status/Value Update

Simple Get Update

https://api.panl.com/monitors/{monitor_hash}/update?k={monitorsecretkey}&up={true|false}&value={nnn.nnn}¬e={urlencodednote}

There is also a brief format available:

https://api.panl.com/{monitor_hash}?k={monitorsecretkey}&up={true|false}&value={nnn.nnn}¬e={urlencodednote}

The variables for this API call are defined as:

argument description
k Secret access key. Optional, can use HTTP Simple Authentication to access the monitor instead.
up true or false. Notify Panl that the monitor is up or down. Optional, defaults to true. Note that up can be defined using 1/0 or yes/no instead of true/false
value Update Panl with a new value. If up is false a value is optional.
note A note to attach to this update. Optional and must be encoded if present.

This is not a pure RESTful interface as it uses the GET method to update the values but it makes this interface much easier to use in scripts.

Examples:

https://api.panl.com/monitors/a5yH23/update?k=d87725b9f7694b0cba3d9e7bb49c9edf&up=false
https://api.panl.com/a5yH23?k=d87725b9f7694b0cba3d9e7bb49c9edf&value=230.34
https://{username}:{password}@api.panl.com/monitors/a5yH23/update?value=1
https://{username}:{password}@api.panl.com/monitors/a5yH23/update?up=false¬e=No%20connection%20to%20server