Configure the New Relic Insights Polling LAM
The New Relic Insights Polling LAM allows Moogsoft Enterprise to collect event data from one or more New Relic Insights systems. The integration uses API authorization keys to authenticate with New Relic Insights.
You can install a basic New Relic Insights Polling integration in the UI. See New Relic Insights Polling for integration steps.
Configure the New Relic Insights Polling LAM if you want to configure custom properties, set up high availability or configure advanced options that are not available in the UI integration.
Before You Begin
The New Relic Insights Polling integration has been validated with New Relic Insights v2.3. Before you set up the LAM, ensure you have met the following requirements for each New Relic Insights server:
You have the New Relic Insights server URL.
You have the New Relic Insights Account ID and API Query Key.
Your New Relic Insights server is able to accept HTTP/HTTPS requests.
Configure the LAM
Edit the configuration file to control the behavior of the New Relic Insights Polling LAM. You can find the file at $MOOGSOFT_HOME/config/newrelic_insights_client_lam.conf
See the New Relic Insights Polling 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 connection properties for each New Relic Insights target:
url: New Relic Insights request URL including host and port.
account_id: Your New Relic Insights account ID.
query_key: Your New Relic query key.
Configure the LAM behavior for each target:
request_interval: Length of time to wait between requests, in seconds.
max_retries: Number of times the LAM attempts to reconnect after connection failure.
retry_interval: Length of time to wait between reconnection attempts, in seconds.
recovery_interval: Length of time to wait between requests, in seconds, when the LAM re-establishes a connection after a failure.
max_lookback: Period of time for which to recover missed events, in seconds, when the LAM re-establishes a connection after a failure.
timeout: Length of time to wait before halting a connection or read attempt, in seconds.
Configure the SSL properties if you want to encrypt communications between the LAM and New Relic Insights:
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.
Optionally configure the LAM identification and logging details in the agent and log_config sections of the file:
name: Identifies events the LAM sends to the Message Bus.
capture_log: Name and location of the LAM's log file.
configuration_file: Name and location of the LAM's process log configuration file.
If you want to connect to New Relic Insights through a proxy server, configure the host, port, user, and password or encrypted_password in the proxy section of the file.
Optionally configure the LAM identification and capture logging details:
name: Maps to
$Laminstancename
, so that theagent
field indicates events Moogsoft Enterprise ingests from this LAM.capture_log: Name and location of the LAM's capture log file, which it writes to for debugging purposes.
Optionally configure severity conversion. See Severity Reference for further information and "Conversion Rules" in Tokenize Source Event Data for details on conversions in general.
Optionally configure the process logging details:
configuration_file: Name and location of the LAM's process log configuration file. See Configure Logging for more information.
Example
You can configure the New Relic Insights LAM to retrieve events from one or more targets. The following example demonstrates a configuration that targets two New Relic Insights 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 : "New Relic Insights Client Lam Monitor", class : "CNewRelicInsightsClientMonitor", request_interval : 60, max_retries : -1, retry_interval : 60, retry_recovery: { recovery_interval : 20, max_lookback : -1 }, targets: { target1: { url : "https://insights-api-server1.newrelic.com/", account_id : "8729338", query_key : "QUERY_1", disable_certificate_validation : true, path_to_ssl_files : "config", server_cert_filename : "server.crt", client_key_filename : "client.key", client_cert_filename : "client.crt", request_interval : 60, max_retries : -1, retry_interval : 60, retry_recovery: { recovery_interval : 20, max_lookback : -1 }, timeout : 120 }, target2: { url : "https://insights-api-server2.newrelic.com/", account_id : "0022839", query_key : "QUERY_2", proxy: { host : "localhost", port : 8080, user : "proxy_user", #password : "password", encrypted_password : "ieytOFRUdLpZx53nijEw0rOh07VEr8w9lBxdCc7229o=" } request_interval : 60, max_retries : -1, retry_interval : 60, timeout : 120 } } }, agent: { name : "New Relic", capture_log : "$MOOGSOFT_HOME/log/data-capture/newrelic_insights_client_lam.log" }, log_config: { configuration_file : "$MOOGSOFT_HOME/config/logging/newrelic_insights_client_lam.log.json" },
Configure for High Availability
Configure the New Relic Insights LAM for high availability if required. See High Availability Overview for details.
Configure LAMbot Processing
The New Relic Insights Polling LAMbot processes and filters events before sending them to the Message Bus. You can customize or bypass this processing if required. You can also load JavaScript files into the LAMbot and execute them.
See LAMbot Configuration for more information. An example New Relic Insights Polling LAM filter configuration is shown below.
filter: { presend: "NewRelicInsightsClientLam.js", modules: [ "CommonUtils.js" ] }
Map LAM Properties
You can configure custom mappings in the New Relic Insights Polling LAMbot. See Tokenize Source Event Data information for details.
By default, the following New Relic Insights event properties map to the following Moogsoft Enterprise New Relic Insights Polling LAM properties:
New Relic Insights Event Property | New Relic Insights LAM Event Property |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The overflow properties are mapped to "custom info" and appear under custom_info
in Moogsoft Enterprise alerts.
Start and Stop the LAM
Restart the New Relic Insights Polling LAM to activate any changes you make to the configuration file or LAMbot.
The LAM service name is newrelicinsightsclientlamd
.
See Control Moogsoft Enterprise Processes for further details.
If the LAM fails to connect to one or more New Relic Insights sources, Moogsoft Enterprise creates an alert and writes the details to the process log. Refer to the logging details for LAMs and integrations for more information.