[influxdb] Re: kapacitor sending ok alerts as state change on start up

2017-02-22 Thread nathaniel
Hmm, I see. Could you put a log node before the alert node and share the logs along with the logs for triggered alerts after startup? Also this may be a bug with the most recent alerting system. Do you get the same behavior if you configure slack directly in the TICKscript instead of via the to

[influxdb] Re: shift listen's Deadman

2017-02-22 Thread nathaniel
One way would be to add a window node after the derivative to buffer the data. Something like // Use this segment to replace the whole deadman section, this is equivalent but will process batches of 5m at a time. |stats(10s) .align() |derivative('emitted') .un

[influxdb] Re: Kapacitor : Delete task vs Dsiable then delete

2017-02-22 Thread nathaniel
A straight delete is just fine, the process will be the same. On Monday, February 13, 2017 at 10:49:22 PM UTC-7, Subba Rao Thirumoorthy wrote: > > Is it advisable to disable a task first before delete or straight delete > is fine? > -- Remember to include the version number! --- You received

[influxdb] Re: Kapacitor - Alert on 5XX errors only alerting once per type

2017-02-22 Thread nathaniel
The problem is probably the window node buffering data. The window will not emit the current batch of data until the it has received a point the is more than a minute past the first point in the window. Since the 5xx are sparse points you will only get alerts after the next 5xx event happens.

[influxdb] Re: Kapacitor: Drop identical consecutive values / mapreduce

2017-02-22 Thread nathaniel
Sounds like you are looking for something like this https://github.com/influxdata/kapacitor/issues/643. The feature hasn't been implemented but if its what you are looking for any input on the issue will help us prioritize and make sure the implementation meets your needs. On Friday, February 1

[influxdb] Re: kapacitor sending ok alerts as state change on start up

2017-02-22 Thread nathaniel
If you want to ignore the OK alerts use the `.noRecoveries` property of the alert node. This will suppress the OK alerts. On Friday, February 17, 2017 at 3:33:16 PM UTC-7, Archie Archbold wrote: > > Hey all. Pretty new to TICK but I have a problem that I can't wrap my head > around. > > I am mon

[influxdb] Re: How to conduct stress testing on kapacitor?

2017-02-22 Thread nathaniel
Performance data for each task is available via the kapacitor show command. You can write data to Kapacitor just like InfluxDB so influx-stress and similar tools all work. On Tuesday, February 21, 2017 at 2:38:22 AM UTC-7, Xigang Wang wrote: > > How to conduct stress testing on kapacitor? > thx

[influxdb] Re: [Kapacitor] Questions about my tick script (joins and other things)

2017-02-13 Thread nathaniel
On Friday, February 10, 2017 at 6:11:00 PM UTC-7, Glenn Davy wrote: > > On Saturday, 11 February 2017 07:05:14 UTC+13, nath...@influxdb.com wrote: > >> Thanks for a detailed question! >> > > Welcome! Thanks for a detailed answer :) > > >> Not quite, the join node has two parent nodes log4 and gr

[influxdb] Re: [Kapacitor] Questions about my tick script (joins and other things)

2017-02-10 Thread nathaniel
Thanks for a detailed question! 1) Am I right in that this is failing at the join? Or is there fundamentally bigger problems Not quite, the join node has two parent nodes log4 and groupBy8. Neither parent has sent any points on to the join node, so the join node has not had an opportunity to

[influxdb] Re: Use Kapacitor with ElasticSearch

2017-02-10 Thread nathaniel
x27;ll start an internal discussion about this and see where it goes. Let me know if I can clarify more about how those translation layers would work Bests, Nathaniel Cook On Thursday, February 9, 2017 at 9:58:18 PM UTC-7, ra...@exotel.in wrote: > > Hello, > > We have all our Data

[influxdb] Re: Kapacitor groupByNode usage

2017-02-09 Thread nathaniel
How do you want to merge them. Just flatten them all into a single point or perform some aggregation across them? To flatten them see https://docs.influxdata.com/kapacitor/v1.2/nodes/flatten_node/ or to aggregate them first change the groupBy dimension to be empty by using `|groupBy()` then pip

[influxdb] Re: Kapacitor and influxdb hogging CPU

2017-02-09 Thread nathaniel
Currently there are no plans to add WHERE clause to subscriptions. On Monday, February 6, 2017 at 1:20:43 PM UTC-7, Amit Chandak wrote: > > Hi, > I am running kapacitor and influxdb on a AWS instance with 4 vCPUs > and 16GB Memory. I have a client which needs to subscribe to certain field

[influxdb] Re: Kapacitor one shot alerts: any way to accomplish this.

2017-01-31 Thread nathaniel
You can turn off recovery notifications via the noRecoveries property https://docs.influxdata.com/kapacitor/v1.2/nodes/alert_node/#norecoveries This will make the alert node behave as you expect. On Tuesday, January 31, 2017 at 6:50:24 AM UTC-7, Kristopher Cieplak wrote: > > I guess my descript

[influxdb] Re: kapacitor anda influxdb

2017-01-30 Thread nathaniel
Is Kapacitor running on the same host as the InfluxDB process? What is the output of `kapacitor stats ingress`? On Friday, January 27, 2017 at 11:23:04 AM UTC-7, Sebastián Peralta wrote: > > Hello, > I can't integrate kacitor with influxDB. I have telegraf, influxDB and > Grafana working OK. >

Re: [influxdb] Kapacitor index.Tags on "com.docker.swarm.service.name"

2017-01-25 Thread nathaniel
I have tested this out locally and have not been able to reproduce. What version of Kapacitor are you using? I used this TICKscript: stream |from() .measurement('test') |log() |alert() .crit(lambda: TRUE) .message('{{index .Tags "com.docker.swarm.service.name"

[influxdb] Re: Telegraf -> Kapacitor -> InfluxDB possible?

2017-01-25 Thread nathaniel
It is possible, Kapacitor acts like an InfluxDB server as far as writes are concerned. Just point Telegraf at Kapacitor and it will work. As for the second question Kapacitor does not persist any writes/snapshots to disk. Meaning if Kapacitor crashes or even during a restart you will loose a s

[influxdb] Re: Kapacitor Logging - Line Truncation

2017-01-25 Thread nathaniel
Hmm, systemd/journald will truncate lines at 2K bytes, but that shouldn't happen if you are logging directly to a file and that example is not 2K bytes long. The config should be [logging] file ="/tmp/log.txt" Notice no double brackets around the logging section. What version are you using?

[influxdb] Re: 'kapacitor record' hangs and doesn't record any data

2017-01-25 Thread nathaniel
Can you share the output of `kapacitor show cpu_alert`? Check that the dbrp for the task matches what you expect. On Tuesday, January 24, 2017 at 2:13:58 AM UTC-7, denis.ki...@gmail.com wrote: > > Please, can someone help me. I have no suggestions how to fix it -- Remember to include the versi

[influxdb] Re: kapacitor tick script help

2017-01-25 Thread nathaniel
Looks like you are missing a step, where you count the number of 500s. stream |from() .measurement('error_500') |window() .period(10m) .every(5m) |count('value') .as('value') |alert() .id('{{ index .Name }}') .message('{{

[influxdb] Re: Joining together two measurements from batch

2017-01-11 Thread nathaniel
I think the flatten node https://docs.influxdata.com/kapacitor/v1.1/nodes/flatten_node/ might be what you are looking for, but its a little hard to tell without example data. On Wednesday, January 11, 2017 at 4:08:11 AM UTC-7, krzysztof...@husarlabs.com wrote: > > Helllo, > I'm trying to count

[influxdb] Re: Query is possible in Kapacitor?

2017-01-11 Thread nathaniel
Yes, here is an example: batch |query('SELECT percentile(value, 99) as 99th FROM db.rp.measurement') .period(15m) .every(1m) |alert() .crit(lambda: "99th" > 1.0) // assuming units of seconds This is a super simple example. Not sure what you mean by this > We don't want

[influxdb] Re: defining and starting kapacitor tasks in configuration

2016-12-15 Thread nathaniel
Kapacitor will persist the tasks so long as you persists its kapacitor.db file (or basically everything under /var/lib/kapacitor). A similar question was asked here https://github.com/influxdata/influxdata-docker/issues/6. On Thursday, December 15, 2016 at 2:25:12 PM UTC-7, Archie Archbold wro

[influxdb] Re: Understanding Morgoth

2016-12-05 Thread nathaniel
; > > > > > > > > > > > > > > I would first recommend that you tweak the sigmas value, may increase > it to 3.5 or 4. To iterate quickly on for these tests I recommend that you > create a recording of the data set and then tweak value replay the > recording check the results, and repeat unt

[influxdb] Re: Kapacitor filtering duplicate events

2016-12-01 Thread nathaniel
We are actively working on a solution to this problem. See https://github.com/influxdata/kapacitor/blob/nc-alert-service/ALERT_DESIGN.md The basic idea is that you will be able to both aggregate multiple alerts and rate limit sending alerts. Which should be able to prevent an alert storm On T

[influxdb] Re: Kapacitor subscription to influxdb traffic v/s InfluxdbRelay push to kapacitor

2016-12-01 Thread nathaniel
The relay copies all data it receives to all configured backends. The basic flow should be something like this: client -> load balancer -> relays -> influxdb, kapacitor (can have multiple instances of each) Kapacitor should be configured to disable subscriptions and use the load balancer when

[influxdb] Re: Kapacitor .exec command not working

2016-11-29 Thread nathaniel
Are there any errors in the Kapacitor logs? Maybe a permissions issue since the scripts exists in the test user home dir its not likely any other user will be able to execute it. On Monday, November 28, 2016 at 1:50:51 PM UTC-7, car...@gensolve.com wrote: > > > Hi, i'm new working with Kapacitor

[influxdb] Re: Initialization for Kapacitor UDF

2016-11-28 Thread nathaniel
way you have control over > the weights and using an InfluxDB measurement could work well for this case > since the weights are inherently a series. Or if you have some other > distributed storage available to you, you could leverage that to store and > load the weights, elimina

[influxdb] Re: Initialization for Kapacitor UDF

2016-11-23 Thread nathaniel
now if I can clarify anything more. Nathaniel On Wednesday, November 23, 2016 at 9:46:41 AM UTC-7, kho...@gmail.com wrote: > > I would like to implement a UDF for Kapacitor providing a weighted moving > average, which means I need to be able to initialize the UDF with its array > of weights

Re: [influxdb] Kapacitor Questions

2016-11-22 Thread nathaniel
First to answer the RAM question, Kapacitor doesn't store all data for the max window size rather each window stores what it needs and nothing more. So if a user adds a task with a 24hr window the rest of your tasks will remain the same, and Kapacitor will only need extra capacity for what ever

Re: [influxdb] Kapacitor Questions

2016-11-22 Thread nathaniel
In answer to #3, Kapacitor round robins through the list of URLs for each of its queries to InfluxDB. In which case it will not work well using a primary/secondary approach to subscriptions, as Kapacitor will end up subscribing to both InfluxDB hosts and then Kapacitor will be getting duplicat

Re: [influxdb] Dealing with lagging data in CQ's and Kapacitor tick scripts

2016-11-21 Thread nathaniel
Kapacitor streams may fit your use case if I am understanding correctly. It sounds like your data arrives days late but that you are only aggregating 10 minutes of data at a time. Does all the data arrive late or just some of it? If it all arrives late and in order then Kapacitor will be a good

[influxdb] Re: kapacitor outter join

2016-11-21 Thread nathaniel
The outer join will work in Kapacitor but it does require that points arrive, Meaning if two points arrive and there is a gap between them then the outer join will fill in all the missing points. But it can't do so until the second point arrives since it doesn't know if the point is just delaye

[influxdb] Re: Kapacitor subscription to influxdb traffic v/s InfluxdbRelay push to kapacitor

2016-11-18 Thread nathaniel
Kirtimaan, There are a few things at play here. Here are the questions I had while reading about your setup: 1) Do you want multiple Kapacitor instances because of redundancy/isolation or because you are worried about capacity? 2) Are you running multiple relays? If so how easy is it to reconf

[influxdb] Re: variables in kapacitor queriesla

2016-11-18 Thread nathaniel
Use string concatenation like: |query('SELECT count(jobRunTime) FROM "metrics"."days30"."tasks" where "component"=\'site\' and "taskType"= \'' + taskType + '\' and "status" = \'FINISHED\'') Your solution would be nicer and maybe we should add it but for now this works. On Thursday, N

[influxdb] Re: Tick Script question

2016-11-16 Thread nathaniel
Use a window operation and then set the `.all()` property on the alert. For example: ... |window() .period(3m) .every(1m) |alert() .crit(lambda: "value" > 90) .all() On Wednesday, November 16, 2016 at 10:15:47 AM UTC-7, kraj...@gmail.com wrote: > > Hi, > How do i tell tick scr

[influxdb] Re: /ping for influxdb-relay project

2016-11-15 Thread nathaniel
Yeah I should have posted back here. Also note that another related PR is up and will probably be merged soon after some small changes. https://github.com/influxdata/influxdb-relay/pull/45 On Tuesday, November 15, 2016 at 3:21:44 PM UTC-7, kraj...@gmail.com wrote: > > I just saw nathoniel merged

Re: [influxdb] Re: Kapacitor How to set the variable based on the .Level

2016-11-14 Thread nathaniel
If you want to use the variable in the message then use the template if expressions like you are doing in your example ` {{ if eq .Level "WARNING" }}... {end}}` On Monday, November 14, 2016 at 12:03:19 PM UTC-7, Rishma Gupta wrote: > > The problem with this is : I am unable to include the new va

Re: [influxdb] Re: Kapacitor How to set the variable based on the .Level

2016-11-14 Thread nathaniel
You will have to use an `|eval()` node and the `if` function See https://docs.influxdata.com/kapacitor/v1.1/tick/expr/#conditional-functions after the alert node to transform the data. On Friday, November 11, 2016 at 4:41:36 PM UTC-7, Rishma Gupta wrote: > > Thanks Nate, > > How can I set the v

[influxdb] Re: kapacitor join - calculate rate

2016-11-14 Thread nathaniel
TICKscript numeric values are either floats or integers. The count operation always returns an integer. As a result the eval is doing integer division. Use `float()` to convert the value to floats and do the correct division operation. |eval(lambda: float("success.count") / float("total.cou

Re: [influxdb] Re: Tick script queries

2016-11-14 Thread nathaniel
Your condition looks right as `.crit(lambda: "stat" >= 5 AND "stat" <= 4)` if it is not triggering as expected I recommend adding a `|log()` node before the alert node so you can see the data being processed. As for the error in the second script it should be `.crit(lambda: "anomalyScore" >= x)

[influxdb] Re: Kapacitor: TICK script ignores condition & alerting everytime

2016-11-14 Thread nathaniel
Based on your description it looks like you only want to filter the source data, not necessarily trigger alerts from that data. Is that correct? If it is I would recommend using the `|where(lambda: "tablespace_used" > 0.6)` node instead of the alert node. If you do want to track alerts based o

[influxdb] Re: Kapacitor: trouble creating alert when field in certain state for too long

2016-11-11 Thread nathaniel
FYI, I dug in and found several optimizations that can be made to the union node. PR will be incoming. On Friday, November 11, 2016 at 1:59:20 PM UTC-7, nath...@influxdb.com wrote: > > Below is a script that gets closer but still suffers from the 2nd and 3rd > issues you mentioned. It does fix

[influxdb] Re: Kapacitor How to set the variable based on the .Level

2016-11-11 Thread nathaniel
I think this is what you are looking for. https://docs.influxdata.com/kapacitor/v1.1/nodes/alert_node/#levelfield In combination with an eval node you can convert the level string to a 0,1, or 2 value. On Friday, November 11, 2016 at 10:42:53 AM UTC-7, Rishma Gupta wrote: > > Thanks Nate for yo

[influxdb] Re: Kapacitor: trouble creating alert when field in certain state for too long

2016-11-11 Thread nathaniel
Below is a script that gets closer but still suffers from the 2nd and 3rd issues you mentioned. It does fix the first issue. I'll file a github issue to see if we can change elapsed to return a 0 if it only receives a single point. The third issue about buffering is going to stay. The buffering

[influxdb] Re: how to use vars defined in a template in alerts

2016-11-11 Thread nathaniel
Since you are using triple quotes for the details method, use triple quotes for the end of the string. For example |alert() .id('Passenger queue kapacitor alert') .message('{{ .ID }}, Level: {{ .Level }} , Alert Time : {{.Time}}') .details(''' Name of the m

[influxdb] Re: Kapacitor How to set the variable based on the .Level

2016-11-11 Thread nathaniel
It is not clear to me what you are trying to do. Can you provide some examples? And perhaps some TICKscript you have tried and why they didn't work? Thanks On Thursday, November 10, 2016 at 8:50:11 PM UTC-7, Rishma Gupta wrote: > > I am writing the script to declare new variable severity and set

[influxdb] Re: Use Kapacitor under HTTPS with own-signed certificates.

2016-11-11 Thread nathaniel
This is possible but it looks like the Kapacitor config has drifted a bit from the InfluxDB config. To specify the server private key for Kapacitor simply append the key to the end of the cert file. This way the cert file has both the ca cert and the server key. This is the way InfluxDB used to

[influxdb] Re: how to use vars defined in a template in alerts

2016-11-10 Thread nathaniel
There is an open issue to make this easier. https://github.com/influxdata/kapacitor/issues/894 For now you can use string concatenation as a work around. For example |alert() ... .message('{{ .ID }}, Level: {{ .Level }} , Alert Time : {{.Time}} Instance: ' + instance + ' Ma

[influxdb] Re: Understanding Morgoth

2016-11-10 Thread nathaniel
k > as well. As it is its a little hard to give good advice based of a handful > of data points. > > > > On Tuesday, November 8, 2016 at 7:47:39 AM UTC-7, amith...@gmail.com > wrote:On Thursday, 27 October 2016 21:46:08 UTC+5:30, nath...@influxdb.com > wrote: > >

Re: [influxdb] Re: kapacitor: scripts strategy

2016-11-10 Thread nathaniel
We started work on it yesterday :) You can also see a short write up of our design at https://github.com/influxdata/kapacitor/blob/master/ALERT_DESIGN.md On Thursday, November 10, 2016 at 3:40:56 AM UTC-7, Julien Ammous wrote: > > Thanks, it looks like my initial impressions were correct, I am

[influxdb] Re: Understanding Morgoth

2016-11-09 Thread nathaniel
g to take a quick look >> as well. As it is its a little hard to give good advice based of a handful >> of data points. >> >> On Tuesday, November 8, 2016 at 7:47:39 AM UTC-7, amith...@gmail.com >> wrote: >>> >>> On Thursday, 27 Octo

[influxdb] Re: kapacitor: scripts strategy

2016-11-09 Thread nathaniel
1. No software limit, but it will be limited by available resources. 2. Taking things to the extreme the best case is one task that consumes all the data and does all the work, as there will be less overhead etc of managing multiple tasks. That said significant effort has gone into making sure

[influxdb] Re: Understanding Morgoth

2016-11-08 Thread nathaniel
d to give good advice based of a handful of data points. On Tuesday, November 8, 2016 at 7:47:39 AM UTC-7, amith...@gmail.com wrote: > > On Thursday, 27 October 2016 21:46:08 UTC+5:30, nath...@influxdb.com > wrote: > > Clarification from Amith: > > > >

Re: [influxdb] Re: deadman never triggers OK state

2016-11-08 Thread nathaniel
Glad you figured it out. Yes, the deadman is literally the same thing as that code, you can think of deadman kind of like a macro. If you ever need to look up that code again it can be found in the docs here https://docs.influxdata.com/kapacitor/v1.1/nodes/from_node/#deadman On Tuesday, Nove

Re: [influxdb] Re: deadman never triggers OK state

2016-11-07 Thread nathaniel
> The test case is so basic I really don't see what I could be doing wrong... Agreed, what version of Kapacitor are you using? I just manually tested the deadman with the latest release and its working fine. Could you try this TICKscript to helps us get to the bottom of what is going on? var

[influxdb] Re: Exponential Moving Average

2016-11-07 Thread nathaniel
I may have misunderstood what you are asking. The Join node does join on timestamp. It does so on a group by group basis. Since you are grouping by fingerprint, it will group points that have the same fingerprint together. Could you share some of the specific data points you wish to combine in

Re: [influxdb] batch query not always executed

2016-11-07 Thread nathaniel
Julien, Deadman is the answer here, it is designed with this exact use case in mind. I have replied to your other post, we should be able to get it working shortly. On Monday, November 7, 2016 at 9:06:11 AM UTC-7, Julien Ammous wrote: > > Thanks for your reply, having COUNT() return null mak

[influxdb] Re: Kapacitor: Inserting the alert back into Influxdb

2016-11-07 Thread nathaniel
Can you also share your TICKscript? On Monday, November 7, 2016 at 5:24:15 AM UTC-7, amith...@gmail.com wrote: > > Hi, > > I am trying to plot a graph out of alerts(anomalies) generated by > Kapacitor into Grafana. I need to know how can I insert the alert generated > back into Influxdb. I und

[influxdb] Re: deadman never triggers OK state

2016-11-07 Thread nathaniel
To answer your questions: Yes, the deadman should fire an OK alert. And it should do so within the deadman interval of the point arriving. In your case since you are checking on 3m intervals, if a new points arrives it should fire an OK alert within 3m of that point's arrival. As for the sourc

[influxdb] Re: Exponential Moving Average

2016-11-04 Thread nathaniel
Have you seen the Join node https://docs.influxdata.com/kapacitor/v1.0/nodes/join_node/ It should do exactly what you want. On Thursday, November 3, 2016 at 6:54:41 PM UTC-6, ni...@gratafy.com wrote: > > I'm wondering if it would actually be possible to calculate exponential > moving average us

Re: [influxdb] Tokenizing a string in kapacitor

2016-11-04 Thread nathaniel
As of the upcoming release of Kapacitor 1.1 string manipulation functions have been added. The function you are probably interested in is the `regexReplace` function. It works like this: |eval(lambda: regexReplace(/^.*-(\w\+)_.*$/, "raw_tag", '$1')) .as('value2') See https://golang.org/p

Re: kapacitor [[influxdb]] highly available config question

2016-11-04 Thread nathaniel
Subscriptions are unrelated to querying. The logs lines you see are because the old subscriptions still exist. Use the DROP SUBSCRIPTION ... query to remove them. On Friday, November 4, 2016 at 9:20:02 AM UTC-6, kraj...@gmail.com wrote: > > On Thursday, November 3, 2016 at 2:36:04 PM UTC-4, kraj

Re: kapacitor [[influxdb]] highly available config question

2016-11-03 Thread nathaniel
If you are using the relay you should probably not use subscriptions since they are essentially the same thing but at different steps in the process. If you point Kapacitor at the list of both hosts when one host goes down Kapacitor will get errors, it will retry in most cases but it will not st

[influxdb] Re: batch vs stream

2016-11-03 Thread nathaniel
Batch tasks query data from InfluxDB and Stream tasks process data that is directly sent to Kapacitor. i.e pull vs push There are some highlevel differences with batch and stream Batch: Higher latency on processed data since you have to wait to the query to be scheduled. Can access da

[influxdb] Re: Kapacitor - Batch script not working

2016-11-03 Thread nathaniel
The query node doesn't have a `.where` property as the where conditions should be specified in the query itself. Since the where condition is just `lambda: TRUE` then you can remove it. batch |query(''' SELECT * FROM "pramit"."autogen"."errorcount" ''') .period(

[influxdb] Re: round of time in kapacitor alerts

2016-11-02 Thread Nathaniel Cook
Not currently, all that would be needed is to add a new template function to the template object here https://github.com/influxdata/kapacitor/blob/master/alert.go#L152. Can you file an issue on github so we can track this feature request? On Wednesday, November 2, 2016 at 3:56:09 AM UTC-6, v

[influxdb] Re: help with Kapacitor disk alert query

2016-11-02 Thread nathaniel
Currently its not possible to rate limit the sending of emails. We are working on a new system that will allow this though. There are two things you could try in the meantime: 1. Use .stateChangesOnly, so that you will only get and email if the state of the alert changes. 2. Change the every ti

[influxdb] Re: Learning/Documentation source for writing more advance Tick Scripts in Kapacitor

2016-11-01 Thread nathaniel
Here are set of more in depth examples https://docs.influxdata.com/kapacitor/v1.0/examples/. While they cover specific topics having a read through them will help to get and idea of what is possible. Also there are a handful of examples here https://github.com/influxdata/kapacitor/tree/master/

[influxdb] Re: alerts showing tim but not then umber of alerts

2016-10-31 Thread nathaniel
The eval node replaces all fields with the computed fields unless the `keep` property is used. Simply add `.keep()` or `.keep('val', 'value')` to the eval node to tell it to keep those specific fields. On Friday, October 28, 2016 at 12:22:36 AM UTC-6, vipul@traveltriangle.com wrote: > > hi

[influxdb] Re: Understanding Morgoth

2016-10-27 Thread nathaniel
Clarification from Amith: Hi Nathaniel, Thanks a lot for your quick reply, what is confusing for me here is how morgoth calculated anomalyScore field whose value has turned out to be 0.9897172236503856. And how is this being used to detect anomaly. How does this particular node function

[influxdb] Re: Need help in completing the .tick script

2016-10-27 Thread nathaniel
To detect if data has stopped arriving you should use a deadman's switch. The reason for this is that a `select count ...` for a time range doesn't return a 0 but rather an empty response if no data exists. Try something like this // Changed this to 7d since that is want you had in your query

[influxdb] Re: Understanding Morgoth

2016-10-27 Thread nathaniel
In short there are two parts to Morgoth. 1. A system that counts the frequency of different kinds of events. This is the lossy counting part 2. A system that determines if a window of data is the same as an existing event being tracked or something new. This is the fingerprinting part. Here is

[influxdb] Re: InfluxDB Relay with kapacitor

2016-10-26 Thread nathaniel
A quick note about #2 It is possible to set a default retention policy on the relay to fix that issue See https://github.com/influxdata/influxdb-relay/pull/22/files On Wednesday, October 26, 2016 at 1:20:53 PM UTC-6, nath...@influxdb.com wrote: > > Running Kapacitor in an HA setup requires that

[influxdb] Re: InfluxDB Relay with kapacitor

2016-10-26 Thread nathaniel
Running Kapacitor in an HA setup requires that you figure out a few things. Here are a few questions you should be asking yourself to get started. 1. Are you already using the relay? If so I would recommend disabling subscriptions and adding the Kapacitor hosts directly as backend to the relay.

[influxdb] Re: kapacitor: delay alarms

2016-10-25 Thread nathaniel
To make sure I understand correctly you still want to detect the alert changes so flapping is not what you want, but you want to delay/throttle the amount of emails you send? Is that correct? Currently this is not possible but a new alerting system is on the roadmap that should enable this kind

[influxdb] Re: Kapacitor joins have no fields in

2016-10-25 Thread nathaniel
Peter, Your script is nearly correct there is just a small subtle issue causing it to not quite work. Specifically the output of a query node is a batch edge, Meaning that is the data is batched into sets of data. In your case that batch of data contains one point, the mean value for the specif

[influxdb] Re: Kapacitor AWS SNS Topic Post

2016-10-20 Thread nathaniel
Kapacitor doesn't understand AWS ARN values, that is why you will need a translation layer between the two. For example you could map the alert ID to the ARN in that layer. On Thursday, October 20, 2016 at 11:55:13 AM UTC-6, Nikhil Agrawal wrote: > > Aws SNS can understand JSON. > > To configure

[influxdb] Re: Kapacitor AWS SNS Topic Post

2016-10-20 Thread nathaniel
Yes, it is possible, but it may require that you put a proxy in between to transform the JSON that Kapacitor generates into something that AWS SNS can understand. On Thursday, October 20, 2016 at 11:14:40 AM UTC-6, Nikhil Agrawal wrote: > > Hi, > > Can we use Kapacitor post method to post data

Re: [influxdb] Re: Sum of Column across series - kapacitor v0.12

2016-10-20 Thread nathaniel
The JoinNode https://docs.influxdata.com/kapacitor/v1.0/nodes/join_node/ will do what you want. Keep in mind that the JoinNode joins on groups, so make sure the .groupBy dimensions match. On Wednesday, October 19, 2016 at 4:50:55 PM UTC-6, Vinit wrote: > > TICKscript: > var running = batch >

[influxdb] Re: (Kapacitor) database name in the tickscript

2016-10-20 Thread nathaniel
Unfortunately there is not. A possible workaround would be to use tasks templates https://docs.influxdata.com/kapacitor/v1.0/examples/template_tasks/ and have one task per db, not sure if that is reasonable in your case or not. Then you could pass the database name down as a argument to the scri

[influxdb] Re: Sum of Column across series - kapacitor v0.12

2016-10-19 Thread nathaniel
A simple `|sum('emiited')` should work, but its hard to tell without the context of your TICkscirpt. Can you share your TICKscript that is producing that data? On Tuesday, October 18, 2016 at 6:07:12 PM UTC-6, Vinit wrote: > > I have data like this, I want to sum of the column "emitted" across

Re: [influxdb] Re: question on kapacitor example, custom anomaly detection

2016-10-18 Thread nathaniel
It might not be exactly 1.6 MB but it should get to the finished state and be close to 1.6 MB. Based on the ingress stats you are receiving the data as expected and your task looks to be configured with the right dbrp, so the recording should work. Can you share the exact command you are using

Re: [influxdb] Re: question on kapacitor example, custom anomaly detection

2016-10-18 Thread nathaniel
What is the output of `kapacitor stats ingress`? On Tuesday, October 18, 2016 at 2:11:13 PM UTC-6, A Sun wrote: > > I didn't see any error in the kapacitor.log file about not being able to > write to log files. I tried the telegraf/influxdb/kapacitor cpu_alert > example, which worked. So I think

[influxdb] Re: question on kapacitor example, custom anomaly detection

2016-10-18 Thread nathaniel
Based on the stats from the show output it looks like all three alert nodes have produced at least some alerts. Does the directory /tmp/test exist? Is it writable by the kapacitord process? Are there any errors in the logs about not being able to write to the log files? On Tuesday, October 18

Re: [influxdb] Kapacitor does not generate the stream data

2016-10-18 Thread nathaniel
Based on the subscriptions the InfluxDB and Kapacitor process should be running on the same host and the listed UDP need to be open. Can you confirm that is the case? On Tuesday, October 18, 2016 at 12:12:31 AM UTC-6, amith...@gmail.com wrote: > > Sorry for the delayed reply , please find below

[influxdb] Re: [Kapacitor] Capture n consecutive values and raise Alert

2016-10-17 Thread nathaniel
UNtil this issue is resolved https://github.com/influxdata/kapacitor/issues/327 you can only window based on time instead of count. But if your events arrive a regular time intervals it should be possible. Something like this |window() // assuming 3 events per minute .period(1m) .eve

[influxdb] Re: Kapacitor and external InfluxDB.

2016-10-12 Thread nathaniel
What is the output of `kapacitor show task_name` for your task? On Wednesday, October 12, 2016 at 9:49:44 AM UTC-6, codep...@gmail.com wrote: > > And kapacitor list recordings produces: > ID TypeStatusSize Date > > f6dc1d97-6bb

[influxdb] Re: Kapacitor and external InfluxDB.

2016-10-11 Thread nathaniel
Kapacitor isn't receiving any data from InfluxDB. What is the output of show subscriptions and kapacitor stats ingress On Tuesday, October 11, 2016 at 11:29:26 AM UTC-6, codep...@gmail.com wrote: > > I'm having a hard time setting up a record. Currently kapacitor.conf > contains: > > [[infl

Re: [influxdb] [Kapacitor] How to control the calculated precision of float values.

2016-10-11 Thread nathaniel
If you want to store floats with less precision you can truncate the information to the decimal place you like by multiplying by a base 10 factor flooring the result and then dividing by the same factor. ie |eval(lambda: floor("value" * 100.0)/ 100.0) May I ask what is the motivation? The prec

[influxdb] Re: Join not working, union `processed` does not add up to two parent batch results

2016-10-05 Thread nathaniel
First the union is working as expected, the script has three parents to the union node: expected_instances, expected_instances, and running_instances. Expected_instances is given twice, as a result if you do 72985 + 38927 38927 = 150839 > 150782, which just means that some messages are still in

Re: [influxdb]

2016-09-30 Thread nathaniel
The stats show that Kapacitor is receiving data for the _kapacitor database which is internal to Kapacitor but it is not receiving any data from InfluxDB. Can you share the output of `show subscriptions` and `show databases` on the InfluxDB host? On Thursday, September 29, 2016 at 4:30:39 PM U

Re: [influxdb] Re: [Kapacitor] some confusions about Kapacitor Window node.

2016-09-28 Thread nathaniel
You would have to define two alert nodes, one for email and one for InfluxDB which have the same criteria. On Tuesday, September 27, 2016 at 1:15:50 AM UTC-6, guotao Yao wrote: > > Hi nathaniel, > > I use window node in my tick script, like this: > |window() >

Re: [influxdb] Re: [Kapacitor] some confusions about Kapacitor Window node.

2016-09-23 Thread nathaniel
ce" == 'memory.used') .groupBy('tag1', 'tag2') On Friday, September 23, 2016 at 3:42:58 AM UTC-6, guotao Yao wrote: > > Hi, > @nathaniel Thanks very much. > > I find out some issues when use the mean function or sum funciton, alert >

[influxdb] Re: [Kapacitor] some confusions about Kapacitor Window node.

2016-09-22 Thread nathaniel
Three consecutive times means for 6 minutes total so: stream |from() .measurement('m') |window() .period(2m) .every(2m) |max('value') |window() .period(6m) .every(6m) |alert() .crit(lambda: "max" >= threshold) // mark that all points nee

[influxdb] Re: [Kapacitor] some confusions about Kapacitor Window node.

2016-09-21 Thread nathaniel
All data that is within the time now - period will be emitted into the pipeline. This means data can be emitted more than once if the period is longer than every. On Wednesday, September 21, 2016 at 12:08:02 AM UTC-6, guotao Yao wrote: > > Hi all, > > I have some confusions when I use kapacitor

[influxdb] Re: Kapacitor: Store Current timestamp in another table's field

2016-09-19 Thread nathaniel
Bala, This is not currently possible. But it would not be hard to add support. Could you file an issue on github requesting this feature? Thanks On Monday, September 19, 2016 at 12:27:38 AM UTC-6, balamuru...@gmail.com wrote: > > Hi all, > > I need to store the timestamp of a newly inserted rec

[influxdb] Re: Batch query is not join some times

2016-09-15 Thread nathaniel
Try it this way (comments inline explaining the difference): // This is my script var today_trips = batch |query(''' SELECT count(count) as count FROM "product"."default".leads ''') .period(24h) .cron('28 18 * * * *') |log() var yester

[influxdb] Re: Kapacitor: alert on age of last data

2016-09-14 Thread nathaniel
This is great work! We'll take a look at those issues to see if we can't help simplify this workflow. Thanks again. On Wednesday, September 14, 2016 at 12:07:22 PM UTC-6, patrick...@gmail.com wrote: > > Finally came up with a solution for this: > > var interval = 5s > var threshold_warn

[influxdb] Re: time difference between first and last entry in windowed stream

2016-09-09 Thread nathaniel
I have pasted an example below but it might not do what you expect. The elapsed time will almost always be 10m since that is the period of your window, except for the first 10m where it will still be filling up. Kapacitor measures time based on the data it sees. This means the window will not be

[influxdb] Re: kapacitor: panic: runtime error: invalid memory address or nil pointer dereference

2016-09-09 Thread nathaniel
Can you create an issue at https://github.com/influxdata/kapacitor/issues/new and include the new stack trace using version 1.0? Thanks On Friday, September 9, 2016 at 3:52:56 AM UTC-6, Jun Zhang wrote: > > > @nathanielc , I have upgraded to v1.0.0, > but still p

  1   2   >