-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
memory-monitor: Log last lines of failed handler script to syslog.
Add functionality to capture and log the last 10 lines of the handler script output when it exits with a non-zero status. This ensures that relevant log information is sent to syslog, making it accessible to log aggregation tools for better visibility. * Introduced `get_tail()` to extract the last n lines of a log file. * Updated the script handler logic to send the last 10 lines to syslog upon failure. This enhancement improves error diagnosis by ensuring failed handler output is readily available in centralized logging systems. Signed-off-by: Nikolay Martyanov <[email protected]>
- Loading branch information
1 parent
c65ba9e
commit 5c73b71
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters