Article 59SPR Shell script to analyze log file and output as json format

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
txt.gifsyslog.txt (254.9 KB)
latest?d=yIl2AUoC8zA latest?i=7TVvSI_8qjg:JdwTlVwQKKs:F7zBnMy latest?i=7TVvSI_8qjg:JdwTlVwQKKs:V_sGLiP latest?d=qj6IDK7rITs latest?i=7TVvSI_8qjg:JdwTlVwQKKs:gIN9vFw7TVvSI_8qjg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments