KumaCub
Run local checks; push results to Uptime Kuma.
KumaCub is a lightweight daemon that executes scheduled health checks and pushes the results to Uptime Kuma. It supports Nagios-compatible check scripts and provides flexible configuration via TOML files or environment variables.
Nagios-compatible check scripts are easy to find (and easy to write). You can find more than 50 of them at the Monitoring Plugins website alone. There are checks for local system metrics, such as:
- Disk space
- Disk/RAID health
- Load averages
- Processes
- System clock (NTP)
- and more...
KumaCub allows you to execute these plugins locally, and push the results to Uptime Kuma.
Installation
Arch Linux (AUR)
For Arch Linux users, you can install kumacub from the AUR. Installing this way will also install the systemd unit file and a sample config file.
# Install from AUR (we'll use `yay` for this example)
yay -S kumacub
# Optionally, install the monitoring-plugins package
yay -S monitoring-plugins
Manual Installation (PIP)
If your distro doesn't have a package available, you can install KumaCub manually.
sudo pip install kumacub
sudo kumacub install
Quick Setup with uv
If you prefer to use uv, you can set up your systemd service to use uv to run KumaCub.
- Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sudo sh
- Create a systemd unit file
/etc/systemd/system/kumacub.service:[Unit] Description=KumaCub - Run local checks and push results to Uptime Kuma Documentation=https://github.com/toadstule/kumacub After=network-online.target Wants=network-online.target [Service] ExecStart=/root/.local/bin/uv run --isolated --no-progress --python=3.13 --with kumacub kumacub daemon ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target
- Create a config file
/etc/kumacub/config.toml: (see Configuration) - Reload systemd daemon:
sudo systemctl daemon-reload
Configuration
KumaCub uses TOML configuration files. By default, it looks for /etc/kumacub/config.toml, but you can override this
with the KUMACUB__CONFIG environment variable.
Configuration Sources
KumaCub supports multiple configuration sources that are merged in order of priority (highest to lowest):
- Environment variables (
KUMACUB__*) - Main config file (
KUMACUB__CONFIG, default:/etc/kumacub/config.toml) - Checks directory (
KUMACUB__CHECKS_DIR, default:/etc/kumacub/checks.d/)
Configuration Directory
You can place multiple TOML files in the checks directory (/etc/kumacub/checks.d/ by default). All .toml files in this directory will be loaded and merged in alphabetical order.
Important: Files in the checks directory can only contain [[checks]] sections. Other configuration (like [log]) must be in the main config file.
Checks Accumulation: All [[checks]] entries from both the main config file and all files in the checks directory are accumulated into a single list. This means you can distribute your checks across multiple files and they will all be executed.
# Override checks directory location.
export KUMACUB__CHECKS_DIR=/path/to/checks.d/
Example directory structure:
/etc/kumacub/
├── config.toml # Base configuration (logging, etc.)
└── checks.d/
├── 01_disk_usage.toml # Disk usage check
├── 02_system_time.toml # NTP check
└── 03_system_load.toml # Load average check
Example Configuration
Single File Configuration
For simple setups, you can use a single configuration file:
# Logging configuration.
[log]
level = "INFO" # DEBUG, INFO, WARNING, ERROR, CRITICAL
structured = true # Use JSON-formatted logs
# Define checks.
[[checks]]
name = "disk usage"
executor.command = "/usr/lib/monitoring-plugins/check_disk"
executor.args = ["-c", "90"]
publisher.url = "https://uptime-kuma.example.com"
publisher.push_token = "your-push-token-here"
schedule.interval = 60 # Run every 60 seconds
[[checks]]
name = "system time (ntp)"
executor.command = "/usr/lib/monitoring-plugins/check_ntp_time"
executor.args = ["-H", "pool.ntp.org", "-c", "10"]
publisher.url = "https://uptime-kuma.example.com"
publisher.push_token = "your-push-token-here"
schedule.interval = 30
[[checks]]
name = "system load"
executor.command = "check_load"
executor.args = ["-c", "10", "-w", "10"]
executor.env = { "PATH" = "/usr/lib/monitoring-plugins" }
publisher.url = "https://uptime-kuma.example.com"
publisher.push_token = "your-push-token-here"
schedule.interval = 30
Split Configuration (Directory-based)
For more complex setups, you can split configuration across multiple files:
/etc/kumacub/config.toml (base configuration):
# Base logging configuration.
[log]
level = "INFO"
structured = true
/etc/kumacub/checks.d/01_disk_usage.toml:
[[checks]]
name = "disk usage"
executor.command = "/usr/lib/monitoring-plugins/check_disk"
executor.args = ["-c", "90"]
publisher.url = "https://uptime-kuma.example.com"
publisher.push_token = "your-push-token-here"
schedule.interval = 60
/etc/kumacub/checks.d/02_system_time.toml:
[[checks]]
name = "system time (ntp)"
executor.command = "/usr/lib/monitoring-plugins/check_ntp_time"
executor.args = ["-H", "pool.ntp.org", "-c", "10"]
publisher.url = "https://uptime-kuma.example.com"
publisher.push_token = "your-push-token-here"
schedule.interval = 30
/etc/kumacub/checks.d/03_system_load.toml:
[[checks]]
name = "system load"
executor.command = "check_load"
executor.args = ["-c", "10", "-w", "10"]
executor.env = { "PATH" = "/usr/lib/monitoring-plugins" }
publisher.url = "https://uptime-kuma.example.com"
publisher.push_token = "your-push-token-here"
schedule.interval = 30
Configuration Fields
Check Configuration
Each [[checks]] entry supports:
- name: Unique identifier for the check
- executor.command: Command to execute
- executor.args: Command arguments (optional, default:
[]) - executor.env: Environment variables (optional, default:
{}) - publisher.url: Uptime Kuma instance URL
- publisher.push_token: Uptime Kuma push token
- schedule.interval: Check interval in seconds (default:
60)
Environment Variables
You can override any configuration value using environment variables with the KUMACUB__ prefix:
# Override config file location.
export KUMACUB__CONFIG=/path/to/config.toml
# Override checks directory location.
export KUMACUB__CHECKS_DIR=/path/to/checks.d/
# Override log level.
export KUMACUB__LOG__LEVEL=DEBUG
# Override log format.
export KUMACUB__LOG__STRUCTURED=false
Usage
Managing the Systemd Service
# Start the service.
sudo systemctl start kumacub
# Stop the service.
sudo systemctl stop kumacub
# Restart the service.
sudo systemctl restart kumacub
# Reload configuration without restarting.
sudo systemctl reload kumacub
# Check service status.
sudo systemctl status kumacub
# View logs.
sudo journalctl -u kumacub -f
# Enable on boot.
sudo systemctl enable kumacub
# Disable on boot.
sudo systemctl disable kumacub
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
Metadata
Release files for kumacub 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kumacub-0.8.0.tar.gz | 30.5 kB | With provenance | Details for kumacub-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kumacub-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for kumacub-0.8.0-py3-none-any.whl |
Total release size: 73.9 kB
Release files / kumacub-0.8.0.tar.gz
| Download URL | kumacub-0.8.0.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc21c5765313952af8986c06730acbadfd2a6e15cbbef093477e7b56324c7b96
|
|
BLAKE2b-256 checksum How to use checksums |
bc7ee460919e94a2b5747c4cbd8e4c07fdab504a9fd48c00022676b3113259e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logRelease files / kumacub-0.8.0-py3-none-any.whl
| Download URL | kumacub-0.8.0-py3-none-any.whl |
|---|---|
| Size | 43.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53fd3ce2f4a87e68efc0625a8420c069a7cb12514d1b377bca95b5ccf32bb2b5
|
|
BLAKE2b-256 checksum How to use checksums |
c4c0108e3310b713406af9f718562f470a8bcf2ee884373e58be03cc8e782481
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logSecurity for kumacub 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for kumacub-0.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.