Skip to content

Commit

Permalink
added config and instructions to the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Jan 19, 2021
1 parent ebb57ed commit 4c057eb
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 32 deletions.
55 changes: 43 additions & 12 deletions docs/source/AdministratorGuide/Systems/MonitoringSystem/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,33 @@ Monitoring System
Overview
=========

The Monitoring system is used to monitor various components of DIRAC. Currently, we have two monitoring types:
The Monitoring system is used to monitor various components of DIRAC. Currently, we have three monitoring types:

- WMSHistory: for monitoring the DIRAC WMS
- Component Monitoring: for monitoring DIRAC components such as services, agents, etc.
- Component Monitoring: for monitoring DIRAC components such as services, agents, etc.
- RMS Monitoring: for monitoring the DIRAC RequestManagement System (mostly the Request Executing Agent).

It is based on Elasticsearch distributed search and analytics NoSQL database. If you want to use it, you have to install the Monitoring service and
elasticsearch db. You can use a single node, if you do not have to store lot of data, otherwise you need a cluster (more than one node).
It is based on Elasticsearch distributed search and analytics NoSQL database.
If you want to use it, you have to install the Monitoring service, and of course connect to a ElasticSearch instance.

Install Elasticsearch
======================

You can found in https://www.elastic.co official web site. I propose to use standard tools to install for example: yum, rpm, etc. otherwise
you encounter some problems. If you are not familiar with managing linux packages, you have to ask your college or read some relevant documents.
This is not covered here, as installation and administration of ES are not part of DIRAC guide.
Just a note on the ES versions supported: ES7 and ES6 are supported, the support for ES5 is not assured.

Configure the MonitoringSystem
===============================

You can run your El cluster without authentication or using User name and password. You have to add the following parameters:
You can run your Elastic cluster even without authentication, or using User name and password. You have to add the following parameters:

- User
- Password
- Host
- Port

The User name and Password must be added to the local cfg file while the other can be added to the CS using the Configuration web application.
You have to handle the EL secret information in a similar way to what is done for the other supported SQL databases, e.g. MySQL
You have to handle the ES secret information in a similar way to what is done for the other supported SQL databases, e.g. MySQL


For example::
Expand All @@ -47,18 +48,48 @@ For example::
User = test
Password = password
}
}


The following option can be set in `Systems/Monitoring/<Setup>/Databases/MonitoringDB`:

*IndexPrefix*: Prefix used to prepend to indexes created in the ES instance. If this
is not present in the CS, the indexes are prefixed with the setup name.

For each monitoring types managed, the Period (how often a new index is created)
can be defined with::

MonitoringTypes
{
ComponentMonitoring
{
# Indexing strategy. Possible values: day, week, month, year, null
Period = month
}
RMSMonitoring
{
# Indexing strategy. Possible values: day, week, month, year, null
Period = month
}
WMSHistory
{
# Indexing strategy. Possible values: day, week, month, year, null
Period = day
}
}

The given periods above are also the default periods in the code.


Enable WMSHistory monitoring
============================

You have to install the WorkloadManagemet/StatesMonitoringAgent. This agent is used to collect information using the JobDB and send it to the Elasticsearch database.
If you install this agent, you can stop the StatesAccounting agent.
You have to install the WorkloadManagemet/StatesMonitoringAgent.
This agent is used to collect information using the JobDB and send it to the Elasticsearch database.
If you install this agent, you can stop the StatesAccounting agent, that was reporting to the MySQL backend of the Accounting system.

Note: You can use RabbitMQ for failover. This is optional as the agent already has a failover mechanism. You can configure RabbitMQ in the local dirac.cfg file
where the agent is running::
You can use RabbitMQ for failover. This is optional as the agent already has a failover mechanism.
You can configure RabbitMQ in the local dirac.cfg file where the agent is running::

Resources
{
Expand Down
20 changes: 1 addition & 19 deletions src/DIRAC/MonitoringSystem/ConfigTemplate.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,12 @@ Services
Port = 9137
Authorization
{
Default = authenticated
Default = authenticated
FileTransfer
{
Default = authenticated
}
}
MonitoringTypes
{
ComponentMonitoring
{
# Indexing strategy. Possible values: day, week, month, year, null
Period = month
}
RMSMonitoring
{
# Indexing strategy. Possible values: day, week, month, year, null
Period = month
}
WMSHistory
{
# Indexing strategy. Possible values: day, week, month, year, null
Period = day
}
}
}
##END
}
25 changes: 24 additions & 1 deletion src/DIRAC/MonitoringSystem/DB/MonitoringDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,34 @@
**Configuration Parameters**:
The following options can be set in ``Systems/Monitoring/<Setup>/Databases/MonitoringDB``
The following option can be set in `Systems/Monitoring/<Setup>/Databases/MonitoringDB`
* *IndexPrefix*: Prefix used to prepend to indexes created in the ES instance. If this
is not present in the CS, the indexes are prefixed with the setup name.
For each monitoring types managed, the Period (how often a new index is created)
can be defined with::
MonitoringTypes
{
ComponentMonitoring
{
# Indexing strategy. Possible values: day, week, month, year, null
Period = month
}
RMSMonitoring
{
# Indexing strategy. Possible values: day, week, month, year, null
Period = month
}
WMSHistory
{
# Indexing strategy. Possible values: day, week, month, year, null
Period = day
}
}
"""
from __future__ import absolute_import
from __future__ import division
Expand Down

0 comments on commit 4c057eb

Please sign in to comment.