Skip to content

Commit 627f991

Browse files
custom http tracing (#202)
1 parent bb3f6bb commit 627f991

File tree

2 files changed

+44
-5
lines changed

2 files changed

+44
-5
lines changed

apx-parameters.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ CVMFS_GEO_LICENSE_KEY A license key for downloading the geolite2 c
188188
CVMFS_GID_MAP Path of a file for the mapping of file owner group ids.
189189
CVMFS_HASH_ALGORITHM | Define which secure hash algorithm should be used by CernVM-FS for CAS objects
190190
| (supported are: *sha1*, *rmd160* and *shake128*)
191+
CVMFS_HTTP_TRACING Activates that a tracing header is attached to each CURL request. Consists of ``uid``, ``pid``, and ``gid``. Default is ``off``.
192+
CVMFS_HTTP_TRACING_HEADERS Adds additional static, user-defined tracing headers. Format: ``key1:val1|key2:val2|key3:val3``. Needs ``CVMFS_HTTP_TRACING`` to be set to ``on``.
191193
CVMFS_IGNORE_SPECIAL_FILES Set to *true* to skip special files (pipes, sockets, block device and character device files) during publish without aborting.
192194
CVMFS_INCLUDE_XATTRS Set to *true* to process extended attributes
193195
CVMFS_MAX_CHUNK_SIZE Maximal size of a file chunk in bytes (see also *CVMFS_USE_FILE_CHUNKING*)

cpt-configure.rst

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,18 +1213,55 @@ They can also be exported in regular intervals (see :ref:`cpt_telemetry`).
12131213
starts the catalog update routine.
12141214
When using ``remount sync`` the system waits for the new file system snapshot to be served (if there is a new one).
12151215

1216-
Other
1217-
~~~~~
1216+
1217+
File System Information
1218+
~~~~~~~~~~~~~~~~~~~~~~~
12181219

12191220
Information about the current cache usage can be gathered using the
12201221
``df`` utility. For repositories created with the CernVM-FS 2.1
12211222
toolchain, information about the overall number of file system entries
12221223
in the repository as well as the number of entries covered by currently
12231224
loaded metadata can be gathered by ``df -i``.
12241225

1225-
For the `Nagios monitoring system <http://www.nagios.org>`_ [Schubert08]_, a
1226-
checker plugin is available `on our website
1227-
<http://cernvm.cern.ch/portal/filesystem/downloads>`_.
1226+
1227+
Monitoring
1228+
----------
1229+
1230+
CernVM-FS offers multiple options to remotely monitor client status and behavior.
1231+
1232+
Since the early days, CernVM-FS supports the `Nagios monitoring system <http://www.nagios.org>`_ [Schubert08]_.
1233+
A checker plugin is available `on our website <https://cernvm.cern.ch/fs/#download>`_.
1234+
1235+
Since CernVM-FS 2.11 there are two more options: 1) :ref:`Telemetry Aggregator <cpt_telemetry>` that allows the remote
1236+
monitoring of all counters of ``cvmfs_talk internal affairs``, and 2) sending an extended CURL HTTP header for
1237+
each download request. For this, ``CVMFS_HTTP_TRACING`` must be set. It will then include ``uid``, ``gid``, and
1238+
``pid`` with each download request.
1239+
1240+
.. note::
1241+
Depending on which CernVM-FS component sends the CURL request, ``uid``, ``gid`` or ``pid`` might not be set.
1242+
Based on the platform, their default value ``-1`` might change to a large number if the base type is ``unsigned``.
1243+
1244+
Furthermore, ``CVMFS_HTTP_TRACING_HEADERS`` can be set. This parameter allows for user-defined, static key-value pairs
1245+
to be added to the header, e.g. to identify the client that send the request. As key, only alphanumeric sequences are
1246+
accepted and white space around the key is ignored. Invalid keys are ignored. An example is given below
1247+
1248+
.. code-block:: bash
1249+
1250+
# client config
1251+
CVMFS_HTTP_TRACING=on #(default off)
1252+
# illegal headers are: CVMFS-X-h2:ff and X-CVMFS-h3:12_ad
1253+
CVMFS_HTTP_TRACING_HEADERS='h1:test|CVMFS-X-h2:ff|X-CVMFS-h3:12_ad | h4 : 12fs_?'
1254+
1255+
# debug output
1256+
(download) CURL Header for URL: /data/81/7c882d4a2e9dd7f9c5c2bfb4e04ff316e436dfC is:
1257+
Connection: Keep-Alive
1258+
Pragma:
1259+
User-Agent: cvmfs Fuse 2.11.0
1260+
X-CVMFS-h1: test
1261+
X-CVMFS-h4: 12fs_?
1262+
X-CVMFS-PID: 561710
1263+
X-CVMFS-GID: 0
1264+
X-CVMFS-UID: 0
12281265
12291266
.. _sct_debug_logs:
12301267

0 commit comments

Comments
 (0)