Following the discussion from the matrix channel, I made the disk usage metrics optional, as it currently causes ~35% of cpu usage on our system.
Old cadvisor-config from this repo had a - "--housekeeping_interval=120s" option enabled which seems currently not configurable for alloy - maybe this allows us reenabling disk metrics at a later point again.
dropped from 35% to 5% when removing disk from enabled_metrics = ["cpu", "cpuLoad", "diskIO", "memory", "network"] for cadvisor.
Looks good, but have you considered making the whole enabled_metrics value configurable with an env? So, setting the full ["cpu", "cpuLoad", "diskIO", "memory", "network"] as an env value, with a default fallback if unset.
This method of CADVISOR_DISK_USAGE=1 quickly becomes complicated in the config file if we want to add the option to enable/disable more categories.
Looks good, but have you considered making the whole `enabled_metrics` value configurable with an env? So, setting the full `["cpu", "cpuLoad", "diskIO", "memory", "network"]` as an env value, with a default fallback if unset.
This method of `CADVISOR_DISK_USAGE=1` quickly becomes complicated in the config file if we want to add the option to enable/disable more categories.
I have, but since there was no demand to make any other metric configurable in the past years It seemed easier to just add a flag for this one. But mainly because I wanted to avoid potentials issues with quoting and correct escaping of quotes when passing the full array as env.
I'm fine with either, though
I have, but since there was no demand to make any other metric configurable in the past years It seemed easier to just add a flag for this one. But mainly because I wanted to avoid potentials issues with quoting and correct escaping of quotes when passing the full array as env.
I'm fine with either, though
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Following the discussion from the matrix channel, I made the disk usage metrics optional, as it currently causes ~35% of cpu usage on our system.
Old cadvisor-config from this repo had a
- "--housekeeping_interval=120s"option enabled which seems currently not configurable for alloy - maybe this allows us reenabling disk metrics at a later point again.dropped from 35% to 5% when removing
diskfromenabled_metrics = ["cpu", "cpuLoad", "diskIO", "memory", "network"]for cadvisor.go profiling:
Looks good, but have you considered making the whole
enabled_metricsvalue configurable with an env? So, setting the full["cpu", "cpuLoad", "diskIO", "memory", "network"]as an env value, with a default fallback if unset.This method of
CADVISOR_DISK_USAGE=1quickly becomes complicated in the config file if we want to add the option to enable/disable more categories.I have, but since there was no demand to make any other metric configurable in the past years It seemed easier to just add a flag for this one. But mainly because I wanted to avoid potentials issues with quoting and correct escaping of quotes when passing the full array as env.
I'm fine with either, though