The Sia Alerts System: Be more informed about your cloud storage Steve Follow Jan 16 · 5 min read

Sia is a next-gen cloud storage platform that lets you store your files online with ultimate privacy, security, and speed. Learn more at sia.tech.

One of the new features coming in Sia v1.4.2 is the Alert System, a new set of tools that allow Sia to report irregularities during runtime — in other words, it will tell you when you have a problem. It will also tell you what the problem is, how severe the problem is, and (if Sia can figure this much out) what caused the problem.

Here’s a quick example to illustrate the point: Sia needs your wallet to be unlocked periodically so it can access your funds to perform maintenance like repairing files and renewing contracts. If it can’t do this, Sia might eventually lose access to the data you’ve uploaded because you’ve stopped paying for it. It’s an issue that me and my team have seen quite a few times in confused emails from users.

With alerts, Sia can now tell you that your wallet is locked and contracts can’t be renewed, instead of you finding out when your file health drops, or later.

If you’re into Gitlab and want to check out the birth of the Alert System, see core dev Chris’ first MR for it here.

The Sia Alert System will be just as effective, and hopefully less annoying, than this alert system.

Hello, alerts!

Part of my job is to assist with and manage Sia’s support channels. Back in July of 2019, Sia lead dev David asked me to come up with a list of things that siad should be able to tell the user automatically. The list ended up being the types of things that we see a lot in support, and would be helpful for a user to get smacked in the face with instead of having to either figure out on their own, or email in so we can tell them.

Danger, one of our Sia support reps, and I ended up putting together a list of what we thought were good starters for this — the types of things that are good to know as soon as they happen, before they might become problems or emergencies.

The dev team took this as a starting point and began developing a series of alerts for different modules in Sia. This has evolved and expanded into a wide net of alerts that cover every part of Sia, from wallet to renting and everything in between. These alerts should allow you to be far more nimble when using Sia, and address issues before they expand into something that could impact your files or host.

What tools does this give developers?

Because Sia can now provide more insight into potential issues, this is something that can be expanded on by developers of apps that are Built With Sia.

Sia is decentralized, and we take that belief seriously. As a platform, you should remain in control of how you use Sia, what it does, and how it does it. This means that, while Sia might know there’s a problem, and can now tell you about that problem because of Alerts, there aren’t many times when it can fix the problem for you. Doing so could violate the trustless ethos that Sia is built on. For example, Sia might know when it’s out of date, and tell you that that’s a problem because you’re now a version behind, but it can’t auto-update because that removes your control.

This isn’t so much of a problem for third party devs, whose apps inherently take some control away from users in return for convenience. It lets you identify issues, present them to the user, and deal with them in creative ways.

How they work

Alerts register when they’re triggered, and then unregister when whatever caused them is fixed. This makes for easy tracking with the new API endpoint /daemon/alerts . This returns the following for each error that is registered:

cause | string

Cause is the cause for the information contained in msg if known.

msg | string

Msg contains information about an issue.

module | string

Module is the module which caused the alert.

severity | string

Severity is either “warning”, “error”, or “critical” where “error” might be a

lack of internet access and “critical” would be a lack of funds and contracts

that are about to expire due to that.

What’s it look like?

Here’s an example return that you might get when you call for the current alerts that Sia is experiencing.

cause: wallet is locked,

msg: user’s contracts need to be renewed but a locked wallet prevents renewal,

module: contractor,

severity: warning,

Get started as a user

The great thing about the Alert System is that, as a user, you don’t need to do much. If you’re an advanced user, just call the /alerts endpoint or use siac alerts in the command line. You’ll see any currently registered alerts and can take the appropriate action, or at least get pointed in the right direction.

The alerts aren’t yet implemented into Sia-UI, at least not in a GUI-friendly way yet. You can still go the Terminal in Sia-UI and type siac alerts to find them, but in the future Sia-UI will auto-report them to you. The beautiful user interface of Sia-UI is the perfect home for important updates about the status of your Sia node.

How does it all fit together?

The implementation of the Alerts System is an important step for Sia — one that allows Sia to stay decentralized while giving it essential self-monitoring tools. The amazing third-party developers in our community will be able to make use of this to enable a better experience for their users.

This is a feature that will serve enterprise-level use well, and something that can be expanded on easily in the future. As Sia grows (we recently hit an all-time high of 734 TB stored on the network), this feature provides a great way for the platform to remain agile, provide important info, and creates a path for third-party devs to come up with some really clever solutions.

See it in action now

Download Sia v1.4.2 (v1.4.2.1 coming soon) to experience the Alerts System in action. It’s accessible via the CLI for Sia, or the Terminal built-in to Sia-UI. This new feature expands Sia’s capabilities and is accessible to all users.

Additional Alert System Code Merges

Chris’ code that created the Alert System: !3769

Important alerts for renters: !3855

New gateway alerts: !3874

PJ adds hosting alerts: !3903

Tbenz adds the siac alerts command: !3858

David and Matt address low funds: !3754 !4013

Steve