9. Reloading and Replaying Alerts

You may occasionally for whatever reason after stopping and restarting the server want to reload all the alerts it knew about at the time it was shutdown.

The reload_alerts program will scan the alert log file you specify and re-process all the alerts recorded in it by re-raiseing/re-acknowledging/re-deleting alerts in the order the events occurred in the log file selected.

Note 1: It will only recreate critical alerts, cancelled alert and acknowledge alert events. It will ignore warning, informational and log only events as they have no affect on what is displayed to a console application.
Note 2: It timestamps its own startup and will not process any messages from a log after that time. This is to prevent it re-processing the events it is raising itself if you are scanning the current days log file (that its events are being written to so expanding the eof).

Personally I only use this for application testing and stress testing. It doesn't replay in real time, it hammers through the alerts as fast as it can so console monitoring users will not see all the alert state changes occuring, just the final result.

The logfile to be processed must be one written by this version of the application.
Syntax: reload_alerts   
    port    - the tcp port number the alert collector
              server is listening on.
    ipaddr  - the ip address the alert collector server
              listens on.
    logfile - an alert collector logfile you are going 
              to recreate alert events from.

Example:
    cd /opt/dickinson/alert_management.logs
    ../reload_alerts 9003 127.0.0.1 log_20030315.log

End of chapter 9