Last active
June 26, 2016 18:36
-
-
Save ademar/567f4feefeb8c375df82165f407461f6 to your computer and use it in GitHub Desktop.
Logary plus Logstash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Logary | |
open Logary.Configuration | |
open Logary.Targets | |
open Hopac | |
let logstashConf = Logstash.LogstashConf.create("tcp://127.0.0.1:1939") | |
let pointName = PointName.ofSingle "logstash" | |
let logary = | |
withLogaryManager "bitbuy.web" ( | |
withTargets [ | |
Logstash.create logstashConf pointName | |
] >> | |
withRules [ | |
Rule.createForTarget pointName | |
] | |
) |> run | |
let logstash = SuaveAdapter(logary.getLogger (PointName.parse "bitbuy.web")) :> Suave.Logging.Logger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
tcp { | |
codec => json_lines { charset => "UTF-8" } | |
host => "127.0.0.1" | |
port => 1939 | |
} | |
} | |
output { | |
elasticsearch { hosts => [ "localhost:9200"] } | |
stdout { codec => rubydebug } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment