Using lookup tables
You can use the SpectrumCause.pl Perl script supplied with the probe to create lookup files. The lookup files contain tables that enable the rules file to match CA Spectrum probable cause descriptions to the alarms generated by the SpectroSERVER.
When you use lookup tables, the following tokens are generated
in the rules file with data extracted from the CA Spectrum probable
cause files:
$title
$symptoms
$prob_cause
$recommended_actions
To enable the probe to use the CA Spectrum probable
cause files, use the following steps:
- Run the SpectrumCause.pl script on the SpectroSERVER host, using the
following command:
perl SpectrumCause.pl spectrum_install_dir lookup_file_location
Where spectrum_install_dir is the SpectroSERVER directory that contains the CA Spectrum probable cause files and lookup_file_location is the full directory path to the generated lookup file.
- Copy the generated lookup file to the probe host, for example:
/opt/IBM/tivoli/netcool81/solaris2/server1.lookup
- If the probe is running, stop it.
- Open the rules file
ca_spectrum_corba.rules
in a text editor. - Uncomment the following two lines in the rules
file by removing
the # character:
#table spectrum_lookup_table="/etc/user/my.lookup" #default = {"unavailable", "unavailable", "unavailable", "unavailable"}
- In the first line, replace the lookup table name with your own site-specific name and replace
/etc/user/my.lookup
with the directory path to the lookup file.For example:table
server1_lookup_table="/opt/IBM/tivoli/netcool81/probes/solaris2/server1.lookup" default = {"unavailable", "unavailable", "unavailable", "unavailable"}If you are using multiple SpectroSERVERs, repeat this step for each lookup file that you are using. Each entry must have a unique lookup table name and lookup file name, and be followed by the
default
line.For example:table
server1_lookup_table="/opt/IBM/tivoli/netcool81/probes/solaris2/server1.lookup" default = {"unavailable", "unavailable", "unavailable", "unavailable"} table
server2_lookup_table="/opt/IBM/tivoli/netcool81/probes/solaris2/server2.lookup" default = {"unavailable", "unavailable", "unavailable", "unavailable"} - Uncomment the following lines:
if (exists($CauseNum)) { # # if (match(@Node, "your_spectrum_hostname_string")) # { # [$title, $symptoms, $prob_cause, $recommended_actions] = lookup($CauseNum, spectrum_lookup_table) # } }
- Replace your_spectrum_hostname_string with the name of the SpectroSERVER host
as specified by the
Name
attribute of theSpectroServer
property in the host configuration file ca_spectrum_corba_host.xml. - Replace spectrum_lookup_table with the lookup table name that you specified in Step 6.
- If you are using
multiple SpectroSERVERs, repeat Steps 7 to 9
for each lookup file that you are using and use an
else if
statement for each additional entry. For example:#Lookup table needs $CauseNum if (exists($CauseNum)) { if (match(@Node, "spectroserver1")) { [$title, $symptoms, $prob_cause, $recommended_actions] = lookup($CauseNum, server1_lookup_table) } else if (match(@Node, "spectroserver2")) { [$title, $symptoms, $prob_cause, $recommended_actions] = lookup($CauseNum, server2_lookup_table) }
- Save and close the rules file.
- In the
host configuration file, add the location of the lookup
file to the
Value
attribute of theProbCauseLookupFile
property. - Restart the probe.