11.26 SMTPMailRpt

This Knowledge Script supports the report-related (ReportAM) Knowledge Scripts, which can be application-specific reports or generic reports.

Use this Knowledge Script to email the first page of a report to a list of recipients.

The first page of the report contains a list of parameter values and hyperlinks to subsequent pages of the report. The hyperlinks refer to files on the computer where the report is located, so the email is lightweight (approximately 6-10 KB).

For this Action to succeed, generate reports on the same computer where the Report agent is installed, and use the AMAdmin_SetReportPaths Knowledge Script to display the location of each report as a hyperlink. Run AMAdmin_SetReportPaths on the AppManager Repositories object under the Report agent.

If the Admin_SetReportPaths Knowledge Script has not been used to display report locations as hyperlinks, the hyperlinks in the email message will not work.

If there is no data in the report, the email message will not be sent.

The Location for this Action must be defined as MC (referring to the managed computer where the Report agent is installed), and the Report agent computer must have Internet connectivity to be able to send mail.

NOTE:SMTPMailRpt will not send reports to Lotus Notes client because of a limitation with Lotus Notes in displaying the PNG images. For more information, see http://www-1.ibm.com/support/docview.wss?rs=0&q1=1090737&uid=swg21090737&loc=en_US&cs=utf-8&lang=

11.26.1 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

Event Notification

Raise event if SMTP server is not accessible?

Select Yes to raise an event when the SMTP server is not accessible. The default is Yes.

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 SMTP server is not accessible. The default is 35 (magenta event indicator).

Event severity -- Action failure

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the SMTPMailRpt job fails. The default is 5 (red event indicator).

Severity Configuration

Minimum event severity for Action

Set the minimum severity level, from 1 to 40, for an event that triggers this action. The default is 1.

Maximum event severity for Action

Set the maximum severity level, from 1 to 40, for an event that triggers this action. The default is 40.

Action

List of recipient email addresses

Provide the email address of each individual who should receive the report, using the format <recipient>@<domain> (for example, SLAAdmin@netiq.com). Use commas (,) to separate multiple recipient addresses.

NOTE:The following characters are invalid in this parameter:

/ \ [ ] : | = , * ? < >

Sender’s email address

Provide the email address of the person sending the message.

Notes

  • In Microsoft Exchange Server 2007 environments, specify the sender name in SMTP format: <name>@<domain>.

  • The following characters are invalid in this parameter:

    / \ [ ] : | = , * ? < >

SMTP server name

Specify the name of the SMTP mail server used to send mail from the Report agent computer.

SMTP server 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 Yes.

Include JobID?

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

Include agent computer name?

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

Include event severity?

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

Include Knowledge Script name?

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

Include AppManager object name?

Select Yes to include the AppManager resource object name in the standard message (the AppManager resource object where the event was raised). The default is Yes.

Include event detail message?

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

Custom Message Options

Custom message subject

Provide a subject line for the email message. This parameter is optional. If this parameter is not set, the report title is used for the 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)

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 message event

  • $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

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

The following are examples of the types of messages you can construct using these 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!