Skip to content

Commit

Permalink
Adding documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
waschndolos committed Aug 26, 2023
1 parent 2aa84c0 commit 3698fc0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Please note that the documentation is a WIP.
- Metrics from [Metrics-plugin](https://github.com/jenkinsci/metrics-plugin)
- Metrics from this plugin. Refer [Prometheus-plugin](docs/metrics/index.md)

## Configuring the plugin

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 1; Actual: 0; Below Warning

Expected: 1; Actual: 0; Below
You can find some examples in this documentation [Configuring Plugin](docs/configuration/configuration.md)

## Environment variables

Expand Down
18 changes: 18 additions & 0 deletions docs/configuration/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Plugin configuration

Check notice

Code scanning / Remark-lint (reported by Codacy)

Warn when a line feed at the end of a file is missing. Note documentation

[final-newline] Missing newline character at end of file

This page is under construction.

## Disable Metrics (since v2.3.0)

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 1; Actual: 0; Below Warning documentation

Expected: 1; Actual: 0; Below
Sometimes you don't need all metrics in your prometheus endpoint which this plugin provides.

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 80; Actual: 93 Warning documentation

Expected: 80; Actual: 93

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 0 or 2; Actual: 1 Warning documentation

Expected: 0 or 2; Actual: 1
You can disable certain metrics. These metrics are not being collected by the plugin and therefore not added in the

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 80; Actual: 116 Warning documentation

Expected: 80; Actual: 116

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 0 or 2; Actual: 1 Warning documentation

Expected: 0 or 2; Actual: 1
prometheus endpoint.

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

### Regex Entry

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 1; Actual: 0; Below Warning documentation

Expected: 1; Actual: 0; Below
A Regex entry can be used to disable a group of metrics. E.g. if you want to disable everything with

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 0 or 2; Actual: 1 Warning documentation

Expected: 0 or 2; Actual: 1

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 80; Actual: 101 Warning documentation

Expected: 80; Actual: 101
default_jenkins_disk.*

### Fully qualified Name Entry

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 1; Actual: 0; Below Warning documentation

Expected: 1; Actual: 0; Below
If you want to disable certain individual entries you can do it with this entry. The value should be the same

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 80; Actual: 109 Warning documentation

Expected: 80; Actual: 109
as you can see it in the prometheus endpoint. It's case-insensitive.

Check warning

Code scanning / Markdownlint (reported by Codacy)

Files should end with a single newline character Warning documentation

Files should end with a single newline character

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 0 or 2; Actual: 1 Warning documentation

Expected: 0 or 2; Actual: 1
Binary file added docs/configuration/img/disabled_metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public FormValidation doCheckRegex(@QueryParameter String value) {

@Override
public Descriptor<Entry> getDescriptor() {
return new NamedDisabledMetric.DescriptorImpl();
return new DescriptorImpl();

Check warning on line 37 in src/main/java/org/jenkinsci/plugins/prometheus/config/disabledmetrics/RegexDisabledMetric.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 37 is not covered by tests
}

@Extension
Expand Down

0 comments on commit 3698fc0

Please sign in to comment.