The REST LAM is a link access module that allows Moogsoft AIOps to receive data from REST-compliant web services. REST LAM accepts HTTP and HTTPS requests in all varieties of JSON, XML and YAML formats and parses them into Moogsoft AIOps events.
You can use curl commands to test whether you have correctly configure the REST LAM to accept REST messages. See the examples provided for more information. The REST LAM responds to the data sender with standard HTTP response codes and JSON messages.
Before You Begin
Before you configure the REST LAM, ensure you have met the following requirements:
- You have network access to the host address and port.
- The port is open through the server firewall.
- You understand the message data format you will send to the REST LAM.
If you are configuring a distributed deployment refer to High Availability first. You will need the details of the server configuration you are going to use for HA.
Configure the LAM
Edit the REST LAM configuration file to control the behavior of the REST LAM. You can find the file at
See the REST LAM Reference for a full description of all properties. Some properties in the file are commented out by default. Uncomment properties to enable them.
- Configure the properties for the REST connection:
- port: Port on the Moogsoft AIOps server that listens for REST messages. Defaults to 8888.
- address: Address on the Moogsoft AIOps server that listens for REST messages. Default to all interfaces.
- expose_request_headers: Allows you to include request HTTP headers in Moogsoft AIOps events.
- Configure authentication:
- authentication_type: Type of authentication used by the LAM. Defaults to none.
- jwt: The claims used for JSON Web Token, if the authentication type is set to JWT.
- authentication_cache: Whether to cache the username and password for the current connection when the authentication type is Basic.
- Configure the LAM behavior:
- num_threads: Number of worker threads to use.
- rest_response_mode: When to sends a REST response. See the REST LAM Reference for the options.
- rpc_response_timeout: Number of seconds to wait for a REST response.
- event_ack_mode: When moogfarmd acknowledges events from the REST LAM during the event processing pipeline.
- accept_all_json: Allows the LAM to read and process all forms of JSON.
- lists_contain_multiple_events: Whether Moogsoft AIOPs interprets a JSON list as multiple events.
- Configure the SSL properties if you want to encrypt communications between the LAM and the REST connection:
- use_ssl: Whether to use SSL certification.
- path_to_ssl_files: Path to the directory that contains the SSL certificates.
- ssl_key_filename: The SSL server key file.
- ssl_cert_filename: The SSL root CA file.
- use_client_certificates: Whether to use SSL client certification.
- client_ca_filename: The SSL client CA file.
- auth_token or encrypted_auth_token: Authentication token in the request body.
- header_auth_token or encrypted_header_auth_token: Authentication token in the request header.
ssl_protocols: Sets the allowed SSL protocols.
- Optionally configure the LAM identification and log file details:
- name: Identifies the event sent to the message bus by the REST LAM.
- log: Name and location of the REST LAM log file.
- Review the severity conversion rules and filtering and modify if required. See Data Parsing for details.
- If you are using a data format with multiple nested fields, see REST LAM Examples for a nested fields example and information on how to handle it.
- Refer to the REST LAM Reference to review the structure of REST LAM response messages and response codes.
The following example demonstrates a basic REST LAM configuration that receives messages without authentication or SSL encryption. See REST LAM Examples for some more complex configuration examples.
Map LAM Properties
REST messages are mapped to Moogsoft AIOps event fields according to the mapping rules in the REST LAM configuration file.
You can choose to map request headers when the
expose_request_headers property is set to
true. For example:
See the REST LAM Reference for more details.
Check the LAM Status
You can use a GET request to check the status of the REST LAM. The request uses the authentication type and header authentication token defined in the REST LAM configuration file. See the
header_auth_token properties in the REST LAM Reference for more information.
The following examples show the only two possible responses: active and passive.
Response from an active REST LAM:
Response from an inactive REST LAM:
Start and Stop the LAM
Restart the REST LAM to activate any changes you make to the configuration file or LAMbot.
The LAM service name is
See Control Moogsoft AIOps Processes for further details.