public interface SLARuleInterface extends PluginCommon
All implementations should be stateless
PCS
,
SLARuleGeneric
,
org.miloss.fgsms.services.interfaces.policyconfiguration.SLAActionGeneric
,
NonTransactionalSLAProcessor
,
RuleBaseType
,
Utility
,
AuditLogger
,
DBSettingsLoader
,
SLACommon
,
SetServicePolicyRequestMsg
,
ServicePolicy
,
SLA
Modifier and Type | Field and Description |
---|---|
static String |
ENCRYPTED_MASK |
static String |
UNDEFINED_VALUE |
Modifier and Type | Method and Description |
---|---|
boolean |
CheckNonTransactionalRule(ServicePolicy pol,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg,
boolean pooled)
Returns True is the rule's conditions have been met (SLA
Violation).
|
boolean |
CheckTransactionalRule(AddDataRequestMsg req,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation) Web
Service Transaction performance data This function should never throw an
exception
|
boolean |
CheckTransactionalRule(MachinePerformanceData req,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation)
Machine Performance data This function should never throw an exception
|
boolean |
CheckTransactionalRule(ProcessPerformanceData req,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation)
Process Performance data This function should never throw an exception
|
boolean |
CheckTransactionalRule(SetStatusRequestMsg req,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation) This
represents when a Status message comes in to the status service, such as
from an OS agent.
|
boolean |
CheckTransactionalRule(String url,
List<BrokerData> data,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation)
Statistical Message Broker data This function should never throw an
exception
|
String |
GetHtmlFormattedDisplay(List<NameValuePair> params)
returns a html encoded string contain usually the rule name plus the configured values.
|
AlertType |
GetType()
If the rule is triggered, this defines what type of rule this is.
|
boolean |
ValidateConfiguration(List<NameValuePair> params,
AtomicReference<String> outError,
ServicePolicy policy)
Validates the configuration settings.
|
GetAppliesTo, GetDisplayName, GetHtmlFormattedHelp, GetOptionalParameters, GetRequiredParameters
static final String ENCRYPTED_MASK
static final String UNDEFINED_VALUE
boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
req
- Set Status messageparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredboolean CheckTransactionalRule(ProcessPerformanceData req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
req
- process performance dataparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredboolean CheckTransactionalRule(MachinePerformanceData req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
req
- machine performance dataparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredboolean CheckTransactionalRule(AddDataRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
req
- web service transaction dataparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredboolean CheckTransactionalRule(String url, List<BrokerData> data, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
url
- The url of the broker in questiondata
- BrokerData, generally a list of queue, topics and their
associated metricsparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredboolean CheckNonTransactionalRule(ServicePolicy pol, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg, boolean pooled)
This is used for non transactional rules. Implementors should access the database and perform whatever calculations are required in order to determine if the rule's conditions are met or not.
This function should never throw an exception.
The calling function is typically the NonTransactionalSLAProcessor which operates on a set schedule that can be adjusted by administrators. It operates using the Quarts schedulers
Since no data is provided, an implementor is expected to access data on their own. To access global settings
Connection con =null; if (pooled) con= Utility.GetPerformanceDBConnection(); else con = Utility.GetPerformanceDB_NONPOOLED_Connection(); //or use Utility.ConfigurationDBConnection(); for the configuration database try { // do something } catch (Exception ex) { // log some message } finally { if (con != null) { try { con.close(); } catch (Exception e) { } } }
pol
- This is a reference the service policy that this rule is
attached to. Do not modify, unexpected results may occurparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredpooled
- Indicates the usage of pooled database connections or notNonTransactionalSLAProcessor
,
RuleBaseType
,
Utility
,
AuditLogger
,
DBSettingsLoader
,
SLACommon
,
SetServicePolicyRequestMsg
,
ServicePolicy
,
SLA
boolean ValidateConfiguration(List<NameValuePair> params, AtomicReference<String> outError, ServicePolicy policy)
params
- parameters for this instance for a SLARule for validationoutError
- human readable error message representing whatever the problem areas arepolicy
- a reference to the proposed service policyAlertType GetType()
String GetHtmlFormattedDisplay(List<NameValuePair> params)
params
- StringEscapeUtils, Utility
Copyright © 2008–2017 MIL-OSS. All rights reserved.