influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.94k stars 3.56k forks source link

Send telemetry report for cpu usage and memory usage #25371

Closed praveen-influx closed 1 month ago

praveen-influx commented 1 month ago

This issue will cover sending cpu/memory usage to the server, along with static values covered in issue

{
  // other values
  "cpuUtilizationPercent": 89,
  "memoryUsage": 240,
  "memoryUsagePercent": 23,
}
pauldix commented 1 month ago

For memoryUsage put the units at the end like memoryUsageMB or something like that. Given it happens once per hour, it'll need to be either a sample or an average over the hour. Could opt for a min/avg/max over the period with measurements taken every minute, but the report sent once per hour.

praveen-influx commented 1 month ago
    // cpu
    pub cpu_utilization_percent_min: f64,
    pub cpu_utilization_percent_max: f64,
    pub cpu_utilization_percent_avg: f64,
    // mem
    pub memory_used_mb_min: u64,
    pub memory_used_mb_max: u64,
    pub memory_used_mb_avg: u64,

That is what has been captured as part of PR that's been merged.