public static void main(String[] args) throws Exception {
// configure reporter
final MetricRegistry metrics = new MetricRegistry();
ElasticsearchReporter reporter = ElasticsearchReporter.forRegistry(metrics)
// support for several es nodes
.hosts("localhost:9200", "localhost:9201")
// just create an index, no date format, means one index only
.index("metrics")
.indexDateFormat(null)
// define a percolation check on all metrics
.percolationFilter(MetricFilter.ALL)
.percolationNotifier(new SystemOutNotifier())
//.percolationNotifier(new HttpNotifier())
.build();
// usually you set this to one minute
reporter.start(10, TimeUnit.SECONDS);
// start up background thread
ExecutorService executorService = Executors.newSingleThreadExecutor();
executorService.submit(new StreamMeetupComTask(metrics));