How to monitor JournalD for Error/Fatal error messages of some particular process and start some callback if any. Say if some service - say Nginx posts a log with Error - some script would call. How to make such a script?
How to monitor JournalD for Error/Fatal error messages of some particular process and start some callback if any
366 views Asked by AudioBubble At
1
You have to use
journalctl --unit darts-game-server.service --follow -o json
stream and parse the output in your code. There are libs for that as well.