Moogsoft Docs

Configure the CA Spectrum LAM

CA Spectrum provides deep application monitoring and performance lifecycle management. The CA Spectrum LAM connects to CA Spectrum, fetches the incidents and forwards them to Moogsoft AIOps.

The CA Spectrum API does not supply events with status 'clear' for collection by Moogsoft AIOps.

See CA Spectrum for UI configuration instructions.

The workflow of gathering events from CA Spectrum and publishing it to Moogsoft AIOps is as follows:

  1. The LAM reads the configuration from the ca_spectrum_lam.conf file.

  2. It connects the CA Spectrum REST API with the URL given in the config file.

  3. It creates a rest_client instance for each server in the server section of the config file.

  4. It fetches data either by polling or by subscription as defined in the config file.

  5. It prepares a request body and sends it to the CA Spectrum Server.

  6. A response is received with incident data in the JSON format.

  7. The events are parsed and converted into normalized Moogsoft AIOps events.

  8. The normalized events are published to the Message Bus.

Configuration

Events received from CA Spectrum are processed according to the configuration in the ca_spectrum_lam.conffile and then they are published to the Moogsoft AIOps.

The configuration file contains a JSON object. At the first layer of the object, LAM has a parameter called config, and the object that follows config has all the necessary information to control the LAM.

Monitor

The CA Spectrum LAM takes the incidents from the CA Spectrum Servers. To establish a connection with the CA Spectrum, you can configure the parameters here:

General

Field

Type

Description

name and class

String

Reserved fields: do not change. Default values are CA Spectrum Lam Monitor and CCASpectrumMonitor.

target

JSON Object

A top-level container for which you can define one or more target CA Spectrum sources. You can specify the configuration for each target.

user_name and Password

String

Enter the username and password of the CA Spectrum console.

url

String

Enter the URL of the server along with the port number in this field. For example https://myspectrumserver:80/

encrypted_password

String

If you are using an encrypted password, enter the encrypted password in this field and comment the password field. Either password or the encrypted_password field is used. If both the fields are specified, then only the encrypted_password value will be used by the CA Spectrum LAM.

fetch_type

String

This option gives you the flexibility to poll events or get events via subscription. The

values can be either 'poll' or 'subscription' :

  • Poll: Request body is sent in every poll.

  • Subscription: In case of subscription, the request body is sent only once and then a subscription ID will be received. This subscription id is attached to the request which enables the LAM to not send request body in every poll, the URL with the subscription id is hit and the events are received by the LAM.

limit

Integer

Enter the number of events that can be fetched here. The default is set to 1000. If 0, or any negative value is set, it will revert to the default value i.e. 1000.

max_thread

Integer

Enter the number of threads the LAM will run to fetch the alarms/events from the CA Spectrum servers. Increase the number of threads according to the number of servers that the LAM will fetch data from, and the processing capability (number of cores) of the machine on which the LAM is running.

polling_interval

Integer

The polling time interval, in seconds, between the requests after which the event data is fetched from the CA Spectrum.

Default = 60 seconds. If 0 is entered, the time interval will set to 60 seconds.

retry_recovery

Object

Specifies the behavior of the LAM when it re-establishes a connection after a failure.

- recovery_interval: Length of time to wait between recovery requests in seconds. Must be less than the request_interval set for each target. Defaults to 20.

- max_lookback: The period of time for which to recover missed events in seconds. Defaults to -1 (recover all events since the last successful poll).

timeout

Integer

The value in seconds to wait for a request to complete before timing out. If a timeout occurs, the LAM will wait for the next poll before trying again.

Default value is 120 seconds.

proxy

Object

If you want to connect to CA Spectrum through a proxy server, configure the host, port, user, and password or encrypted password properties in the proxy section for the target.

Secure Sockets Layer

Field

Type

Description

ssl

Boolean

Set to true, to enable SSL Communication:

  • ssl_keystore_file_path: Enter the path of the keystore file. This is the path where the generated keystore file is copied e.g. "/usr/local/ssl_keystore_password/keystore.jks".

  • ssl_keystore_password: Enter the password of keystore. It is the same password that was entered when the keystore was generated.

To set up SSL for CA Spectrum see Configuring SSL in CA Spectrum.

Filter

Field

Type

Description

filter

Object

Parameters to filter incidents:

  • acknowledged: If set to true, only the acknowledged events will be fetched from the CA Spectrum, else, all the alarms will be fetched from CA Spectrum.

Note

The LAM starts fetching the events from the current time. After that it saves the last poll time (in epoch format) in a state file. The state file is generated in the same folder where the config file is present e.g. $MOOGSOFT_HOME/config. The LAM generates the name of the state file as <proc_name>.state. Here the default proc_name (process name) is ca_spectrum_lam, therefore, the state file name is ca_spectrum_lam.state. The proc_name is defined in ca_spectrum_lam.sh file located at $MOOGSOFT_HOME/bin.

It is recommended not to make any changes to the state file as this may lead to loss of events.

Example
monitor:
{
        name                                                                    : "CA Spectrum Lam Monitor",
        class                                                                   : "CCASpectrumMonitor",
        request_interval                                                                : 60,
        max_retries                                                                     : -1,
        retry_interval                                                                  : 60,
        retry_recovery:
                {
                        recovery_interval                                               : 20,
                        max_lookback                                                    : -1
                },
        targets:
                {
                        target1:
                                {
                                        url                                                             : "http://localhost:8080", 
                                        user_name                                               : "user name", 
                                        password                                                : "password",
                                        #encrypted_password                             : "ieytOFRUdLpZx53nijEw0rOh07VEr8w9lBxdCc7229o=",
                                        request_interval                                : 60,
                                        max_retries                                     : -1,
                                        retry_interval                                  : 60,
                                        retry_recovery:
                                                {
                                                        recovery_interval               : 20,
                                                        max_lookback                    : -1
                                                },
                                        
                                        #proxy:
                                                #{
                                                        #host                                   : "localhost",
                                                        #port                                   : 8181,
                                                        #user                                   : "user",
                                                        #password                               : "pass",
                                                        #encrypted_password             : "ieytOFRUdLpZx53nijEw0rOh07VEr8w9lBxdCc7229o="

                    #},
                                        disable_certificate_validation  : false,
                                        path_to_ssl_files                               : "config",
                                        server_cert_filename                    : "server.crt",
                                        #client_key_filename                    : "client.key",
                    #client_cert_filename                       : "client.crt",                   
                                        limit                                                   : 1000,
                                        timeout                                                 : 120,
                                        filter:
                                                {
                                                        acknowledged                    : false
                                                }              
                        },
                target2:
                {
                                        url                                                             : "http://localhost:8080",
                                        user_name                                               : "user name",
                                        password                                                : "password",
                                        request_interval                                : 60,
                                        max_retries                                             : -1,
                                        retry_interval                                  : 60,
                                        disable_certificate_validation  : false,
                                        #path_to_ssl_files                              : "config",
                                        #server_cert_filename                   : "server.crt",                     
                                        limit                                                   : 1000,
                                        timeout                                                 : 120,
                                        filter:
                                                {
                                                        acknowledged                    : "false"                        
                                                }
                }
            }
       },
agent:
{
                        name                                    : "CA Spectrum",
                        capture_log                             : "$MOOGSOFT_HOME/log/data-capture/ca_spectrum_lam.log"
},
log_config:
{
                        configuration_file              : "$MOOGSOFT_HOME/config/logging/caspectrum.log.json"
}
Agent and Process Log

Agent and Process Log allow you to define the following properties:

  • name: Identifies events the LAM sends to the Message Bus.

  • capture_log: Name and location of the LAM's capture log file.

  • configuration_file: Name and location of the LAM's process log configuration file.

Mapping

You can directly map the alert/event fields of CA Spectrum with Moogsoft AIOps fields displayed in Moogsoft AIOps. The mapping example is as follows:

 mapping :
        {
            catchAll: "overflow",
                        rules:
           [
                { name: "signature", rule:      "$serverName :: $alarmId" },
                { name: "source_id", rule:      "$modelId" },
                { name: "external_id", rule:    "$significantModelId" },
                { name: "manager", rule:        "CA Spectrum" },
                { name: "source", rule:         "$serverName" },
                { name: "class", rule:          "$modelClass" },
                { name: "agent", rule:          "$LamInstanceName" },
                { name: "agent_location", rule: "$networkAddress" },
                { name: "type", rule:           "$modelTypeName" },
                { name: "severity", rule:       "$severity", conversion:"sevConverter" },
                { name: "description", rule:    "$alarmTitle :: $originatingEvent" },
                { name: "agent_time", rule:     "$creationDate", conversion:"stringToInt"}
            ]
        },
        filter:
        {
            presend:"CASpectrumLam.js"
        }

The above example specifies the mapping of the CA Spectrum alarm fields with the Moogsoft AIOps fields. Data not mapped to fields goes into "Custom Info".

Note

The signature field is used by the LAM to identify correlated alarms.

Constants and Conversions

Constants and Conversions allows you to convert formats of the received data.

Field

Description

Example

Severity and sevConverter

There is a conversion defined as sevConverter in the Conversions section, this looks up the value of severity defined in the severity section of constants and returns back the mapped integer corresponding to the severity.

severity: {

"0" : 0,

"1" : 3,

"2" : 4,

"3" : 5,

"4" : 1,

"5" : 1,

"6" : 1

},

sevConverter:
{
    lookup : "severity",
    input  : "STRING",
    output : "INTEGER"
},

stringToInt

Used in a conversion, which forces the system to turn a string token into an integer value.

stringToInt:
{
    input  : "STRING",
    output : "INTEGER"
},

timeConverter

Used in conversion which forces the system to convert time. If epoc time is to be used, then timeFormat mentioned in timeConverter should be commented. Otherwise, the user should provide the timeFormat.

timeConverter:
{
    timeFormat : "yyyy-MM-dd'T'HH:mm:ss.SSS",
    input      : "STRING",
    output     : "INTEGER"
}
Example

Example Constants and Conversions

constants:
        {
            severity:
                        {
                "0"        : 0,
                "1"        : 1,
                "2"        : 2,
                "3"        : 3,
                "4"        : 4,
                "5"        : 5
            }
        },
        conversions:
        {
            sevConverter:
            {
                lookup: "severity",
                input:  "STRING",
                output: "INTEGER"
            },

            stringToInt:
            {
                input:      "STRING",
                output:     "INTEGER"
            },
         
            timeConverter:
            {
                timeFormat: "yyyy-MM-dd'T'HH:mm:ss.SSS",
                input:      "STRING",
                output:     "INTEGER"
            }
        },
Service Operation Reference

Process Name

Service Name

ca_spectrum_lam

caspectrumlamd

Start the LAM Service:

service caspectrumlamd start

Stop the LAM Service:

service caspectrumlamd stop

Check the LAM Service status:

service caspectrumlamd status

If the integration fails to connect to one or more CA Spectrum sources, creates an alert and writes the details to the process log. Refer to the logging details for LAMs and integrations for more information.

Command Line Reference

You can see the available optional attributes of the ca_spectrum_lam by running the following command:

ca_spectrum_lam --help

The ca_spectrum_lam is a command line executable, and has the following optional attributes:

Option

Description

--config

Points to a pathname to find the configuration file for the LAM. This is where the entire configuration for the LAM is specified.

--help

Displays all the command line options.

--version

Displays the component’s version number.

--loglevel

Specifies the level of debugging. By default, User gets everything. In common with all executables in Moogsoft AIOps, having it set at that level can result in a lot of output (many messages per event message processed).

In all production implementations, it is recommended that log level is set to WARN. This ensures only warning, error and fatal messages are recorded.