Splunk Enterprise

Timechart Count by multiple regexed fields

neill_freer
New Member

I'm trying to create a timechart that tracks the total count of 3 different areas of error per day. I've regexed out each type which works fine, but I cannot get a timechart to work at all.

This is my current splunk search:

host="hostname" sourcetype=sourcetypename "[ERROR]" | rex field=_raw "\.php\:\d+\n(?P<StackTraceError>.*)\:\n" | rex field=_raw "\\\LdapServiceProvider\:\:(?P<IncorrectUsernameOrPassword>.+)\s" | rex field=_raw "\s\-\sTraceyId\:\"(?P<AppError>.+)\-\d.+\"\s\-\-"

Any ideas?

Tags (1)
0 Karma

DalJeanis
Legend

Try this...

 host="hostname" sourcetype=sourcetypename "[ERROR]" 
| rex field=_raw "\.php\:\d+\n(?P<StackTraceError>.*)\:\n" 
| rex field=_raw "\\\LdapServiceProvider\:\:(?P<IncorrectUsernameOrPassword>.+)\s" 
| rex field=_raw "\s\-\sTraceyId\:\"(?P<AppError>.+)\-\d.+\"\s\-\-"
| bin _time span=1m
| stats count(StackTraceError) as StackTraceError count(IncorrectUsernameOrPassword) as IncorrectUsernameOrPassword count(AppError) as AppError by _time
| untable _time errortype errorcount
| timechart sum(errorcount) as errorcount by errortype 
0 Karma

niketn
Legend

What is the issue you are facing with timechart? What is the timechart query you are running?

Are you able to display values in table using

 | head 10 
 | table _time StackTraceError IncorrectUserNameOrPassword AppError
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
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 ...