2. Configuration

Important Considerations

2.1 General Considerations

You should as a general rule not run the alert_collector_server on a system with both internal and external network interfaces, but on an internal network server. If you must run it on a system with an external interface to the big wide world ensure that when you start the server you specify the ip-address of one of the interfaces connected to the internal network. This will prevent any external traffic from accessing the application.

2.2 Configuration/Installation considerations

The port number and ipaddress you will be starting the server to use need to be known to any remote servers that will be forwarding alerts to this server. Please record them before starting the alert_collector_server process. You will need to configure this information on each server you install the scripts into for alert forwarding.
Do read the entire chapter, there is a very important note on customising the startup script after the dicussion on configuring the main configuration file.

Configuring the toolkit - etc/config.txt file

Under the directory you installed the toolkit to there is a directory etc which contains all the configuration information used by the toolkit in the file config.txt. All the supplied scripts use this file by refering to it using relative paths from where they are installed.

As long as you get this file correct, it can be copied to every other server you install the toolkit on and the supplied scripts to raise/cancel alerts and run the monitoring interfaces (both vt100 and java GUI) will work correctly.
Note: if on the alert collector server you use the generic localhost address to force it to listen on all interfaces you will need to put the appropriate ip-address of the alert collector server into the config.txt SERVER_IPADDR of each remote server that will forward alerts to it rather just just copying the master, so it can find the correct server.

The config.txt file contains the following information (this sample is the configuration from my servers). The fields are explained below.
# -----------------------------------------------------------------------------
# Common to all scripts
# -----------------------------------------------------------------------------
PORT=9003                         # tcp port number collector server listens on
# SERVER_IPADDR=127.0.0.1         # Use localhost address to listen on all interfaces
SERVER_IPADDR=169.254.218.183     # ip addr of server with collector server running
SERVER_NAME=falcon                # ip addr of server with collector server running
INSTALLED_DIR="/opt/dickinson/alert_management"   # where the binaried reside
LOGPATH="/opt/dickinson/alert_management/logs"    # where the forwarding log files reside
RUNPID_DIR="/opt/dickinson/alert_management/run"  # Where pid files are stored

# -----------------------------------------------------------------------------
# Used by the supplied scripts for forwarding alerts from batch jobs
# -----------------------------------------------------------------------------
ALERTPROG="raise_alert"          # supplied program, in $INSTALLED_DIR
LOG_FILE="forwarded_alerts.log"  # history file for batch alerts generated, in $LOGPATH

# -----------------------------------------------------------------------------
# Used by the console application to override server defaults
# -----------------------------------------------------------------------------
CONSOLE_LINE_LEN="LINELEN=118"   # passed as a parm from console.sh (max 127)
CONSOLE_NUM_LINES="NUMLINES=24"  # passed as a parm from console.sh (max 99)
# CONSOLE_BLINK="ON"               # set to OFF is you don't want blinking acked alerts
CONSOLE_BLINK="OFF"              # set to OFF is you don't want blinking acked alerts on tty

# -----------------------------------------------------------------------------
# Used for automation of alert events
# Optional (free) plugin for this tool.
# -----------------------------------------------------------------------------
AUTOMATION_ENABLED="TRUE"  # Change to FALSE if you don't have the plugin
AUTOMATION_DIR="/opt/dickinson/alert_management/automation"  # Automation tools
AUTOMATION_PROG="actioncmd.sh"          # Does automation checks and tasks
AUTOMATION_TABLE="automation_table"

Common fields

The connon fields block are for variables used by pretty much all of the supplied scripts. Used by the alert raise/cancel scripts and the monitoring scripts to locate the alert_collector server to connect to when they are requested to do anything. Also used by the supplied startup/shutdown scripts.

Alert forwarding parameters

These are used by the supplied scripts that raise and cancel alerts. You should not need to change these. The alertprog must be in the installation directory.

Console application parameters

These control the operation of the vt100 alert monitoring interface. As users generally prefer different window sizes and displays these should be set as a generic default for most of the users, or for the console. Users can always customise there own display formats as documented in the chapter on the vt100 interface as needed.

Automation parameters

These are not used by the alert server itself, they are used by the supplied scripts and are expected to be used on the server generating the alerts, not the central server collecting the alerts.

A sample simple automation structure is provided that will allow you to automate the recovery of some alerts at the time they are generated rather than just forwarding an alert to the central monitoring server for somebody else to deal with. The use of this facility is covered in the chapter on automation tools. The parameters here are

Customising the startup script

The supplied startup script will need to be customised. As this is unlikely to be run from the scripts directory as supplied, but more likely to be run from the init.d directory, the startup script does not make any assumptions as to where the config.txt file will actually live. It may even be that you run multiple copies for some reason.

In the installation directory there is a file scripts/start_alertserver.sh that is used to start and stop the alert server task. The first few lines after the comments have explicit pathnames to where the config.txt file is expected to be. If you have installed the toolkit anywhere but /opt/dickinson/alert_management or if you are running multiple copies of the alert collector server on a machine you must customise this.
There is also a start_server_and_tailtask.sh script that I use personally, that starts the server and a tail task against /var/log/messages using the sample log processing scripts (although my message rules are different). You can use this instead of the script above if you will always be using the tail task.
Both these scripts are covered in chapter 3.

Summary

To keep the supplied scripts simple to use they all obtain there information from etc/config.txt under the installation directory. That should be the only file (with the exception of the supplied startup script) you need to customise on each server to use the application.

End of Chapter 2