Splunk Search

Use value in log file to draw chart

webantsug
Explorer

Dear Splunkies,

I am very happy with Splunk so far, but ran into one issue, I stuck.

I got a log file, containing a timestamp and a value, example below:

2015-05-18 1:53:30 Count=12

I want to use the Count (here 12) as value to display a chart but it usually displays a list of Count entire, found in my log file.

I'm pretty sure it's a very simple thing, but right now I don't see it.

Please advice.

Thanks very much

T.

0 Karma
1 Solution

webantsug
Explorer

Hi again.
I found a solution, by using field extractor to describe a field named "UserCount". then I used the following query to create a bar chart:

source="/opt/webants-dns/logs/ddnscount.log" | stats avg(UserCount) by _time | reverse | head 10

Thank you all.

T.

View solution in original post

0 Karma

webantsug
Explorer

Hi again.
I found a solution, by using field extractor to describe a field named "UserCount". then I used the following query to create a bar chart:

source="/opt/webants-dns/logs/ddnscount.log" | stats avg(UserCount) by _time | reverse | head 10

Thank you all.

T.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

What does your failing search look like?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...