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

Support Prometheus service discovery with Kubernetes annotations #866

Merged
merged 2 commits into from
Feb 1, 2020
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
1 change: 1 addition & 0 deletions changelog/content/experimental/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ weight: 1
version:
---

- {{% tag added %}} Support Prometheus service discovery in Helm chart ([#861](https://github.com/tomkerkhove/promitor/issues/861))
- {{% tag added %}} Capability to gain insights on Azure Monitor integration ([docs](http://promitor.io/operations/#azure-monitor-integration) | [#848](https://github.com/tomkerkhove/promitor/issues/848))
1 change: 1 addition & 0 deletions charts/promitor-agent-scraper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ their default values.
| `prometheus.scrapeEndpointPath` | Path where the scraping endpoint for Prometheus is being exposed | `/metrics` |
| `prometheus.enableMetricTimestamps` | Indication wheter or not to include timestamp | `true` |
| `prometheus.metricUnavailableValue` | Value to report in Prometheus when no metric was found wheter or not to include timestamp | `NaN` |
| `prometheus.enableServiceDiscovery` | Indication wheter or not service discovery with annotations should be enabled ([docs](https://github.com/helm/charts/tree/master/stable/prometheus#scraping-pod-metrics-via-annotations)) | `true` |
| `telemetry.applicationInsights.enabled` | Indication wheter or not to send telemetry to Azure Application Insights | `false` |
| `telemetry.applicationInsights.logLevel` | Minimum level of logging for Azure Application Insights | |
| `telemetry.applicationInsights.key` | Application Insights instrumentation key | |
Expand Down
6 changes: 6 additions & 0 deletions charts/promitor-agent-scraper/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
type: {{ .Values.service.labelType }}
{{- if .Values.prometheus.enableServiceDiscovery }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: {{ .Values.prometheus.scrapeEndpointPath | quote }}
prometheus.io/port: {{ .Values.service.targetPort | quote }}
{{- end }}
spec:
{{- if .Values.service.exposeExternally }}
type: LoadBalancer
Expand Down
1 change: 1 addition & 0 deletions charts/promitor-agent-scraper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ prometheus:
scrapeEndpointPath: /metrics
enableMetricTimestamps: True
metricUnavailableValue: NaN
enableServiceDiscovery: True
telemetry:
defaultLogLevel: "Error"
applicationInsights:
Expand Down