You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -337,72 +337,135 @@ The fields `rpMaxAgeMinutes`, `rpMaxAgeHours` specify the lifetime of the log fi
337
337
338
338
## Prometheus
339
339
340
-
The optional field `hasPrometheus` specifies the host and port of the web page with metrics. For example:
340
+
At top-level route `/` Promtheus gives a list of connected nodes.
341
+
342
+
The responses are either human-readable names (HTML) with clickable
343
+
links, or JSON mapping from connected node names to relative URLs,
344
+
depending on desired content type (`Accept:` header of the request).
345
+
346
+
The routes dynamically depend on the connected nodes, the node names
347
+
are [sluggified](https://hackage.haskell.org/package/slugify).
348
+
349
+
The optional field `hasPrometheus` specifies the host and port of the
350
+
web page with Prometheus metrics. For example:
341
351
342
352
```
343
353
"hasPrometheus": {
344
354
"epHost": "127.0.0.1",
345
-
"epPort": 3000
355
+
"epPort": 3200
346
356
}
347
357
```
348
358
349
-
Here the web page is available at `http://127.0.0.1:3000`. Please note that if you skip this field, the web page will not be available.
359
+
With this example, the list of clickable identifiers of connected
360
+
nodes will be available at `http://127.0.0.1:3200`, such as:
361
+
362
+
```
363
+
* 127.0.0.1:30004
364
+
* 127.0.0.1:30001
365
+
* 127.0.0.1:30005
366
+
* 127.0.0.1:30000
367
+
* 127.0.0.1:30003
368
+
* 127.0.0.1:30002
369
+
* TxGenerator
370
+
```
371
+
372
+
Clicking an identifier will take you to its monitoring page. For
373
+
example clicking on `127.0.0.1:30004` displays the monitoring metrics
374
+
at `http://localhost:3200/12700130004`.
350
375
351
-
After you open `http://127.0.0.1:3000` in your browser, you will see the list of identifiers of connected nodes (or the warning message, if there are no connected nodes yet), for example:
376
+
Sending a HTTP GET request with a JSON Accept header gives the metrics
377
+
of the top-level route, or identifier as JSON. `jq '.'` pretty-prints
Each identifier is a hyperlink to the page where you will see the **current** list of metrics received from the corresponding node, in such a format:
393
+
The Promethus output is a map from Prometheus metric to value:
360
394
361
395
```
396
+
$ curl '127.0.0.1:3200/12700130004'
397
+
blockNum_int 35
398
+
rts_gc_init_cpu_ms 5
362
399
rts_gc_par_tot_bytes_copied 0
363
-
rts_gc_num_gcs 2
364
-
rts_gc_max_bytes_slop 15880
365
-
rts_gc_num_bytes_usage_samples 1
366
-
rts_gc_wall_ms 4005
367
-
...
368
-
rts_gc_par_max_bytes_copied 0
369
-
rts_gc_mutator_cpu_ms 57
370
-
rts_gc_mutator_wall_ms 4004
371
-
rts_gc_gc_cpu_ms 1
372
-
rts_gc_cumulative_bytes_used 184824
400
+
served_block_counter 31
401
+
submissions_accepted_counter 2771
402
+
density_real 5.7692307692307696e-2
403
+
blocksForged_int 6
404
+
373
405
```
374
406
375
407
## EKG Monitoring
376
408
377
-
The optional field `hasEKG` specifies the hosts and ports of two web pages:
409
+
At top-level route `/` EKG gives a list of connected nodes.
410
+
411
+
The responses are either human-readable names (HTML) with clickable
412
+
links, or JSON mapping from connected node names to relative URLs,
413
+
depending on desired content type (`Accept:` header of the request).
378
414
379
-
1. the list of identifiers of connected nodes,
380
-
2. EKG monitoring page.
415
+
The routes dynamically depend on the connected nodes, the node names
416
+
are [sluggified](https://hackage.haskell.org/package/slugify).
381
417
382
-
For example, if you use JSON configuration file:
418
+
The optional field `hasEKG` specifies the host and port of the web
419
+
page with EKG metrics. For example:
383
420
384
421
```
385
-
"hasEKG": [
386
-
{
387
-
"epHost": "127.0.0.1",
388
-
"epPort": 3100
389
-
},
390
-
{
391
-
"epHost": "127.0.0.1",
392
-
"epPort": 3101
393
-
}
394
-
]
422
+
"hasEKG": {
423
+
"epHost": "127.0.0.1",
424
+
"epPort": 3100
425
+
}
395
426
```
396
427
397
-
The page with the list of identifiers of connected nodes will be available at `http://127.0.0.1:3100`, for example:
428
+
With this example, the list of clickable identifiers of connected
429
+
nodes will be available at `http://127.0.0.1:3100`, such as:
398
430
399
431
```
400
-
* tmp-forwarder.sock@0
401
-
* tmp-forwarder.sock@1
402
-
* tmp-forwarder.sock@2
432
+
* 127.0.0.1:30004
433
+
* 127.0.0.1:30001
434
+
* 127.0.0.1:30005
435
+
* 127.0.0.1:30000
436
+
* 127.0.0.1:30003
437
+
* 127.0.0.1:30002
438
+
* TxGenerator
403
439
```
404
440
405
-
Each identifier is a hyperlink, after clicking to it you will be redirected to `http://127.0.0.1:3101` where you will see EKG monitoring page for corresponding node.
441
+
Clicking an identifier will take you to its monitoring page. For
442
+
example clicking on `127.0.0.1:30004` displays the monitoring metrics
443
+
at `http://localhost:3100/12700130004`.
444
+
445
+
Sending a HTTP GET request with a JSON Accept header gives the metrics
446
+
of an identifier as JSON. `jq '.'` pretty-prints the JSON object.
0 commit comments