nanovms / nanos

A kernel designed to run one and only one application in a virtualized environment
https://nanos.org
Apache License 2.0
2.58k stars 133 forks source link

Klibs: add DigitalOcean metrics agent #2007

Closed francescolavra closed 5 months ago

francescolavra commented 6 months ago

This new klib implements an agent which, similarly to the DigitalOcean agent at https://github.com/digitalocean/do-agent, collects memory usage metrics (consisting of values for total, free, cached and available memory) and sends them to the DigitalOcean monitoring server. This klib is configured via a "digitalocean" tuple in the manifest options: sending of memory metrics is enabled when this tuple contains a "metrics" tuple. The default interval between two successive metrics data points is 120 seconds; the "metrics" configuration tuple may contain an "interval" option to specify an arbitrary interval value, expressed in seconds. Example snippet of Ops configuration:

"ManifestPassthrough": {
  "digitalocean": {
    "metrics": {
      "interval":"180"
    }
  }
}

Note: when the DigitalOcean klib is configured to send memory metrics, CPU and disk I/O metrics are not displayed in the graphs of the DigitalOcean droplet control panel.