Anonymous_User Absent Member.
Absent Member.
1601 views

How to script "Add AppManager Comments" for an alarm


I want to be able to update the "AppManager Comments" field on an alarm
from an automation script. From the debugger, it is the "alarm.Comment"
variable. Just using the line alarm.Comment = 'test' returns the error
"Could not modify alarm: TypeError: Cannot convert null to an object."
This works fine if you use the right-click tool, "Add AppManager
comment...", but I need to be able to do this from an automation.

This is the code I'm using (pretty much straight out of the Scripting
Guide):

try
{

alarm.Comment = 'test'

}

catch( Exception )
{
formula.log.warn( 'Could not modify alarm: ' + Exception )
}


--
csssl
------------------------------------------------------------------------
csssl's Profile: https://forums.netiq.com/member.php?userid=6773
View this thread: https://forums.netiq.com/showthread.php?t=53266

Labels (1)
0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

Re: How to script "Add AppManager Comments" for an alarm


Pretty sure there are element comments and there are appmanager
comments. What you found in the debugger might be the standard out of
the box element comments that NOC does. IE: if you get it to work it
may not do what you want, such as... update AppManager. Also, there
may be a specific order of function/method calls that you need to do to
make either of them to work. I suggest opening an SR and asking
support for the function calls to add an app manager comment.
Potentially you might be able to issue a perform() and pass the comment
as a parm, but again, support would know better.


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: https://forums.netiq.com/member.php?userid=1851
View this thread: https://forums.netiq.com/showthread.php?t=53266

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.