Merge pull request #17 from elemoine/stacklight-time-precision

Make InfluxDB time precision configurable
diff --git a/heka/files/toml/output/elasticsearch.toml b/heka/files/toml/output/elasticsearch.toml
index 54aa685..0e8d03b 100644
--- a/heka/files/toml/output/elasticsearch.toml
+++ b/heka/files/toml/output/elasticsearch.toml
@@ -1,10 +1,10 @@
 [{{ output_name }}_output]
 type = "ElasticSearchOutput"
-message_matcher = "{{ output.message_matcher }}"
-encoder = "{{ output.encoder }}"
+message_matcher = "Type == 'log' || Type == 'notification'"
+encoder = "elasticsearch_encoder"
 server = "http://{{ output.host }}:{{ output.port }}"
-flush_interval = {{ output.flush_interval }}
-flush_count = {{ output.flush_count }}
+flush_interval = 5000
+flush_count = 100
 use_buffering = true
 
 [{{ output_name }}_output.buffering]
diff --git a/heka/meta/heka.yml b/heka/meta/heka.yml
index 1178219..eb3bcce 100644
--- a/heka/meta/heka.yml
+++ b/heka/meta/heka.yml
@@ -1,18 +1,35 @@
 {%- from "heka/map.jinja" import server with context %}
 
 log_collector:
+  filter:
+    aggregated_http_metrics:
+      engine: sandbox
+      module_file: /usr/share/lma_collector/filters/http_metrics_aggregator.lua
+      module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
+      message_matcher: "Type == 'log' && Fields[http_response_time] != NIL"
+      ticker_interval: 10
+      config:
+        hostname: '{{ grains.host }}'
+        interval: 10
+        max_timer_inject: 10
+        bulk_size: 523
+        percentile: 90
+        grace_time: 5
+    log_counter:
+      engine: sandbox
+      module_file: /usr/share/lma_collector/filters/logs_counter.lua
+      module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
+      preserve_data: true
+      message_matcher: "Type == 'log' && Logger =~ /^openstack\\\\./"
+      ticker_interval: 1
+      config:
+        hostname: '{{ grains.host }}'
+        interval: 60
+        grace_interval: 30
   encoder:
     elasticsearch:
       engine: elasticsearch
   output:
-    elasticsearch:
-      engine: elasticsearch
-      message_matcher: "Type == 'log' || Type  == 'notification'"
-      encoder: elasticsearch_encoder
-      host: mon
-      port: 9200
-      flush_interval: 5000
-      flush_count: 100
     metric_collector:
       engine: tcp
       host: 127.0.0.1