Moogsoft Docs

CA Spectrum Integration Reference

CA Spectrum provides deep application monitoring and performance lifecycle management. The CA Spectrum Integration (LAM) connects to CA Spectrum, fetches the incidents and forwards them to 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 MooMS bus.

Configuration

Events received from CA Spectrum are processed according to the configuration in the ca_spectrum_lam.conf file 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.

The CA Spectrum LAM configuration file has the following sections:

Monitor

Agent

HA Configuration

Mapping

Constants and conversations

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
Example
name and class String Reserved fields: do not change. Default values are CA Spectrum Lam Monitor and CCASpectrumMonitor.
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. 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.

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.

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


Config File
config :
    {

        monitor:
        {

            name                     : "CA Spectrum Lam Monitor",

            class                    : "CCASpectrumMonitor",

			servers: 
            { 
				server1 : 
				{ 
					
							url						: "http://localhost:80" , user_name: "", password: "", 
					
							#encrypted_password 	: "ieytOFRUdLpZx53nijEw0rOh07VEr8w9lBxdCc7229o=" 
					 
            				ssl 					: false,
            
              	    		ssl_keystore_file_path  : "", ssl_keystore_password : "" 
				},
				server2 : 
				{ 

							url: "http://localhost	:80" , user_name: "", password: "", 
					
							#encrypted_password		: "ieytOFRUdLpZx53nijEw0rOh07VEr8w9lBxdCc7229o=" 
					 
            				ssl 					: false,
            
              	    		ssl_keystore_file_path  : "", ssl_keystore_password : "" 
				}
			},

            fetch_type               : "poll",

            limit                    : 1000,

            filter                   : {
                                        acknowledged   : false
                                        },
			max_thread				 : 2,
            	      
	      	polling_interval         : 60,

			timeout					 : 120
	       	              
	  },


 


Agent

Agent allows you to define two parameters:

Field

name This is the agent name, the events sent to MooMS by the CA Spectrum LAM are identified by the agent name in the log. In this example, the agent name is CA Spectrum.
log

CA Spectrum LAM will write its ingress contents in the file ca_Spectrum_lam.log located at /var/log/moogsoft/.


HA Configuration

Refer the document HA Configuration of LAM

Mapping

You can directly map the alert/event fields of CA Spectrum with moogsoft 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 Moogsoft AIOps 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"        : 1,
     "2"        : 2,
     "3"        : 3,
     "4"        : 4,
     "5"        : 5
}, 
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"
            }
        },



Severity Reference

Severity Levels
Moogsoft Severity Levels
severity:
        {
            "CLEAR" : 0,
            "INDETERMINATE" : 1,
            "WARNING" : 2,
            "MINOR" : 3,
            "MAJOR" : 4,
            "CRITICAL" : 5,
            moog_lookup_default: 3
        }
Level Description
0 Clear
1 Indeterminate
2 Warning
3 Minor
4 Major
5 Critical

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

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 MOOG, 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.

Performance Information

Minimum Requirement
Component Value
CPU 2 core
RAM 4 GB
Operating System CentOS Linux release 6.7

Version

Integration Version

Tool Version

1.0 - 1.2

CA Spectrum OneClick Version 10.2.0.0.245