theDrey

The ultimate power monitoring and orchestration nest.

Gathering your MixedNuts and dispatching Squirrels to guard your winter stash.

Why build a Drey?

theDrey provides a cozy, centralized hollow for managing power events across your entire forest.

The Central Hoard

Stash UPS data from multiple sources into a single, coherent pile. Stop checking individual hollows and see the big picture.

Winter Preparedness

Don't just watch the nuts—protect them. Define complex shutdown policies and trigger scripts when the storm hits.

Climb Any Tree

Built with Rust for agility. Scampers seamlessly on Linux, macOS, Windows, BSD, and Docker environments.

MixedNuts Logo
Status Page

MixedNuts

The Great Gatherer

MixedNuts acts as a high-performance caching gateway, gathering all your power metrics in one basket.

Virtual Chassis & Clustering

Group multiple UPS units into a single "Virtual Chassis". If you have dual power supplies connected to different UPSs, MixedNuts understands redundancy. It reports a healthy status as long as one UPS is online, or can be configured in Strict Mode to require all devices.

NUT Server Emulator

Legacy device support is built-in. MixedNuts acts as a standard upsd server, allowing devices like Synology NAS, QNAP, or standard upsc clients to monitor your complex "Virtual Chassis" as if it were a single physical UPS.

Key Features
  • Persistent Connections: Maintains long-lived TCP sockets for low-latency updates.
  • Smart Caching: Reduces load on backend UPS hardware while serving instant API responses.
  • Dual Operation Modes: Choose between Active Polling for speed or Passive for on-demand checks.
  • Prometheus Metrics: Built-in /metrics endpoint for instant Grafana integration.
View on GitLab

Start gathering fast. Grab the Quick Start Config to set up your basket.

Squirrel Logo

Squirrel

The Guardian of the Stash

"Watching your nuts so you don't have to."
Squirrel is a vigilant daemon that watches the hoard and takes action when the weather turns.

Advanced Rule Engine

Go beyond simple "on battery" checks. Squirrel evaluates complex, logic-based rules using a simple syntax:
status == 'critical' || battery.charge < 20

Automated Actions

When rules are met, Squirrel executes a variety of actions with debounce protection:

  • Shutdown: Gracefully power down servers, preventing data corruption.
  • 🐚 Exec: Run custom shell scripts (e.g., unmount drives, stop services).
  • 🔔 Notify: Send alerts to Slack, Discord, Email, or generic Webhooks.
  • 🌐 API Calls: Trigger remote APIs (e.g., tell UniFi network gear to power cycle).
Flexible Deployment

Run it as a service with a full config file, or use Ad-Hoc Mode for single-command deployment on embedded devices like UniFi Gateways:

squirrel --api-url "http://mixednuts:8080" --target-tag "rack1" --shutdown-cmd "poweroff"
View on GitLab

Guard the hoard. Use the Example Config to set your watch rules.

For Every Hollow

The Main Trunk

Protect critical application servers. Use MixedNuts' Virtual Chassis to ensure servers with dual PSUs don't shut down prematurely if only one UPS fails.

The Deep Storage

Prevent data corruption. Use the NUT Emulator to let your Synology or QNAP NAS see the aggregated status of your entire power rack as a single device.

The High Branches

Lightweight enough for routers and firewalls. Use Squirrel's Ad-Hoc Mode on UniFi Dream Machines or EdgeRouters to automate safe shutdowns without complex configuration.