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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...