Forward events if one of downstream down(unreachable).
Closed this issue · 1 comments
alexandrst88 commented
Hi, I have a question about forwarding events on few endpoints. For instance, I have graphite1 and graphite1 endpoint, and if graphite1 is (down(unreachable), all event should go to graphite2.
(let [index (index)
graphite-stream1 (batch 100 1/10
(async-queue! :agg { :queue-size 1e3
:core-pool-size 4
:max-pool-size 32}
(forward
(riemann.client/tcp-client :host "graphite-host1"))))
graphite-stream2 (batch 100 1/10
(async-queue! :agg_back { :queue-size 1e3
:core-pool-size 4
:max-pool-size 32}
(forward
(riemann.client/tcp-client :host "graphite-host2"))))]
(streams
(default :ttl 60
index
(where (and (service "cpu") (state "expired") (host "graphite-stream1"))
; send all events to graphite1
graphite-stream1
else
; send all event to graphite2
graphite-stream2)
)
)
)
Does it possible to achieve somehow?
mcorbin commented
Hi,
I dont' think there is a stream for this. I will try to write it (it should
be possible using a try/catch in the stream to catch an instance failure).
You could also maybe use a tcp proxy in front of the graphite servers.
2017-02-13 17:30 GMT+01:00 Aleksandr Stepanov <notifications@github.com>:
… Hi, I have a question about forwarding events on few endpoints. For
instance, I have graphite1 and graphite1 endpoint, and if graphite1 is
(down(unreachable), all event should go to graphite2.
(let [index (index)
graphite-stream1 (batch 100 1/10
(async-queue! :agg { :queue-size 1e3
:core-pool-size 4
:max-pool-size 32}
(forward
(riemann.client/tcp-client :host "graphite-host1"))))
graphite-stream2 (batch 100 1/10
(async-queue! :agg_back { :queue-size 1e3
:core-pool-size 4
:max-pool-size 32}
(forward
(riemann.client/tcp-client :host "graphite-host2"))))]
(streams
(default :ttl 60
index
(where (and (service "cpu") (state "expired") (host "graphite-stream1"))
; send all events to graphite1
influxdb-stream
else
; send all event to graphite2
graphite-stream2)
)
)
)
Does it possible to achieve somehow?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#771>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEPrhH-_xZ4fyMjFD1yRoBJehqvad2dfks5rcIUngaJpZM4L_azT>
.