-
Notifications
You must be signed in to change notification settings - Fork 65
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
Setting 'tag_keys' dynamically #75
Comments
👍 I would like to dynamically set tags, too. It would be possible by combining rewrite_tag_filter and forest plugins but it is tough. The A simple solution would be adding an option like "tag_key" (confusing name though...) and then post the value of the "tag_key" field as tags. { 'interface-bandwidth': 1234, 'tags': { 'interface-name': 'abc' } }
{ 'arp-timeout': 34, 'tags': { 'arp-ip': '1.2.3.4' } } |
yeah, saidie's way is one approach. |
Or if we send like below, can we use the 'tag_keys' in the message? { 'interface-bandwidth': 1234, 'tag_keys': [ 'interface-name' ] } The code modification is minimum and has backward compatibility as well. |
👍 for @gaddevijay 's proposal. |
Maybe, adding |
In the work that I am doing, I do not know in advance the tags to be used in tag_keys. For every packet that is received I can look at the data and decide what the tags could be. Is there any way that I can set the 'tag_keys' per record that I am will be sending to influxDB?
For example, I could get a packet which could transform to {'interface-name': 'abc', 'interface-bandwidth': 1234, }. For this the tag should be 'interface-name'. Next I could get a packet which could transform to {'arp-ip': '1.2.3.4' and 'arp-timeout': 34}. Here the index should be 'arp-ip'. All of the packets are coming at the same time, so the timestamp would be the same and these should of to the same measurement. Above records are just example to simplify the use case.
The text was updated successfully, but these errors were encountered: