Splunk Search

Splitting table columns into timespan values

Matthias_BY
Communicator

Hi,

i want to have a report which shows me volume per month based on access_combined logs.

source="/var/log/httpd/access_log" | stats sum(bytes) as "TOTALBytes" by clientip date_month

what i get is one row for each month:

CLIENTIP MONTH VOLUME
172.0.0.1 April 123
172.0.0.1 March 321
172.0.0.1 Feb 654
172.0.0.2 April 123
172.0.0.2 March 432

i want to compare over time in a table them per clientip as there are only a few like:

CLIENTIP Volume_JAN Volume_Feb Volume_March Volume_April
172.0.0.1 123 456 789 123
172.0.0.2 321 654 0 321
....

and so on... how can i achieve this, of course i don't want to edit in may the table, it should be automatically added

thanks a lot
Matthias

Tags (2)
0 Karma
1 Solution

Ayn
Legend

You could use chart instead. It will create a matrix rather than a list.

... | chart sum(bytes) as "TOTALBytes" by clientip,date_month

View solution in original post

Ayn
Legend

You could use chart instead. It will create a matrix rather than a list.

... | chart sum(bytes) as "TOTALBytes" by clientip,date_month

Matthias_BY
Communicator

this solved my question! Thanks a lot

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...