Skip to content
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

InfluxDB storage as fields #31

Open
alexmc1510 opened this issue Nov 27, 2019 · 2 comments
Open

InfluxDB storage as fields #31

alexmc1510 opened this issue Nov 27, 2019 · 2 comments

Comments

@alexmc1510
Copy link

I have going deeper in influxDB database (which is impressive) and I have noticed that we are storing each OPC tag as independent measurement. As I have several machines I would like to know if it would be possible to store a group of measurements as fields instead of measurements. Actually I am clasifying the measurements thanks to tag values but it would be good to have all the sensors of each machine under the same measurement "box" and treated as fields. I don't know if I have explained properly.

Thanks

@coussej
Copy link
Owner

coussej commented Dec 3, 2019

I think I understand what you mean :-)

The setup is indeed to have an individual measurement per sensor / source value. You indeed give structure and group those measurements per machine using tags, as you mention. If you then want to query all data from one machine, you can use a regex query, for example:

 SELECT value FROM /.*/ WHERE machine = 'machine1' AND time > now() - 5m

@mirkocomparetti-synesis

I interpreted this differently, and it is a use case I'm interested as well: for a machine I collect a set of data at the same timestamp: i would like to be able to save them in the same record in the same measurement, as different fields, for instance
time tags1, tag2, tag3 field1 field2 field3
currently the configuration allows for multiple tag, but not for multiple fields.
The polled configuration, as it reads values from opc ua at a predeterined rate could do this, while this does not make sense in the "subscribe/monitor" configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants