Splunk Search

Combining separate columns based on x-axis value

sepkarimpour
Path Finder

I initially created a chart that will show log count for a number of hosts: ... | chart count by host source | ... which would show the logs based for each separate host (first image) but I wanted it to only display when the counts don't match.

After some testing, I can produce a table that will display three columns per host when the counts don't match: ... | stats count as num_source by host source | eventstats values(num_source) as num_counts by host | where mvcount(num_counts)>1 | table host num_source | ... (second image), but now it displays the host for each column and are all one colour which isn't clear. Is there a way I can use the chart command so it's similar to the first image but with the data of the second? Thanks.alt text

alt text

1 Solution

DalJeanis
Legend
...
| stats count as num_source by host source 
| eventstats values(num_source) as num_counts by host 
| where mvcount(num_counts)>1 
| table host source num_source 
| chart sum(num_source) as count by host source

View solution in original post

DalJeanis
Legend
...
| stats count as num_source by host source 
| eventstats values(num_source) as num_counts by host 
| where mvcount(num_counts)>1 
| table host source num_source 
| chart sum(num_source) as count by host source
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 ...