Shell script to analyze log file and output as json format
by sgm277 from LinuxQuestions.org on (#59SPR)
hi all, the syslog of MAC is as attached. I would like get some key information like
1 ServerName
2 IDofProcess
3 NameofProcess
4 Description
5 TimeWindow (eg: 0100-0200, 0200-0300)
6 Occurrence (the number of occurrence in the time window)
as json format and post the result to server https://myweb/log. Is that possible to use shell to accomplish this goal? Much thanks!
Attached Files


1 ServerName
2 IDofProcess
3 NameofProcess
4 Description
5 TimeWindow (eg: 0100-0200, 0200-0300)
6 Occurrence (the number of occurrence in the time window)
as json format and post the result to server https://myweb/log. Is that possible to use shell to accomplish this goal? Much thanks!
Attached Files
![]() | syslog.txt (254.9 KB) |