Hi Guys,
I am using Influxdb to store the performance data of several systems. The database looks somewhat like this:
==================================================
| time | Connection | Name | Value|
==================================================
| 1234554321 | 192.168.2.2 | Parameter_1 | 10 |
| 1234554322 | 192.168.2.2 | Parameter_2 | 20 |
| 1234554323 | 192.168.2.2 | Parameter_3 | 30 |
| 1234554324 | 192.168.3.2 | Parameter_1 | 11 |
| 1234554325 | 192.168.3.2 | Parameter_2 | 21 |
| 1234554326 | 192.168.3.2 | Parameter_3 | 31 |
| 1234554327 | 192.168.2.2 | Parameter_1 | 12 |
| 1234554328 | 192.168.2.2 | Parameter_2 | 22 |
| 1234554329 | 192.168.2.2 | Parameter_3 | 32 |
| 1234554330 | 192.168.3.2 | Parameter_1 | 13 |
| 1234554331 | 192.168.3.2 | Parameter_2 | 23 |
| 1234554332 | 192.168.3.2 | Parameter_3 | 33 |
==================================================
Now I want to get the average value (Downsample) and store it in a different table like this:
======================================================
| time | Connection | Name | AvgValue |
======================================================
| 1234554333 | 192.168.2.2 | Parameter_1 | 11 |
| 1234554334 | 192.168.2.2 | Parameter_2 | 21 |
| 1234554335 | 192.168.2.2 | Parameter_3 | 31 |
| 1234554336 | 192.168.3.2 | Parameter_1 | 12 |
| 1234554337 | 192.168.3.2 | Parameter_2 | 22 |
| 1234554338 | 192.168.3.2 | Parameter_3 | 32 |
======================================================
Please help me with a suitable TICK script to do this job.
Thanks in advance.
Cheers,
Subhadeep Datta