Newbie to InfluxDB here.
I have a raspberry pi that collects accelerometer data via a python program and sends it to a bucket in InfluxDB, let’s call that bucket “gyro_data”. This bucket will fill up with a lot of data since the sample rate is around 200+ Hz. This data is going to be sent to the cloud later, but to reduce the amount of data I want to filter the data down to the mean value every second instead before sending it to the cloud.
So I was thinking I could use a second local bucket which stores this data before it is being sent to the cloud, lets call that bucket “filtered_gyro_data”.
Now here is the problem. I can not figure out how to send the data between these buckets.
I have set up Telegraf on my raspberry pi and configured the outputs section, it is currently running fine. This is what the configuration looks like for the outputs section:
# # Configuration for sending metrics to InfluxDB 2.0 [[outputs.influxdb_v2]] # ## The URLs of the InfluxDB cluster nodes. # ## # ## Multiple URLs can be specified for a single cluster, only ONE of the # ## urls will be written to each interval. # ## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"] urls = ["http://<pi's ip here>:8086"] # # ## Token for authentication. token = "<valid token here>" # # ## Organization is the name of the organization you wish to write to. organization = "test" # # ## Destination bucket to write into. bucket = "filtered_gyro_data" # # ## The value of this tag will be used to determine the bucket. If this # ## tag is not set the 'bucket' option is used as the default. etc.....
I was googling around and found out that I may be required to configure a inputs section as well to actually read the data from the source bucket. But whenever I did that Telegraf would not start because of some problem with the configuration file (assuming because of syntax error).
Here is also some other information if needed: InfluxDB v. 2.6.1, Telegraf v. 1.26, Pi is running Debian 11. The configuration file on my pi is being edited, Telegraf configuration in the InfluxDB web interface is not being used.
This feels like an easy task to accomplish, but with my limited knowledge so far I just can’t get it to work. Anyone have some hints or suggestions on how I can solve this problem? I really appreciate all help!
Thanks in advance!