|
4 | 4 |
|
5 | 5 | # Contents
|
6 | 6 |
|
7 |
| -1. [Introduction](#Introduction) |
8 |
| - 1. [Motivation](#Motivation) |
9 |
| - 3. [Overview](#Overview) |
10 |
| -2. [Build and run](#Build-and-run) |
11 |
| -3. [Configuration](#Configuration) |
12 |
| - 1. [Distributed Scenario](#Distributed-scenario) |
13 |
| - 2. [Local Scenario](#Local-scenario) |
14 |
| - 3. [Network Magic](#Network-magic) |
15 |
| - 4. [Requests](#Requests) |
16 |
| - 5. [Logging](#Logging) |
17 |
| - 6. [Logs Rotation](#Logs-rotation) |
18 |
| - 7. [Prometheus](#Prometheus) |
19 |
| - 8. [EKG Monitoring](#EKG-monitoring) |
20 |
| - 9. [Verbosity](#Verbosity) |
21 |
| - 10. [RTView](#RTView) |
| 7 | +- [Cardano Tracer](#cardano-tracer) |
| 8 | +- [Contents](#contents) |
| 9 | +- [Introduction](#introduction) |
| 10 | + - [Motivation](#motivation) |
| 11 | + - [Overview](#overview) |
| 12 | +- [Build and run](#build-and-run) |
| 13 | +- [Configuration](#configuration) |
| 14 | + - [Distributed Scenario](#distributed-scenario) |
| 15 | + - [Important](#important) |
| 16 | + - [Local Scenario](#local-scenario) |
| 17 | + - [Network Magic](#network-magic) |
| 18 | + - [Requests](#requests) |
| 19 | + - [Logging](#logging) |
| 20 | + - [Logs Rotation](#logs-rotation) |
| 21 | + - [Prometheus](#prometheus) |
| 22 | + - [EKG Monitoring](#ekg-monitoring) |
| 23 | + - [Verbosity](#verbosity) |
| 24 | + - [RTView](#rtview) |
22 | 25 |
|
23 | 26 | # Introduction
|
24 | 27 |
|
@@ -390,20 +393,51 @@ $ curl --silent -H "Accept: application/json" '127.0.0.1:3200' | jq '.'
|
390 | 393 | }
|
391 | 394 | ```
|
392 | 395 |
|
393 |
| -The Promethus output is a map from Prometheus metric to value: |
| 396 | +Prometheus uses the text-based exposition format, complete with `# TYPE` and `# HELP` annotations. The latter ones have to be provided by the `metricsHelp` config value (see below). |
| 397 | + |
| 398 | +The output should be [OpenMetrics](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#text-format) compliant. Example snippet: |
394 | 399 |
|
395 | 400 | ```
|
396 | 401 | $ curl '127.0.0.1:3200/12700130004'
|
397 |
| -blockNum_int 35 |
398 |
| -rts_gc_init_cpu_ms 5 |
399 |
| -rts_gc_par_tot_bytes_copied 0 |
400 |
| -served_block_counter 31 |
401 |
| -submissions_accepted_counter 2771 |
402 |
| -density_real 5.7692307692307696e-2 |
403 |
| -blocksForged_int 6 |
404 |
| -
|
| 402 | +# TYPE Mem_resident_int gauge |
| 403 | +# HELP Mem_resident_int Kernel-reported RSS (resident set size) |
| 404 | +Mem_resident_int 103792640 |
| 405 | +# TYPE rts_gc_max_bytes_used gauge |
| 406 | +rts_gc_max_bytes_used 5811512 |
| 407 | +# TYPE rts_gc_gc_cpu_ms counter |
| 408 | +rts_gc_gc_cpu_ms 50 |
| 409 | +# TYPE RTS_gcMajorNum_int gauge |
| 410 | +# HELP RTS_gcMajorNum_int Major GCs |
| 411 | +RTS_gcMajorNum_int 4 |
| 412 | +# TYPE rts_gc_par_avg_bytes_copied gauge |
| 413 | +rts_gc_par_avg_bytes_copied 0 |
| 414 | +# TYPE rts_gc_num_bytes_usage_samples counter |
| 415 | +rts_gc_num_bytes_usage_samples 4 |
| 416 | +# TYPE remainingKESPeriods_int gauge |
| 417 | +remainingKESPeriods_int 62 |
| 418 | +# TYPE rts_gc_bytes_copied counter |
| 419 | +rts_gc_bytes_copied 17114384 |
| 420 | +# TYPE nodeCannotForge_int gauge |
| 421 | +# HELP nodeCannotForge_int How many times was this node unable to forge [a block]? |
| 422 | +# EOF |
| 423 | +``` |
| 424 | + |
| 425 | +Passing metric help annotations to the service can be done in the config file, either as a key-value map from metric name to help text, or as a seperate JSON file containing such a map. |
| 426 | +The system's internal metric names have to be used as keys (cf. [metrics documentation](https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/new-tracing/tracers_doc_generated.md#metrics)). |
| 427 | +``` |
| 428 | +"metricsHelp": "path/to/key-value-map.json" |
| 429 | +``` |
| 430 | +or |
| 431 | +``` |
| 432 | +"metricsHelp": { |
| 433 | + "Mem.resident": "Kernel-reported RSS (resident set size)", |
| 434 | + "RTS.gcMajorNum": "Major GCs", |
| 435 | + "nodeCannotForge": "How many times was this node unable to forge [a block]?" |
| 436 | +} |
405 | 437 | ```
|
406 | 438 |
|
| 439 | + |
| 440 | + |
407 | 441 | ## EKG Monitoring
|
408 | 442 |
|
409 | 443 | At top-level route `/` EKG gives a list of connected nodes.
|
|
0 commit comments