Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rundeck_project_execution_duration_seconds report wrong values #65

Closed
kaplanben opened this issue May 2, 2023 · 5 comments
Closed

rundeck_project_execution_duration_seconds report wrong values #65

kaplanben opened this issue May 2, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@kaplanben
Copy link

We're seeing strange numbers in rundeck_project_execution_duration_seconds metrics and we're not sure why:

# HELP rundeck_project_execution_duration_seconds Rundeck Project ProjectName Execution Duration
# TYPE rundeck_project_execution_duration_seconds gauge
rundeck_project_execution_duration_seconds{execution_id="1111",execution_type="user",instance_address="localhost:4440",job_group="****",job_id="id_a",job_name="job_a",project_name="project_a",user="user_a"} 985109.0
rundeck_project_execution_duration_seconds{execution_id="1110",execution_type="user",instance_address="localhost:4440",job_group="****",job_id="id_a",job_name="job_a",project_name="project_a",user="user_a"} 985109.0
rundeck_project_execution_duration_seconds{execution_id="1109",execution_type="user",instance_address="localhost:4440",job_group="****",job_id="id_a",job_name="job_a",project_name="project_a",user="user_a"} 985109.0
rundeck_project_execution_duration_seconds{execution_id="1108",execution_type="user",instance_address="localhost:4440",job_group="****",job_id="id_b",job_name="job_b",project_name="project_a",user="admin"} 1202.0
rundeck_project_execution_duration_seconds{execution_id="1107",execution_type="user",instance_address="localhost:4440",job_group="****",job_id="id_a",job_name="job_a",project_name="project_a",user="user_a"} 985109.0
rundeck_project_execution_duration_seconds{execution_id="1106",execution_type="user",instance_address="localhost:4440",job_group="****",job_id="id_c",job_name="job_c",project_name="project_a",user="user_b"} 1.269357e+06

what's interesting is that 985109.0 appear multiple times.

  • If this is the average duration of a job then the label for execution_id is redundant no?
  • The value is totally wrong, all our executions took minutes to finish (expect of one or two outliers), and job_a average duration from Rundeck UI is 18m

Any ideas?

Thanks!

@phsmith
Copy link
Owner

phsmith commented May 2, 2023

Hey @kaplanben, thanks for your report.
The exporter is currently showing the averageDuration attribute from Rundeck jobs, and it really isn't the right attribute to measure the job execution duration.
I'll take a look at that issue as soon as possible!

@phsmith phsmith self-assigned this May 2, 2023
@phsmith phsmith added the bug Something isn't working label May 2, 2023
@phsmith
Copy link
Owner

phsmith commented May 2, 2023

Hey @kaplanben, can you try the latest release (2.5.1)?

@kaplanben
Copy link
Author

Wow 😄 lightning fast! It works 👍

one suggestion I have is to rename the metric since the value is in milliseconds and not second
e.g. # HELP rundeck_project_execution_duration_milliseconds Rundeck Project ProjectName Execution Duration in ms

Thank you @phsmith!

@phsmith
Copy link
Owner

phsmith commented May 2, 2023

Awesome! 😃

Yeah, your suggestion is completely right, but Prometheus has some name conventions that encourages the usage of base units in the metrics name (seconds, bytes, meters, etc...). So in that case, it's better to transform the milliseconds value into seconds.

@phsmith
Copy link
Owner

phsmith commented May 2, 2023

I've just released the version 2.5.2. Now rundeck_project_execution_duration_milliseconds going to return the values in seconds! 👍

@phsmith phsmith closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants