I did this query in Splunk:
source="/log/ABCD/cABCDXYZ/xyz.log" doSomeTasks|timechart partial=f span=1h count as "#XYZ doSomeTasks" |fillnull
This query works out fine. Now, I would like to group this results by another entry in my log file. This entry is taskType
. taskType
can be either One
, Two
or Three
. One
, Two
or Three
are also entries after taskType
.
How could I do this?
Add a by
clause to your timechart
:
source="/log/ABCD/cABCDXYZ/xyz.log" doSomeTasks
| timechart partial=f span=1h count as "#XYZ doSomeTasks" by taskType
| fillnull