IxoraRMS allows the user to create complex rules to trigger reactions such as visual alerts, emails or the execution of custom jobs. Note that a data view does not have to be plotted in order for its reaction to be triggered as long as it is enabled. All reaction events will be stored in the "Reaction Log" but if the data view is also plotted any reaction event will be reflected on the control itself as shown in the figure below.
Reactions can be disabled from the "Actions\Disable Reactions" menu.
Reactions can be defined inside the definition of a data view between the query tags. When editing the data view click on the 'Insert Reaction' button to open the reaction editor which will create the XML text for the reaction's definition.
java.lang.String
. If this reaction triggers an advice than this message will be available in the "Reaction Log" under the "Advice" tab.As you noticed for the previous example in the java code you have available an environment parameter called 'env' which exposes the following methods:
/**
* @return the timestamp when the reaction was armed for the first time
*/
long getArmedTime();
/**
* @return the number of seconds since the reaction was armed
*/
long getSecondsSinceArmed();
/**
* @return the number of times the reaction was armed.
*/
long getArmedCount();
/**
* @return the number of times the reaction was fired.
*/
long getFiredCount();
/**
* @return the timestamp when the reaction was last armed
*/
long getLastArmedTime();
/**
* @return the number of seconds since the reaction was last armed
*/
long getSecondsSinceLastArmed();
/**
* @param id
* @return the translated path of the resource path with the given id
*/
String getPath(String id);
/**
* @param id
* @return the name of the host for the resource with the specified id
*/
String getHost(String id);
/**
* @param id
* @return the name of the agent for the resource with the specified id
*/
String getAgent(String id);
/**
* @param id
* @return the name of the part <code>i</code> of the entity for the resource with the specified id
*/
String getEntityPart(String id, int i);
/**
* @param id
* @return the translated path of the entity for the resource with the specified id
*/
String getEntityPath(String id);
/**
* @param id
* @return the translated name of the counter for the resource with the specified id
*/
String getCounter(String id);
/**
* Invoked by code fragments to send email.
*/
void email();
/**
* Invoked by code fragment to run jobs.
* @param jobLibraryId
*/
void job(String jobLibraryId);
/**
* Writes the given message to the application's log.
* @param logMsg
*/
void log(String logMsg);
/**
* Store a custom object for later retrieval.
* @param key
* @param obj
*/
void put(String key, Serializable obj);
/**
* Retrieves an object that was previously stored with <code>put(String, Serializable)</code>.
* @param key
* @return
*/
Serializable get(String key);
All reactions events (armed, fired, disarmed) that occured during the current monitoring session are available in the Reaction Log dialog which is accesibe during a monitoring session from the 'View/Reaction Log' menu.
The rection cool down period is the amount of time in seconds that a reaction is disabled after it was fired. This is useful to avoid triggering multiple reactions during a realtively short period of unusual activity. This value can be configured from the 'Configuration/Settings' menu.