phsmith / rundeck_exporter

Rundeck Metrics Exporter
GNU General Public License v3.0
58 stars 25 forks source link

remove recentFilter for /executions/running endpoint #70

Closed davidcpell closed 1 year ago

davidcpell commented 1 year ago

~#69 introduced made the execution API's recentFilter value configurable via RUNDECK_PROJECTS_EXECUTIONS_FILTER but this was only applied to the main /executions endpoint. This PR also uses the value in the /executions/running endpoint.~

We discovered the endpoint doesn't accept this parameter, so we're now just removing it altogether.

phsmith commented 1 year ago

@davidcpell I have kept the /executions/running endpoint with recentFilter=1d because we can have long running jobs, so if this period is set too short some executions may be missed. Note that if no jobs are running, no results will be retrieved.

davidcpell commented 1 year ago

@phsmith looking back at the documentation, it doesn't seem like the endpoint actually supports the recentFilter parameter: https://docs.rundeck.com/docs/api/rundeck-api.html#listing-running-executions

image

Thinking about it, it makes sense because I think I would expect the endpoint that lists running executions to list all currently-running executions regardless of when they started. If anything, this endpoint probably needs to be queried as frequently as possible/reasonable to get accurate data.

phsmith commented 1 year ago

Oh, man... You're absolutely right, sorry! I can't even remember why I put the recentFilter there, maybe just copy and paste from the line above one. :upside_down_face:

Would you mind in removing this filter so I can approve and merge your PR?

davidcpell commented 1 year ago

done! https://github.com/phsmith/rundeck_exporter/pull/70/commits/5b9cb4a24484ecaac0a9ddb7f3c9489a5f3eb0ea

phsmith commented 1 year ago

Awesome! Thanks for your contribution @davidcpell!