Splunk Search

how to use multiple fields in timechart command

mvaradarajam
Path Finder

Hi All,

How to use

index="*"|timechart count by sourcetype,source

Tags (1)
0 Karma

tom_frotscher
Builder

As an fast solution you might combine the two fields into one field with eval and use the result as by clause:

index=_internal | eval combi=source."#".sourcetype | timechart count by combi

tom_frotscher
Builder

I don't know what exactly you want to know. There are examples for inpage drilldowns in the splunk 6.1 overview app. https://apps.splunk.com/app/1773/

You should be able to take the combi field as a normal token. If you want to split it up again in source and sourcetype, you can use the rex command:

index=_internal | eval combi=source."#".sourcetype | rex field=combi "(?<first_part>^.*)#(?<second_part>.*$)"
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...