Outputting Metrics while respecting Dynamic Naming Conventions

Hello,

I've been unable to reference a dynamic field name in my output.

filter{
metrics {
meter => ["%{request}"]
add_tag => "requests"
flush_interval => "5"
clear_interval => "60"
}
}

output {
if "requests" in [tags] {
codec => line {format => " %{request} count: %{[%{request}][count]}"}
}

For each type of request, I'm expecting the %{request} field to contain the name of the particular request type (e.g HTTPRequest, SFTPRequest etc.) with the corresponding count. Instead I get the following in my terminal output:

%{request} count: %{[%{request}][count]}

I understand that it's a referencing issue - If I change things around slightly:

filter{
metrics {
meter => ["Request"]
add_tag => "requests"
flush_interval => "5"
clear_interval => "60"
}
}

output {
if "requests" in [tags] {
codec => line {format => " Request count: %{[Request][count]}"}
}

I can get the following in my output:

Request count: 39

Which proves that it's an issue with referencing the dynamic field name, in this case, the specific request. It doesn't have an issue processing all of the requests at a higher level.

How can I configure my output to ensure that the dynamic field name is processed in the output? I've checked the documentation but haven't had any luck.

This topic is similar to This Thread but it seems that there wasn't an answer that worked.

Much appreciated!

@magnusbaeck any ideas on this one?

@Ryanbarnes Please do not ping people that are not already involved in the thread. This forum is manned by volunteers, so please also be patient. If you need support with defined SLAs, Elastic offers commercial subscriptions.

Apologies - to clarify, there's no SLA involved, and i'm not rushing volunteers for answers, I just pinged who I thought may be able to assist to bring the issue to their attention. I've linked to a previous thread which was closed after no response regarding the same issue, so do although I appreciate that this is a community support site, I don't see any reason why we can't reach out to people directly to ask questions. If it's specified not to send private messages for help in their profile, whats the issue with creating a topic and tagging them?

If you have any input on this issue instead of suggesting subscriptions (essentially upselling), that'd be great. Otherwise, if you have something similar to above say, It would be much better to DM me directly rather than post an off topic comment in this thread.

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