Skip to content

Commit

Permalink
Undo auto formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Wall <[email protected]>
  • Loading branch information
petewall committed Jan 14, 2025
1 parent 86b20a7 commit 174b333
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 33 deletions.
18 changes: 8 additions & 10 deletions modules/kubernetes/kube-state-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ Handles scraping Grafana kube-state-metrics metrics.

### `kubernetes`

Handles discovery of kubernetes targets and exports them, this component does not perform any scraping at all and is not
required to be used for kubernetes, as a custom service discovery and targets can be defined and passed to
`kube-state-metrics.scrape`
Handles discovery of kubernetes targets and exports them, this component does not perform any scraping at all and is not required to be used for kubernetes, as a custom service discovery and targets can be defined and passed to `kube-state-metrics.scrape`

#### Arguments

| Name | Required | Default | Description |
|:------------------|:---------|:------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------|
| :---------------- | :------- | :---------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
| `namespaces` | _no_ | `[]` | The namespaces to look for targets in, the default (`[]`) is all namespaces |
| `field_selectors` | _no_ | `[]` | The [field selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/) to use to find matching targets |
| `label_selectors` | _no_ | `["app.kubernetes.io/name=kube-state-metrics"]` | The [label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to use to find matching targets |
Expand All @@ -25,16 +23,16 @@ required to be used for kubernetes, as a custom service discovery and targets ca
#### Exports

| Name | Type | Description |
|:---------|:--------------------|:---------------------------|
| :------- | :------------------ | :------------------------- |
| `output` | `list(map(string))` | List of discovered targets |

#### Labels

The following labels are automatically added to exported targets.

| Label | Description |
|:---------|:--------------------------------------------------------------------------------------------------|
| `source` | Constant value of `kubernetes`, denoting where the results came from, this can be useful for LBAC |
| Label | Description |
| :-------- | :------------------------------------------------------------------------------------------------ |
| `source` | Constant value of `kubernetes`, denoting where the results came from, this can be useful for LBAC |

---

Expand All @@ -43,7 +41,7 @@ The following labels are automatically added to exported targets.
#### Arguments

| Name | Required | Default | Description |
|:--------------------|:---------|:---------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------|
| :------------------ | :------- | :------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
| `targets` | _yes_ | `list(map(string))` | List of targets to scrape |
| `forward_to` | _yes_ | `list(MetricsReceiver)` | Must be a where scraped should be forwarded to |
| `job_label` | _no_ | `integrations/kubernetes/kube-state-metrics` | The job label to add for all metrics |
Expand All @@ -61,7 +59,7 @@ The following labels are automatically added to exported targets.
The following labels are automatically added to exported targets.

| Label | Description |
|:------|:-----------------------------------------------|
| :---- | :--------------------------------------------- |
| `job` | Set to the value of `argument.job_label.value` |

---
Expand Down
44 changes: 21 additions & 23 deletions modules/system/node-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ Handles scraping Node Exporter metrics.

### `kubernetes`

Handles discovery of kubernetes targets and exports them, this component does not perform any scraping at all and is not
required to be used for kubernetes, as a custom service discovery and targets can be defined and passed to
`node_exporter.scrape`
Handles discovery of kubernetes targets and exports them, this component does not perform any scraping at all and is not required to be used for kubernetes, as a custom service discovery and targets can be defined and passed to `node_exporter.scrape`

#### Arguments

| Name | Required | Default | Description |
|:------------------|:---------|:------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------|
| :---------------- | :------- | :---------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
| `namespaces` | _no_ | `[]` | The namespaces to look for targets in, the default (`[]`) is all namespaces |
| `field_selectors` | _no_ | `[]` | The [field selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/) to use to find matching targets |
| `label_selectors` | _no_ | `["app.kubernetes.io/name=prometheus-node-exporter"]` | The [label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to use to find matching targets |
Expand All @@ -26,15 +24,15 @@ required to be used for kubernetes, as a custom service discovery and targets ca
#### Exports

| Name | Type | Description |
|:---------|:--------------------|:---------------------------|
| :------- | :------------------ | :------------------------- |
| `output` | `list(map(string))` | List of discovered targets |

#### Labels

The following labels are automatically added to exported targets.

| Label | Description |
|:------------|:----------------------------------------------------------------------------------------------------------------------------------------------------|
| :---------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
| `app` | Derived from the pod label value of `app.kubernetes.io/name`, `k8s-app`, or `app` |
| `component` | Derived from the pod label value of `app.kubernetes.io/component`, `k8s-component`, or `component |
| `container` | The name of the container, usually `haproxy` |
Expand All @@ -50,21 +48,21 @@ The following labels are automatically added to exported targets.
#### Arguments

| Name | Optional | Default | Description |
|:-------|:---------|:--------|:---------------------------------------|
| :----- | :------- | :------ | :------------------------------------- |
| `port` | `true` | `9100` | The of the port to scrape metrics from |

#### Exports

| Name | Type | Description |
|:---------|:--------------------|:---------------------------|
| :------- | :------------------ | :------------------------- |
| `output` | `list(map(string))` | List of discovered targets |

#### Labels

The following labels are automatically added to exported targets.

| Label | Description |
|:---------|:---------------------------------------------------------------------------------------------|
| :------- | :------------------------------------------------------------------------------------------- |
| `source` | Constant value of `local`, denoting where the results came from, this can be useful for LBAC |

---
Expand All @@ -73,26 +71,26 @@ The following labels are automatically added to exported targets.

#### Arguments

| Name | Required | Default | Description |
|:--------------------|:---------|:------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------|
| `targets` | _yes_ | `list(map(string))` | List of targets to scrape |
| `forward_to` | _yes_ | `list(MetricsReceiver)` | Must be a where scraped should be forwarded to |
| `job_label` | _no_ | `integrations/node_exporter` | The job label to add for all mimir metric |
| `keep_metrics` | _no_ | [see code](module.river#L228) | A regular expression of metrics to keep |
| `drop_metrics` | _no_ | [see code](module.river#L235) | A regular expression of metrics to drop |
| `scheme` | _no_ | `http` | The scheme to use when scraping metrics |
| `bearer_token_file` | _no_ | none | The bearer token file |
| `scrape_interval` | _no_ | `60s` | How often to scrape metrics from the targets |
| `scrape_timeout` | _no_ | `10s` | How long before a scrape times out |
| `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. |
| `clustering` | _no_ | `false` | Whether or not [clustering](https://node_exporter.com/docs/agent/latest/flow/concepts/clustering/) should be enabled |
| Name | Required | Default | Description |
| :------------------ | :------- | :----------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
| `targets` | _yes_ | `list(map(string))` | List of targets to scrape |
| `forward_to` | _yes_ | `list(MetricsReceiver)` | Must be a where scraped should be forwarded to |
| `job_label` | _no_ | `integrations/node_exporter` | The job label to add for all mimir metric |
| `keep_metrics` | _no_ | [see code](metrics.alloy#L256) | A regular expression of metrics to keep |
| `drop_metrics` | _no_ | [see code](metrics.alloy#L249) | A regular expression of metrics to drop |
| `scheme` | _no_ | `http` | The scheme to use when scraping metrics |
| `bearer_token_file` | _no_ | none | The bearer token file |
| `scrape_interval` | _no_ | `60s` | How often to scrape metrics from the targets |
| `scrape_timeout` | _no_ | `10s` | How long before a scrape times out |
| `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. |
| `clustering` | _no_ | `false` | Whether or not [clustering](https://node_exporter.com/docs/agent/latest/flow/concepts/clustering/) should be enabled |

#### Labels

The following labels are automatically added to exported targets.

| Label | Description |
|:------|:-----------------------------------------------|
| :---- | :--------------------------------------------- |
| `job` | Set to the value of `argument.job_label.value` |

---
Expand Down

0 comments on commit 174b333

Please sign in to comment.