Setup heka log input and sandbox
diff --git a/metadata/service/server/single.yml b/metadata/service/server/single.yml
index 063e77e..e91d562 100644
--- a/metadata/service/server/single.yml
+++ b/metadata/service/server/single.yml
@@ -8,3 +8,6 @@
bind:
address: 0.0.0.0
protocol: tcp
+ logging:
+ heka:
+ enabled: true
diff --git a/nginx/files/heka.toml b/nginx/files/heka.toml
new file mode 100644
index 0000000..de99e14
--- /dev/null
+++ b/nginx/files/heka.toml
@@ -0,0 +1,42 @@
+{%- from "nginx/map.jinja" import server with context -%}
+## Inputs
+
+[logstreamer_nginx_access]
+type = "LogstreamerInput"
+log_directory = "/var/log/nginx"
+file_match = 'access\.log\.?(?P<Index>\d+)?(.gz)'
+priority = ["^Index"]
+decoder = "Sandbox_nginx_access"
+
+[logstreamer_nginx_error]
+type = "LogstreamerInput"
+log_directory = "/var/log/nginx"
+file_match = 'error\.log\.?(?P<Index>\d+)?(.gz)'
+priority = ["^Index"]
+decoder = "Sandbox_nginx_error"
+
+[logstreamer_nginx_site_access]
+type = "LogstreamerInput"
+log_directory = "/var/log/nginx"
+file_match = '(?P<SiteName>.+)-access\.log\.?(?P<Index>\d*)'
+priority = ["^Index"]
+differentiator = ["nginx-", "SiteName", "-access"]
+decoder = "Sandbox_nginx_access"
+
+[logstreamer_nginx_site_error]
+type = "LogstreamerInput"
+log_directory = "/var/log/nginx"
+file_match = '(?P<SiteName>.+)-error\.log\.?(?P<Index>\d*)'
+priority = ["^Index"]
+differentiator = ["nginx-", "SiteName", "-error"]
+decoder = "Sandbox_nginx_error"
+
+## Sandboxes
+
+[Sandbox_nginx_access]
+type = "SandboxDecoder"
+filename = "lua_decoders/nginx_access.lua"
+
+[Sandbox_nginx_error]
+type = "SandboxDecoder"
+filename = "lua_decoders/nginx_error.lua"