Hi
I am trying to search two strings in message like "Stopped successfully" and "connected" from 6 host names.
Please help me
am writing like below
Source="WinEventlog:applicaiton"
|rex "message\s(?<message>.*).*"
|search host like "host1" OR host Like "host2"
| search message="stopped succesfully" OR "Connected"
|table _time, host, message
Can you please try this?
Source="WinEventlog:applicaiton" (host="host1*" OR host="host2*") (message="*stopped succesfully*" OR message="*Connected*")
| rex field=_raw "Message=(?<message1>.*).*"
|table _time, host, message, message1
it worked , but i have to add
"Message=Event*(?<message1>.*).*
Thank you..
Still same,
sample message in the log will be like below
Message=Event : _*protocol* Name : tcp://servername:port
Still same,
sample message in the log willbe like below
Message=Event : _*protocol* Name : tcp://servername:port
Are you spelling application wrong
WinEventlog:applicaiton
should be
WinEventlog:application
it updated and resoled
Thank you Kamalesh, its working for Hosts.
but am not getting "message"
I have updated my answer. Can you please try it?
Try like this,
Source="WinEventlog:applicaiton" (host="host1*" OR host="host2*") (message="*stopped succesfully*" OR message="*Connected*")
| rex field=_raw "message\s(?<message1>.*).*"
|table _time, host, message, message1
KV