Should i couple InfluxDB with another Database for long but rare info?

Hello !

I have sensors on robots, they give me datas over time, it’s pretty clear i should use InfluxDB for that.
The files i receive however, contain a lot of informations / fields i need to store, that are not based on time.

Example :
station ip, station name, installation name, serial number, description, location, …

If i put all these informations as Fields, there will be a lot of repetition and a tremendous loss of space on disk.
If i put all these informations as Tags, i will have a very extended index, and the temendous loss will be on RAM.

So what should i do ?

What i plan to do :
Use influxDB for time based data, and another DBMS (MySQL or something) for the informations about the stations.
I would put 1 tag in influxDB, such as “Station_name” or “Station_id” , and use it to create my table in MySQL, then somehow i will do the link between MySQL and influxDB. Probably in my application before i display the datas.

This could work, but feels wrong. Is there a better solution ? Because that’s the only thing i can think of…

Interesting question! I’ve used multiple tags on my data in a similar scenario, and hadn’t considered using an external RDBMS for such data.

One way to implement it is to have your robots write their data to a MQTT broker. You could then have Chronograf pull the sensor data off of the MQTT broker, and have MySQL also pull data from the same broker. Then your robots are only writing data to one place, and each data store is pulling from the same source.

dg

Yes i was tempted to do the same, but as i only would have gotten <5 records in my DB it was a little bit exagerated to put another DBMS , server, and write the code to bind the results.

So for now, i have created two measurement : " infos_robots " & " full_datas " , i will probably have a third with downsampled data, but anyway you get the spirit. I “emulated” a link between the two by adding a tag “id_robot” in the measurements containing data, and this obviously matches with another tag called “id” in the infos_robots measurement.

Still not finding that very nice : feels wrong to have a timestamp which doesn’t make any sense for each robot information.
And in my case it’s not very bothering because the informations are all in one row per robot, but what if i had to split this with 10rows per robot ? Would take 10 timestamp for nothing at all.

I think it would be great to be able to disable the timestamp features and work only with tags for specific measurements.
But it was not the idea of influx at the beginning so … Open debate !

Meanwhile, 2 measurements or another DBMS is the best i came up with … =X

1 Like