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

2016-11-04 Thread Sean Beckett
You mention two relay servers, a load balancer, two InfluxDB instances, and
a Kapacitor instance. I can't make sense of your architecture. Can you
please describe it again?

On Fri, Nov 4, 2016 at 11:46 AM,  wrote:

> sorry scratch that..as there wont be duplicate traffic because
> loadbalancer will choose one relay at a time?
>
> --
> Remember to include the version number!
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxData" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to influxdb+unsubscr...@googlegroups.com.
> To post to this group, send email to influxdb@googlegroups.com.
> 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/d27bf9e2-3c60-488e-b361-142baad51eec%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 version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
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/CALGqCvMKx3WuAMxurzMC6HdaejAMPAwLLBq06hDgXefzQ1RxBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-11-04 Thread krajshiva
So i was implemnting the setup you have mentioned. But if i have two local 
influxdb relays on two influxdb servers both will send data to my kapacitor 
instance.
How i will kapacitor handle duplicate data? Wont it mess up my alert tasks as 
they will be access duplicate timeseries data points?

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
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/af2225fc-57df-450a-ba97-220a24d621b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-11-04 Thread Sean Beckett
https://github.com/influxdata/kapacitor/blob/master/etc/kapacitor/kapacitor.conf#L104


On Fri, Nov 4, 2016 at 9:29 AM,  wrote:

> Can you paste me kapacitor config which allows it to query an influxdb
> instance but doesnt subscribe to it? This will be very helpful.
>
> --
> Remember to include the version number!
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxData" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to influxdb+unsubscr...@googlegroups.com.
> To post to this group, send email to influxdb@googlegroups.com.
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/influxdb/d7adba67-11f3-4b09-9f79-671d091b67e8%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 version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
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/CALGqCvOQNeQ3qZtO1BMduHGHOuZ_REpLKRX68zVJYanVk2P_VA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-11-04 Thread krajshiva
Can you paste me kapacitor config which allows it to query an influxdb instance 
but doesnt subscribe to it? This will be very helpful.

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
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/d7adba67-11f3-4b09-9f79-671d091b67e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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...@gmail.com 
> wrote:
> > I am trying to setup high availability setup of influxdb using influxdb 
> relays.So telegraf clients send data to both host1 and host2 via influxdb 
> relay.
> > 
> >   telegraf --> Loadbalancer-->influxdbrelay --> influxdb@host1 and @host2
> > 
> > I want kapacitor to generate alert from influxdb@host1 if its available 
> and for some reason if host1 goes down i want it to query influxdb@host2. 
> Is it possible?
> > 
> > Should i be pointing kapacitor to loadbalancer infront of influxdbrelays 
> or directly as given below in kapacitor.conf==>
> > 
> > [[influxdb]]
> >   # Connect to an InfluxDB cluster
> >   # Kapacitor can subscribe, query and write to this cluster.
> >   # Using InfluxDB is not required and can be disabled.
> >   enabled = true
> >   default = true
> >   name = "xyzhost"
> >   urls = ["http://host1:8086","http://host2:8086;]
> > 
> > Or should it be
> >urls = ["http://loadbalancer hostname:port"]
> > 
> > If you have above influxdb configuration with host1, host2 in urls list, 
> will kapacitor subscribe to both host1 and host2 and query both. Or will it 
> first query host1 and if it fails then queries host2?
> > 
> > If i subsequently define a task that generates alert for high cpu will 
> it generate from host1 or host2?
>
> If i unsubscribe how am i going to query via loadbalancer?
> I tried :
>
> [[influxdb]]
>
>   # Turn off all subscriptions
>   disable-subscriptions = true
>
>
> but i still see in /var/log/kapacitor/kapacitor.log following messages 
> that tells me the subscription is still happening:
>
> [noauth] 2016/11/04 15:18:20 W! using noauth auth backend. Faked 
> authentication for subscription user token
> [httpd] 10.93.73.184 - ~subscriber [04/Nov/2016:15:18:20 +] "POST 
> /write?consistency==_internal=ns=monitor HTTP/1.1" 204 0 
> "-" "InfluxDBClient" eb26ec48-a2a1-11e6-8020- 858
> [noauth] 2016/11/04 15:18:30 W! using noauth auth backend. Faked 
> authentication for subscription user token
> [httpd] 10.93.73.184 - ~subscriber [04/Nov/2016:15:18:30 +] "POST 
> /write?consistency==_internal=ns=monitor HTTP/1.1" 204 0 
> "-" "InfluxDBClient" f11cdfca-a2a1-11e6-8021- 877
>
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
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/bcf168dc-8cd7-4aa2-9838-b2bcdce71c99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-11-04 Thread krajshiva
On Thursday, November 3, 2016 at 2:36:04 PM UTC-4, kraj...@gmail.com wrote:
> I am trying to setup high availability setup of influxdb using influxdb 
> relays.So telegraf clients send data to both host1 and host2 via influxdb 
> relay.
> 
>   telegraf --> Loadbalancer-->influxdbrelay --> influxdb@host1 and @host2
> 
> I want kapacitor to generate alert from influxdb@host1 if its available and 
> for some reason if host1 goes down i want it to query influxdb@host2. Is it 
> possible?
> 
> Should i be pointing kapacitor to loadbalancer infront of influxdbrelays or 
> directly as given below in kapacitor.conf==>
> 
> [[influxdb]]
>   # Connect to an InfluxDB cluster
>   # Kapacitor can subscribe, query and write to this cluster.
>   # Using InfluxDB is not required and can be disabled.
>   enabled = true
>   default = true
>   name = "xyzhost"
>   urls = ["http://host1:8086","http://host2:8086;]
> 
> Or should it be
>urls = ["http://loadbalancer hostname:port"]
> 
> If you have above influxdb configuration with host1, host2 in urls list, will 
> kapacitor subscribe to both host1 and host2 and query both. Or will it first 
> query host1 and if it fails then queries host2?
> 
> If i subsequently define a task that generates alert for high cpu will it 
> generate from host1 or host2?

If i unsubscribe how am i going to query via loadbalancer?
I tried :

[[influxdb]]

  # Turn off all subscriptions
  disable-subscriptions = true


but i still see in /var/log/kapacitor/kapacitor.log following messages that 
tells me the subscription is still happening:

[noauth] 2016/11/04 15:18:20 W! using noauth auth backend. Faked authentication 
for subscription user token
[httpd] 10.93.73.184 - ~subscriber [04/Nov/2016:15:18:20 +] "POST 
/write?consistency==_internal=ns=monitor HTTP/1.1" 204 0 "-" 
"InfluxDBClient" eb26ec48-a2a1-11e6-8020- 858
[noauth] 2016/11/04 15:18:30 W! using noauth auth backend. Faked authentication 
for subscription user token
[httpd] 10.93.73.184 - ~subscriber [04/Nov/2016:15:18:30 +] "POST 
/write?consistency==_internal=ns=monitor HTTP/1.1" 204 0 "-" 
"InfluxDBClient" f11cdfca-a2a1-11e6-8021- 877

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
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/c20e0848-b604-43cb-ac71-122be470e204%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 stop 
trying the downed host thus adding extra work and latency for all the retry 
logic. As a result point Kapacitor at the load balancer would be best since 
the loadbalancer can drop out the dead host. But since you don't want to 
subscribe to both hosts and setting up some kind of loadbalancer routing 
for the subscirption queries would be fragile I recommend disabling 
subscriptions and add Kapacitor as a host to the relay.

I recommend this setup

Writes:
telegraf --> Loadbalancer-->influxdbrelay --> influxdb@host1 and @host2 and 
kapacitor@host3

Queries
kapacitor -> Loadbalancer -> influxdb@host1 and @host2.

and disable subscriptions.

In this setup Kapacitor will get all writes without having to manage 
subscriptions; and queries will be balanced across both hosts through the 
load balancer.





On Thursday, November 3, 2016 at 12:36:04 PM UTC-6, kraj...@gmail.com wrote:
>
> I am trying to setup high availability setup of influxdb using influxdb 
> relays.So telegraf clients send data to both host1 and host2 via influxdb 
> relay.
>
>   telegraf --> Loadbalancer-->influxdbrelay --> influxdb@host1 and @host2
>
> I want kapacitor to generate alert from influxdb@host1 if its available 
> and for some reason if host1 goes down i want it to query influxdb@host2. 
> Is it possible?
>
> Should i be pointing kapacitor to loadbalancer infront of influxdbrelays 
> or directly as given below in kapacitor.conf==>
>
> [[influxdb]]
>   # Connect to an InfluxDB cluster
>   # Kapacitor can subscribe, query and write to this cluster.
>   # Using InfluxDB is not required and can be disabled.
>   enabled = true
>   default = true
>   name = "xyzhost"
>   urls = ["http://host1:8086","http://host2:8086;]
>
> Or should it be
>urls = ["http://loadbalancer hostname:port"]
>
> If you have above influxdb configuration with host1, host2 in urls list, 
> will kapacitor subscribe to both host1 and host2 and query both. Or will it 
> first query host1 and if it fails then queries host2?
>
> If i subsequently define a task that generates alert for high cpu will it 
> generate from host1 or host2?
>
>
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
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/eb71cd93-8a37-4278-aaff-ab7b129f2905%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.