phsmith/rundeck_exporter

Project executions metrics not show all jobs info

Closed this issue · 8 comments

The order of the labels are not correct.

This is already fixed in PR #3

I thougth about the current solution of Metrics and IMHO there is much room for improvements. For example: Currently the recent executions are fetch but just the first one is evaluated.

I thougth about the current solution of Metrics and IMHO there is much room for improvements. For example: Currently the recent executions are fetch but just the first one is evaluated.

@rdoering on previous versions, the executions fetch returned more results, but as a recommendation from the Prometheus curators, these metrics must return only the last value. But we can review that logic.

I guess this is OK, but the execution endpoint is returning execution for all jobs in rundeck and we are showing just representing the latest execution of an arbitrary job.

I would like to address following question with the metric. "Was there a failing execution of job named abc?"

I would suggest to use the endpoint /api/14/project/[PROJECT]/executions as before but with the param "recentFilter". The result set could be represented as "current" state or we append the result set to the previous and represent the stored set as current state.

@rdoering you're right. I understood what you're talking about.
I'm going to fix the project executions metrics to retrieve the status of all project jobs.

@rdoering I've just release the version 2.1.0 with the recentFilter query as you suggested.
I've put recentFilter=1h.

@phsmith Thank you very much for your quick response. It is working like a charm.