The data flux between MonALISA Service and clients is
encapsulated (more or less) in the following objects:
1.1.
lia.Monitor.monitor.Result
This is the base class for numeric monitoring values.
For generic monitoring values Section 1.2,
“ lia.Monitor.monitor.eResult
” class should be used. Inside MonALISA
framework all the monitoring values are identified by
the tupple (FarmName,
ClusterName, NodeName, ParamName) and the time The relationship between
FarmName and ClusterName is "1-to-many", as it is
for the relation between ClusterName and NodeName This will map any Result to the following
structure
Every NodeName can have
one or more parameters. The array param_name[] stores the parameter
names which should be mapped 1-to-1 to param[] values. The Result data object structure is:
public String NodeName;
public String ClusterName;
public String FarmName;
public String[] param_name;
public long time;
public double[] param;
The array param_name has
the same length as param;
the first one contains the name of params for which
values are in param[]. The
mapping is one to one.
The values stored in param MUST implement java.io.Serializable
This class is also used to dynamically remove
Clusters, Nodes and Parameters from internal
configuration using the following algorithm:
if (NodeName == null) then
remove ClusterName;
else if (param == null || this.param_name == null)
remove NodeName;
else
for index in [0 ... param_name.length-1]
if ( param[i] == null )
remove param_name[i];
This can be used by the monitoring modules to notify
the data collector that the configuration exported by
the module has been changed.
1.3. lia.Monitor.monitor.Gresult
This class is used to aggregate some online
informations on Cluster basis. To have a general
overview over a Cluster (e.g. Load5) ypu can divide
Nodes (number of active nodes) in nbin interval (e.g
nbin=5 for nodes between 0-0.25, 0.25-0.5, 0.5-0.75,
0.75-1.0, and over 1.0) and use hist[] to express how
many of nodes belong to each interval. TotalNodes can
express Nodes + Dead Nodes. Module should store the
name of the param for which this Gresult was
calculated. The Gresult
data object struncture is:
public long time;
public String ClusterName;
public String FarmName;
public String Module;
public int TotalNodes ;
public int Nodes ;
public double mean;
public double max ;
public double min;
public double sum ;
public int nbin ;
public int[] hist ;
2. Data
Query/Filtering
2.1. lia.Monitor.monitor.monPredicate
Defines a Predicate to select data from the input
stream and from the DB. The monPredicate class provides basic
filtering functionality for data.
An object of this type implements java.io.Serializable because it is
send using RMI or another protocol (i.e. WSDL) to a
lia.Monitor.monitor.DataStore.
2.1.1. Synopsis
public class monPredicateimplements Serializable {
// Public Fieldspublic String Cluster ; public String Farm ; public String Node ; public boolean bLastVals ; public String[] constraints ; public int id ; public String[] parameters ; public long tmax ; public long tmin ;
// Public Constructorspublic monPredicate(); public monPredicate(java.lang.String farm, java.lang.String cluster, java.lang.String node, long tmin, long tmax, java.lang.String[] parameters, java.lang.String[] constraints);
// Public Methodspublic String toString();
}
public monPredicate(java.lang.String farm, java.lang.String cluster, java.lang.String node, long tmin, long tmax, java.lang.String[] parameters, java.lang.String[] constraints);
Parameters
farm
The name of the farm.
cluster
The name of the cluster.
node
The name of the node.
tmin
Starting time (in milliseconds). It can be
positive or negative.
tmax
Ending time (in milliseconds). It can be
positive or negative.
parameters
Names of the functions(module parameters)
that are filtered. Same names as from lia.Monitor.monitor.ModuleInfo.ResTypes
.
constrains
constrains that this monPredicate provides.
It initializes a monPredicate. The parameters are
used for filtering the data.
2.1.4. bLastVals
public boolean bLastVals ;
Since
ML 1.5.0
Should be a RT predicate ... will try to get ONLY
the lastValue from Cache
2.1.5. Cluster
public String Cluster ;
It should be the name of the Cluster. It can be an
regular expression.
Provides basic constraints for functions passed in
parameters. It can be
null.
If parameters is
null it is ignored.
Basic logical operations like AND, OR
are supported for the Filtering constraints.
constraints can be
basically of two types:
Filtering
constraints
Logical constraints for the corresponding
column in parameters
Grouping
Functions
AVG , MIN and MAX are supported until now.
It can be only one function.
There can be either a Grouping Function either a
Filtering
Constraint.If an element in theconstraints starts with a:
Grouping
Function like AVG, MIN, MAX this must be the only
function (you cannot have another Grouping Function or
Filtering
Constraint applied to the
corresponding parameter)
Filtering
Constraint (>,<,=) than
you can specify either float values, either
Grouping
Function for the right operand.
Only the right
operand can be specified! The
left is assumed to be the corresponding
function in parameters. There can be more
than one Filtering
constrains separated by logical
operators like AND
or OR(and and or will also work). A
recursive "definition" for Filtering Constraint
will be:
Filters values greater than 2.3 and less
than 2.5 and greater than average(Grouping
FunctionAVG is used) value for the
corresponding function in parameters
Grouping
Functions
AVG -
calculates the average value for the
corresponding function in parameters
MIN -
calculates the minimum for the corresponding
function in parameters
MAX -
calculates the maximum for the corresponding
function in parameters
The Grouping
Function are calculated between tmin and tmax
2.1.7. Farm
public String Farm ;
It should be the name of the Farm. It can be an
regular expression.
2.1.8. id
public int id ;
The id for this monPredicate. It should be
unique for a couple (Client, monPredicate). It is assigned by the
Client.
2.1.9. Node
public String Node ;
It should be the name of the Node. It can be an
regular expression.
This vector stores names of the functions for
basic filtering. If this parameter is null it is ignored and also constraints parameter from
monPredicate.
The names must be the same as the ones found in
lia.Monitor.monitor.MonModuleInfo.ResTypes
tmin > 0 is
used to express an absolute time in
milliseconds since January 1, 1970, 00:00:00
GMT. Possible values for tmax are:
If tmax
> 0 then it means that this monPredicate is
used to filter some stored values between
two given absolute times [tmin, tmax]. The values are
considered to be DataStore times. The
Result is
sent to the Client only once.
If tmax =
0 then it means that this monPredicate is used to
filter some stored values between tmin and the local time
on DataStore(present time). The Result is
sent to the Client only once.
If tmax
< 0 then it means that this monPredicate is
used to filter some stored values between
tmin and the local
time on DataStore. The difference between
this case and the previous one is that
the DataStore must provide filtered data
based on this monPredicate to the
Clientperiodically.
tmin < 0
represents an relative time to the local time
on the DataStore
where this monPredicate is used to filter
data. Possible values for tmax are:
If tmax =
0 then it means that this monPredicate is used to
filter some stored values between local
time - tmin and the
local time([-tmin, 0]) on DataStore (0 is
the present time on DataStore). The
Result is sent to the Client only
once.
If tmax
< 0 is the same case as previous.
The difference between this case and the
previous one is that the DataStore must provide
filtered data based on this monPredicate to the
Clientperiodically.
tmin = 0. monPredicate does no
time filtering on DataStore. In this case the
Filtering
constraints from constraints are applied
only on received data, but the Grouping Functions
applies to the entire set of
data.
If tmax =
0 the Result
is sent to the Client only once.
If tmax
< 0 the Result is sent to the
Clientperiodically.
The Grouping
Functions applies to entire set of data
on DataStore only when
tmin = 0 and tmax = 0, in all other cases
are applied on the specified time interval.