Need to display integrer data in terms panel

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
bpizzutiWHI
Posts: 64
Joined: Thu Mar 02, 2017 10:15 am

Need to display integrer data in terms panel

Post 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?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Need to display integrer data in terms panel

Post 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.
Former Nagios employee
https://www.mcapra.com/
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Need to display integrer data in terms panel

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked