@@ -26,6 +26,7 @@ keywords: [Tracing, cardano-tracer, trace-dispatch, new tracing system, monitori
2626 1 . [ Logging] ( #logging )
2727 1 . [ Logs Rotation] ( #logs-rotation )
2828 1 . [ Prometheus] ( #prometheus )
29+ 1 . [ Prometheus HTTP Service Discovery] ( #prometheus-http-service-discovery )
2930 1 . [ EKG Monitoring] ( #ekg-monitoring )
3031 1 . [ Verbosity] ( #verbosity )
3132
@@ -91,7 +92,6 @@ Tracing options that can be given based on a namespace are `severity`, `detail`
9192 "maxFrequency" : 2.0
9293 }
9394 },
94- "TraceOptionPeerFrequency" : 2000
9595}
9696```
9797
@@ -402,6 +402,29 @@ rts_gc_bytes_copied 17114384
402402
403403That page from the example can of course be directly accessed by ` http://127.0.0.1:3000/kindstar-3001 ` .
404404
405+ #### Prometheus HTTP Service discovery
406+
407+ The ` /targets ` path can be used for Prometheus HTTP service discovery. This lets
408+ Prometheus dynamically discover all connected nodes, and scrape their metrics.
409+ Below is a minimal example of a corresponding job definition that goes into the
410+ ` prometheus.yml ` configuration:
411+
412+ ``` yaml
413+ - job_name : " cardano-tracer"
414+ http_sd_configs :
415+ - url : ' http://127.0.0.1:3200/targets' # <-- Your cardano-tracer's real hostname:prometheus port
416+ ` ` `
417+
418+ Each target will have a label ` node_name` which corresponds to the `TraceOptionNodeName` setting in the respective node config.
419+
420+ In `cardano-tracer`'s config, you can optionally provide additional labels to be attached to *all* targets
421+ (default is no additional labels) :
422+ ` ` ` json
423+ "prometheusLabels": {
424+ "<labelname>": "<labelvalue>", ...
425+ }
426+ ` ` `
427+
405428# ## EKG Monitoring
406429
407430The optional field `hasEKG` specifies the host and port of the web
0 commit comments