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

Add excludeJobMetrics parameter available on collectd-jenkins v2.4.0 #1712

Merged
merged 7 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/monitors/collectd-jenkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Configuration](../monitor-config.md#common-configuration).**
| `path` | no | `string` | |
| `metricsKey` | **yes** | `string` | Key required for collecting metrics. The access key located at `Manage Jenkins > Configure System > Metrics > ADD.` If empty, click `Generate`. |
| `enhancedMetrics` | no | `bool` | Whether to enable enhanced metrics (**default:** `false`) |
| `excludeJobMetrics` | no | `bool` | Set to *true* to to exclude job metrics retrieved from `/api/json` endpoint (**default:** `false`) |
| `includeMetrics` | no | `list of strings` | Used to enable individual enhanced metrics when `enhancedMetrics` is false |
| `username` | no | `string` | User with security access to jenkins |
| `apiToken` | no | `string` | API Token of the user |
Expand Down
3 changes: 3 additions & 0 deletions pkg/monitors/collectd/jenkins/jenkins.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ type Config struct {
MetricsKey string `yaml:"metricsKey" validate:"required"`
// Whether to enable enhanced metrics
EnhancedMetrics *bool `yaml:"enhancedMetrics"`
// Set to *true* to to exclude job metrics retrieved from `/api/json` endpoint
ExcludeJobMetrics *bool `yaml:"excludeJobMetrics"`
// Used to enable individual enhanced metrics when `enhancedMetrics` is
// false
IncludeMetrics []string `yaml:"includeMetrics"`
Expand Down Expand Up @@ -82,6 +84,7 @@ func (m *Monitor) Configure(conf *Config) error {
"Interval": conf.IntervalSeconds,
"MetricsKey": conf.MetricsKey,
"EnhancedMetrics": conf.EnhancedMetrics,
"ExcludeJobMetrics": conf.ExcludeJobMetrics,
"Username": conf.Username,
"APIToken": conf.APIToken,
"ssl_keyfile": conf.SSLKeyFile,
Expand Down
8 changes: 8 additions & 0 deletions selfdescribe.json
Original file line number Diff line number Diff line change
Expand Up @@ -12637,6 +12637,14 @@
"type": "bool",
"elementKind": ""
},
{
"yamlName": "excludeJobMetrics",
"doc": "Set to *true* to to exclude job metrics retrieved from `/api/json` endpoint",
"default": "false",
"required": false,
"type": "bool",
"elementKind": ""
},
{
"yamlName": "includeMetrics",
"doc": "Used to enable individual enhanced metrics when `enhancedMetrics` is false",
Expand Down