You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/kubernetes/annotations/README.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -239,6 +239,8 @@ Handles discovery of kubernetes targets and exports them, this component does no
239
239
| `label_selectors` | _no_ | `[]` | The [label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to use to find matching targets |
240
240
| `annotation` | _no_ | `metrics.grafana.com` | The domain to use when looking for annotations, Kubernetes selectors do not support a logical `OR`, if multiple types of annotations are needed, this module should be invoked multiple times. |
241
241
| `tenant` | _no_ | `.*` | The tenant to write metrics to. This does not have to be the tenantId, this is the value to look for in the `{{argument.annotation.value}}/tenant` annotation i.e. (`metrics.grafana.com/tenant`), and this can be a regular expression. It is recommended to use a default i.e. `primary\|`, which would match the primary tenant or an empty string meaning the tenant is not set. |
242
+
| `scrape_interval` | _no_ | `60s` | How often to scrape metrics from the targets |
243
+
| `scrape_timeout` | _no_ | `10s` | How long before a scrape times out |
242
244
| `blackbox_url` | _no_ | `""` | The address of the blackbox exporter to use (without the protocol), only the hostname and port i.e. `blackbox-prometheus-blackbox-exporter.default.svc.cluster.local:9115` |
243
245
244
246
#### Exports
@@ -263,16 +265,14 @@ The following labels are automatically added to exported targets.
| `targets` | _yes_ | `list(map(string))` | List of targets to scrape |
269
-
| `forward_to` | _yes_ | `list(MetricsReceiver)` | Must be a where scraped should be forwarded to |
270
-
| `keep_metrics` | _no_ | [see code](module.alloy#L228) | A regular expression of metrics to keep |
271
-
| `drop_metrics` | _no_ | [see code](module.alloy#L235) | A regular expression of metrics to drop |
272
-
| `scrape_interval` | _no_ | `60s` | How often to scrape metrics from the targets |
273
-
| `scrape_timeout` | _no_ | `10s` | How long before a scrape times out |
274
-
| `max_cache_size` | _no_ | `100000` | The maximum number of elements to hold in the relabeling cache. This should be at least 2x-5x your largest scrape target or samples appended rate. |
275
-
| `clustering` | _no_ | `false` | Whether or not [clustering](https://grafana.com/docs/agent/latest/flow/concepts/clustering/) should be enabled |
| `targets` | _yes_ | `list(map(string))` | List of targets to scrape |
271
+
| `forward_to` | _yes_ | `list(MetricsReceiver)` | Must be a where scraped should be forwarded to |
272
+
| `keep_metrics` | _no_ | [see code](module.alloy#L228) | A regular expression of metrics to keep |
273
+
| `drop_metrics` | _no_ | [see code](module.alloy#L235) | A regular expression of metrics to drop |
274
+
| `max_cache_size` | _no_ | `100000` | The maximum number of elements to hold in the relabeling cache. This should be at least 2x-5x your largest scrape target or samples appended rate. |
275
+
| `clustering` | _no_ | `false` | Whether or not [clustering](https://grafana.com/docs/agent/latest/flow/concepts/clustering/) should be enabled |
276
276
277
277
#### Labels
278
278
@@ -288,7 +288,7 @@ The following example will scrape all metric annotation instances in cluster.
Copy file name to clipboardExpand all lines: modules/kubernetes/annotations/metrics.alloy
+10-14
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,16 @@ declare "kubernetes" {
128
128
default = false
129
129
}
130
130
131
+
argument "scrape_interval" {
132
+
comment = "How often to scrape metrics from the targets (default: 60s)"
133
+
optional = true
134
+
}
135
+
136
+
argument "scrape_timeout" {
137
+
comment = "How long before a scrape times out (default: 10s)"
138
+
optional = true
139
+
}
140
+
131
141
/*
132
142
Hidden Arguments
133
143
These arguments are used to set reusable variables to avoid repeating logic
@@ -503,16 +513,6 @@ declare "metrics" {
503
513
optional = true
504
514
}
505
515
506
-
argument "scrape_interval" {
507
-
comment = "How often to scrape metrics from the targets (default: 60s)"
508
-
optional = true
509
-
}
510
-
511
-
argument "scrape_timeout" {
512
-
comment = "How long before a scrape times out (default: 10s)"
513
-
optional = true
514
-
}
515
-
516
516
argument "max_cache_size" {
517
517
comment = "The maximum number of elements to hold in the relabeling cache (default: 100000). This should be at least 2x-5x your largest scrape target or samples appended rate."
0 commit comments