Skip to main content

Lighthouse Agent

Lighthouse is a small agent that runs on Linux, macOS, Windows and Raspberry Pi. It collects readings, copes with network drops, updates itself, and sends everything to a General crate.

Each thing Lighthouse watches is a monitor. A monitor has a name (which becomes the device in your crate) and a source: what it collects.


Install​

Linux, macOS and Raspberry Pi: paste this into a terminal:

curl -sL get.carroted.com | sudo bash

Windows: open PowerShell as Administrator and run:

iwr get.carroted.com | iex

Lighthouse installs as a system service and starts on boot.


Add a monitor​

You need your crate ID (it starts with crt_) and your API key, both under Send data in the crate.

Step 1: Run lighthouse --add

On Linux or macOS:

sudo lighthouse --add --name "server-01" --harbor-id "YOUR_CRATE_ID" --key "YOUR_API_KEY" --source linux

On Windows, leave out sudo and use --source windows.

Step 2: Check it

Run lighthouse --list. Your monitor shows with its health. Readings arrive in the crate every 60 seconds.

note

The flag that takes your crate ID is still called --harbor-id.


Sources​

Pick one with --source.

SourceWhat it collects
linux, macos, windowsCPU, memory, disk usage, uptime and load averages
dockerEach container's state (running or exited), uptime and resource use
uptimeWhether a website answers, its response code and how long it takes
execWhatever your own command or script prints. See Custom scripts

For a Meshtastic radio, use exec with the mesh engine. See Meshtastic.

Docker needs permission to talk to Docker: usually the docker group on Linux, or Administrator on Windows.

sudo lighthouse --add --name "docker-host" --harbor-id "YOUR_CRATE_ID" --key "YOUR_API_KEY" --source docker

Uptime needs the address to check:

sudo lighthouse --add --name "website" --harbor-id "YOUR_CRATE_ID" --key "YOUR_API_KEY" --source uptime --param target_url="https://example.com"

Add --param timeout_ms=5000 to change how long it waits.


Custom scripts​

The exec source runs any command or script (Python, Bash, Node and so on) and reads the JSON it prints.

sudo lighthouse --add --name "weather" --harbor-id "YOUR_CRATE_ID" --key "YOUR_API_KEY" --source exec --param command="python3 /opt/weather.py"

One device: print one JSON object. Each key becomes a metric, and the monitor's --name is the device.

{ "temperature": 24.5, "humidity": 60 }

Many devices: print a JSON array with a ship_id in each item. Each item is sent as its own device.

[
{ "ship_id": "living-room", "temperature": 22.0 },
{ "ship_id": "kitchen", "temperature": 25.5 }
]

Add --param timeout_ms=10000 to stop a script that hangs.


Options​

FlagWhat it doesDefault
--nameThe monitor's name, used as the device
--harbor-idYour crate ID
--keyYour API key
--sourceWhat to collectlinux
--intervalSeconds between readings60
--batch-sizeMost readings sent in one request100
--paramA setting for the source, like target_url=...
--endpointSend somewhere else, such as a self-hosted serverhttps://data.carroted.com

On Maker, you can raise --batch-size to 250. See Plans and limits.


Manage Lighthouse​

CommandWhat it does
lighthouse --listShows every monitor and its health
lighthouse --logs "name"Shows the logs for one monitor
lighthouse --remove "name"Stops and deletes a monitor
lighthouse --autoupdate=falseTurns off the daily update check
sudo lighthouse --uninstallRemoves the service and the program (no sudo on Windows)