Skip to content

Commit 600bfc8

Browse files
authored
Merge pull request #195 from HereThereBeDragons/telemetry_doc_3096
telemetry aggregator doc
2 parents 3e1e9b0 + d66bcb9 commit 600bfc8

File tree

4 files changed

+89
-2
lines changed

4 files changed

+89
-2
lines changed

apx-parameters.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ CVMFS_INITIAL_GENERATION Initial inode generation. Used for testing.
6262
CVMFS_INSTRUMENT_FUSE | When set to *true* gather performance statistics about the FUSE callbacks.
6363
| The results are displayed with `cvmfs_talk internal affairs`.
6464
CVMFS_NFS_INTERLEAVED_INODES In NFS mode, use only inodes of the form :math:`an+b`, specified as "b%a".
65+
CVMFS_INFLUX_EXTRA_FIELDS Static fields always attached to the (absolute) output of the InfluxDB Telemetry Aggregator
66+
CVMFS_INFLUX_EXTRA_TAGS Static tags always attached to the (absolute + delta) output of the InfluxDB Telemetry Aggregator
67+
CVMFS_INFLUX_HOST Host name or IP address of the receiver of the InfluxDB Telemetry Aggregator
68+
CVMFS_INFLUX_METRIC_NAME Name of the measurement of the InfluxDB Telemetry Aggregator
69+
CVMFS_INFLUX_PORT Port of the host (receiver) of the InfluxDB Telemetry Aggregator
6570
CVMFS_IPFAMILY_PREFER Which IP protocol to prefer when connecting to proxies. Can be either 4 or 6.
6671
CVMFS_KCACHE_TIMEOUT Timeout in seconds for path names and file attributes in the kernel file system buffers.
6772
CVMFS_KEYS_DIR | Directory containing \*.pub files used as repository signing keys.
@@ -113,6 +118,8 @@ CVMFS_SYSLOG_LEVEL | If set to 1 or 2, sets the syslog level for Ce
113118
| LOG_DEBUG or LOG_INFO respectively.
114119
CVMFS_SYSTEMD_NOKILL | If set to *yes*, modify the command line to ``@vmfs2 ...`` in order to
115120
| act as a systemd lowlevel storage manager.
121+
CVMFS_TELEMETRY_RATE Rate in seconds for Telemetry Aggregator to send the telemetry. Minimum send rate >= 5 sec.
122+
CVMFS_TELEMETRY_SEND ``ON`` to activate Telemetry Aggregator.
116123
CVMFS_TIMEOUT Timeout in seconds for HTTP requests with a proxy server.
117124
CVMFS_TIMEOUT_DIRECT Timeout in seconds for HTTP requests without a proxy server.
118125
CVMFS_TRACEFILE If set, enables the tracer and trace file system calls to the given file.

cpt-configure.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,8 +1200,9 @@ the client experiences cache thrashing.
12001200

12011201
cvmfs_talk internal affairs
12021202

1203-
prints the internal status information and performance counters. It can
1204-
be helpful for performance engineering.
1203+
prints the internal status information and performance counters.
1204+
It can be helpful for performance engineering.
1205+
They can also be exported in regular intervals (see :ref:`cpt_telemetry`).
12051206

12061207
::
12071208

cpt-telemetry.rst

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
.. _cpt_telemetry:
2+
3+
Client Telemetry Aggregators
4+
============================
5+
6+
It is possible to configure the client to send in regular intervals the performance counters listed by ``cvmfs_talk internal affairs``.
7+
By default, an aggregator is available that exposes the counters in InfluxDB data format.
8+
It can easily be replaced by any other aggregator in a form of a source code plugin.
9+
10+
Independent of the aggregator following 2 client parameters must be set:
11+
::
12+
13+
CVMFS_TELEMETRY_SEND=ON
14+
CVMFS_TELEMETRY_RATE=<rate in seconds> # minimum send rate >= 5 sec
15+
16+
17+
Influx Telemetry Aggregator
18+
---------------------------
19+
20+
The Influx Telemetry Aggregator sends per timestamp two versions of the counters:
21+
their absolute values and the delta between two timestamps to a socket.
22+
For this, the measurement name given by ``CVMFS_INFLUX_METRIC_NAME`` is extended with either ``_absolute`` or ``_delta``.
23+
24+
Mandatory client parameters for the Influx Telemetry Aggregator are
25+
26+
::
27+
28+
CVMFS_INFLUX_HOST=localhost # IP address
29+
CVMFS_INFLUX_PORT=8092 # Port
30+
CVMFS_INFLUX_METRIC_NAME=<measurement name> # "Table" name
31+
32+
And optional parameters are
33+
34+
::
35+
36+
CVMFS_INFLUX_EXTRA_TAGS="some_tag=42,some_tag2=27" # always included
37+
CVMFS_INFLUX_EXTRA_FIELDS="somefield=3" # not included in delta
38+
39+
The general layout of the data send is
40+
41+
::
42+
43+
# for absolute
44+
CVMFS_INFLUX_METRIC_NAME_absolute,repo=@fqrn,CVMFS_INFLUX_EXTRA_TAGS countername=value,...,CVMFS_INFLUX_EXTRA_FIELDS timestamp
45+
46+
# for delta (no CVMFS_INFLUX_EXTRA_FIELDS)
47+
CVMFS_INFLUX_METRIC_NAME_delta,repo=@fqrn,CVMFS_INFLUX_EXTRA_TAGS countername=value_new - value_old,... timestamp
48+
49+
50+
51+
.. warning::
52+
In the output, counters are only included if they have been used at least once (value != 0).
53+
And for the very first measurement no delta values are available.
54+
55+
Writing Your Own Aggregator
56+
---------------------------
57+
58+
The ``TelemetryAggregator`` base class consists of a loop that for each time step
59+
snapshots the counters (saved to ``counters_``), and calls ``PushMetrics()``.
60+
``PushMetrics()`` needs to be overwritten by your own aggregator to perform all manipulations
61+
needed for the counters and the sending/storing of the counters.
62+
63+
To write your own aggregator you need the following parts:
64+
65+
* Your aggregator must inherit from ``TelemetryAggregator``
66+
* Your aggregator's constructor must take care of additional client parameters needed.
67+
In case your object is incorrectly constructed, ``is_zombie_`` **MUST** be set to ``true``.
68+
* Your aggregator must overwrite ``PushMetrics()``
69+
* Create a new value for your aggregator in enum ``TelemetrySelector``
70+
* Add your aggregator inside the ``Create()`` of ``TelemetryAggregator`` using the newly created value of ``TelemetrySelector``
71+
* Change in ``mountpoint.cc`` the ``TelemetrySelector`` used in ``perf::TelemetryAggregator::Create``
72+
73+
.. note::
74+
75+
Please feel free to contribute your aggregator to the CVMFS project, so we can expand the number of
76+
available aggregators to all users.
77+
78+

part-advanced.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Advanced Topics
66
:maxdepth: 2
77

88
cpt-plugins
9+
cpt-telemetry
910
cpt-tracer
1011
cpt-enter
1112
cpt-hpc

0 commit comments

Comments
 (0)