Skip to content

Commit

Permalink
Documenting config (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
Waschndolos authored Jan 14, 2024
1 parent ca1cd93 commit 3da0c3a
Showing 1 changed file with 60 additions and 2 deletions.
62 changes: 60 additions & 2 deletions docs/configuration/configuration.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,70 @@
# Plugin configuration

This page is under construction.
## Path
With the path configuration you can configure under which url the Prometheus page will be rendered. The default
is `prometheus` which will cause the rending to be at `http(s)://yourInstance:(port)/(jenkins?)/prometheus`

## Default Namespace
You can configure a namespace for all metrics generated by this plugin which will be prefixed to the output

## Enable authentication for prometheus end-point
If you check this the accessing the endpoint needs to have the `Metrics.VIEW` permission

## Collecting metrics period in second
The metrics are collected every x seconds. You can configure the interval here.

## Count duration of successful builds
If checked the plugin wil calculate the duration of successful builds

## Count duration of unstable builds
If checked the plugin wil calculate the duration of unstable builds

## Count duration of not-built builds
If checked the plugin wil calculate the duration of not-built builds

## Count duration of aborted builds
If checked the plugin wil calculate the duration of aborted builds

## Fetch the test results of builds
If checked the plugin will return test results as metrics

## Add build parameter label to metrics
If checked the plugin will add the build (input) parameters to the metrics.
Note: If the cardinality of your build parameters is high, this will create a large number of metrics.
This can result in poor jenkins and prometheus performance.

## Add build status label to metrics
If checked the plugin will add the build status like SUCCESS, FAILURE, RUNNING to the metrics of
`duration_milliseconds_summary`, `success_build_count` and `failed_build_count metrics`

## Job attribute name
You can configure the label of the field which contains the job name here.

## Build parameters that will be added as separate labels to metrics
Please refer online documentation (question mark symbol in jenkins configuration page)

## Collect disk usage
If checked the plugin will collect the disk usage of your master agent. Do not use this on a cloud storage provider.

## Collect node status
If checked the plugin will collect data of up/down status of your Jenkins agents

## Collect metrics for each run per build
If checked it will cause the plugin to add metrics for every build available. The build number will be added as label. Use with caution!

## Collect Code coverage (since v2.3.0)
If checked and you publish your code coverage results with [https://plugins.jenkins.io/coverage](https://plugins.jenkins.io/coverage)
the plugin will output metrics for:
* (Class | Branch | Instruction | File | Line ) Missed
* (Class | Branch | Instruction | File | Line ) Covered
* (Class | Branch | Instruction | File | Line ) Total
* (Class | Branch | Instruction | File | Line ) Percent

## Disable Metrics (since v2.3.0)
Sometimes you don't need all metrics in your prometheus endpoint which this plugin provides.
You can disable certain metrics. These metrics are not being collected by the plugin and therefore not added in the
prometheus endpoint.
A

![img.png](img/disabled_metrics.png)

### Regex Entry
Expand Down

0 comments on commit 3da0c3a

Please sign in to comment.