kapacitor icon indicating copy to clipboard operation
kapacitor copied to clipboard

Reset window data ?

Open cbarzu opened this issue 9 years ago • 2 comments

I would need some help with mi tickscript, if this isn't the correct place to ask for it please close the ticket.

I want to scale my application if last 4 points were below a threshold. But, I have the next problem. Scaling an application may take more than 1 minute, so my telegraf will return that de average cpu is below that threshold, and kapacitor will scale my app again which is not correct. Is there any way to wait some minutes after an altert is triggered? Or same way to clean the window and begin again ?

This is a example about what I am trying to do:

stream
         |from()
             .measurement('cpu')
         |where(lambda: "cpu" == 'cpu-total')
         |groupBy('host')
         | window()
              .period(4m)
              .every(1m)
         |stateCount(lambda: "usage_idle" <= 10)
         |alert()
             // Warn after 4 point
             .warn(lambda: "state_count" >= 4)
             .exec ( custom_scale_script)
             //if alert was triggered now should clean window o ignore the next 4 points

Thank you very much.

Regards, Claudiu

cbarzu avatar Jun 05 '17 09:06 cbarzu

@cbarzu We try to reserve GitHub Issues for actionable bug reports or feature requests. Please send general questions to the community board at community.influxdata.com. Thanks!

nathanielc avatar Jun 05 '17 21:06 nathanielc

Ok @nathanielc , I will ask there then. Thanks for your response.

cbarzu avatar Jun 06 '17 09:06 cbarzu