Page 1 of 1

Need to display integrer data in terms panel

Posted: Fri Mar 16, 2018 8:49 am
by bpizzutiWHI
I'm collecting some Apache logs in a custom format, and I'm pulling the HTTP response as an integer to avoid any wierdness. The thing is, I can't seem to display this in a terms chart of any sort. Is there a way to get the panel to treat this as a string for display purposes?

Re: Need to display integrer data in terms panel

Posted: Fri Mar 16, 2018 9:47 am
by mcapra
I *think* this is a limitation of ElasticSearch's terms facet.

The naive solution would be to include a separate field for the "string" value of the response code, which would then be picked up by the standard analyzer and indexed appropriately to be later used in a terms facet. You could do that with a mutate filter and a add_field step. Something like:

Code: Select all

mutate {
    add_field => {
        "response_code_str" => "%{response_code}"
    }
}
I could be wrong about all of that though. Haven't tested/verified any of the above.

Re: Need to display integrer data in terms panel

Posted: Fri Mar 16, 2018 2:23 pm
by cdienger
What version of NLS is this? I've tested on NLS 2.0.2 and haven't had a problem including the integer response codes in term panels . Please provide screenshots of the panel config if you're at 2.0.2.