Created attachment 522152 [details] CLIAlert script Description of problem: silent failure on CLI scripted alert with error Steps to Reproduce: 1. http://metlos.wordpress.com/2011/03/08/scripted-alert-notifications-in-rhq/ 2. (see attachment) 3. Actual results: 1) errors in server log, attached 2) silent failure, no information on the alert history notification tab that the notification had an error in it Expected results: some information on the alert history notification tab that the notification had an error in it Additional info: the CLI script (attached) has an error in it, as follows: java.lang.Runtime.getRuntime().exec('/somewhere/on/the/server/restart-database.sh')
Created attachment 522153 [details] server log
I could not reproduce this. The system seems to behave as expected to me. For reference, here's what I did: 1) Created a Repository "test" 2) Went to a platform, created alert on the change of "Free Memory" metric, created a CLI Script notification and uploaded the script to the test repo. 3) Saved the alert definition 4) waited for an alert to fire 5) Double clicked on the entry in the alert history Here's what the notification subtab of the history entry shows: Sender: CLI Script Status: x Message: Ran script bz-736762.js in version rhqadmin:1.0 from repo test as user rhqadmin. javax.script.ScriptException:sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "MeasumentDefinitionManager" is not defined. (#19) in at line number 19 in script bz-736762.js (rhqadmin:1.0) in repo test at line number 19