-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from HereThereBeDragons/telemetry_doc_3096
telemetry aggregator doc
- Loading branch information
Showing
4 changed files
with
89 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
.. _cpt_telemetry: | ||
|
||
Client Telemetry Aggregators | ||
============================ | ||
|
||
It is possible to configure the client to send in regular intervals the performance counters listed by ``cvmfs_talk internal affairs``. | ||
By default, an aggregator is available that exposes the counters in InfluxDB data format. | ||
It can easily be replaced by any other aggregator in a form of a source code plugin. | ||
|
||
Independent of the aggregator following 2 client parameters must be set: | ||
:: | ||
CVMFS_TELEMETRY_SEND=ON | ||
CVMFS_TELEMETRY_RATE=<rate in seconds> # minimum send rate >= 5 sec | ||
|
||
|
||
Influx Telemetry Aggregator | ||
--------------------------- | ||
|
||
The Influx Telemetry Aggregator sends per timestamp two versions of the counters: | ||
their absolute values and the delta between two timestamps to a socket. | ||
For this, the measurement name given by ``CVMFS_INFLUX_METRIC_NAME`` is extended with either ``_absolute`` or ``_delta``. | ||
|
||
Mandatory client parameters for the Influx Telemetry Aggregator are | ||
|
||
:: | ||
|
||
CVMFS_INFLUX_HOST=localhost # IP address | ||
CVMFS_INFLUX_PORT=8092 # Port | ||
CVMFS_INFLUX_METRIC_NAME=<measurement name> # "Table" name | ||
|
||
And optional parameters are | ||
|
||
:: | ||
|
||
CVMFS_INFLUX_EXTRA_TAGS="some_tag=42,some_tag2=27" # always included | ||
CVMFS_INFLUX_EXTRA_FIELDS="somefield=3" # not included in delta | ||
|
||
The general layout of the data send is | ||
|
||
:: | ||
|
||
# for absolute | ||
CVMFS_INFLUX_METRIC_NAME_absolute,repo=@fqrn,CVMFS_INFLUX_EXTRA_TAGS countername=value,...,CVMFS_INFLUX_EXTRA_FIELDS timestamp | ||
|
||
# for delta (no CVMFS_INFLUX_EXTRA_FIELDS) | ||
CVMFS_INFLUX_METRIC_NAME_delta,repo=@fqrn,CVMFS_INFLUX_EXTRA_TAGS countername=value_new - value_old,... timestamp | ||
|
||
|
||
|
||
.. warning:: | ||
In the output, counters are only included if they have been used at least once (value != 0). | ||
And for the very first measurement no delta values are available. | ||
|
||
Writing Your Own Aggregator | ||
--------------------------- | ||
|
||
The ``TelemetryAggregator`` base class consists of a loop that for each time step | ||
snapshots the counters (saved to ``counters_``), and calls ``PushMetrics()``. | ||
``PushMetrics()`` needs to be overwritten by your own aggregator to perform all manipulations | ||
needed for the counters and the sending/storing of the counters. | ||
|
||
To write your own aggregator you need the following parts: | ||
|
||
* Your aggregator must inherit from ``TelemetryAggregator`` | ||
* Your aggregator's constructor must take care of additional client parameters needed. | ||
In case your object is incorrectly constructed, ``is_zombie_`` **MUST** be set to ``true``. | ||
* Your aggregator must overwrite ``PushMetrics()`` | ||
* Create a new value for your aggregator in enum ``TelemetrySelector`` | ||
* Add your aggregator inside the ``Create()`` of ``TelemetryAggregator`` using the newly created value of ``TelemetrySelector`` | ||
* Change in ``mountpoint.cc`` the ``TelemetrySelector`` used in ``perf::TelemetryAggregator::Create`` | ||
|
||
.. note:: | ||
|
||
Please feel free to contribute your aggregator to the CVMFS project, so we can expand the number of | ||
available aggregators to all users. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ Advanced Topics | |
:maxdepth: 2 | ||
|
||
cpt-plugins | ||
cpt-telemetry | ||
cpt-tracer | ||
cpt-enter | ||
cpt-hpc | ||
|