Aggregate by job?

Hello, I’d like to know if it is possible to aggregate node exporter counters by job? For example a typical aggregation query is:

sum by(instance, path, job)
(rate(node_api_request_duration_seconds_count{job=“clusterA”}[5m]))

But I have my exporter nodes organized into separate jobs, and so want to aggregate this counter by each separate job, thus getting a summation of all of that counter for clusterA

Thanks

You are already aggregating by job with that query (as job is included in the “by” clause), however as you are also filtering by job (job=“clusterA”) it isn’t doing much. Just remove that filter and you’ll start seeing the different jobs being returned. If you are only wanting the job label you’d need to remove instance & path from the by clause too.