JBoss ON is unable to use JRuby alert script

Solution Unverified - Updated

Environment

  • Red Hat JBoss Operations Network (ON) 3.3
  • JRuby script (rb) placed in <RHQ_SERVER_HOME>/alert-scripts

Issue

  • Cannot get JRuby CLI scripts to work
  • No output or errors from the JRuby alert script

Resolution

JRuby alert scripts are unsupported and not available for use with JBoss ON.

Root Cause

The JBoss ON servers installation includes a directory named alert-scripts. This directory is intended for JBoss ON command-line interface (CLI) scripts that can be used with the Alert:CLI server plug-in.

This directory also includes a README.txt and example.rb file. Neither of these files should exist. This issue has been captured in This content is not included.Red Hat Bugzilla 1234651 and will be addressed in a future release.

The README.txt and example.rb files come from the upstream Alert:Scriptlang server plug-in. This plug-in is not supported with JBoss ON. Furthermore, the plug-in is not built or included in the upstream RHQ Project. These example files were accidentally included in the core server build.

Diagnostic Steps

  • Add new logger org.rhq.enterprise.server.alert and set it to DEBUG. Then repeat the test and the server.log file will show:

    DEBUG [org.rhq.enterprise.server.alert.AlertManagerBean] (Thread-7 (HornetQ-client-global-threads-679970177)) Matched alert condition log for alertId=10311: org.rhq.core.domain.alert.AlertConditionLog[ id=10321, value=706.0, org.rhq.core.domain.alert.AlertCondition[ id=10051, category=Measurement Value Change, name=Number of management requests per Minute, comparator='null', threshold=null, option=null ] ]
    DEBUG [org.rhq.enterprise.server.alert.engine.jms.AlertConditionConsumerBean] (Thread-7 (HornetQ-client-global-threads-679970177)) Checking for cache reload due to alert firing
    DEBUG [org.rhq.enterprise.server.alert.AlertManagerBean] (Thread-7 (HornetQ-client-global-threads-679970177)) Sending alert notifications for Alert[id=10311]...
    DEBUG [org.rhq.enterprise.server.alert.AlertManagerBean] (Thread-7 (HornetQ-client-global-threads-679970177)) SenderResult{state=FAILURE, summary=null, successMessages=[], failureMessages=[Could not determine the script engine to use based on the script file extension 'rb'. Only the following extensions are currently supported: [py, js]]}
    
SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.