Unable to access fields in metrics filter event

i'm unable to get metrics count in the metrics event , my conf. file as shown below, kindly help here.

filter{
**using grok to extract file_name **
metrics {
meter => ["%{file_name}"]
add_tag => "metrics"
id => "file_count"
}
}
output {
if "metrics" in [tags] {
stdout {
codec => line {
format => " %{file_name} --> COUNT : %{[file_name][count]}"
}
}

}

OUTPUT i'm getting is
%{file_name} -->COUNT : %{[file_name][count]}
%{file_name} -->COUNT : %{[file_name][count]}
%{file_name} -->COUNT : %{[file_name][count]}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.