Anonymous_User Absent Member.
Absent Member.
437 views

E-mail Automation Settings


Hello!

I'm trying to make Novell Operation Center send e-mails in response to
critical alarm opened.
I go to Automations property page, select "Critical alarm opened" as
Filter, and "Mail element and alarm information" as Action.
But Automation Description section requires only recipient and sender
e-mail addresses, SMTP server address, and nothing else - no password,
no protocol, etc.
I've read the docs, but I haven't found anything concerning how to
configure the mail server.

What additional actions should I perform to send e-mail notifications
from Novell Operations Center?

Thank you in advance.

Elena


--
SmiLena
------------------------------------------------------------------------
SmiLena's Profile: http://forums.novell.com/member.php?userid=109527
View this thread: http://forums.novell.com/showthread.php?t=448710

Labels (1)
0 Likes
6 Replies
Anonymous_User Absent Member.
Absent Member.

Re: E-mail Automation Settings


Sorry, I don't have a system in front of me for reference, under
<install_directory>database\scripts (under another subdirectory) there
is an example script for sending emails. You may want to review that
script and see what the options are. The sending of an email is very
much a java exercise. Have a look, if you still have questions let me
know.


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: http://forums.novell.com/member.php?userid=56548
View this thread: http://forums.novell.com/showthread.php?t=448710

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: E-mail Automation Settings


Thank you for reply.
I'll study the scripts, and before I start could you please explain how
can I check whether the mail was sent or not?
Is there any automation event history or would it be logged in
formula.trc?


--
SmiLena
------------------------------------------------------------------------
SmiLena's Profile: http://forums.novell.com/member.php?userid=109527
View this thread: http://forums.novell.com/showthread.php?t=448710

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: E-mail Automation Settings


You can do a couple things...

a) Right-click on Enterprise\Administration\Automation, choose
properties, then the Audit tab. You can turn on auditing.

b) Add additional logging (formula.log.info() ) to your automation
script

c) Check return codes from java methods and log good and/or bad
results.

Sending an email is purely a java exercise. The only thing NOC related
is accessing details about the element and/or alarm, from there it is a
java exercise to send the email.


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: http://forums.novell.com/member.php?userid=56548
View this thread: http://forums.novell.com/showthread.php?t=448710

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: E-mail Automation Settings


Well, I've tried to send a test message using the script below

Code:
--------------------

// Load the mail library.
load( "mail/maillib" )

// The test main routine to send a mail message
function main()
{
// Set this for debugging; not in an applet!
var embedded = 0

// Make the message object
var msg = new Message()
if( this.debug )
{
writeln( "Script.mail(): debug is on" )
msg.debug = true
}
writeln( "Script.mail(): sending email message" )
msg.setSubject( "In Managed objects mail message" )
writeln( "Script.mail(): setting server" )
msg.setServer( "M1.catest.local" )
writeln( "Script.mail(): setting sender" )
msg.setSender( "monitoring@catest.local", "Monitoring" )
writeln( "Script.mail(): setting recipient" )
msg.addRecipient( "servicedesk@catest.local", "ServiceDesk" )
writeln( "Script.mail(): setting body" )
msg.setBody( "A message from Managed Objects follows" )
writeln( "Script.mail(): sending" )
msg.send()
writeln( "Script.mail(): the end" )

}
main ()

--------------------


The script is quite simple, but I got an error message related to
maillib.fs
It seems like getDefaultInstance method is wrong. Should I modify
maillib.fs ? Or maybe my initial script is wrong?


Code:
--------------------
js> Script.mail(): sending email message
Script.mail(): setting server
Script.mail(): setting sender
Script.mail(): setting recipient
Script.mail(): setting body
Script.mail(): sending
TypeError: [JavaPackage javax.mail.Session.getDefaultInstance] is not a function. (scripts/mail/maillib.fs; line 86)
at org.mozilla.javascript.NativeGlobal.constructError(Unknown Source)
at org.mozilla.javascript.NativeGlobal.constructError(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedScript.call(Unknown Source)
at org.mozilla.javascript.InterpretedScript.exec(Unknown Source)
at com.mosol.Formula.Script.ScriptEcmaScript.eval(ScriptEcmaScript.java:657)
at com.mosol.Formula.Script.ScriptEngine.eval(ScriptEngine.java:226)
at com.mosol.Formula.Client.engine.ScriptEngineUI.eval(ScriptEngineUI.java:76)
at com.mosol.Formula.Client.ui.Automation.DefinitionScriptsPanel.ConsoleButton_actionPerformed(DefinitionScriptsPanel.java:679)
at com.mosol.Formula.Client.ui.Automation.DefinitionScriptsPanel$4.actionPerformed(DefinitionScriptsPanel.java:188)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

--------------------


--
SmiLena
------------------------------------------------------------------------
SmiLena's Profile: http://forums.novell.com/member.php?userid=109527
View this thread: http://forums.novell.com/showthread.php?t=448710

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: E-mail Automation Settings


Solution was found here
http://www.novell.com/support/viewContent.do?externalId=7008211&sliceId=1


--
SmiLena
------------------------------------------------------------------------
SmiLena's Profile: http://forums.novell.com/member.php?userid=109527
View this thread: http://forums.novell.com/showthread.php?t=448710

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: E-mail Automation Settings


That's great, it makes sense why it wasn't working.


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: http://forums.novell.com/member.php?userid=56548
View this thread: http://forums.novell.com/showthread.php?t=448710

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.