Small Grant: hostd prometheus exporter

Grant Proposal for hostd Prometheus Exporter

Project Name: hostd Metrics Exporter for Prometheus
Submitted by:
Nikita Orlov


Project Overview

This project aims to build a production-ready Prometheus exporter for Sia’s hostd, enabling users and node operators to monitor the health and performance of their hosts using standardized, widely-adopted infrastructure.

The exporter will expose key operational metrics from hostd, such as availability, storage status, and usage stats, via a /metrics endpoint consumable by Prometheus. In addition, we will provide a starter Grafana dashboard and a configurable alert (e.g. host down) to showcase the exporter in action.


Key Features

  • Prometheus-Compatible Metrics:

    • Export health and availability of hostd nodes.
    • Include key operational variables (e.g. remaining storage, uptime).
    • Collect all metrics available from /api/metrics.
    • Track availability of accounts from /api/accounts.
    • Count connected peers from /api/syncer/peers.
  • Multi-node Support:

    • Monitor multiple hostd endpoints via config file.
  • Built-in Dashboard & Alerts:

    • Simple example Grafana dashboard with Prometheus data source.
    • Alert rule for node downtime — easily extendable by users.
  • Community Input Welcome:

    • If the community has suggestions for additional metrics, we’re happy to incorporate them into the exporter.

Who Benefits From This Project?

  • Sia node operators who want a clear and standard way to monitor their infrastructure.
  • DevOps teams already using Prometheus/Grafana — the exporter plugs in directly.
  • Sia core developers — better insight into real-world node behavior.
  • Infrastructure providers running hostd as a service.

How Does the Project Serve the Sia Ecosystem?

Sia has long prioritized decentralization and user control — but meaningful self-hosting at scale requires monitoring. This project bridges that gap by integrating hostd into one of the most popular monitoring ecosystems (Prometheus), giving operators tools to detect issues proactively and integrate with their own workflows.

This exporter is the missing piece to enable seamless visibility into hostd, and lays groundwork for alerting, auto-scaling, and even potential incident response automation.


Grant Specifics

Amount Requested: $9,000 USD

Budget Breakdown:

  1. Exporter Development (Go): $6,500

    • Metrics collector and parser
    • Config loader and node manager
    • Multi-instance support
    • Prometheus /metrics endpoint
  2. Dashboard & Alerting Example: $1,500

    • Sample Grafana dashboard
    • Prometheus rule file for alerting
    • Example Slack/Telegram integration
  3. Testing, Documentation, Packaging: $1,000

    • Setup guides and examples
    • Dockerfile and binary builds
    • End-to-end validation with real hostd instances

Timeline (1.5 Months)

  • Week 1–2:

    • Exporter scaffolding and config system
    • Basic /metrics endpoint with uptime/availability
  • Week 3–4:

    • Add more metrics (/api/metrics, /api/accounts, /api/syncer/peers)
    • Add multi-node support
  • Week 5–6:

    • Build dashboard & example alert
    • Final polish, testing, documentation
    • Publish and announce project

Potential risks that will affect the outcome of the project

At first glance, the potential risks are minimal. We have a well-documented API (for hostd/renterd), and I’ve reviewed all the methods mentioned here. The only potential risk I foresee is in the future, if a new major version is released. However, I don’t expect it to be a significant problem — updating the monitoring tool to support new major versions of renterd/hostd should be straightforward.

Open-Source Commitment

Yes, the exporter will be released under an MIT license and maintained on GitHub. Contributions and extensions will be encouraged.


Progress Reporting

Yes, progress updates will be submitted biweekly during the development period. All milestones will be documented in the public GitHub repo and optionally shared in Sia’s community channels.


Contact Info

Email: [email protected]
Discord: stringnick6408
GitHub: https://github.com/stringnick

Hello. Thanks for a new request!

  1. This goes past the 10k limit for a small grant
  2. The foundation decided generally to not take on grants that require deep modifications to the base software, as we had one prometheus effort already and it ended badly. Prometheus: remove id label on hostd_consensus_state_index by bustedware · Pull Request #312 · SiaFoundation/hostd · GitHub. You might have gotten the idea from there? But you can find the communications on Standard Grant: Native prometheus endpoints for Sia services - #5 by steve.
  • I personally think this should be inside the core software and be something the core team handles later this year, if it has not already been done (and it looks like a lot was)? (Pull requests · SiaFoundation/hostd · GitHub). If you have something of value you can add on top, then go wild :)

And feel free to clarify if you think I missed or overlooked something.

Kudos.

Hi, thank you for ur comment, I dont wanna change existed codebase (core), i want create separate tool, that use existed hostd API (collect data from several endpoints). My tool will support authorization in this nodes, also multi-node support. Simple dashboard + alerting (telegram).
I want implement the exporter like for Nats.
Basically i took idea from main page


So my example will cover offline / stability alerting through prometheus.

after research, i think it can take less time, cannot change name of topic back to small.

Feel free to reach out to me if you have any questions about my grant and you think it could help GitHub - bustedware/siagrafana - there was nothing about that effort that ended badly. Good luck!

yes, true, i saw u done it, so i think we can close it ( i mean that if Sia Foundation is interested, to do it in one place for all (renterd, hostd and etc), i can do it.
also i agree with pcfreak, that better to hold it inside core.
so basically i want to impl something that can help to implement fast monitoring tool, with notifications (because prometheus/grafana support all 3rd parties).
Maybe i need better to focus on something more high leveled for monitoring, i saw RFP on a main page about monitoring tool, that is why i thought that this grant will be useful, maybe @steve u can help, is it this still relevant?

@StringNick Thanks for your proposal. Please update your proposal to include potential risks that could affect the project. We’ve recently updated our templates and you can find the small grant one here.

Updated with risks. I don’t want to mention in the proposal that I plan to expand the monitoring tool (e.g. availability checks, etc.). Along with this, the result will also include a ready-to-use metrics exporter for developers.
The only significant advantage I see is multi-node support — everything in a single place. It has both pros and cons, which I’ve reflected in the risks section.
Maybe u want something special, we can discuss about it.