Highlighted
Absent Member.
Absent Member.
518 views

Access database table (read, write) in Sentinel Action


I am currently finding a way to query the contact list, which is stored
in our self maintaining database table (PostgreSQL) when triggering the
Sentinel Action. Is it possible to connect to our database inside the
Sentinel Action plug-in (the javascript files)?

And i read from the document that (http://tinyurl.com/hxl89ok) , we can
import our own JAR file for Collector plugin, is it possible to do the
same in Sentinel Action plugin? and how exactly can we import the JAR
file? I tried to find any documents for importing own JAR files, but i
couldnt find a way to do that yet, have any of you tried that before?

Any help is appreciated.

Thanks


--
hang
------------------------------------------------------------------------
hang's Profile: https://forums.netiq.com/member.php?userid=9460
View this thread: https://forums.netiq.com/showthread.php?t=56119

0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

hang;2432535 wrote:
I am currently finding a way to query the contact list, which is stored
in our self maintaining database table (PostgreSQL) when triggering the
Sentinel Action. Is it possible to connect to our database inside the
Sentinel Action plug-in (the javascript files)?

And i read from the document that (http://tinyurl.com/hxl89ok) , we can
import our own JAR file for Collector plugin, is it possible to do the
same in Sentinel Action plugin? and how exactly can we import the JAR
file? I tried to find any documents for importing own JAR files, but i
couldnt find a way to do that yet, have any of you tried that before?

Any help is appreciated.

Thanks


--
hang
------------------------------------------------------------------------
hang's Profile: https://forums.netiq.com/member.php?userid=9460
View this thread: https://forums.netiq.com/showthread.php?t=56119


Currently actions do not have a mechanism to load java classes not already in the classpath - and do not support the ability to package actions in that have external jars (will not be added to the classpath). However, since Sentinel uses an internal Postgres database, it's technically possible to leverage that. Be EXTREMELY careful if you choose to do so; give the rate actions often run at, if you are careless in clearing up resources when the action completes, it will be very easy to run Sentinel out of memory since the actions run in-process.
0 Likes
Highlighted
Absent Member.
Absent Member.

brandon.langley;2433077 wrote:
Currently actions do not have a mechanism to load java classes not already in the classpath - and do not support the ability to package actions in that have external jars (will not be added to the classpath). However, since Sentinel uses an internal Postgres database, it's technically possible to leverage that. Be EXTREMELY careful if you choose to do so; give the rate actions often run at, if you are careless in clearing up resources when the action completes, it will be very easy to run Sentinel out of memory since the actions run in-process.


One slightly safer approach would be to leverage the action to run a shell command on-disk and capture the output. You can see this technique in action in both the Execute a Command action as well as the various feeds (which under the covers are just actions)
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.