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:
-
The LAM reads the configuration from the
ca_spectrum_lam.conf
file. -
It connects the CA Spectrum REST API with the URL given in the config file.
-
It creates a rest_client instance for each server in the server section of the config file.
-
It fetches data either by polling or by subscription as defined in the config file.
-
It prepares a request body and sends it to the CA Spectrum Server.
-
A response is received with incident data in the JSON format.
-
The events are parsed and converted into normalized Moogsoft AIOps events.
-
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.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.
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 |
---|---|---|
|
String |
Reserved fields: do not change. Default values are CA Spectrum Lam Monitor and CCASpectrumMonitor. |
|
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. |
|
String |
Enter the username and password of the CA Spectrum console. |
|
String |
Enter the URL of the server along with the port number in this field. For example https://myspectrumserver:80/ |
|
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. |
|
String |
This option gives you the flexibility to poll events or get events via subscription. The values can be either 'poll' or 'subscription' :
|
|
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. |
|
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. |
|
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. |
|
Object |
Specifies the behavior of the LAM when it re-establishes a connection after a failure. - - |
|
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. |
|
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
To set up SSL for CA Spectrum, refer to the CA Spectrum documentation.
Configure the SSL properties for each target if you want to encrypt communications between CA Spectrum and Moogsoft AIOps:
-
disable_certificate_validation: Whether to disable SSL certificate validation.
-
path_to_ssl_files: Path to the directory that contains the SSL certificates.
-
server_cert_filename: Name of the SSL root CA file.
-
client_key_filename: Name of the SSL client key file.
-
client_cert_filename: Name of the SSL client certificate.
Filter
Field |
Type |
Description |
---|---|---|
|
Object |
Parameters to filter incidents:
|
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: "ieytOFRUdLpZx53nijEw0rOh07VEr8w9l=" #}, 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 |
---|---|---|
|
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. |
|
|
Used in a conversion, which forces the system to turn a string token into an integer value. |
stringToInt: { input : "STRING", output : "INTEGER" }, |
|
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 |
---|---|
|
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 |
---|---|
|
Points to a pathname to find the configuration file for the LAM. This is where the entire configuration for the LAM is specified. |
|
Displays all the command line options. |
|
Displays the component’s version number. |
|
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. |