Export nano_node stats for prometheus
Project description
nano-prom
Requirements:
- python 3.7+ https://www.python.org/downloads/
Installation:
pip3 install nano-prom-exporter
Usage:
nano-prom [-h] [--rpchost RPCHOST] [--rpcport RPCPORT] [--datapath DATAPATH] [--pushgateway PUSHGATEWAY] [--hostname JOBNAME] [--interval SEC] [--username USERNAME] [--password PASSWORD]
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 |
--username | USERNAME | "" | http_basic_auth support username |
--password | PASSWORD | "" | http_basic_auth support password |
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for nano_prom_exporter-0.1.5-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 439a6d7597e90ad1ec1f358fda769159e363fa29bf779ebd6fc8796917de152d |
|
MD5 | 98d64b3cc14fdb407705d0df3b74465d |
|
BLAKE2b-256 | 5c0e763e48671a7ac6e77373e2aa3f9475c5d7a8abfbc87d4b1175dacdb6d522 |
Close
Hashes for nano_prom_exporter-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd18d51f223294e57bb90ad6cded6a71ed25a6791bf9101a7b5dee85cb0e3fda |
|
MD5 | 92f50b5e51d878139346b2fd906ea2d7 |
|
BLAKE2b-256 | 4eab42e1bdcdfde26fe4b9225c2264b01e05af225bbf14cc62c57c555c8a1285 |