This script allows you to import monitors from UptimeRobot to Uptime Kuma using the Uptime Kuma API.
- Syncs monitors from UptimeRobot to Uptime Kuma.
- Supports HTTP(s), Ping, Keyword, and Port monitors.
- Supports skipping paused monitors.
- Supports cleaning all existing monitors from Uptime Kuma before syncing.
- Duplicate monitors are skipped.
While Uptime Kuma supports a wide range of monitor types, this script currently only supports the following monitor types:
- Friendly Name
- URL
- Monitoring Interval
- Hostname
- Friendly Name
- URL
- Monitoring Interval
- Hostname
- Friendly Name
- URL
- Monitoring Interval
- Hostname
- Keyword
- Friendly Name
- URL
- Monitoring Interval
- Hostname
- Port
Before running the script, make sure you have the following information:
- UptimeRobot API key: Obtain this from your UptimeRobot account.
- Uptime Kuma credentials: You need the protocol (http or https), URL or IP address of your Uptime Kuma instance, username, and password.
-
Clone this repository or download the script to your local machine.
-
Install the required dependencies by running the following command:
pip install -r requirements.txt
-
Update the following variables in the script:
uptimerobot_api_key
: Replace'UPTIMEROBOT-API-KEY'
with your UptimeRobot API key.uptimekuma_protocol
: Set this to'http'
or'https'
depending on the protocol used by your Uptime Kuma instance.uptimekuma_url
: Replace'127.0.0.1:3001'
with the domain or IP address of your Uptime Kuma instance.uptimekuma_username
: Replace'admin'
with your Uptime Kuma username.uptimekuma_password
: Replace'password'
with your Uptime Kuma password.skip_paused_monitors
: Set this toTrue
if you want to skip importing paused monitors.start_clean
: Set this toTrue
if you want to clean all existing monitors from Uptime Kuma before importing.
To run the script, execute the following command:
python sync.py
The script will perform the following steps:
- Fetch monitors from UptimeRobot API.
- Import each monitor to Uptime Kuma API.
- Print status messages and errors for each monitor sync.
Please note that the script will print verbose output during the process.
- The script uses the
requests
library to make API requests, so make sure it is installed before running the script. - The
uptime_kuma_api
module is required for interacting with the Uptime Kuma API. Make sure it is present in the same directory as the script.
This script is released under the MIT License.