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

Fix gaps in the Prometheus integration (technical preview) #3662

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/prometheus/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "0.10.0"
changes:
- description: Hide some configuration for remote_write data_stream; Add leader election for collector and query data_streams
type: enhancement
link: https://github.com/elastic/integrations/pull/3662
- version: "0.9.2"
changes:
- description: reworded a link to related documentation in the Readme so it is clearer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ metrics_filters.include:
metrics_path: {{metrics_path}}
period: {{period}}
rate_counters: {{rate_counters}}
{{#if ssl.certificate_authorities}}
ssl.certificate_authorities:
{{#each ssl.certificate_authorities}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have many cert_authorities? Just wondering

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes
Screenshot 2022-07-07 at 16 50 21
it defined by multi: true setting in manifest

- {{this}}
{{/each}}
{{/if}}
use_types: {{use_types}}
username: {{username}}
password: {{password}}
{{#if leaderelection}}
condition: ${kubernetes_leaderelection.leader} == true
{{/if}}
{{#if query}}
{{query}}
{{/if}}
Expand All @@ -33,4 +38,4 @@ password: {{password}}
{{/if}}
{{#if timeout}}
{{timeout}}
{{/if}}
{{/if}}
9 changes: 7 additions & 2 deletions packages/prometheus/data_stream/collector/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ streams:
required: true
show_user: true
default: true
- name: leaderelection
type: bool
title: Leader Election
multi: false
required: true
show_user: false
default: true
- name: bearer_token_file
type: text
title: Bearer Token File
Expand All @@ -53,8 +60,6 @@ streams:
multi: true
required: false
show_user: false
default:
- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
- name: metrics_filters.exclude
type: text
title: Metrics Filters Exclude
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ hosts:
{{/each}}
period: {{period}}
queries: {{queries}}
{{#if leaderelection}}
condition: ${kubernetes_leaderelection.leader} == true
{{/if}}
7 changes: 7 additions & 0 deletions packages/prometheus/data_stream/query/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ streams:
params:
query: some_value
path: /api/v1/query
- name: leaderelection
type: bool
title: Leader Election
multi: false
required: true
show_user: false
default: true
title: Prometheus query metrics
enabled: false
description: Collect Prometheus query metrics
10 changes: 5 additions & 5 deletions packages/prometheus/data_stream/remote_write/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ streams:
title: Enabled SSL
multi: false
required: true
show_user: true
show_user: false
default: false
- name: ssl.certificate
type: text
title: SSL Certificate
multi: false
required: false
show_user: true
show_user: false
default: /etc/pki/server/cert.pem
- name: ssl.key
type: text
title: SSL Key
multi: false
required: false
show_user: true
show_user: false
default: /etc/pki/server/cert.key
- name: rate_counters
type: bool
Expand All @@ -58,14 +58,14 @@ streams:
title: Counter Type Patterns
multi: true
required: false
show_user: true
show_user: false
default: []
- name: types_patterns.histogram_patterns
type: text
title: Histogram Type Patterns
multi: true
required: false
show_user: true
show_user: false
default: []
title: Prometheus remote write metrics
enabled: false
Expand Down
2 changes: 1 addition & 1 deletion packages/prometheus/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: 1.0.0
name: prometheus
title: Prometheus Metrics
version: 0.9.2
version: 0.10.0
license: basic
description: Collect metrics from Prometheus servers with Elastic Agent.
type: integration
Expand Down