Oracle Alert Log Checking, Monitoring & Alerting:
Example 1:
If you wish to view all events that occurred in the log file within the last x amount of time:
Output:
Archived Log entry 14726 added for thread 1 sequence 3641 ID 0xa0c57074 dest 1:
Archived Log entry 14730 added for thread 1 sequence 3642 ID 0xa0c57074 dest 1:
Explanation:
Logrobot = the log monitoring tool
Oraclelogs = option passed to the tool to tell it what type of log file you want to scan
/apps/oracle/MSG.log = absolute path of the log file you wish to scan
1d = how far back in the log you want to scan. In this case, 1d means 1 Day. If you want to scan by minutes, you do 10m, 15m etc. If you want to scan by hours, you do 1h or 2h etc. If you want to scan by weeks, you do 2w etc.
'Archived Log entry' = Scan the specified log file, and pull out all lines that contain this string.
'dest 1:' = After finding all lines that contain the entry 'Archived Log entry', from those lines that are found, pull out all lines that have the string 'dest 1:' in them. In other words, from the log file, you want to pull out all log lines that have both strings of 'Archived Log entry' and 'dest 1:' in them.
1= if the number of lines returned is at least 1 but less than 2, then abort with a warning.
2 = if the number of lines found/returned is at least 2, then abort with a critical.
-show = If the desired log lines are found, output them to the screen.
Example 2:
If you don't want to view the events but would only like to see the statistics:
Output:
2---54000---2---(2012/Jul/18)-(15:00)---(Jul/19)-(14:31:01)---ETWNFILF---(2012/Jul/18)-(16:08)---(Jul/19)-(14:31:01)
Explanation:
So instead of showing all 2 occurrences of specified patterns as was shown in Example 1, this will only output the statistics. In terms of monitoring and alerting on the content and/or status of your log files, it is the statistics that provide the information you would want to alert on. This can be set up with Nagios or any other scheduling/monitoring application.
By Jacob Bowman
If you wish to view all events that occurred in the log file within the last x amount of time:
- Command:
Output:
Archived Log entry 14726 added for thread 1 sequence 3641 ID 0xa0c57074 dest 1:
Archived Log entry 14730 added for thread 1 sequence 3642 ID 0xa0c57074 dest 1:
Explanation:
Logrobot = the log monitoring tool
Oraclelogs = option passed to the tool to tell it what type of log file you want to scan
/apps/oracle/MSG.log = absolute path of the log file you wish to scan
1d = how far back in the log you want to scan. In this case, 1d means 1 Day. If you want to scan by minutes, you do 10m, 15m etc. If you want to scan by hours, you do 1h or 2h etc. If you want to scan by weeks, you do 2w etc.
'Archived Log entry' = Scan the specified log file, and pull out all lines that contain this string.
'dest 1:' = After finding all lines that contain the entry 'Archived Log entry', from those lines that are found, pull out all lines that have the string 'dest 1:' in them. In other words, from the log file, you want to pull out all log lines that have both strings of 'Archived Log entry' and 'dest 1:' in them.
1= if the number of lines returned is at least 1 but less than 2, then abort with a warning.
2 = if the number of lines found/returned is at least 2, then abort with a critical.
-show = If the desired log lines are found, output them to the screen.
Example 2:
If you don't want to view the events but would only like to see the statistics:
- Command:
Output:
2---54000---2---(2012/Jul/18)-(15:00)---(Jul/19)-(14:31:01)---ETWNFILF---(2012/Jul/18)-(16:08)---(Jul/19)-(14:31:01)
Explanation:
So instead of showing all 2 occurrences of specified patterns as was shown in Example 1, this will only output the statistics. In terms of monitoring and alerting on the content and/or status of your log files, it is the statistics that provide the information you would want to alert on. This can be set up with Nagios or any other scheduling/monitoring application.
By Jacob Bowman
No comments:
Post a Comment