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

SNMP exporter: Label targets block as deprecated #2274

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ptodev
Copy link
Contributor

@ptodev ptodev commented Dec 12, 2024

Since the target block is deprecated, it'd be nice to mention this in the docs #979.

In general, it's not ideal how there are so many ways to do the same thing in this components:

  • target block and targets argument
  • config_file argument and configargument

I wish we didn't have the config_file argument at all. I really don't see the benefit in it.

Comment on lines 20 to 21
### Recommended usage

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to remove this and keep it just Usage to keep it consistent with the other topic layouts.

Copy link
Contributor

@ptodev
Copy link
Contributor Author

ptodev commented Dec 19, 2024

@clayton-cornell @wildum I edited the page to put less emphasis on the deprecated options. I do think it looks better now! Thank you for the feedback.

| walk_param | [walk_param][] | SNMP connection profiles to override default SNMP settings. | no |

[target]: #target-block
[walk_param]: #walk_param-block

### target block

{{< admonition type="warning" >}}

Using the `target` block is deprecated because it is less flexible than the `targets` argument:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Using the `target` block is deprecated because it is less flexible than the `targets` argument:
Starting with {{< param "FULL_PRODUCT_NAME" >}} version 1.6, the `target` block is deprecated.
It will be removed in a future release.
The `target` block is deprecated because it is less flexible than the `targets` argument:

What release is target deprecated in? v1.6? v2.0?

Including the text suggestion from herE: https://grafana.com/docs/writers-toolkit/write/deprecate-remove/#deprecation

@@ -94,6 +95,19 @@ The `target` block may be specified multiple times to define multiple targets. T
| `snmp_context` | `string` | Override the `context_name` parameter in the SNMP configuration file. | `""` | no |
| `labels` | `map(string)` | Map of labels to apply to all metrics captured from the target. | `""` | no |

{{< collapse title="Deprecated example using the target block" >}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{< collapse title="Deprecated example using the target block" >}}
{{< collapse title="Example using the target block (deprecated)" >}}

@@ -74,14 +63,26 @@ The following blocks are supported inside the definition of

| Hierarchy | Name | Description | Required |
| ---------- | -------------- | ----------------------------------------------------------- | -------- |
| target | [target][] | Configures an SNMP target. | no |
| target | [target][] | (Deprecated) Configures an SNMP target. | no |
| walk_param | [walk_param][] | SNMP connection profiles to override default SNMP settings. | no |

[target]: #target-block
[walk_param]: #walk_param-block

### target block
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### target block
### target block (deprecated)

| walk_param | [walk_param][] | SNMP connection profiles to override default SNMP settings. | no |

[target]: #target-block
[walk_param]: #walk_param-block

### target block

{{< admonition type="warning" >}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{< admonition type="warning" >}}
{{< admonition type="caution" >}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants