Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Klibs: add DigitalOcean metrics agent #2007

Merged
merged 3 commits into from
Mar 21, 2024
Merged

Conversation

francescolavra
Copy link
Member

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.

This is being done so that macros such as htobe32() and le64toh()
can be called from buffer.h (which will be needed in the next
commit).
With this change, the buffer.h header file contains all the helper
functions to read and write 16-, 32- and 64-bit values in big
endian or little endian format; these functions can be used
regardless of the endianness of the target architecture.
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.

Closes nanovms/ops#1583
@francescolavra francescolavra merged commit 2a3ba30 into master Mar 21, 2024
5 checks passed
@francescolavra francescolavra deleted the feature/digitalocean branch March 21, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant