Full node monitoring
Introduction
This article is the reference material for developers, to consult about monitoring while operating their full nodes.
Monitoring tools
Hathor full node provides two main built-in monitoring alternatives:
- via HTTP API; and
- via Prometheus integration.
HTTP API
There are many endpoints exposed by Hathor full node HTTP API that can be used in monitoring activities. Among these, the most relevant for ongoing operations are:
GET /status
API operation is particularly useful during deployment stage, offering details on whether the full node has completed initialization, is ready to receive API requests, how many peers it is connected with, etc. In turn, GET /health
conducts a health check of the full node.
For more on these and all other endpoints, see Hathor full node HTTP API.
Prometheus integration
While one may use these endpoints to implement a polling solution, a better strategy for health check routine and overall observability is to use metrics with an off-the-shelf monitoring solution.
For this purpose, Hathor full node integrates with the Prometheus monitoring and alerting toolkit. As such, it generates metrics in Prometheus' text-based format, which can be exposed to Prometheus and compatible solutions. For the list of metrics that are generated by Hathor full node, see Hathor full node metrics.
Suggested solution
This section presents the suggested solution, based on Prometheus, for monitoring one or multiple Hathor full nodes. The following diagram presents the architecture of this solution:

Credits: icons created by Ralph Schmitzer — The Noun Project, IYIKON — The Noun Project, Freepik — Flaticon, Junaid Ali — The Noun Project, Alexa Nguyen — The Noun Project, and krisna arga muria — The Noun Project.
The arrows denote the orientation of API requests. This architecture comprises five main components:
- Hathor full node(s) (multiple instances)
- Node exporter(s) (multiple instances)
- Prometheus
- Grafana
- Alertmanager
In the following subsections, we explain what each of these components is, their roles in the suggested solution, and how they interact. We conclude the section by discussing how to implement the solution.
Hathor full node
As already explained, Hathor full node generates metrics about its own execution in Prometheus' text-based format. It then writes these metrics to the hathor.prom
file located within its database directory. This solution allows for the monitoring of multiple full node instances.
Node exporter
Node exporter is a service that collects metrics within the scope of its host, and exports them to Prometheus. As a result, each full node's host need to execute its own Node exporter instance.
This instance collects full node's metrics by reading the hathor.prom
file, and collects machine-related metrics directly from the host — e.g., CPU usage, memory usage, disk usage, etc. Finally, it exposes these metrics to Prometheus. It exports these metrics at /metrics
endpoint of its HTTP API, and by default listens to Prometheus requests on port 9100.
Prometheus
The Prometheus server is the central component of the suggested monitoring solution. It scrapes metrics from targets, stores them in its local database, and aggregates them into timeseries, enabling data analysis and alarms.
In the suggested solution, Prometheus scrapes metrics from each existent instance of Node exporter. It exposes all aggregated data through its HTTP API and listens on port 9090 by default. Grafana can then be used to visualize this data.
Additionally, Prometheus allows the definition of alarms. An alarm is a piece of configuration describing an undesirable condition and alerts issued in response to it. An alert is a notification message informing about a change of state, typically signifying a potential problem 1. Thus, Prometheus pushes alerts to Alertmanager.