Linux log file monitor – Do you have Linux log files on your UNIX servers that you would like to monitor? Terrified by the amount of work it will take to write an efficient Linux log file monitoring tool? Do you want to be taught and / or guided on how to write the best log file monitoring tool or point out where to download one that is already written?

If any of these questions regarding the Linux log file catch your attention, take a look at the following commands.

Syntax: achievementbot (log file) (minutes) (patternA) (patternB) (-found or -show) (warning) (critical)

Command1: achievementbot / var / log / messages 60 ‘error’ ‘panic’ – found 5 10

Command2: achievementbot / var / log / messages 60 ‘error’ ‘panic’ -show 5 10

Can you guess what the above commands do?

The first command (Command1) containing “-found” tells the achievementbot program to scan the / var / log / messages for the “error” and “panic” patterns (these are just general patterns and strings. You can substitute them by any string or pattern as long as they are enclosed in single quotes).

If Command1 finds the two specified strings “error” and “panic” on the same lines in the Linux log file / var / log / messages, AND the number of lines containing these words is less than 5, then there is no problem . The program will be aborted with a 0.

If the number of lines that match the patterns in the log is greater than OR equal to 5 BUT less than 10, then it will abort with a Warning, because that falls into the category of warning.

If the number of lines in the log that match the specified patterns is greater than or equal to 10, then the script will abort on a Critical, because it is in the critical category.

The second line (Command2) containing the “-show” tells the script to exit (that is, to be posted to your screen), ALL lines in the Linux log file match the specified patterns. The achievementbot tool is told to display only the lines that were written to the log in the last 60 minutes. So in other words, if you want to get lines from your Linux logs based on a time frame, you can.

If you need to monitor your Linux system logs, a registry scan tool like the one mentioned above is what you need to write OR download. This new tool brings to the table a unique Linux Log Monitoring method that bypasses ANY series of queues and frenzied greps that you would have otherwise had to run in times of crisis.

Can this Linux log monitoring tool also be used on Sun Solaris systems? Yes it can.

Leave a Reply

Your email address will not be published. Required fields are marked *