mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Mass Add Sites via Command Line Interface (CLI) #2981
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#2981
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Xliff on GitHub (Jan 2, 2024).
⚠️ Please verify that this feature request has NOT been suggested before.
🏷️ Feature Request Type
API, Other
🔖 Feature description
Is there a way that one can add sites from the command line? The UI is well done and useful, but I have dozens of sites I'd like to add (I'm a new Kuma user, and this is a new install), but I'd rather not have to maintain them, en-mass, by hand.
✔️ Solution
I'll probably end up attempting to reverse engineer this, as I have an Immediate need for it. Are there technical documentations that I can use to assist in this?
❓ Alternatives
No response
📝 Additional Context
No response
@CommanderStorm commented on GitHub (Jan 2, 2024):
Currently, there is no CLI and adding one is blocked by #118 imo.
See PR #3854 for further details on planned progress.
@CommanderStorm commented on GitHub (Jan 2, 2024):
Note that third partys have created an api wrapper around our websockets:
https://uptime-kuma-api.readthedocs.io/en/latest/
@Xliff commented on GitHub (Jan 2, 2024):
Where can I find details on the WebSocket messaging? Has this been documented?
UPDATE: Given that using the WebSockets appears to not be the preferred method, and that I do not know Python (yet), is there a way to add monitors via accessing the kuma.db file and adding information to the tables therein?
Please note, I am not looking for something permanent. I just need to get our sites into some form of monitoring now and am willing to look, code, document methods for formally adding them later.
Thanks for your hard work in developing this tool! Works nicely!
@CommanderStorm commented on GitHub (Jan 18, 2024):
You can do that, but I would recomend using the third party python api instead.
see https://uptime-kuma-api.readthedocs.io/en/latest/api.html
@Xliff commented on GitHub (Jan 18, 2024):
I did manage to write something in Raku that worked out. Would you like me to share that code?
@CommanderStorm commented on GitHub (Jan 18, 2024):
Given the scarily complex syntax of said language, I am a bit doubtful that we could use that code, but sure share it ^^
(Why I am doubtful https://www.youtube.com/watch?v=9J0vCQ36020)
@Xliff commented on GitHub (Jan 27, 2024):
ROFLMAO!!!
Don't believe the hype.
I was able to do the addition script in less than a day. If said syntax was so scarily complex, I wouldn't have been able to do half of the things I've been able to accomplish in it.
(And I have over 1 million lines in over 65 separate projects in less than 6 years to prove it...)
@danielgoepp commented on GitHub (Feb 14, 2025):
Unfortunately this option doesn't look like a great plan either:
https://github.com/lucasheld/ansible-uptime-kuma/issues/54
https://github.com/lucasheld/uptime-kuma-api/issues/75
:(
Fingers crossed a good programmatic way to interface with this platform will happen some day.
@paul-uz commented on GitHub (Feb 19, 2025):
Any updates?