heka roles refactor
diff --git a/heka/router.sls b/heka/router.sls
deleted file mode 100644
index b8b7666..0000000
--- a/heka/router.sls
+++ /dev/null
@@ -1,23 +0,0 @@
-{%- from "heka/map.jinja" import router with context %}
-{%- if router.enabled %}
-
-heka_packages:
- pkg.installed:
- - names: {{ heka.pkgs }}
-
-/etc/heka/conf.d/00-hekad.toml:
- file.managed:
- - source: salt://heka/files/00-hekad.toml
- - template: jinja
- - mode: 755
- - require:
- - pkg: heka_packages
- - watch_in:
- - service: heka_service
-
-heka_service:
- service.running:
- - enable: true
- - name: {{ router.service }}
-
-{%- endif %}
\ No newline at end of file
diff --git a/metadata/service/router/single.yml b/metadata/service/router/single.yml
deleted file mode 100644
index 9bce095..0000000
--- a/metadata/service/router/single.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-applications:
-- heka
-_param:
- heka_router_output_host: localhost
- heka_router_input_host: localhost
- heka_router_input_user: guest
- heka_router_input_password: guest
-parameters:
- heka:
- router:
- enabled: true
- bind:
- address: 0.0.0.0
- port: 4352
- output:
- elasticsearch01:
- engine: elasticsearch
- host: ${_param:heka_router_output_host}
- port: 9200
- input:
- rabbitmq:
- engine: amqp
- host: ${_param:heka_router_input_host}
- user: ${_param:heka_router_input_user}
- password: ${_param:heka_router_input_password}
\ No newline at end of file
diff --git a/metadata/service/server/router.yml b/metadata/service/server/router.yml
new file mode 100644
index 0000000..07834f7
--- /dev/null
+++ b/metadata/service/server/router.yml
@@ -0,0 +1,59 @@
+applications:
+- heka
+_param:
+ heka_router_output_host: localhost
+ heka_router_input_host: localhost
+ heka_router_input_user: guest
+ heka_router_input_password: guest
+ heka_router_input_vhost: /heka
+ heka_router_input_exchange: logs
+
+parameters:
+ heka:
+ server:
+ enabled: true
+ input:
+ rabbitmq:
+ engine: amqp
+ host: ${_param:heka_router_input_host}
+ user: ${_param:heka_router_input_user}
+ password: ${_param:heka_router_input_password}
+ vhost: ${_param:heka_router_input_vhost}
+ exchange: ${_param:heka_router_input_exchange}
+ exchange_type: fanout
+ decoder: ProtoBufDecoder
+ splitter: HekaFramingSplitter
+ rsyslog-syslog:
+ engine: logstreamer
+ log_directory: /var/log
+ file_match: syslog\.?(?P<Index>\d+)?(.gz)?
+ decoder: RsyslogDecoder
+ priority: ["^Index"]
+ rsyslog-auth:
+ engine: logstreamer
+ log_directory: /var/log
+ file_match: auth\.log\.?(?P<Index>\d+)?(.gz)?
+ decoder: RsyslogDecoder
+ priority: ["^Index"]
+ decoder:
+ rsyslog:
+ engine: rsyslog
+ template: %TIMESTAMP% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n
+ hostname_keep: TRUE
+ tz = Europe/Prague
+ output:
+ elasticsearch01:
+ engine: elasticsearch
+ host: ${_param:heka_router_output_host}
+ port: 9200
+ encoder: es_json
+ message_matcher: TRUE
+ dashboard01:
+ engine: dashboard
+ ticker_interval: 30
+ encoder:
+ es-json:
+ engine: es-json
+ message_matcher: TRUE
+ index: logfile-%{%Y.%m.%d}
+
diff --git a/metadata/service/server/shipper.yml b/metadata/service/server/shipper.yml
new file mode 100644
index 0000000..606fe29
--- /dev/null
+++ b/metadata/service/server/shipper.yml
@@ -0,0 +1,51 @@
+applications:
+- heka
+_param:
+ heka_shipper_output_host: localhost
+ heka_shipper_input_host: localhost
+ heka_shipper_input_user: guest
+ heka_shipper_input_password: guest
+ heka_shipper_input_vhost: /logs
+ heka_shipper_input_exchange: logs
+parameters:
+ heka:
+ server:
+ enabled: true
+ input:
+ rsyslog-syslog:
+ engine: logstreamer
+ log_directory: /var/log
+ file_match: syslog\.?(?P<Index>\d+)?(.gz)?
+ decoder: RsyslogDecoder
+ priority: ["^Index"]
+ rsyslog-auth:
+ engine: logstreamer
+ log_directory: /var/log
+ file_match: auth\.log\.?(?P<Index>\d+)?(.gz)?
+ decoder: RsyslogDecoder
+ priority: ["^Index"]
+ decoder:
+ rsyslog:
+ engine: rsyslog
+ template: %TIMESTAMP% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n
+ hostname_keep: TRUE
+ tz = Europe/Prague
+ output:
+ rabbitmq:
+ engine: amqp
+ host: ${_param:heka_shipper_output_host}
+ user: ${_param:heka_shipper_output_user}
+ password: ${_param:heka_shipper_output_password}
+ vhost: ${_param:heka_shipper_output_vhost}
+ exchange: ${_param:heka_shipper_output_exchange}
+ exchange_type: fanout
+ encoder: ProtobufEncoder
+ use_framing: true
+ heka-logfile:
+ engine: logoutput
+ encoder: RstEncoder
+ message_matcher: TRUE
+ encoder:
+ heka-logfile:
+ engine: RstEncoder
+