riemann/riemann

Forward events if one of downstream down(unreachable).

Closed this issue · 1 comments

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?