Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- tcp {
- port => 5043
- codec => 'json'
- }
- }
- filter {
- if [thrown] {
- ruby {
- code => "
- trace = event.get('[thrown][name]') + 10.chr
- event.get('[thrown][extendedStackTrace]').each{ |line|
- trace += ' at ' + line['class'] + '.' + line['method'] + '(' + line['file'].to_s + ':' + line['line'].to_s + ')' + 10.chr
- }
- event.set('[thrown][stackTrace]', trace)
- event.remove('[thrown][extendedStackTrace]')
- "
- }
- }
- }
- output {
- elasticsearch {
- hosts => ['localhost:9200']
- user => 'elastic'
- password => 'changeme'
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement