Table of Contents

Export

The Healthmonitor offers currently two options to integrate its data into your own system.

JSON

The current status is available on the API endpoint [host]?page=monitor&app=[id]&mode=json. The response include the current general status, the static message and an array of the status of each service.

{
  "meta": {
    "id": "qebqs6d3bpiombhi",
    "result": 0
  },
  "message": {
    "visible": "1",
    "type": "warning",
    "title": "Problem",
    "text": "There is something wrong."
  },
  "apps": {
    "Service_1": {
      "meta": {
        "host": "somehost.example.com",
        "website": "Service 1",
        "result": 0,
        "ttl": 300
      },
      "since": 1786529957,
      "state": {
        "result-soft": 0,
        "result-hard": 0,
        "result-hard-since": 1786529957,
        "lastresponses": [
          {
            "timestamp": 1789036190,
            "data": {
              "status": 0,
              "value": 1221
            }
          },
          ...
        ]
      }
    },
    ...
  }
}

Javascript Integration

Additionally, the Healthmonitor offers a Javascript integration.

<script src="[host]?page=monitor&app=[id]&mode=script"></script>

The script will show the current status in the upper right corner of the page. Javascript integration

The default messages and additional translations can be changed by modifying the config object.

document.addEventListener('healthmonitor:init', (event) => {
    event.config.style += '.status-container { background: red; }';
    event.config.showLinkToStatusPage = false;
    event.config.pollInterval = 60_000;
    event.config.translations.de.service_interruption_title = 'Neuer Titel';
})