Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions AccountingSystem/Agent/NetworkAgent.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
"""
Accounting agent to consume perfSONAR network metrics received via a message queue.

.. literalinclude:: ../ConfigTemplate.cfg
:start-after: ##BEGIN NetworkAgent
:end-before: ##END
:dedent: 2
:caption: NetworkAgent options

"""

from datetime import datetime
Expand All @@ -20,8 +27,9 @@ class NetworkAgent (AgentModule):
Results are stored in the accounting database.
"""

BUFFER_TIMEOUT = 3600 # default number of seconds after which network accounting
# objects are removed form the the temporary buffer
#: default number of seconds after which network accounting
#: objects are removed from the temporary buffer
BUFFER_TIMEOUT = 3600

def initialize(self):

Expand Down
13 changes: 13 additions & 0 deletions AccountingSystem/ConfigTemplate.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
Services
{
##BEGIN DataStore
DataStore
{
Port = 9133
# Run compaction, has to be True for Master, False for others
RunBucketing = True
Authorization
{
Default = authenticated
Expand All @@ -13,9 +16,13 @@ Services
regenerateBuckets = ServiceAdministrator
}
}
##END
##BEGIN ReportGenerator
ReportGenerator
{
Port = 9134
# folder relative to instance path, where data is stored
DataLocation = data/accountingGraphs
Authorization
{
Default = authenticated
Expand All @@ -25,14 +32,20 @@ Services
}
}
}
##END
}
Agents
{
##BEGIN NetworkAgent
NetworkAgent
{
MaxCycles = 0
PollingTime = 60
# URI of the MQ of the perfSONAR information
MessageQueueURI =
# time how long objects are kept in the buffer if they cannot be written to the DB
BufferTimeout = 3600
}
##END
}

7 changes: 7 additions & 0 deletions AccountingSystem/Service/DataStoreHandler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
""" DataStore is the service for inserting accounting reports (rows) in the Accounting DB

This service CAN be duplicated iff the first is a "master" and all the others are slaves.
See the information about :ref`datastorehelpers`.

.. literalinclude:: ../ConfigTemplate.cfg
:start-after: ##BEGIN DataStore
:end-before: ##END
:dedent: 2
:caption: DataStore options
"""


Expand Down
6 changes: 6 additions & 0 deletions AccountingSystem/Service/ReportGeneratorHandler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
""" Module that holds the ReportGeneratorHandler class

.. literalinclude:: ../ConfigTemplate.cfg
:start-after: ##BEGIN ReportGenerator
:end-before: ##END
:dedent: 2
:caption: ReportGenerator options
"""

__RCSID__ = "$Id$"
Expand Down
3 changes: 1 addition & 2 deletions ConfigurationSystem/test/Test_agentOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from DIRAC.tests.Utilities.assertingUtils import AgentOptionsTest
from DIRAC import S_OK

AGENTS = [('DIRAC.AccountingSystem.Agent.NetworkAgent', {'IgnoreOptions': ['MaxCycles', 'MessageQueueURI',
'BufferTimeout']}),
AGENTS = [('DIRAC.AccountingSystem.Agent.NetworkAgent', {'IgnoreOptions': ['MessageQueueURI']}),
('DIRAC.ConfigurationSystem.Agent.Bdii2CSAgent', {'IgnoreOptions': ['BannedCEs', 'BannedSEs', 'DryRun',
'AlternativeBDIIs', 'VO']}),
('DIRAC.ConfigurationSystem.Agent.GOCDB2CSAgent', {'IgnoreOptions': ['Cycles', 'DryRun']}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ Databases used by Accounting System. Note that each database is a separate subse
+--------------------------------+----------------------------------------------+-----------------------+
| *<DATABASE_NAME>/Host* | Database host server where the DB is located | Host = db01.in2p3.fr |
+--------------------------------+----------------------------------------------+-----------------------+
| *<DATABASE_NAME>/MaxQueueSize* | Maximum number of simultaneous queries to | MaxQueueSize = 10 |
| | the DB per instance of the client | |
+--------------------------------+----------------------------------------------+-----------------------+

The databases associated with Accounting System are:
- AccountingDB
- AccountingDB

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ In this subsection are described the databases, services and URLs related with A
:maxdepth: 2

Databases/index
Services/index
URLs/index
URLs/index