sys-agent

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2021 License: MIT

README

sys-agent build Coverage Status

System agent is a simple service reporting server status via HTTP GET request.

usage

$ sys-agent -l :8080 -v "root:/" -v "data:/mnt/data"

Application Options:
  -l, --listen= listen on host:port (default: localhost:8080) [$LISTEN]
  -v, --volume= volumes to report (default: root:/) [$VOLUMES]
      --dbg     show debug info [$DEBUG]

Help Options:
  -h, --help    Show this help message

api

  • GET /status - returns server status

    {
      "hostname": "UMBP.localdomain",
      "procs": 697,
      "host_id": "021cd85f-69cc-5ae1-9725-5836eca1b092",
      "cpu_percent": 11,
      "mem_percent": 51,
      "volumes": {
        "root": {
          "name": "root",
          "path": "/",
          "usage_percent": 33
        },
         "data": {
            "name": "data",
            "path": "/mnt/data",
            "usage_percent": 87
         }
      }
    }
    
  • GET /ping - returns pong

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL