Bug 534869 (RHQ-1623) - Add possibility to execute a script as a reaction to an alert.
Summary: Add possibility to execute a script as a reaction to an alert.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-1623
Product: RHQ Project
Classification: Other
Component: Alerts
Version: unspecified
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Heiko W. Rupp
QA Contact: Sudhir D
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On: RHQ-2045 RHQ-585
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-20 20:37 UTC by Joao Paulo Viragine
Modified: 2010-08-12 16:48 UTC (History)
5 users (show)

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-12 16:48:58 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 535339 0 high CLOSED Allow to execute an arbitrary resource action when an alert fires 2021-02-22 00:41:40 UTC

Description Joao Paulo Viragine 2009-02-20 20:37:00 UTC
Add possibility to execute a script as a reaction to an alert. 
Currently, we only have the choice to execute an operation as a reaction to an alert.

Comment 1 Heiko W. Rupp 2009-02-22 16:50:15 UTC
We are planning for the future to execute operations on 'arbitrary' resources - which could also be script resources. Would this be what you are proposing?

Comment 2 Joao Paulo Viragine 2009-02-22 19:15:37 UTC
Currently, we only have the choice to execute a *predefined* operation as a reaction to an alert.
I think that execute a script would be a very flexible choice, besides the *predefined* operations (Control type)  .

For example:

The only options available as a "reaction" to an alert for resource type JBoss AS are:

Control type:
none
Restart
Shutdown
Start

Execute a script would be a useful choice.

Thus, besides executes the operations (Restart, Shutdown, Start) we have a choice to execute a script.





Comment 3 Udaypal Aarkoti 2009-09-24 17:58:33 UTC
There will always be some unorthodox processes in every enterprise and its hard to cover every use case and that's where executing an arbitrary script will come in handy. The use case that was presented is quite normal where on an alert user wants to execute a script. That way if an enterprise has invested significant amount of time building scripts to handle certain use cases we will allow them to reuse them.

It also becomes an extension point.

Comment 4 Red Hat Bugzilla 2009-11-10 20:36:56 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1623


Comment 5 Heiko W. Rupp 2010-02-24 09:36:46 UTC
I am currently working on this in the form of the alert-operations notifications sender.

Comment 6 Heiko W. Rupp 2010-04-14 14:51:37 UTC
This is included in https://bugzilla.redhat.com/show_bug.cgi?id=535339

Comment 7 Sudhir D 2010-05-21 08:02:51 UTC
This can be achieved now, by script execution for a relative resource type. 

1.Browse through to the JBoss AS Server
2.Create a new alert definition with condition when JVM Free mem reaches
critical value.
3.Click on Edit for the Alert Notification.
4.On the Alert notification page, click on Add New. Select the Alert sender
type as Resource Operations.
5.Select the resource selection mode as Relative Resource. 
6.Click Save
7.Select Start search from as "JBoss AS Server"
8.Click Save.
9.Select Then Filter by as "Script"
10.Provide the restart script name. (Ensure that this script is under
~/jbossas/bin directory.)
11.Select operation name as "Execute Script"
12.Click Save.

Marking this bug as verified.

Comment 8 Corey Welton 2010-08-12 16:48:58 UTC
Mass-closure of verified bugs against JON.


Note You need to log in before you can comment on or make changes to this bug.