The Assimilation Project  based on Assimilation version
cma.monitoring.OCFMonitoringRule Class Reference
Inheritance diagram for cma.monitoring.OCFMonitoringRule:
Collaboration diagram for cma.monitoring.OCFMonitoringRule:

Public Member Functions

def __init__ (self, provider, rsctype, triplespec)
def constructaction (self, context)
- Public Member Functions inherited from cma.monitoring.MonitoringRule
def __init__ (self, monitorclass, tuplespec, objclass='service')
def tripletuplecheck (self, triplespec)
def specmatch (self, context)
def constructaction (self, context)

Data Fields

- Data Fields inherited from cma.monitoring.MonitoringRule

Additional Inherited Members

- Static Public Member Functions inherited from cma.monitoring.MonitoringRule
def monobjclass (mtype='service')
def ConstructFromString (s, objclass='service')
def compute_available_agents (context)
def findbestmatch (context, preferlowoverpart=True, objclass='service')
def findallmatches (context, objclass='service')
def ConstructFromFileName (filename)
def load_tree (rootdirname, pattern=r".*\.mrule$", followlinks=False)
- Static Public Attributes inherited from cma.monitoring.MonitoringRule
int NOMATCH = 0
dictionary monitor_objects = {'service': {}, 'host': {}}

Detailed Description

Class for implementing monitoring rules for OCF style init script monitoring
OCF ==  Open Cluster Framework

Definition at line 713 of file

Constructor & Destructor Documentation

def cma.monitoring.OCFMonitoringRule.__init__ (   self,
provider: str
    The OCF provider name for this resource
    This is the directory name this resource is found in
rsctype: str
    The OCF resource type for this resource (service)
    This is the same as the script name for the resource

triplespec: list
    Similar to but wider than the MonitoringRule tuplespec
    (name,  expression, regex,  regexflags(optional))

    'name' is the name of an OCF RA parameter or None or '-'
    'expression' is an expression for computing the value for that name
    'regex' is a regular expression that the value of 'expression' has to match
    'regexflags' is the optional re flages for 'regex'

    If there is no name to go with the tuple, then the name is given as None or '-'
    If there is no regular expression to go with the name, then the expression
and remaining tuple elements are missing.  This can happen if there
is no mechanical way to determine this value from discovery information.
    If there is a name and expression but no regex, the regex is assumed to be '.'

Definition at line 718 of file

Member Function Documentation

def cma.monitoring.OCFMonitoringRule.constructaction (   self,
Construct arguments to give MonitorAction constructor
    We can either return a complete match (HIGHPRIOMATCH)
    or an incomplete match (PARTMATCH) if we can't find
    all the parameter values in the nodes we're given
    We can also return NOMATCH if some things don't match
    at all.

Definition at line 751 of file

References cma.monitoring.MonitoringRule.nvpairs, cma.monitoring.MonitorAction.provider, cma.monitoring.OCFMonitoringRule.provider, and cma.monitoring.OCFMonitoringRule.rsctype.

Field Documentation


Definition at line 744 of file

Referenced by cma.monitoring.OCFMonitoringRule.constructaction().


The documentation for this class was generated from the following file: