Currently i'm using vmware log insight to do log analysis. Is there any log analysis tool can define a search pattern cross log entries? e.g. my log looks like these:
2018-03-20T15:44:14.785Z node-92008 Hostd: pam_unix(passwd:chauthtok): password changed for vpxuser started
2018-03-20T15:44:14.785Z node-92008 Hostd: pam_unix(passwd:chauthtok): password changed for vpxuser` ends with status success
So the action started log is in one line and the action ends is in one line.
Is there any tool i can define an search pattern e.g. find each pair of "started" and "ends" to counter how many times i did in logs?
Thanks a lot.
Use grep to get the records
grep -E 'vpxuser (started|ends with)' file.log
I'm assuming the backtick in 'vpxuser` ends with' is a typo.