Set default scrape interval

This commit is contained in:
Dmytro Bondar 2024-10-01 12:02:04 +02:00
parent ea1a0e0bbf
commit be762de5c1
No known key found for this signature in database
GPG Key ID: C123CD37BBED8BB7
3 changed files with 4 additions and 5 deletions

View File

@ -110,7 +110,7 @@ The [Values](#values) section lists the parameters that can be configured during
| monitoring.kind | string | `"PodMonitor"` | Kind of the Prometheus resource. Could be `PodMonitor` or `ServiceMonitor`. |
| monitoring.labels | object | `{}` | Resource labels. |
| monitoring.annotations | object | `{}` | Resource annotations. |
| monitoring.interval | string | `""` | Interval at which metrics should be scraped. If not specified Prometheus' global scrape interval is used. |
| monitoring.interval | string | `1m` | Interval at which metrics should be scraped. If not specified `config.statistics.data_collection_interval` interval is used. |
| monitoring.metricRelabelings | list | `[]` | Relabelings to samples before ingestion. |
| monitoring.relabelings | list | `[]` | Relabelings to samples before scraping. |
| monitoring.scrapeTimeout | string | `""` | Timeout after which the scrape is ended If not specified, the Prometheus global scrape interval is used. |

View File

@ -19,9 +19,7 @@ spec:
{{ $endpointsKey }}:
- port: metrics
path: /metrics
{{- with .interval }}
interval: {{ . }}
{{- end }}
interval: {{ coalesce .interval ($.Values.config.statistics).data_collection_interval "1m" }}
{{- with .metricRelabelings }}
metricRelabelings: {{- toYaml . | nindent 8 }}
{{- end }}

View File

@ -218,7 +218,8 @@ monitoring:
labels: {}
# -- Resource annotations.
annotations: {}
# -- Interval at which metrics should be scraped. If not specified Prometheus' global scrape interval is used.
# -- Interval at which metrics should be scraped. If not specified `config.statistics.data_collection_interval` interval is used.
# @default -- `1m`
interval: ''
# -- Relabelings to samples before ingestion.
metricRelabelings: []