Splunk Search

group values in search

wsw70
Communicator

Hello,

I have data in the form of a date,server,events triplet. The fields are correctly extracted and assigned.

date1,server1,3
date2,server2,5
date3,server3,2
date4,server4,2

server1, server2 and server4 are all part of the same group, EMEA. server3 is not part of any group.

I am looking at ultimately creating a bar chart with the groups and non-grouped servers all together - with the number of events summed up:

EMEA      |---|-----|--|
server3   |--|

The bars are stacked and the stack is made up by the servers in a group.

The closest I found is using lookups with an OUTPUT clause (lookup OSServersRegions.csv server OUTPUT region) -- this works fine except that I get three pairs (region,number). I do not know how to chart so that the results are stacked by server within a region.

In other words what I get today is

EMEA      |----------|
AP        |--|

What would be the magic incantation to get the stacks? 🙂

Thanks!

0 Karma
1 Solution

Ayn
Legend

Given a bunch of servers with their respective event count and their region, how about this:

... | chart count over region by server

View solution in original post

Ayn
Legend

Given a bunch of servers with their respective event count and their region, how about this:

... | chart count over region by server

wsw70
Communicator

Wonderful, thanks. I still have a hard time completely understanding the philosophy behind the general splunk syntax

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...