Skip to content

Instantly share code, notes, and snippets.

@emag
Created August 31, 2013 14:18
Show Gist options
  • Save emag/6398520 to your computer and use it in GitHub Desktop.
Save emag/6398520 to your computer and use it in GitHub Desktop.
td-agent.conf for WildFly
<source>
type forward
</source>
<match wildfly.access>
type copy
<store>
type file_alternative
path /var/log/td-agent/wildfly-access.log
time_slice_format %Y%m%d
output_include_time false
output_include_tag false
output_data_type attr:message
add_newline true
</store>
<store>
type parser
add_prefix parsed
format /^\[(?<time>[^\]]*)\],(?<host>[^ ]*),(?<method>[^ ]*),(?<path>[^ ]*),(?<status>[^ ]*),(?<session_id>[^ ]*),(?<response_time>[^ ]*)$/
time_format %d/%b/%Y:%H:%M:%S %z
key_name message
</store>
</match>
<match parsed.wildfly.access.**>
type copy
<store>
type file
path /var/log/td-agent/parsed-wildfly-access.log
</store>
<store>
# type forest
# subtype numeric_monitor
type numeric_monitor
input_tag_remove_prefix parsed.wildfly.access
unit minute
tag wildfly.response_time
aggregate all
monitor_key response_time
percentiles 90,95
</store>
</match>
<match wildfly.response_time.**>
type copy
<store>
type file
path /var/log/td-agent/wildfly-response-time
</store>
<store>
type growthforecast
gfapi_url http://<growthforecast-domain>:<port,default:5125>/api/
service wildfly-fluent-demo
tag_for section
name_keys avg,max,min,percentile_90,percentile_95
</store>
</match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment