StatesMonitoringAgent¶
- StatesMonitoringAgent
- sends periodically numbers of jobs in various states for various
sites to the Monitoring system to create monitoring plots.
As of DIRAC v7r2, this agent is an almost exact copy of StatesAccountingAgent, the only difference being that it will only use the Monitoring System as its backend (and so ElasticSearch). This agent will be removed from DIRAC v7r3.
StatesMonitoringAgent
{
# the name of the message queue used for the failover
MessageQueue = dirac.wmshistory
}
- class DIRAC.WorkloadManagementSystem.Agent.StatesMonitoringAgent.StatesMonitoringAgent(agentName, loadName, baseAgentName=False, properties={})¶
Bases:
AgentModule
- __init__(agentName, loadName, baseAgentName=False, properties={})¶
Common __init__ method for all Agents. All Agent modules must define: __doc__ __RCSID__ They are used to populate __codeProperties
The following Options are used from the Configuration: - /LocalSite/InstancePath - /DIRAC/Setup - Status - Enabled - PollingTime default = 120 - MaxCycles default = 500 - WatchdogTime default = 0 (disabled) - ControlDirectory control/SystemName/AgentName - WorkDirectory work/SystemName/AgentName - shifterProxy ‘’ - shifterProxyLocation WorkDirectory/SystemName/AgentName/.shifterCred
It defines the following default Options that can be set via Configuration (above): - MonitoringEnabled True - Enabled True if Status == Active - PollingTime 120 - MaxCycles 500 - ControlDirectory control/SystemName/AgentName - WorkDirectory work/SystemName/AgentName - shifterProxy False - shifterProxyLocation work/SystemName/AgentName/.shifterCred
different defaults can be set in the initialize() method of the Agent using am_setOption()
In order to get a shifter proxy in the environment during the execute() the configuration Option ‘shifterProxy’ must be set, a default may be given in the initialize() method.
- am_Enabled()¶
- am_checkStopAgentFile()¶
- am_createStopAgentFile()¶
- am_disableMonitoring()¶
- am_getBasePath()¶
- am_getControlDirectory()¶
- am_getCyclesDone()¶
- am_getMaxCycles()¶
- am_getModuleParam(optionName)¶
- am_getOption(optionName, defaultValue=None)¶
Gets an option from the agent’s configuration section. The section will be a subsection of the /Systems section in the CS.
- am_getPollingTime()¶
- am_getShifterProxyLocation()¶
- am_getStopAgentFile()¶
- am_getWatchdogTime()¶
- am_getWorkDirectory()¶
- am_go()¶
- am_initialize(*initArgs)¶
Common initialization for all the agents.
This is executed every time an agent (re)starts. This is called by the AgentReactor, should not be overridden.
- am_monitoringEnabled()¶
- am_removeStopAgentFile()¶
- am_secureCall(functor, args=(), name=False)¶
- am_setModuleParam(optionName, value)¶
- am_setOption(optionName, value)¶
- am_stopExecution()¶
- beginExecution()¶
- endExecution()¶
- execute()¶
Main execution method
- finalize()¶
- initialize()¶
Standard initialization
- jobDB = None¶
- monitoringReporter = None¶