Print

Print


With this work, there is a new built-in HTTP extension plugin that can be used to export OpenMonitoring / prometheus-based metrics.

An example output on a dev host:
```
$ curl -H "Authorization: Bearer $BEARER_TOKEN" http://localhost:8000/metrics/
# HELP server_bytes Number of bytes read into the server
# TYPE server_bytes counter
server_bytes{direction="tx"} 882
server_bytes{direction="rx"} 3107
# HELP server_metadata XRootD server metadata
# TYPE server_metadata gauge
server_metadata{instance="f4hp7ql65f.local:1095",site="bbockelm_laptop",version="v5.5.4.post     248"} 1680294742
```

I am told by @ivukotic it would be immensely helpful in "collapsing" the monitoring pipeline.  His central Prometheus monitoring could work directly with the caches instead of going through the XRootD/UDP->TCP->Collector->LogStash->database (or in the case of OSG, XRootD/UDP->Shoveler/AMQ->Collector/AMQ->database).

Beyond shortening the chain it also simplifies the authorization scheme -- only the central prometheus instance needs a token.  The caches just need to be configured to trust the central service.

Note this includes a dependency on https://github.com/jupp0r/prometheus-cpp; the build of the module should be disabled if the library is missing.  This only needs the `prometheus-cpp-core` library; it might be quite reasonable to think about vendoring it.

@jthiltges @djw8605 @biozit @brianhlin -- you guys might be interested in this as well.
You can view, comment on, or merge this pull request online at:

  https://github.com/xrootd/xrootd/pull/1985

-- Commit Summary --

  * Extend XrdXmlReader to parse memory buffers
  * Introduce basic Prometheus exports
  * Allow handler plugins to be run when HTTP is disabled
  * Allow authorization to be used with prometheus plugin

-- File Changes --

    M cmake/XRootDDefaults.cmake (1)
    M cmake/XRootDFindLibs.cmake (11)
    M src/CMakeLists.txt (4)
    M src/Xrd/XrdConfig.cc (1)
    M src/XrdHttp/XrdHttpProtocol.cc (5)
    A src/XrdPrometheus.cmake (54)
    A src/XrdPrometheus/XrdPrometheus.cc (275)
    A src/XrdPrometheus/XrdPrometheus.hh (71)
    A src/XrdPrometheus/XrdPrometheusConfigure.cc (74)
    A src/XrdPrometheus/export-lib-symbols (7)
    M src/XrdXml/XrdXmlRdrTiny.cc (13)
    M src/XrdXml/XrdXmlRdrTiny.hh (2)
    M src/XrdXml/XrdXmlRdrXml2.cc (9)
    M src/XrdXml/XrdXmlRdrXml2.hh (2)
    M src/XrdXml/XrdXmlReader.cc (10)
    M src/XrdXml/XrdXmlReader.hh (45)

-- Patch Links --

https://github.com/xrootd/xrootd/pull/1985.patch
https://github.com/xrootd/xrootd/pull/1985.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/1985
You are receiving this because you are subscribed to this thread.

Message ID: <[log in to unmask]>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1