Skip to content

techcoderx/hived-exporter

Repository files navigation

hived exporter

Metrics exporter for hived node. Currently exports block stats and data from hived API.

Required Dependencies

  • nodejs and pnpm (Latest LTS, v20 minimum supported), or Docker
  • Running hived node

Setup hived config

Enable block stats notification in hived config.ini file as follows:

notifications-endpoint = 127.0.0.1:8088

block-stats-report-type = FULL
block-stats-report-output = NOTIFY

Standalone Installation

git clone https://github.com/techcoderx/hived-exporter
cd hived-exporter
pnpm i
pnpm run compile

Start

pnpm start

Docker

A docker compose file has been included consisting of hived-exporter and VictoriaMetrics. Two instances of hived-exporter will be created, one of which exports data from hived notifications (every 3 seconds) and the other exports data from hived APIs (every 30 seconds).

Configure the containers by copying the included .env.docker.example file into .env, and modifying the copied .env file as follows:

Env Variable Description Default
HIVED_EXPORTER_LOG_LEVEL Sets log level for exporter instances info
HIVED_EXPORTER_API_NODE_URL hived API endpoint to scrape API data from
HIVED_EXPORTER_ACCOUNTS Comma-separated list of Hive accounts to export metrics
VICTORIA_PORT Listening port for VictoriaMetrics 8428
VICTORIA_RETENTION_PERIOD Metrics retention period 90d

Run the docker compose as follows:

docker compose up -d

To stop the docker compose:

docker compose down

One-liner update command:

docker compose down; git pull; docker compose build; docker compose up -d

⚠️ Warning

When running the exporter with haf_api_node (especially in the same Docker Compose), the exporter process must be running first before starting hived, otherwise the haf container will crash and fail to start .

About

Metrics exporter for hived node

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published