If I understand your question correctly, you want group matching messages to be displayed as a single string like “file put successfully”, not separately as "Inbound file processed successfully GL102...
See more...
If I understand your question correctly, you want group matching messages to be displayed as a single string like “file put successfully”, not separately as "Inbound file processed successfully GL1025pcardBCAXX8595143691007", "File put Succesfully GL1025pcardBCAXX8595143691007", and so on. This is a common requirement. But in addition to unnecessary asterisks in regex's as @ITWhisperer points out, you should group them before performing stats. Here is the code | eval message = if(match(message, "File put Succesfully|Successfully created file data|Archive file processed successfully|Summary of all Batch|processed successfully for file name|ISG successful Call|Inbound file processed successfully|ISG successful Call"),
"file put successfully", message)
| stats values(message) as message Suppose you have events with the following values of message: message Inbound file processed successfully GL1025pcardBCAXX8595143691007 Inbound file processed successfully GL1025pcardBCAXX8595144691006 Inbound file processed successfully GL1025pcardBCAXX8732024191001 Inbound file processed successfully GL1025transBCAXX8277966711002 File put Succesfully GL1025pcardBCAXX8595143691007 File put Succesfully GL1025pcardBCAXX8595144691006 File put Succesfully GL1025pcardBCAXX8732024191001 File put Succesfully GL1025transBCAXX8277966711002 some unmatching value some other unmatching value The result will be message file put successfully some other unmatching value some unmatching value Is this what you are looking for? Here is an emulation that you can play with and compare with real data | makeresults
| eval message = mvappend("Inbound file processed successfully GL1025pcardBCAXX8595143691007",
"Inbound file processed successfully GL1025pcardBCAXX8595144691006",
"Inbound file processed successfully GL1025pcardBCAXX8732024191001",
"Inbound file processed successfully GL1025transBCAXX8277966711002",
"File put Succesfully GL1025pcardBCAXX8595143691007",
"File put Succesfully GL1025pcardBCAXX8595144691006",
"File put Succesfully GL1025pcardBCAXX8732024191001",
"File put Succesfully GL1025transBCAXX8277966711002",
"some unmatching value",
"some other unmatching value")
| mvexpand message
``` data emulation above ```