Moogsoft Docs

Configure the HP OMi Polling LAM

HP Operations Manager (OMi) is an automated IT operations management software application. HP OMi provides automated monitoring, root cause identification and prioritization with automated remedial action.

See HP OMi Polling for UI configuration instructions.

The HP OMi Polling LAM fetches events from the HP OMi and forwards it to Moogsoft AIOps.

  1. LAM reads the configuration from the hp_omi_lam.conf file.

  2. LAM connects to HP OMi REST API with given host name.

  3. The response is received with event data in JSON format.

  4. Events are parsed and converted into normalized Moogsoft AIOps events.

  5. The normalized events are then published to the Message Bus.

HP OMi LAM Configuration

The events received from HP OMi are processed according to the configurations in the hp_omi_lam.conf file. The processed events are published to Moogsoft AIOps.

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

Monitor

The HP OMi Polling LAM takes the alerts from the HP OMi Server. You can configure the parameters here to establish a connection with HP OMi:

General

Field

Type

Description

name and class

String

Reserved fields: do not change. Default values are HpOMi Lam Monitor and CHpOMiMonitor.

target

JSON Object

A top-level container for which you can define one or more target HP OMi sources. You can specify the configuration for each target. If you don't specify a request_interval the target uses the globally defined interval.

url

String

Enter the IP address or the host name or the FQDN of the HP OMi server along with the port on which it will communicate. For example: http://examplehpomi:80

In case of SSL communication, https will be used instead of http.

user_name and Password

String

Enter the username and password of the HP OMi console. The username and password of the user who has the permissions for handling all the events should be given here. If a user does not have permissions for handling all the events, then the LAM will not fetch all the events present in HP OMi.

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 HP Omi LAM.

events_date_format

String

The format of the date/time in event response. The possible value would be like "yyyy-MM-dd'T'HH:mm:ss" or "yyyy-MM-dd'T'HH:mm:ss.SSSXXX". If this value is set to blank, then event date/time will be epoch time.

event_uri

String

This is the uri of the REST Server from which the events will be fetched. The version given here is 9.10 i.e. the current version of the OMi Event Web Service (not the current OMi version). If the version number is omitted, versions lower than 9.10 of the Event Web Service are addressed. You can change the version in case there is an upgrade of the API of HP OMi. For example: /opr-web/rest/9.10/event_list

polling_interval

Integer

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

Default = 10 seconds. If 0 is entered the time interval is set to 10 seconds.

max_retries

Integer

The maximum number of retry attempts to reconnect with HP OMi in case of a connection failure.

Default = -1, if no value is specified, then there will be infinite retry attempts.

If the specified value is greater than 0, then the LAM will try that many times to reconnect; in case of any other value less than 0, max retries will set to default.

retry_interval

Integer

The time interval between two successive retry attempts.

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.

request_interval

Integer

Length of time to wait between requests, in seconds. Can be overridden by request_interval in individual targets. Defaults to 60.

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 in Moogsoft AIOps, e.g. "/usr/local/hpomi_ssl/keystore.jks".

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

Note

The HP OMi has a functionality of duplicating events within its event browser. The LAM does not fetch all the duplicated events, instead it will fetch only single event which is duplicated into multiple events.

Example

You can configure the HP OMi LAM to retrieve events from one or more sources. The following example demonstrates a configuration that targets two HP OMi sources. For a single source comment out the target2 section. If you have more than two sources, add a target section for each one and uncomment properties to enable them.

monitor:
    {
        name                                    : "HpOmi Lam Monitor",
        class                                   : "CHpOmiMonitor",
        request_interval                        : 60,
        max_retries                             : -1,
        retry_interval                          : 60,
        targets:
        {
            target1:
            {
                                url                                                             : "http://examplehpomi1:80",
                                user_name                                               : "hpomi_user1",
                                #password                       : "password",
                encrypted_password              : "qJAFVXpNDTk6ANq65pEfVGNCu2vFdcoj70AF5BIebEc=",
                                events_date_format                              : "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
                                event_uri                                               : "/opr-web/rest/9.10/event_list",
                request_interval                : 60,
                max_retries                     : -1,
                                retry_interval                  : 60,
                                timeout                                                 : 120,
                                disable_certificate_validation  : false,
                path_to_ssl_files               : "config",
                server_cert_filename            : "server1.crt",
                client_key_filename             : "client1.key",
                client_cert_filename            : "client1.crt",
                                ssl_protocols                                   : [ "TLSv1.2" ]
                        }
            target2:
            {
                                url                                                             : "http://examplehpomi2:80",
                                user_name                                               : "hpomi_user2",
                                #password                       : "password",
                encrypted_password              : "bDGFSClSHBn8DSw43nGwSPLSv2dGwdsj50WD4BHdfVa&",
                                events_date_format                              : "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
                                event_uri                                               : "/opr-web/rest/9.10/event_list",
                request_interval                : 60,
                max_retries                     : -1,
                                retry_interval                  : 60,
                                timeout                                                 : 120,
                                disable_certificate_validation  : false,
                path_to_ssl_files               : "config",
                server_cert_filename            : "server2.crt",
                client_key_filename             : "client2.key",
                client_cert_filename            : "client2.crt",
                                ssl_protocols                                   : [ "TLSv1.2" ]
            }
        }
    }
Agent and Process Log

The Agent and Process Log sections allow you to configure 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

For alerts received from HP OMi, you can directly map the alert fields of HP OMi with Moogsoft AIOps fields. The parameters of the received alert are displayed in the Moogsoft AIOps according to the mapping done here:

mapping :
        {
            catchAll: "overflow",
            rules:
            [
                { name: "signature", rule:      "$originating_server.ip_address::$related_ci.configuration_item.root_class" },   
                { name: "source_id", rule:      "$originating_server.ip_address" },
                { name: "external_id", rule:    "$originating_server.dns_name" },
                { name: "manager", rule:        "HP OMi" },
                { name: "source", rule:         "$originating_server.ip_address" },
                { name: "class", rule:          "$state" },
                { name: "agent", rule:          "$LamInstanceName" },
                { name: "agent_location", rule: "$category" }, 
                { name: "type", rule:           "$priority" },
                { name: "severity", rule:       "$severity", conversion:"sevConverter" },
                { name: "description", rule:    "$title" },
                { name: "agent_time", rule:     "$time_changed", conversion:"timeConverter"} 
            ]
        },
        filter:
        {
            presend:"HpOmiLam.js"
        }       

Data not mapped to Moogsoft AIOps Fields goes into "Custom Info".

Constants and Conversions

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

Field

Description

Example

Severity and sevConverter

has 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:
{
    "unknown"   : 0,
    "normal"    : 1,
    "warning"   : 2,
    "minor"     : 3,
    "major"     : 4,
    "critical"  : 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:
            {
                "unknown"             : 0,
                "normal"        : 1,
                "warning"       : 2,
                "minor"         : 3,
                "major"         : 4,
                "critical"      : 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

hp_omi_lam

hpomilamd

Start the LAM Service:

service hpomilamd start

Stop the LAM Service:

service hpomilamd stop

Check the LAM Service status:

service hpomilamd status

If the LAM fails to connect to one or more HP OMi sources, Moogsoft AIOps creates an alert and writes the details to the process log.

Command Line Reference

To see the available optional attributes of the hp_omi_lam, run the following command:

hp_omi_lam --help