Server Management - Systems Insight Manager
1747983 Members
4690 Online
108756 Solutions
New Discussion юеВ

HELP:SIM e-mail subject line IS NOT configurable

 

HELP:SIM e-mail subject line IS NOT configurable

Does anyone know of a workaround to the e-mail feature in SIM that will allow me to only place static text in the subject line? I configured the e-mail settings to place a pager number in the subject line, but, when the event fires, it adds DEVICE NAME:ERRORTEXT: then the pager ID. This will not work with our current configuration.

I tried writing a custom command, but, I cannot figure out how to place the environmental variables in my ini file that I wrote to send an e=mail. Any thoughts?
8 REPLIES 8

Re: HELP:SIM e-mail subject line IS NOT configurable

This one I'll keep open and hope someone reads it and has some usefule suggestions. I am at my wit's end with the e-mail notification feature and could really use a little feedback on what I could do to have a STATIC subject line in SIM...
David Claypool
Honored Contributor

Re: HELP:SIM e-mail subject line IS NOT configurable

William, it would be helpful if you posted information on the email utility you're trying to use, the command line you configured in HP SIM custom commands and the .ini file you speak about...

Re: HELP:SIM e-mail subject line IS NOT configurable

The e-mail "utility" is the SMTP feature that comes with SIM. The steps I am using are outlined below (pasted directly from the SIM help menu). My problem stems from the fact that the SUBJECT Line is only partially configurable. It prepend's a summary of the error into the subject line. This makes the e-mail subject line configuration useless for forwarding to a static pager number.

Steps I have taken are listed below
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Select Options>Events>Automatic Event Handling>New Task. The Automatic Event Handling - New Task page appears.

Select either with event and system attributes that I will specify now or with an existing event collection. Follow the steps to create the task.

In the Task name field, enter a name for the task, such as Important Events for e-mail-Pager Task.

Click [Next]. The Select events section appears. Refer to Searching for Systems and Events - Performing an Advanced Search for Events for more information on selecting event criteria.

If a new event collection is to be created, then in the first selection box (criteria selection), select severity. Otherwise, a list of all event collections is displayed.

In the second selection box (comparison selection), select is.

In the third selection box (value selection), select Critical.

Click [Add] to add the Major and Minor severities to the task.

Repeat steps 5 through 6, and in the third selection box, select Major and Minor.

Click [Next]. The Select systems section appears. For more information on selecting system criteria, refer to Searching for Systems and Events - Performing an Advanced Search for Systems.

In the first selection box (criteria selection), select system name.

In the second selection box (comparison selection), select is.

In the third selection box (value selection), select (any).

Click [Next]. The Select actions section appears.

Select Send e-mail.

In the To address field, enter the e-mail address to which you want the notification sent (multiple addresses can be added so that a group is notified). A CC address can also be added so that a manager or supervisor is also notified.

In the Subject field, enter your subject, for example, HP Systems Insight Manager Events.

In the Message Format section, change the option to Pager/SMS. This option sends a condensed e-mail format that is similar to a Paging Task in HP Systems Insight Manager, which is the ideal way to send alerts to a BlackBerry or cellphone type of hardware (or when TAPI is not available and an e-mail-to-paging provider is being used).

Click [Next]. The Select time filter section appears.

Select Use time filter and select Nights and Weekends, unless you want to receive the e-mail 24 hours per day. If so, clear Use time filter. Refer to Managing with Tasks - Applying a Time Filter for more information on time filters.

Click [Next]. The Review summary appears.

Click [Previous] if you must make changes, or click [Finish] to save the task.

JohnE_2
New Member

Re: HELP:SIM e-mail subject line IS NOT configurable

If you need to totally custom make the message and you have a command line email util, such as postie or some vb script, use a .cmd custom command. The .cmd will have access to all the environment variables created by SIM. To see what these are create the command file and use the SET>cmd.log command to see which ones you need. Then you can alter the command file with the correct pager number and message that you need to send from the command file.

Hope this helps.
David Claypool
Honored Contributor

Re: HELP:SIM e-mail subject line IS NOT configurable

From the way your message was worded I thought you already were using a custom command. The short answer is that the mail is not configurable and the workaround is to use a custom command and a command line email utility. Here is an example of one posted by another user: http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=928452&admit=-682735245+1130781293678+28353475

Re: HELP:SIM e-mail subject line IS NOT configurable

So I need to learn how to write script and figure out how SIM will pass this information to an executable instead of just using the e-mail interface that SIM has provided.

Anyone have some sample code that I can figure out? I read the link to the other workaround, but, I don't know what blat means

Re: HELP:SIM e-mail subject line IS NOT configurable

The custom command solution is kludgey and does not really address my problem. When I am in the Automatic Event Handling - Manage Tasks section of SIM, there is a checkbox that states "e-mail" then I configure e-mail options. One of the "configurable" options is the subject line. However, when I enter the subject line that I want to appear, SIM e-mails it out differently. I want ALL e-mails to have a pager ID number only (ID#49541 for the moment): Below is a resulting example:

bhsexc4: Rising Threshold Passed (10005): 49541

I only wanted the last part on the subject line. Is this an undocumented feature or is there a fix?
Rob Buxton
Honored Contributor

Re: HELP:SIM e-mail subject line IS NOT configurable

To edit the subject line you'll need to learn some scripting.
It's worth the effort as you can use the skills in other places.
I use perl, but you can select any number of other options.
I also use the e-mail utility called blat to send e-mails. Again it's configurable, you'll need to download, install and configure it on the target machine. It's a simple command line SMTP mailer that works very well.

HPSIM passes a wide variety of variables to any custom command. You can use these variables to tailor your message.
An idea of perl doing this and using the blat utility would be:
Items like $DEVICENAME are variables passed by HPSIM.

#-----------------------------
use Env;

$Outfile = $DEVICENAME."mailfile.tmp";
open MAILTMP, ">$Outfile";

# Format the Mail Message
print MAILTMP <Computer: $DEVICENAME
Problemdesc:$NOTICEPLAINTEXT
MAILEND0
close MAILTMP;
system "blat $Outfile -to \"Rob\@myco.co.nz\" -subject \"Server Outage Detected - $DEVICENAME\" ";
}

unlink $Outfile;
unlink mailfile1.tmp;
exit;