Page 1 of 1

How to graph numeric values from messages

Posted: Sun May 01, 2016 6:29 pm
by opene2
I am extracting numeric values from log messages. How can I graph the actual values (not how many times that they occur)?

I've tried with the following but no luck. I am still getting graphs based on how many times that the value occurs in the messages rather than the actual number.

# Partial filter
%{NUMBER:value:int}
NLS.png
Thanks in advance.

Re: How to graph numeric values from messages

Posted: Mon May 02, 2016 8:56 am
by eloyd
You you extracting the portion of the text that contains the number must be parsed into its own field. Then you can graph that field as a number. The basic of how to do this are explained in https://www.elastic.co/guide/en/logstas ... -grok.html, and there are a lot of examples on the web. If you have specific examples you can share about your data, we may be able to help you provide a working filter expression.

Assuming that you are extracting the number into its own field, and you want to graph that number itself, then one option is to make a histogram using the field that you are for as its field value and a chart type of "total." Look at the Apache Dashboard that came with NLS for some inspiration on how you can graph numbers or totals of numbers.

Re: How to graph numeric values from messages

Posted: Mon May 02, 2016 10:21 am
by hsmith
Also, can you please provide a screenshot of the log, and possibly a mock-up of how you want this done?

Re: How to graph numeric values from messages

Posted: Mon May 02, 2016 1:31 pm
by opene2
Thanks to both of you. I've changed chart value/type to "mean" (instead of the default value "count") and I was able to generate the graph I wanted.

1) Yes, I am extracting the portion of the text that contains the number.
2) Correct, I want to graph the number itself.

Thanks again.

Re: How to graph numeric values from messages

Posted: Mon May 02, 2016 2:58 pm
by rkennedy
Are we good to mark this thread as resolved?

Re: How to graph numeric values from messages

Posted: Mon May 02, 2016 6:54 pm
by opene2
Yes.