3.2 EventListener

Use this Knowledge Script to insert events that Advanced Analytics generates into the QDB and view them in AppManager. If you specify an SMTP server and one or more email recipients, the script sends an SMTP mail message with event information.

Do not run this script as part of a monitoring policy.

3.2.1 Resource Objects

Advanced Analytics server

3.2.2 Default Schedule

By default, this script runs on an asynchronous schedule. All other schedule types are unavailable. Once you start the Knowledge Script job, its runs continuously on the monitored system and reports events as they occur.

3.2.3 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

Event severity when job fails to register with Advanced Analytics Service to receive connection status events

Set the event severity level, from 1-40, to indicate the importance of an event in which the QDB fails to register with the NetIQ Advanced Analytics Service. The default is 5.

Event settings when errors prevent job from running normally

 

Event severity when errors prevent job from running normally

Set the event severity level, from 1 to 40, to indicate the importance of an event in which an error prevents the EventListener job from running normally. The default is 5.

For example, if the Microsoft Message Queue (MSMQ) service stops, the EventListener job continues running even though it is not able to retrieve messages from the MSMQ Server.

Time to wait between events when errors prevent job from running normally

Specify the number of minutes, from 1 to 1440 (1 day) to wait between raising events when an error prevents the EventListener job from running normally. The default is 10 minutes.

For example, if you use the default value of 10, AppManager generates one event every 10 minutes until you resolve the error.

Remove existing Advanced Analytics events when the job starts?

Select Yes to remove old Advanced Analytics events from the queue when the job starts. The default is to leave the events in the queue.

For policy jobs only (does not apply for ad hoc jobs): QDB name

Create a custom property for each agent acting as an Advanced Analytics agent, Create the KSG and override this parameter and apply KSG as a Monitoring Policy on a Management group that contains the NetIQ Advanced Analytics agents.

Event Notification Options

 

Event Notification

 

Raise event if SMTP server is not accessible?

Select Yes to raise an event if the job cannot access the SMTP server in order to send email notifications. The default is to raise an event.

Event severity - SMTP server not accessible

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the job cannot access the SMTP server. The default is 35.

Action

 

List of recipient email addresses (semicolon separated)

Provide the full email address for each recipient of the message. Use semicolons (;) to separate multiple recipient addresses. For example: chris@abc.com;pat@def.com;jw@abc.com.

The following characters are invalid: / \ [ ] : | = , * ? < >

Sender’s email address

Provide the email address of the person sending the message.

The following characters are invalid: / \ [ ] : | = , * ? < >

SMTP server name

Provide the host name or IP address of your SMTP server.

SMTP port

Set the port number for your SMTP server. The default is 25.

Message format

Select the format you want to use for the message sent by this script:

  • Standard format generates a message based upon the selections you make from the Standard Message Options parameters.

  • Custom format generates a message based upon the subject and message body you supply in the Custom Message Options parameters.

The default is Standard.

Standard Message Options

 

Include date/timestamp?

Select Yes to include the date/timestamp in the standard message. The default is to exclude the date/timestamp.

Include JobID?

Select Yes to include the job ID in the standard message. The default is to exclude the job ID.

Include agent computer name?

Select Yes to include the name of the agent computer that initiated the action in the standard message. The default is to include the computer name.

Include event severity?

Select Yes to include the severity of the event in the standard message. The default is to include the severity.

Include Knowledge Script name?

Select Yes to include the name of the Knowledge Script that initiated the action in the standard message. The default is to exclude the Knowledge Script name.

Include AppManager object name?

Select Yes to include the name of the resource object where the event was raised in the standard message. The default is to exclude the object name.

Include AppManager event ID (only on MS action)?

Select Yes to include the AppManager event ID in the standard message, possible only in cases when the management server carries out the action. The default is to exclude the event ID.

Include event detail message?

Select Yes to include the event detail message. The default is to exclude the detail message.

Custom Message Options

 

Custom message subject

Provide the text you want to use for the custom message subject line.

Custom message body

Provide the text you want to include in your custom message. You can use the keywords listed below to indicate the information you want to include in the body of your custom message. Add a space before and after keywords to ensure that the keywords display properly.

  • $ShortMsg$ (short event message).

  • $DetailMsg$ (detailed event message).

  • $Time$ (date and time of the event).

  • $JobID$ (ID of the job that raised the event).

  • $MachineName$ (name of the computer where the event was raised).

  • $Severity$ (severity of the event).

  • $KSName$ (name of the Knowledge Script that raised the event).

  • $ObjectName$ (name of the AppManager resource object where the event was raised).

  • $EventID$ (event ID).

  • $tab$ inserts four whitespace characters in the message body.

  • $lf$ inserts a line feed in the message body.

  • $crlf$ inserts a carriage-return line feed in the message body.

  • $cr$ inserts a carriage-return in the message body.

For $ShortMsg$ and $DetailMsg$ you can use number and wildcard options to indicate specific portions of the text string to include. For example:

  • $DetailMsg$[5] includes the fifth word of the detailed event message.

  • $ShortMsg$[1-5] includes the first through fifth words of the short event message.

  • $DetailMsg$[*5] includes the first through fifth words of the detailed event message.

  • $ShortMsg$[5*] includes the fifth through last words of the short event message.

This script treats the following character values as separators between words: carriage return, line feed, carriage return/line feed combination, form feed, horizontal tab, and space. Everything between those character values in a custom message is considered a word.

If you do not enter a keyword, AppManager returns the entire string.

The following are examples of the types of messages you can construct using keywords:

  • Event from $MachineName$: The $ShortMsg$[1-3] has failed. The last command was $DetailMsg$[4*].

  • A severity $Severity$ event has occurred. Call the owner of $MachineName$ immediately.