Skip to main content

Export nano_node stats for prometheus

Project description

nano-prom

Requirements:

Installation:

  • pip3 install nano-prom-exporter

Usage:

nano-prom [-h] [--rpchost RPCHOST] [--rpcport RPCPORT] [--datapath DATAPATH] [--pushgateway PUSHGATEWAY] [--hostname JOBNAME] [--interval sec]

Optional Arguments
-h, --help show this help message and exit
--rpchost RPCHOST "[::1]" default host string
--rpcport RPCPORT "7076" default rpc port
--datapath DATAPATH "~/Nano/" as default
--pushgateway PUSHGATEWAY "http://localhost:9091" prometheus push gateway, push to multiple with ; separaton
--hostname JOBNAME socket.gethostname() jobname to pass to gateway
--interval sec "10" seconds between pushing

Stats exposed:

Source Prometheus Series{tag} Info
rpc nano_rpc_response histogram of rpc response by action
nano_active_difficulty Active Difficulty Multiplier
nano_block_count{type} Block Count Statistics
nano_confirmation_history{count} Block Confirmation Average{count sample size}
nano_node_frontier_count Frontier Count
nano_node_online_stake_total Online Stake Total
nano_node_peers_stake_total Peered Stake Total
nano_node_peer_count raw peer count
nano_peers{endpoint, protocol_version} connected to {who}, running {what}
nano_uptime node uptime(sec)
nano_version version string
nano_stats_counters{type, detail, dir} stats counter entries by type detail and direction
nano_stats_objects_count{l1,l2,l3} stats object count {l1,l2,l3}
nano_stats_objects_size{l1,l2,l3} stats object size {l1,l2,l3}
system nano_node_memory_rss{pid} allocated and in ram
nano_node_cpu_usage{pid} percentage CPU usage
nano_node_threads{pid,tid} percentage of total CPU per thread id
nano_node_database size of database(bytes)
nano_node_volume_free size of volume hosting DATAPATH free
nano_node_volume_used size of volume hosting DATAPATH used
nano_node_volume_total size of volume hosting DATAPATH total
nano_node_memory_vms{pid} all memory used
nano_node_memory_paged_pool{pid}

Development Requirements:

  • prometheus-client pip3 install prometheus-client
  • requests pip3 install requests
  • psutil pip3 install psutil

Development Installation using venv:

  • python3 -m venv venv
  • . /venv/bin/activate
  • pip install -r requirements.txt
  • pip3 install -e . from repo root

DEBUGGING

Setting NANO_PROM_DEBUG to 1 will print exceptions, useful for debugging

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nano_prom_exporter-0.1.4.tar.gz (6.4 kB view details)

Uploaded Source

Built Distributions

nano_prom_exporter-0.1.4-py3.8.egg (6.8 kB view details)

Uploaded Egg

nano_prom_exporter-0.1.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file nano_prom_exporter-0.1.4.tar.gz.

File metadata

  • Download URL: nano_prom_exporter-0.1.4.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for nano_prom_exporter-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9e5a8fa258577da6317e1dfef4e38cba1f09530c5383929270857503c8802036
MD5 95e929f10c9dc2d6578452e5cfb32127
BLAKE2b-256 c2709c31bb3489f1df861449b40ac9754b5fd80fed8b638131998677aeb455f2

See more details on using hashes here.

File details

Details for the file nano_prom_exporter-0.1.4-py3.8.egg.

File metadata

  • Download URL: nano_prom_exporter-0.1.4-py3.8.egg
  • Upload date:
  • Size: 6.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for nano_prom_exporter-0.1.4-py3.8.egg
Algorithm Hash digest
SHA256 45e42722c2e242acd79ada249947921a8a5ff891be803b08db36f05c870a5e8f
MD5 c7621bebb1dc07638824e264e4149d39
BLAKE2b-256 b79f5b6951e4887d9cd7c179a081b81cdbe2c3d120286e69f35fad9ca7c4b6c6

See more details on using hashes here.

File details

Details for the file nano_prom_exporter-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: nano_prom_exporter-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for nano_prom_exporter-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a091bedb556c9fedd954177fd428d2d133ab9c1242172efc76e87151ca0548f3
MD5 5d825f671f09eb843b237c408353a208
BLAKE2b-256 f07f0c141d903a061461332f0485bd0086ead17917a03f0fb01ad33b2e9616fc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page