Vivek Agarwal’s Portal/Java Blog

An IBM Gold Consultant’s weblog about IBM, Lotus, WebSphere, J2EE, IT Processes, and other IT technologies

HP OpenView Operations Basic Tutorial: Working around an issue with the “Send Email” sample policy

Posted by Vivek Agarwal on December 6, 2007


Recently I started to delve into HP OpenView Operations for Windows (OVOW) policy management from the perspective of learning how to build custom policies and determining what standard policies to apply on some WebSphere Portal related servers that I needed monitored. I skimmed through the OVO Basic Tutorial and tried to actually perform step 10 of the tutorial around creating a custom policy and step 11 around deploying a standard policy. Creating the custom policy (NotepadTest) from the tutorial was a piece of cake – 10 minutes. However getting the standard “email notification” policy to work was not so straightforward!

I followed the instructions in the tutorial to the “T” using the FwdMsgAsEmail policy as the basis, but to no avail – no email notifications. Instead, I had a critical error message – Failed to forward message as e-mail: ‘1 processes “notepad.exe” with parameter “” are running. Expected: 0 process.’ Looking at the 2 annotations on the message, I saw this –

Annotation 1:

automatic action started.
Operator : SYSTEM

Node : kingfisher-ovow.ausnq.com
Action : cscript.exe "%OvInstallDir%\bin\FwdMsgAsEMail.vbs" -MsgId 71009140-9ea4-71dc-0efe-0a0a0a850000 -to "my_email_address@xtivia.com" -from "ovow@xtivia.com" -mailsrv "mailserver" -name "HP OpenView Operations"

Annotation 2:

automatic action failed.
Result : -1

Output :

Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
STDERR: Invalid argument 'Files\HP'.

On looking through the HP forums I found that there were others who had run into the same issue, but no obvious solutions. Based on the error message, it appears to me the result of a fatal flaw in Windows installs where you accept default paths that contain spaces (C:\Program Files\HP OpenView). I suspect that if you ran this tutorial with OVOW installed in a path without spaces, you would not encounter the issue. In my case, I just plowed right ahead with the existing install. Once I figured out the command that was being run to send out the script (shown in annotation 1), it was a simple matter to open FwdMsgAsEMail.vbs and see that it was trying to use OvEpMail.exe to send the email. I played with it for a bit and quickly replaced OvEpMail.exe with Blat and ran into a similar issue. Tracked that down to the email subject and was able to get the email notifications to work with a hard-coded subject of “test subject”.

Essentially I replace the following section in FwdMsgAsEMail.vbs

If IsEmpty(MailSrv) Then
Command = "OvEpMail.exe -to " & Recipient & " -from " & Sender & _
" -subject """ & Subj & """ -file """ & TmpFilename & """" & _
" -format convert -name """ & DispName & """"
Else
Command = "OvEpMail.exe -to " & Recipient & " -from " & Sender & _
" -mailsrv " & MailSrv & _
" -subject """ & Subj & """ -file """ & TmpFilename & """" & _
" -format convert -name """ & DispName & """"
End If

with

If IsEmpty(MailSrv) Then
Command = "blat.exe -to " & Recipient & " -f " & Sender & _
" -server localhost" & _
" -subject """ & Subj & """ """ & TmpFilename & """"
Else
Command = "blat.exe -log c:\temp\blat.log -to " & Recipient & " -f " & Sender & _
" -server " & MailSrv & _
" -subject """ & "test subject" & """ -bodyF """ & TmpFilename & """"
End If

Obviously, in retrospect, I could have gotten OvEpMail.exe to work as well and I am sure a production version of this policy would need to have a more useful subject, but if you like me, run into this issue while simply trying to make the basic OVOW tutorial work, then you could use the workaround that I did! 🙂

Advertisements

7 Responses to “HP OpenView Operations Basic Tutorial: Working around an issue with the “Send Email” sample policy”

  1. Vivek Agarwal said

    I should clarify that I did not search hard enough on the forums – there are threads that do specify the root cause being that OvEpMail does not handle double quotes in messages correctly. Also people have suggested using blat and CDOSEND (from ovinternals.com) as alternatives to OvEpMail or alternately there is a patch available from HP support for this issue. The forum link that I hit late last night with useful information was http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=986563&admit=109447627+1197034693320+28353475.

  2. soona said

    Hello,, The tutorial was usefulll..

    thanks!!

    You can find some more valuble information in http://www.hpovo.com/

    Hope you like this..

  3. Tech Question:
    Q

  4. Internetradiosender…

    […]HP OpenView Operations Basic Tutorial: Working around an issue with the “Send Email” sample policy « Vivek Agarwal’s Portal/Java Blog[…]…

  5. everything about java…

    […]HP OpenView Operations Basic Tutorial: Working around an issue with the “Send Email” sample policy « Vivek Agarwal’s Portal/Java Blog[…]…

  6. roulette casino gambling betting…

    […]HP OpenView Operations Basic Tutorial: Working around an issue with the “Send Email” sample policy « Vivek Agarwal’s Portal/Java Blog[…]…

  7. These are in fact impressive ideas in on the topic of blogging.

    You have touched some fastidious factors here. Any way keep up wrinting.

Sorry, the comment form is closed at this time.

 
%d bloggers like this: