agent icon indicating copy to clipboard operation
agent copied to clipboard

Flow: Add total_components metric to Grafana Agent

Open roman-k3i opened this issue 1 year ago • 2 comments

Hi team. I currently working on creating post deployment test for Grafana Agent and encountered an issue to check how many components are healthy out of existed ones. I have tried to make it just getting HTML page but from perspective of programming langage it's too complicated. I propose to add new metric called smth like "total_components" there is alredy metric in place called "agent_component_controller_running_components" that represents numbers of healthy components. I would like to have a metric that shows its total number no matter if they are healthy or not to understand how many components are healthy out of n numbers of total. Thanks

roman-k3i avatar May 20 '24 14:05 roman-k3i

How about using an aggregation (eg. a sum) on the existing agent_component_controller_running_components metric?

tpaschalis avatar May 20 '24 14:05 tpaschalis

@tpaschalis I'm not sure If I got you right. Based on what should I make an aggregation ? agent_component_controller_running_components metric shows total number of running components by health. How should I get the number of healthy components by health status then ? It would be great to have additional metric that shows how many components in status healthy. Based on that it will be simple subtraction agent_component_controller_running_components - total_healthy_components and then you easily get the number of unhealthy components that running on the Agent

roman-k3i avatar May 22 '24 14:05 roman-k3i