Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Notifications

Defelo edited this page Nov 2, 2019 · 4 revisions

Files

file-update

Notifies a changed file

Structure:

{
    "notify-id": "file-update",
    "origin": "<create/delete/update [string]>",
    "device_uuid": "<UUID of the affected device [string, UUID]>",
    "data": {
        "created": ["<UUID of the created file [string, UUID]>"],
        "deleted": ["<UUID of the deleted file {string, UUID]>"],
        "changed": ["<UUID of the changed file [string, UUID]>"]
    }
}

Origin:

  • create: A file has been created
  • delete: A file has been deleted
  • update: A file has been modified

Hardware

resource-usage

Notifies a changed resource usage of a device

Structure:

{
  "notify-id": "resource-usage",
  "origin": "<device-hardware-register, device-hardware-scale or device-hardware-stop>",
  "device_uuid": "<UUID of the device with the changed workload [string, UUID]>",
  "data": {
    "cpu": "<CPU usage [number, 0-1]>",
    "ram": "<RAM usage [number, 0-1]>",
    "gpu": "<GPU usage [number, 0-1]>",
    "disk": "<Disk usage [number, 0-1]>",
    "network": "<Network usage [number, 0-1]>"
  }
}

Origin:

  • device-hardware-register: The change was caused by a new service
  • device-hardware-scale: The change was caused by a changed service property
  • device-hardware-stop: The change was caused by a service stopping

Clone this wiki locally