Grant Proposal: hostd monitoring service

Introduction

Project Name: Sia heartbeat

Name of the organization or individual submitting the proposal: Michał Maj (individual)

Describe your project.
The goal of the project is to create portal allowing users to register for notification when their hostd node goes down. I am planning on creating the following monitoring channels:

  • two independent watchdogs (1 in EU and 1 in US), which will contact nodes via RHPv2 and RHPv3 to check if they are reachable
  • optional software to be run on the same machine as hostd, that will send ping messages to these watchdog satellites, allowing for quicker debugging (is the whole machine down or just RHP communication issue?)

Users should be able to register for the following ways of notification:

  • E-mail notification
  • SMS message

This service is meant to be free. All costs should be covered by grants.

This grant is just for creation of the service and first few weeks of operation. If it succeeds, I will open next grant to secure funds for the service to remain free in long-run.

Who benefits from your project?
Anyone who is running hostd.

How does the project serve the Foundation’s mission of user-owned data?
Self-hosting such watchdogs makes hostd unnecessarily expensive and requires technical knowledge. Providing such portal for free should increase interest in Sia compared to its competitors (who have this feature built-in btw).

Grant Specifics

I estimate project can be up and running for around 2-3 months given I receive total amount of 2500$. This includes:

  • VPS for 4 months
  • Pack of around 1000 SMS worldwide (we will se how quickly it gets eaten up before next grant)
  • Salary for me

Timeline is as follows:

  • August - examine what can be extracted from RHP and what’s the best way of doing it (running hostd locally and querying it or maybe custom partial implementation of RHP)
  • September - by the end of the month portal should be up and runnning
  • October - getting feedback on how it works, improvements. If everything works out - applying for next grant with longer timeframe.

Potential risks that will affect the outcome of the project:
Well, there are only three things that might harm the project:

  • My potential lack of time (I am heavily involved into non-technical voluntary work) - the product will be delivered, it just might be a month later.
  • Lack of interest from the community
  • I am not front-end developer by any means, so portal may come out a little unintuitive. But I will do my best.

Development Information

Will all of your project’s code be open-source? Yes, but I don’t promise there will be documentation on how to run/self-host it (there obviously will be documentation on how to set up additional local watchdog).

Leave a link where code will be accessible for review. GitHub - majudev/hostd-mon

Do you agree to submit monthly progress reports? Yes

Contact info

Email: mimaj@agh.edu.pl

1 Like

It would be very cool to have another service to provide this for hosts.

You can find an example of scanning a host over RHP2 and RHP3 here: https://github.com/SiaFoundation/host-bench/blob/1019366cee8ea65ef8fcfa675d2be6394548887c/benchmark/benchmark.go#L156-L199

Thank you for code sample, I will definitely use it.

Also one more thing: if anyone has ideas on what methods of notification should be implemented, please let me know in this thread. I will consider it.

I’m currently using UptimeRobot (for over a year) which has an app for my iphone. I get alerts within 5 min of a problem on the server and it’s currently free for up to 50 servers.


It would be nice to have an additional backup but I think the above service works well and costs the foundation nothing.

Just my 2 cents

Hello @maju,

Thanks for your proposal! After seeing the value in another tool for host reliability and stability, the committee was happy to approve this grant request.

We’ll reach out via email with onboarding instructions.

Regards,
Kino on behalf of the Sia Foundation and Grants Committee

Glad to hear that! I’ve replied to your email.

Progress Report

This month no progress has been done, except completing onboarding and signing agreement. The whole schedule is going to be shifted by two weeks (it’s already included in the agreement). Additionally my friend decided to help me make project happen and he will be responsible for front-end.

Additionally, our plan is:

  • Using React for front-end
  • Prisma + MySQL/MariaDB as database
  • ExpressJS as backend framework
  • satellites written in Go (because of existing codebase for RHP)
  • satellites connected to main instance via wireguard

This month I will be working on:

  • Checking what can be extracted from RHP
  • Specifying what technologies we will be using
  • Maybe setting up VPS? We’ll see
  • Writing front-end and maybe some mock-up for back-end
  • Buying domain
  • Starting work on satellite

I hope there will be no more delays.

1 Like