Plugins & custom checks
Lookout watches CPU, memory, disk, and services out of the box. Plugins let you check anything else — a website is up, a certificate isn’t expiring, a queue isn’t backing up — in any language you like.
Status: the plugin runner is part of the next phase. This page documents the model so you can write checks that will drop straight in.
Nagios-compatible
If you’ve used Nagios, you already know how Lookout plugins work. A plugin is any program that:
- prints a human-readable status line, and
- exits with a code that means the result.
| Exit code | Meaning |
|---|---|
0 | OK |
1 | WARNING |
2 | CRITICAL |
3 | UNKNOWN |
This means the thousands of existing Nagios plugins work with Lookout unchanged.
A check in any language
Here’s a complete check in shell — “is the website returning 200?”:
#!/usr/bin/env bash
code=$(curl -s -o /dev/null -w "%{http_code}" https://example.com)
if [ "$code" = "200" ]; then
echo "OK - site is up ($code)"; exit 0
else
echo "CRITICAL - site returned $code"; exit 2
fi Performance data
Append metrics after a | so Lookout can graph them over time:
echo "OK - response 142ms | response_ms=142 status=200"; exit 0 Installing a custom plugin
Drop the script in the agent’s plugins folder with a small manifest describing how often to run it:
# /etc/lookout/plugins/site-up.yaml
name: site-up
command: ./site-up.sh
interval: 60s The agent runs it on schedule and reports the result to the dashboard, where it shows up like any other check and can trigger alerts.