MonitoringClient

This is the client of the Monitoring service based on Elasticsearch.

class DIRAC.MonitoringSystem.Client.MonitoringClient.MonitoringClient(**kwargs)

Bases: DIRAC.Core.Base.Client.Client

class MonitoringClient

This class expose the methods of the Monitoring Service

__init__(**kwargs)

Simple constructor

property call

To be removed once we’re sure self.call has been removed

Type

Deprecated

executeRPC(*parms, **kws)

This method extracts some parameters from kwargs that are used as parameter of the constructor or RPCClient. Unfortunately, only a few of all the available parameters of BaseClient are exposed.

Parameters
  • rpc – if an RPC client is passed, use that one

  • timeout – we can change the timeout on a per call bases. Default is self.timeout

  • url – We can specify which url to use

generateDelayedPlot(typeName, reportName, startTime, endTime, condDict, grouping, extraArgs=None, compress=True)

It is used to encode the plot parameters used to create a certain plot.

Parameters
  • typeName (str) – the type of the monitoring

  • startTime (int) – epoch time, start time of the plot

  • endTime (int) – epoch time, end time of the plot

  • condDict (dict) – is the conditions used to gnerate the plot: {‘Status’:[‘Running’],’grouping’: [‘Site’] }

  • grouping (str) – is the grouping of the data for example: ‘Site’

  • extraArgs (dict) – epoch time which can be last day, last week, last month

  • compress (bool) – apply compression of the encoded values.

Returns

S_OK(str) or S_ERROR() it returns the encoded plot parameters

getClientKWArgs()

Returns a copy of the connection arguments

getReport(typeName, reportName, startTime, endTime, condDict, grouping, extraArgs=None)

It is used to get the raw data used to create a plot.

Parameters
  • typeName (str) – the type of the monitoring

  • reportName (str) – the name of the plotter used to create the plot for example: NumberOfJobs

  • startTime (int) – epoch time, start time of the plot

  • endTime (int) – epoch time, end time of the plot

  • condDict (dict) – is the conditions used to gnerate the plot: {‘Status’:[‘Running’],’grouping’: [‘Site’] }

  • grouping (str) – is the grouping of the data for example: ‘Site’

  • extraArgs (dict) – epoch time which can be last day, last week, last month

Rerturn

S_OK or S_ERROR

getServer()

Getter for the server url. Useful ?

httpsClient

alias of DIRAC.Core.Tornado.Client.TornadoClient.TornadoClient

setServer(url)

Set the server URL used by default

Parameters

url – url of the service