X-Git-Url: https://git.xandkar.net/?p=beam_stats.git;a=blobdiff_plain;f=README.md;h=440228858d660810b0b9d96f6c9ab0d2db1be481;hp=22fb510a75cb4196002b4f8dd5a05ce22eee1005;hb=5e118538797724b6021e0dbb1aff29a04c1938b8;hpb=c59a1bccb86e90a68f088184e9e491217de87da6 diff --git a/README.md b/README.md index 22fb510..4402288 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,30 @@ -[![Build Status](https://travis-ci.org/ibnfirnas/beam_stats.svg?branch=master)](https://travis-ci.org/ibnfirnas/beam_stats) +[![Build Status](https://travis-ci.org/xandkar/beam_stats.svg?branch=master)](https://travis-ci.org/xandkar/beam_stats) beam_stats ========== -Periodically collects and pushes VM metrics to arbitrary consumers. Defaults to -StatsD (`beam_stats_consumer_statsd`) and includes off-by-default -implementations for Graphite (`beam_stats_consumer_graphite`) and CSV file -(`beam_stats_consumer_csv`) consumers). +Periodically collects and pushes VM metrics to arbitrary consumer processes, +which, in-turn, can do whatever they want with the given data (such as +serialize and forward to some time series storage). Includes, off by default, +example implementations of consumers for: -Essentially like `folsomite`, but better. Better in the following ways: +- StatsD (`beam_stats_consumer_statsd`) +- Graphite (`beam_stats_consumer_graphite`) +- CSV file (`beam_stats_consumer_csv`) + +Essentially like `folsomite`, but different. Different in the following ways: - More-general: consumers other than graphite can be defined - More-focused: only concerned with VM metrics, while `folsomite` ships off _everything_ from `folsom` (in addition to VM metrics) -- Easier-to-reason-about implementation: well-defined metrics-to-binary - conversions, as opposed to the nearly-arbitrary term-to-string conversions - used in `folsomite` -- Spec'd, tested and Dialyzed +- Easier-(for me!)-to-reason-about implementation: + + Well-defined metrics-to-binary conversions, as opposed to the + nearly-arbitrary term-to-string conversions used in `folsomite` + + Spec'd, tested and Dialyzed + +### Adding consumers -#### Configure consumers +#### At app config time ```erlang {env, @@ -29,6 +35,11 @@ Essentially like `folsomite`, but better. Better in the following ways: , {dst_host , "localhost"} , {dst_port , 8125} , {src_port , 8124} + , {num_msgs_per_packet , 10} + + % If you want to name your node something other than what + % erlang:node() returns: + , {static_node_name , <<"unicorn_at_rainbow">>} ]} , {beam_stats_consumer_graphite, [ {consumption_interval , 60000} @@ -40,12 +51,21 @@ Essentially like `folsomite`, but better. Better in the following ways: [ {consumption_interval , 60000} , {path , "beam_stats.csv"} ]} - , {some_custom_consumer_module, - [ {foo, "abc"} - , {bar, 123} + [ {some_custom_option_a, "abc"} + , {some_custom_option_b, 123} ]} ]} ]} ``` + +#### Dynamically + +```erlang +beam_stats_consumer:add(consumer_module, ConsumerOptions). +``` + +### Removing consumers + +Not yet implemented.