Look into the elapsed function <https://docs.influxdata.com/influxdb/v0.13/query_language/functions/#elapsed>, I think that has what you need to construct your queries, although it will not be possible to do it with just one CQ. I think you'll need one CQ to store the state changes in a number line, and then another to measure the elapsed times between them.
If you want professional help to build your exact queries, I encourage you to purchase a Developer Support subscription <https://influxdata.com/pricing/#product_subscriptions>. On Sun, Jun 19, 2016 at 11:02 AM, <[email protected]> wrote: > On Friday, June 17, 2016 at 3:39:10 AM UTC+5:30, Sean Beckett wrote: > > The best way to design a schema is to start with the queries it needs to > support. What questions do you want to ask of your data? > > > > > > On Thu, Jun 16, 2016 at 12:03 PM, <[email protected]> wrote: > > I have requirement to monitor process line monitoring... > > > > > > > > for example > > > > any product in a factory will go through multiple steps in the factory. > sensors will track the product in different stages. what is the best way to > store the data influx. > > > > > > > > Any one in this group used InfluxDb for process line monitoring, if it > is can you guys suggest me guidance on the schme... > > > > > > > > -- > > > > Remember to include the InfluxDB version number with all issue reports > > > > --- > > > > You received this message because you are subscribed to the Google > Groups "InfluxDB" group. > > > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > > > To post to this group, send email to [email protected]. > > > > Visit this group at https://groups.google.com/group/influxdb. > > > > To view this discussion on the web visit > https://groups.google.com/d/msgid/influxdb/e42140b3-7013-41c8-a5ec-7b44eca0478e%40googlegroups.com > . > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > -- > > > > > > Sean Beckett > > Director of Support and Professional Services > > InfluxDB > > > sorry for being abstract .... let me explain the scenario. > > > Any product in factory goes to multiple stages at different timestamp. for > example > > > ProductID StageName TimeStamp > > ------------------------------------------------------------------------ > 1 Step1 TimeStamp1 > 2 Step2 TimeStamp2 > 3 Step3 TimeStamp3 > 4 Step4 TimeStamp4 > > at every step we have sensor which will just send the data about the step > and timestamp step started. > > > if I store the data like above in influxDb > > I would like write continuous query > > 1. to calculate the no of minutes taken in each step > > 2. to calculate the no of minutes taken for complete process of the > product. > > 3. Raise the alert using kapicator if the no of minutes at particular step > cross the threshold. > > can you please to design the queries in Influx Db. > > please let me know if I make any sense. > > -- > Remember to include the InfluxDB version number with all issue reports > --- > You received this message because you are subscribed to the Google Groups > "InfluxDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/influxdb. > To view this discussion on the web visit > https://groups.google.com/d/msgid/influxdb/be08dbf0-3e3b-489b-aaf4-1a6a6e46d0e7%40googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > -- Sean Beckett Director of Support and Professional Services InfluxDB -- Remember to include the InfluxDB version number with all issue reports --- You received this message because you are subscribed to the Google Groups "InfluxDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/influxdb. To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/CALGqCvOJK3bRJfhpEsuQ2Nvz-xZgFq4FVHDOSn0aYbJdTSVWfQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
