Skip to content

Commit ad104a5

Browse files
committed
fix: Updated docs and removed gMonitor
1 parent 3229027 commit ad104a5

File tree

4 files changed

+6
-63
lines changed

4 files changed

+6
-63
lines changed

docs/source/DeveloperGuide/Systems/Framework/index.rst

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -107,62 +107,6 @@ The MonitoringUtilities module provides the functionality needed to store or del
107107
if not result[ 'OK' ]:
108108
print 'Something went wrong'
109109

110-
gMonitor object Internals
111-
============================
112-
This part covers the internal workings of the **gMonitor** object.
113-
**gMonitor** is a singleton object meaning its instance is only created once from the **MonitoringClient** and is used throughout in other systems for monitoring the component details like CPU, MEM, threads, etc.
114-
115-
Client - Server interactions of the **gMonitor** object (basic overview diagram):
116-
117-
.. image:: /_static/Systems/FS/gMonitorInteractions.png
118-
:alt: gMonitor Client & Server internal interactions.
119-
:align: center
120-
121-
**1) MonitoringClient (inherited by gMonitor singleton object):**
122-
This class is inherited by the gMonitor object and is used for reporting all types of components
123-
Activities.
124-
Basically, from here all the information is sent to the MonitoringHandler(server side) using methods like
125-
**registerActivity** and **addMark** and all the data is flushed periodicaly by the object **gMonitoringFlusher**
126-
every 300 seconds.
127-
128-
**2) MonitoringHandler:**
129-
This class is inherited from the **RequestHandler** class which is the base required for running any kind of services in DIRAC.
130-
This class is basically used to expose methods inside ServiceInterface which is accessed
131-
with the help of the **gServiceInterface** (singleton object) and before exposing the methods
132-
there are some filters applied like not including invalid actions, decoding view descriptions, etc.
133-
Here the methods called inside **export_** methods will be explained in depth inside the
134-
**ServiceInterface** part.
135-
136-
**3) ServiceInterface (inherited by the gServiceInterface singleton object):**
137-
This is the place where all the activity data is received from the **gMonitor** object and from here the other the internal interactions of the
138-
**Framework/MonitoringHandler** happens with components like **RRDManager** used for reporting data to the **rrdtool** which is based on command line
139-
used for generating plots, the **ComponentMonitoringDB** which is used to store the basic component information like component type, component name,
140-
number of queries performed, etc and the **MonitoringCatalog** which is used to store all the activity data inside the sqlite3 database which is lastly
141-
referred by the **rrdtool** and the Web interface i.e. the **ActivityMonitor** part.
142-
143-
**4) RRDManager (wrapper around the rrdtool):**
144-
This is class is called by the **ServiceInterface**
145-
This class is a wrap around the **rrdtool** as it is a command line based tool within this class there are several methods which take in some parameters
146-
required by the corresponding rrd command and executes it.
147-
148-
**5) MonitoringCatalog (based on sqlite3):**
149-
Here all the information about the activity of the components is maintained like which rrd file to refer for what components
150-
then other details like CPU, MEM, Queries, etc. is stored here.
151-
152-
**6) ComponentMonitoringDB (based on MySQL):**
153-
This database basically stores the basic information of the components not the activity data like **Type, ComponentName, Port, Host, etc**
154-
and this all is stored under the **compmon_Components** table inside this database.
155-
The other info like version history of the components like **VersionTimestamp, DIRACVersion, etc.** is stored under **compmon_VersionHistory**
156-
table of the database.
157-
158-
**7) PlotCache**
159-
This is basically used to cache the graphs that are generated once so if the user tries to generate them again the entire
160-
process of graph generation using **RRDManager** is not performed instead a cached version of the graph is returned to reduce the
161-
response time.
162-
163-
This was just an overview of the components that **gMonitor** object interacts with more detail can be found inside the code of that particular
164-
component.
165-
The use cases of **gMonitor** object can be found inside the **DIRAC/Core/DISET/private/Service.py, DIRAC/Core/Base/AgentModule.py, Transformation System, etc.**
166110

167111
Dynamic Component Monitoring
168112
============================
-41.2 KB
Binary file not shown.

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ console_scripts =
171171
dirac-admin-users-with-proxy = DIRAC.FrameworkSystem.scripts.dirac_admin_users_with_proxy:main [admin]
172172
dirac-install-component = DIRAC.FrameworkSystem.scripts.dirac_install_component:main [server]
173173
dirac-install-tornado-service = DIRAC.FrameworkSystem.scripts.dirac_install_tornado_service:main [server]
174-
#dirac-monitoring-get-components-status = DIRAC.FrameworkSystem.scripts.dirac_monitoring_get_components_status:main [admin]
175174
dirac-myproxy-upload = DIRAC.FrameworkSystem.scripts.dirac_myproxy_upload:main
176175
dirac-populate-component-db = DIRAC.FrameworkSystem.scripts.dirac_populate_component_db:main [admin]
177176
dirac-proxy-destroy = DIRAC.FrameworkSystem.scripts.dirac_proxy_destroy:main

src/DIRAC/Core/DISET/private/Service.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ def initialize(self):
106106
self.activityMonitoring = Operations().getValue("EnableActivityMonitoring", False) or getServiceOption(
107107
self._serviceInfoDict, "EnableActivityMonitoring", False
108108
)
109-
if self.activityMonitoring:
110-
# The import needs to be here because of the CS must be initialized before importing
111-
# this class (see https://github.com/DIRACGrid/DIRAC/issues/4793)
112-
from DIRAC.MonitoringSystem.Client.MonitoringReporter import MonitoringReporter
113109

114-
self.activityMonitoringReporter = MonitoringReporter(monitoringType="ComponentMonitoring")
115-
gThreadScheduler.addPeriodicTask(100, self.__activityMonitoringReporting)
110+
# The import needs to be here because of the CS must be initialized before importing
111+
# this class (see https://github.com/DIRACGrid/DIRAC/issues/4793)
112+
from DIRAC.MonitoringSystem.Client.MonitoringReporter import MonitoringReporter
113+
114+
self.activityMonitoringReporter = MonitoringReporter(monitoringType="ComponentMonitoring")
115+
gThreadScheduler.addPeriodicTask(100, self.__activityMonitoringReporting)
116116
self._initMonitoring()
117117
# Call static initialization function
118118
try:

0 commit comments

Comments
 (0)