Hi, I’m new to influxdb, so sorry for my questions… I’m writing data from sensors using python and the following json structure:
json_body = [
{“measurement”: “myhome”,“tags”: {“risorsa”: “TIM”},“fields”: {“valore”: tim}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “TEM”},“fields”: {“valore”: tem}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “UE”},“fields”: {“valore”: ue}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “UI”},“fields”: {“valore”: ui}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “HPA”},“fields”: {“valore”: hpa}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “VENTO”},“fields”: {“valore”: vento}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “ENEL”},“fields”: {“valore”: w}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “LUX”},“fields”: {“valore”: lux}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “FRAME”},“fields”: {“valore”: fm}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “ARIA”},“fields”: {“valore”: aria}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “TMH”},“fields”: {“valore”: tmh}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “THB”},“fields”: {“valore”: thb}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “TSD”},“fields”: {“valore”: tsd}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “PRESENZA”},“fields”: {“valore”: presenza}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “DSKSPACE”},“fields”: {“valore”: dskspace}},
{“measurement”: “myhome”,“tags”: {“risorsa”: “DBSPACE”},“fields”: {“valore”: dbspace}}
]
My retention is 0 and I write data every 5 secons.
I would use the a function to aggregate data automatically without my intervention (for example data should be aggregate to one day after one month).
Can you help me step by step (I would avoid to lose actual data).
Thanks a lot for your help.