Yet another erlang client for riemann, which is a network event stream processing system.
Mainly for fun and learning. There were already zeta and erlang_riemann: zeta is a little outdate, erlang_riemann is just a little redundancy.
%% send event
Event = [
{service, "redis"},
{state, "ok"},
{metric, 100},
{tags, ["group1", "ssd"]}],
hobbit:send(Event).
%% send state, similar to event
State = [
{service, "redis"},
{state, "ok"}],
hobbit:send_state(State).
%% query
hobbit:query('service ~= \"redis\"').
Include the hobbit applicaiton in your rebar.config file. Then add riemann as a dependent application to your project.app.
Riemann will default to sending the metrics to localhost on port 5555. You can set the remote riemann host in your config:
[
...
{hobbit, [
{host, "riemann.host"},
{port, 5555}]}
]
cd into the root directory:
make eunit
- start riemann service: sudo service riemann start
- cd into the root dir of hobbit: make dev
- start the lager[logging] and hobbit process: application:start(lager). application:start(hobbit).