Moogsoft Docs

Email LAM Reference

This is a reference for the Email LAM . The Email LAM configuration file is located at $MOOGSOFT_HOME/config/email_lam.conf

It contains the following sections and properties:

Monitor

name : The name of the LAM. Do not change.

Type : String
Required : Yes
Default : "Email Monitor" .

class : The LAM class. Do not change.

Type : String
Required : Yes
Default : " CEmailMonitor" .

targets : A top-level container defining one or more target email sources . You can specify the configuration for each target. If you don't specify a request_interval the target uses the globally defined interval.

Type : JSON Object
Required : Yes
Default : N/A

protocol : The protocol used to access email on a remote web server from a local client. Can be IMAP or POP3 (email protocols) or IMAPS or POP3S (SSL protocols). If you are using an SSL-secured protocol, IMAPS or POP3S, provide SSL certificate details.

Type : String
Required : Yes
One of : IMAP, POP3, IMAPS, POP3S
Default : "IMAP"

host : IP address or host name of the mail server.

Type : String
Required : Yes
Default : "localhost"

port : Port of the mail server.

Type : Integer
Required : Yes
Default : 143 for IMAP, 110 for POP3, 993 for IMAPS, 995 for POP3S

folder_path : Name of the folder containing the email messages.

Type : String
Required : Yes
Default : "INBOX"

username : Username of the account used to connect to your mail server.

Type : String
Required : Yes
Default : N/A

password : Password of the account used to connect to your mail server.

Type : String
Required : If you are not using encrypted_password
Default : N/A

encrypted_password : If you are using an encrypted password, enter it into this field and comment the password field. Email LAM uses either password or encrypted_password . If you specify both, it uses the encrypted_password value. See Moog Encryptor for more information.

Type : String
Required : If you are not using password
Default : N/A

retrieve : Specifies whether to receive all email messages or only unread messages.

Type : String
Required : Yes
One of : UNREAD, ALL
Default : "UNREAD"

retrieve_filter : Specifies one or more filters to limit the email messages to retrieve. The Email LAM concatenates field-level filters with the AND operator. For example if you set a "to" filter and a "from" filter, a message must match both fields to meet the filter criteria. For each field, you can specify multiple values that the Email LAM joins with an OR operator. For example if you set two email addresses for the "to" field, the message can match one or the other to meet the filter criteria .

Type : String
Required : No
Default : N/A
Example :

{
	to 			: ["support@moogsoft.com", "support1@moogsoft.com"],
	from 		: ["customer@abc.com", "customer@xyz.com"],
	#recipient 	: [],
	subject 	: ["Alert", "Event"],
	#body 		: ""
}

to : A list of email addresses used to filter the "to" field in email messages. If multiple addresses are set, the email is returned if any of them match the "to" address.

Type : String
Required
: No
Default
: N/A

from : A list of email addresses used to filter the "from" field in email messages. If multiple addresses are set, the email is returned if any of them match the "from" address.

Type : String
Required
: No
Default
: N/A

recipient : A list of email addresses used to filter the "to", "CC" and "BCC" fields in email messages. If multiple addresses are set, the email is returned if any of them match the address in "to", "CC" or "BCC".

Type : String
Required
: No
Default
: N/A

subject : A list of strings used to filter the subject field in email messages. The email is returned if any of the strings are found in the subject. The matching is case-insensitive.

Type : String
Required
: No
Default
: N/A

body : A string used to filter the body in email messages. The email is returned if the string is found in the body. The matching is case-sensitive.

Type : String
Required
: No
Default
: N/A

proxy : Defines a HTTP proxy to use.

Type : String
Required
: No
Default
: N/A

mark_as_read : Marks unread emails as read.

Type : Boolean
Required : If retrieve = UNREAD
Default : True

delete_on_retrieve : Specifies whether to delete email messages on retrieval.

Type : Boolean
Required : No
Default : False

remove_html_tags : Specifies whether to remove HTML tags from email messages.

Type : Boolean
Required : No
Default : True

treat_body_as_json : Decodes the email body into a JSON object and makes it available for mapping under the $ body key. Set to true if the body of retrieved email messages contain JSON objects only.

Type : Boolean
Required : No
Default : False

disable_certification_validation : Specifies whether to disable SSL certificate validation. If set to true t he data transmission between Moogsoft AIOps and your mail server is not protected by the encryption protocol.

Type : Boolean
Required : If protocol = POP3S or IMAPS
Default : False

path_to_ssl_files : Path to the directory that contains the SSL certificates . You can use a relative path based upon the $MOOGSOFT_HOME directory. For example the default config indicates $MOOGSOFT_HOME/config .

Type : String
Required : If protocol = POP3S or IMAPS and disable_certificate_certification = false
Default : "config"

server_cert_filename : Name of the SSL root CA file. M ust reside in the location contained in path_to_ssl_files .

Type : String
Required : If protocol = POP3S or IMAPS and disable_certificate_certification = false
Default : N/A

client_key_filename: Name of the SSL client key file.

Type : String
Required : If protocol = POP3S or IMAPS and disable_certificate_certification = false
Default : N/A

client_cert_filename : Name of the SSL client certificate.

Type : String
Required : If protocol = POP3S or IMAPS and disable_certificate_certification = false
Default : N/A

ssl_protocols : Sets the allowed SSL protocols.

Type : Array
Required : If protocol = POP3S or IMAPS
Valid protocols : SSLv3, TLSv1, TLSv1.1, TLSv1.2
Default : [ "TLSv1.2" ]

num_threads : Number of worker threads to use.

Type : Integer
Required : No
Default : The number of available CPUs, up to a maximum of 8

event_ack_mode : Determines when moogfarmd acknowledges events from the Email LAM. Acknowledge events when Moogsoft AIOps adds them to the Moolet queue with queued_for_processing . Acknowledge events when a Moolet processes them with event_processed .

Type : String
Required : Yes
One of : queued_for_processing , event_processed
Default : "queued_for_processing"

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

Type : Integer
Required : Yes
Default : 60

max_retries : Number of times the LAM attempts to reconnect after connection failure. Used in conjunction with retry_interval .

Type : Integer
Required : Yes
Default : -1 (infinite retries)

retry_interval : Length of time to wait between reconnection attempts, in seconds. Used in conjunction with max_retries .

Type : Integer
Required : Yes
Default : 60

timeout : Length of time to wait before halting a connection or read attempt, in seconds.

Type : Integer
Required : Yes
Default : 120

Agent

name : Identifies the event the Email LAM sends to the message bus.

Type : String
Required : Yes
Default : "Email"

log: Location of the Email LAM log file.

Type : String
Required : No
Default : "$MOOGSOFT_HOME/log/data-capture/email_lam.log"