I have a splunk log
LOG: "TOTAL NUMBER OF RECORDS IS:0"
I need to Query it in a way that it find a log message if the number of records turn out to be more than 0
I have tried the following
sourcetype=mylogs | rex "\d+:\d+:\d+\s(?<TOTAL NUMBER OF RECORDS IS:>\d+)$" | where TOTAL NUMBER OF RECORDS IS:>=25
It gives a terminator Error
There are a few things wrong with that query.
TOTAL NUMBER OF RECORDS IS:(?<field>\d+)
. You may even get by with :(?<field>\d+)
.TotalNumberOfRecords
.Try this query:
sourcetype=mylogs | rex ":\d+(?<TotalNumberOfRecords>\d+)" | where TotalNumberOfRecords>=25