forked from riemann/riemann
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
You can set up a websocket server with (ws-server) or (ws-server :host x :port 5556) The server answers websocket connections to /pubsub/<topic>. Any query can be applied as a filter: /pubsub/topic/query=true /pubsub/topic/query=(service =~ "%cat" and metric < 5.4) (query must be url-encoded, obviously) The resulting websocket will receive a stream of UTF8 frames, each containing a JSON representation of an event from that topic which matched the query. Initial testing shows excellent latency (no perceivable lag) but appears to drop events in volume. Need to investigate queue depths. Be aware that the correctness and safety of the query system are not guaranteed; just like the protobufs server, assume this system runs *arbitrary* code from the network.
- Loading branch information
Showing
4 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
(tcp-server) | ||
(udp-server) | ||
(ws-server) | ||
|
||
(periodically-expire 10) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters