From 04a7296aee2d062b22372b9854c114b6134588ca Mon Sep 17 00:00:00 2001 From: Michael Karg Date: Fri, 13 Sep 2024 16:59:21 +0200 Subject: [PATCH] workbench: add default metrics helptexts to cardano-tracer --- .../configuration/metrics_help.json | 137 ++++++++++++++++++ nix/nixos/cardano-tracer-service.nix | 3 +- nix/workbench/service/tracer.nix | 1 + 3 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 cardano-tracer/configuration/metrics_help.json diff --git a/cardano-tracer/configuration/metrics_help.json b/cardano-tracer/configuration/metrics_help.json new file mode 100644 index 00000000000..cf73c2660c0 --- /dev/null +++ b/cardano-tracer/configuration/metrics_help.json @@ -0,0 +1,137 @@ +{ + "Forge.DelegMapSize": "Delegation map size", + "Forge.UtxoSize": "UTxO set size", + "Mem.resident": "Kernel-reported RSS (resident set size)", + "RTS.alloc": "RTS-reported bytes allocated", + "RTS.gcHeapBytes": "RTS-reported heap bytes", + "RTS.gcLiveBytes": "RTS-reported live bytes", + "RTS.gcMajorNum": "Major GCs", + "RTS.gcMinorNum": "Minor GCs", + "RTS.gcticks": "RTS-reported CPU ticks spent on GC", + "RTS.mutticks": "RTS-reported CPU ticks spent on mutator", + "RTS.threads": "RTS green thread count", + "Stat.cputicks": "Kernel-reported CPU ticks (1/100th of a second), since process start", + "Stat.fsRd": "FS bytes read", + "Stat.fsWr": "FS bytes written", + "Stat.netRd": "IP packet bytes read", + "Stat.netWr": "IP packet bytes written", + "SuppressedMessages...": "", + "aboutToLeadSlotLast": "", + "adoptedOwnBlockSlotLast": "", + "adoptionThreadDied": "", + "blockContext": "", + "blockFromFuture": "", + "blockNum": "Number of blocks in this chain fragment.", + "blockReplayProgress": "Progress in percent", + "blockfetchclient.blockdelay": "", + "blockfetchclient.blockdelay.cdfFive": "", + "blockfetchclient.blockdelay.cdfOne": "", + "blockfetchclient.blockdelay.cdfThree": "", + "blockfetchclient.blocksize": "", + "blockfetchclient.lateblocks": "", + "blocksForged": "How many blocks did this node forge?", + "cardano_build_info": "Cardano node build info", + "cardano_version_major": "Cardano node version information", + "cardano_version_minor": "Cardano node version information", + "cardano_version_patch": "Cardano node version information", + "connectedPeers": "Number of connected peers", + "connectionManager.duplexConns": "", + "connectionManager.fullDuplexConns": "", + "connectionManager.inboundConns": "", + "connectionManager.outboundConns": "", + "connectionManager.unidirectionalConns": "", + "couldNotForgeSlotLast": "", + "currentKESPeriod": "", + "density": "The actual number of blocks created over the maximum expected number of blocks that could be created over the span of the last @k@ blocks.", + "epoch": "In which epoch is the tip of the current chain.", + "forgedInvalidSlotLast": "", + "forgedSlotLast": "", + "forging_enabled": "Can this node forge blocks? (Is it provided with block forging credentials) 0 = no, 1 = yes", + "haskell_compiler_major": "Cardano compiler version information", + "haskell_compiler_minor": "Cardano compiler version information", + "headersServed": "A counter triggered on any header event", + "headersServed.falling": "A counter triggered only on header event with falling edge", + "inboundGovernor.Cold": "", + "inboundGovernor.Hot": "", + "inboundGovernor.Idle": "", + "inboundGovernor.Warm": "", + "ledgerState": "", + "ledgerView": "", + "localInboundGovernor.cold": "", + "localInboundGovernor.hot": "", + "localInboundGovernor.idle": "", + "localInboundGovernor.warm": "", + "mempoolBytes": "Byte size of the mempool", + "nodeCannotForge": "How many times was this node unable to forge [a block]?", + "nodeIsLeader": "How many times was this node slot leader?", + "nodeNotLeader": "", + "notAdoptedSlotLast": "", + "operationalCertificateExpiryKESPeriod": "", + "operationalCertificateStartKESPeriod": "", + "peerSelection.ActiveBigLedgerPeers": "Number of active big ledger peers", + "peerSelection.ActiveBigLedgerPeersDemotions": "Number of active big ledger peers demotions", + "peerSelection.ActiveBootstrapPeers": "Number of active bootstrap peers", + "peerSelection.ActiveBootstrapPeersDemotions": "Number of active bootstrap peers demotions", + "peerSelection.ActiveLocalRootPeers": "Number of active local root peers", + "peerSelection.ActiveLocalRootPeersDemotions": "Number of active local root peers demotions", + "peerSelection.ActiveNonRootPeers": "Number of active non root peers", + "peerSelection.ActiveNonRootPeersDemotions": "Number of active non root peers demotions", + "peerSelection.ActivePeers": "Number of active peers", + "peerSelection.ActivePeersDemotions": "Number of active peers demotions", + "peerSelection.Cold": "Number of cold peers", + "peerSelection.ColdBigLedgerPeers": "Number of cold big ledger peers", + "peerSelection.ColdBigLedgerPeersPromotions": "Number of cold big ledger peers promotions", + "peerSelection.ColdBootstrapPeersPromotions": "Number of cold bootstrap peers promotions", + "peerSelection.ColdNonRootPeersPromotions": "Number of cold non root peers promotions", + "peerSelection.ColdPeersPromotions": "Number of cold peers promotions", + "peerSelection.EstablishedBigLedgerPeers": "Number of established big ledger peers", + "peerSelection.EstablishedBootstrapPeers": "Number of established bootstrap peers", + "peerSelection.EstablishedLocalRootPeers": "Number of established local root peers", + "peerSelection.EstablishedNonRootPeers": "Number of established non root peers", + "peerSelection.EstablishedPeers": "Number of established peers", + "peerSelection.Hot": "Number of hot peers", + "peerSelection.HotBigLedgerPeers": "Number of hot big ledger peers", + "peerSelection.KnownBigLedgerPeers": "Number of known big ledger peers", + "peerSelection.KnownBootstrapPeers": "Number of known bootstrap peers", + "peerSelection.KnownLocalRootPeers": "Number of known local root peers", + "peerSelection.KnownNonRootPeers": "Number of known non root peers", + "peerSelection.KnownPeers": "Number of known peers", + "peerSelection.LocalRoots": "Numbers of warm & hot local roots", + "peerSelection.RootPeers": "Number of root peers", + "peerSelection.Warm": "Number of warm peers", + "peerSelection.WarmBigLedgerPeers": "Number of warm big ledger peers", + "peerSelection.WarmBigLedgerPeersDemotions": "Number of warm big ledger peers demotions", + "peerSelection.WarmBigLedgerPeersPromotions": "Number of warm big ledger peers promotions", + "peerSelection.WarmBootstrapPeersDemotions": "Number of warm bootstrap peers demotions", + "peerSelection.WarmBootstrapPeersPromotions": "Number of warm bootstrap peers promotions", + "peerSelection.WarmLocalRootPeersPromotions": "Number of warm local root peers promotions", + "peerSelection.WarmNonRootPeersDemotions": "Number of warm non root peers demotions", + "peerSelection.WarmNonRootPeersPromotions": "Number of warm non root peers promotions", + "peerSelection.WarmPeersDemotions": "Number of warm peers demotions", + "peerSelection.WarmPeersPromotions": "Number of warm peers promotions", + "peerSelection.churn.DecreasedActiveBigLedgerPeers": "number of decreased active big ledger peers", + "peerSelection.churn.DecreasedActivePeers": "number of decreased active peers", + "peerSelection.churn.DecreasedEstablishedBigLedgerPeers": "number of decreased established big ledger peers", + "peerSelection.churn.DecreasedEstablishedPeers": "number of decreased established peers", + "peerSelection.churn.DecreasedKnownBigLedgerPeers": "number of decreased known big ledger peers", + "peerSelection.churn.DecreasedKnownPeers": "number of decreased known peers", + "peerSelection.churn.IncreasedActiveBigLedgerPeers": "number of increased active big ledger peers", + "peerSelection.churn.IncreasedActivePeers": "number of increased active peers", + "peerSelection.churn.IncreasedEstablishedBigLedgerPeers": "number of increased established big ledger peers", + "peerSelection.churn.IncreasedEstablishedPeers": "number of increased established peers", + "peerSelection.churn.IncreasedKnownBigLedgerPeers": "number of increased known big ledger peers", + "peerSelection.churn.IncreasedKnownPeers": "number of increased known peers", + "peersFromNodeKernel": "", + "remainingKESPeriods": "", + "served.block": "", + "slotInEpoch": "Relative slot number of the tip of the current chain within the epoch..", + "slotIsImmutable": "", + "slotNum": "Number of slots in this chain fragment.", + "slotsMissed": "How many slots did this node miss?", + "submissions.accepted": "", + "submissions.rejected": "", + "submissions.submitted": "", + "systemStartTime": "The UTC time this node was started.", + "txsInMempool": "Transactions in mempool", + "txsProcessedNum": "" +} diff --git a/nix/nixos/cardano-tracer-service.nix b/nix/nixos/cardano-tracer-service.nix index 71f2934c30d..14879b1499c 100644 --- a/nix/nixos/cardano-tracer-service.nix +++ b/nix/nixos/cardano-tracer-service.nix @@ -2,7 +2,7 @@ pkgs: let serviceConfigToJSON = cfg: { - inherit (cfg) networkMagic resourceFreq; + inherit (cfg) networkMagic resourceFreq metricsHelp; # loRequestNum = 100; network = if cfg.acceptingSocket != null @@ -75,6 +75,7 @@ in pkgs.commonLib.defServiceModule ekgRequestFreq = opt int 1 "EKG request frequency"; prometheus = opt attrs {} "Prometheus overrides: see cardano-tracer documentation."; resourceFreq = mayOpt int "Frequency (1/ms) for tracing resource usage."; + metricsHelp = mayOpt str "JSON file containing metrics help annotations for Prometheus"; ### Here be dragons, on the other hand.. configFile = mayOpt str diff --git a/nix/workbench/service/tracer.nix b/nix/workbench/service/tracer.nix index 0a2509b6cdc..22fb7e38643 100644 --- a/nix/workbench/service/tracer.nix +++ b/nix/workbench/service/tracer.nix @@ -30,6 +30,7 @@ let }; configFile = "config.json"; logRoot = "."; + metricsHelp = "../../../cardano-tracer/configuration/metrics_help.json"; } // optionalAttrs backend.useCabalRun { executable = "cardano-tracer"; } // optionalAttrs profile.tracer.rtview {