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

Export job run times via Prometheus #45

Open
csweichel opened this issue Jan 30, 2020 · 0 comments
Open

Export job run times via Prometheus #45

csweichel opened this issue Jan 30, 2020 · 0 comments
Labels
enhancement New feature or request plugin

Comments

@csweichel
Copy link
Owner

As operator for our dev-environment I want to have an overview of the job run times for some jobs. For example, if our build job suddenly takes much longer that may be something I want to react to.

A job-metrics plugin could provide this information on a Prometheus endpoint. This plugin would get a list of filter expressions and names. For each such entry we would produce a histogram of build times and a counter of successful builds, failed builds and total builds.

The configuration for this plugin could look like:

metrics:
# name will become part of the metric names which in this case would be
#   werft_job_metric_werft_build_duration_sec
#   werft_job_metric_werft_build_total
#   werft_job_metric_werft_build_success
#   werft_job_metric_werft_build_failure
- name: werft_build
  # filter are "AND'ed" filter expressions. A job has to match all of them to become part of the metric
  filter:
  - or: ["name ~== -build"]
  - or: ["repo.owner == csweichel"]
  - or: ["repo.repo == werft"]
  # histogram lists the time steps of duration the histogram
  histogram:
  - 0.01
  - 1
  - 10
  - 30
  - 60
@csweichel csweichel added enhancement New feature or request plugin labels Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin
Projects
None yet
Development

No branches or pull requests

1 participant