I have the followinf query
sourcetype="server" host=*localqa*
| stats count by Path
| rex field=Path "\/api\/(?<Path>.*)\/(v1|v2|v3)\/(?<Module>.*)"
| streamstats window=2 first(Path) as f_path count as c
| eval Path=case(c=1,Path,Path!=f_path,Path,1=1,"")
| table Path Module count
The output of the above query is
+-------------------------------------------------------------------------------+
|Path | Module |count |
+-------------------------------------------------------------------------------+
|profile | profileTravellroute |212 |
|statements/trialbalance | trialbalance |14 |
|iteneries/breakout | execution |1041 |
| | orderDetails |117 |
|reporting/trans | schemes |712 |
| | fixedIncome |40 |
|reporting | FinalizedReports |161 |
| | PendingReports |8 |
| | reportEntries |14 |
| | closedReport |22 |
| | reportTimes |82 |
| | Reportposition |40 |
| | ReportStates |68 |
+-------------------------------------------------------------------------------+
I want to select records only for reporting
+-------------------------------------------------------------------------------+
|Path | Module |count |
+-------------------------------------------------------------------------------+
|reporting/trans | schemes |712 |
| | fixedIncome |40 |
|reporting | FinalizedReports |161 |
| | PendingReports |8 |
| | reportEntries |14 |
| | closedReport |22 |
| | reportTimes |82 |
| | Reportposition |40 |
| | ReportStates |68 |
+-------------------------------------------------------------------------------+
Tried with
sourcetype="server" host=*localqa*
| stats count by Path
| rex field=Path "\/api\/(?<Path>.*)\/(v1|v2|v3)\/(?<Module>.*)"
| streamstats window=2 first(Path) as f_path count as c
| eval Path=case(c=1,Path,Path!=f_path,Path,1=1,"")
| where Like (Path, 'reporting%')
| table Path Module count
But not working only the following section are coming
+------------------------------------------------------------------------------------------------+
|Path |Module |Count |
+------------------------------------------------------------------------------------------------+
|reporting/trans | schemes |712 |
| fixedIncome |40 |
... View more