Quantcast
Channel: Vivek Agarwal's Portal/Java Blog » HPOpenView
Viewing all articles
Browse latest Browse all 2

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

$
0
0

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! :)



Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images