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:
  1. 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.

  2. Copy the generated lookup file to the probe host, for example:

    /home/user/netcool/omnibus-v7.2.1-solaris2/omnibus/probes/solaris2/server1.lookup

  3. If the probe is running, stop it.
  4. Open the rules file spectrum_corba_v9.rules in a text editor.
  5. 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"}
  6. 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="/home/user/netcool/omnibus-v7.2.1-solaris2/
                              		omnibus/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="/home/user/netcool/omnibus-v7.2.1-solaris2/
                              		omnibus/probes/solaris2/server1.lookup"
    default = {"unavailable", "unavailable", "unavailable", "unavailable"}
    table server2_lookup_table="/home/user/netcool/omnibus-v7.2.1-solaris2/
                              		omnibus/probes/solaris2/server2.lookup"
    default = {"unavailable", "unavailable", "unavailable", "unavailable"}
  7. 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)
                # }            
            }
  8. Replace your_spectrum_hostname_string with the name of the SpectroSERVER host as specified by the Name attribute of the SpectroServer property in the host configuration file spectrum_corba_v9_host.xml.
  9. Replace spectrum_lookup_table with the lookup table name that you specified in Step 6.
  10. 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)
                 }            
    
  11. Save and close the rules file.
  12. In the host configuration file, add the location of the lookup file to the Value attribute of the ProbCauseLookupFile property.
  13. Restart the probe.