Unsolved
This post is more than 5 years old
15 Posts
0
1417
September 12th, 2013 08:00
Remote API for Smarts
Please assist in finding the correct method of remotely setting a notification attribute in SAM 9.0 and SAM 9.2. Java/WebServices/MSA/EDAA/Perl?
Thanks!
No Events found!
choefing
49 Posts
0
September 13th, 2013 00:00
Hi,
I think you want to provide a little more information. AFAIK not all notification attributes can be changed, but I may be wrong.
What I think you mean can be at least 3 things happen.
a) a device sends a notification and and is shown in sm_gui - you want to change an attribute on purpose by invoking a script manually using sm_gui
b) a devicd sends a notification and is shown in sm_gui - you want to have an automated action, maybe retrieve data from a database, and fill the notification automatically
c) a devicd sends a notification and is shown in sm_gui -you want to change an attribute using the dmctl binary
For either a) or b) you Need to write a script and define it in server or automatic Actions in admins sm_gui in the configuration. What Kind of script you want to write is up to you as several ways are possible. You can eitehr use ASL script directly or stock on a scripting/programming language you already know like maybe C or perl.
You can also write a simple shell/batch script invoking the needed dmctl commands.
I personally prefer perl over all others, but thats only a personal thing.
So once you tell what you want to achieve on what way, I'm sure ppl can assist better.
HTH
Christian
choefing
49 Posts
1
September 13th, 2013 05:00
AFAIK each of the API gives you the possibility to open a session to SAM Server.
Which one you use is really up to you.
You just need to start a session, specify (or find) the notification you want to work on, change/set the attribute and invoke the update on that specific notification.
You want to check out API's specific interaction with "NotificationFactory".
ejpren
15 Posts
0
September 13th, 2013 05:00
Thanks choefing, here is a little more information. The project is to integrate Remedy ticketing with the Smarts notifications. The Smarts user, after having identified a ticketable notification, is invoking a right-click tool to run the nco_postmsg.exe program to send the notification identification triplet (Classname, EventName, InstanceName) to the Omnibus system. Impact will find an open ticket, or create a new ticket in Remedy associated with the triplet. The Omnibus/Impact programmers will need to run a remote API method to set the value of the "Ticket ID" attribute of the notification to the TicketID value as determined by Impact.
ejpren
15 Posts
0
September 13th, 2013 06:00
Thanks for letting me know that there is more than one option. Would you consider any one of these methods to be preferred by the developer community, and more likely to be supported and used in the future? I am now looking for the documentation of the syntax and operations of the method(s). I have found no information whatsoever on WebServices, and very little on MSA/EDAA. Perl is an option, but I would need some kind of example to work from, and have found nothing yet. Could you point me to some example code or documentation that would shed light on how to implement one or more of these methods, specifically with SAM 9.0 and SAM 9.2?
choefing
49 Posts
1
September 13th, 2013 07:00
I can't tell what is "best" method, for me mostly perl works, some things are done in ASL.
If you search this forum for "perl notification" you will find lots of snipplets.