-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Make SNMP agent_host configurable #8060
Comments
I don't think it would be used much. In my case for example, there are multiple telegraf hosts that are polling snmp devices, so in that scenario it is useful to still know which one did this polling. Anyway, I would suggest to rename the config setting to be more expressive like |
In that particular use case you can always use global tag to define collector particularities including its hostname, location etc and those tags will always be set on each and every measurement generated by that collector. This would allow you to identify what measurement came from what telegraf collector. This configuration option, thats the subject of this feature request, is meant to define the tag name that will store the SNMP agent being polled. This is mainly useful when using different inputs that references the source of the data with different tag identifiers. For example if one is using a combination of SNMP, gNMI and jti_openconfig_telemetry inputs to collect data (and it might become necessary to do so if devices have different feature sets) than the same data is referenced with different tag names:
You can always use extra processing to align those tags but hardcoding this value in the input phase just to rename it later on does not sound very efficient. |
Ah, I solved that by setting a I agree that multiple plugins should be more aligned regarding the use of tag name to specify the collected host/agent/device/source. That might be the better and higher goal. What did you think of my suggestion of renaming the new option to be more clear? |
I think is a good idea ... I will make the update. |
I Just realised this is an issue and not a PR 🧐 |
#8082 is merged since october. |
Feature Request
The agent hostname is hardcoded in agent_host tag. Expose this as a variable and make it configurable in order to avoid extra processing later on.
Proposal:
Current behavior:
Agent_host is hardcoded and all measurements are exported with agent_host="hostname".
Desired behavior:
Introduce a new configuration option (ex: agent_host) in order to define what is the agent host tag name (ex: agent_host = "host") and then use that value to export the hostname tag in SNMP measurements like host="hostname".
Use case:
It gives an efficient option to align hostname tag without the need of extra processing.
The text was updated successfully, but these errors were encountered: