louislam / uptime-kuma Goto Github PK
View Code? Open in Web Editor NEWA fancy self-hosted monitoring tool
Home Page: https://uptime.kuma.pet
License: MIT License
A fancy self-hosted monitoring tool
Home Page: https://uptime.kuma.pet
License: MIT License
Discord allows for the use of webhooks, which may be more suitable than a bot for an application like this. Using a webhook also means users will not have to generate a bot token and will just have to supply their webook URL into Uptime-Kuma.
More reading:
https://gist.github.com/Birdie0/78ee79402a4301b1faf412ab5f1cdcf9
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
installing manually not docker.
$ npm run setup
> uptime-kuma@ setup /code/uptime-kuma
> git checkout 1.0.0 && npm install && npm run build
Previous HEAD position was 0176857 add ability to change the listening port and hostname
HEAD is now at a1adfb9 minor fix
npm WARN [email protected] requires a peer of vue@^2.6.10 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
removed 1 package and audited 457 packages in 7.619s
10 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
> [email protected] build /code/uptime-kuma
> vite build
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'worker_threads'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/code/uptime-kuma/node_modules/vite/dist/node/chunks/dep-0ed4fbc0.js:23:20)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `vite build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /.npm/_logs/2021-07-12T13_47_45_765Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! uptime-kuma@ setup: `git checkout 1.0.0 && npm install && npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uptime-kuma@ setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /.npm/_logs/2021-07-12T13_47_45_782Z-debug.log
checking the debug log gives me :
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'setup' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'presetup', 'setup', 'postsetup' ]
5 info lifecycle uptime-kuma@~presetup: uptime-kuma@
6 info lifecycle uptime-kuma@~setup: uptime-kuma@
7 verbose lifecycle uptime-kuma@~setup: unsafe-perm in lifecycle true
8 verbose lifecycle uptime-kuma@~setup: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/code/uptime-kuma/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle uptime-kuma@~setup: CWD: /code/uptime-kuma
10 silly lifecycle uptime-kuma@~setup: Args: [ '-c', 'git checkout 1.0.0 && npm install && npm run build' ]
11 silly lifecycle uptime-kuma@~setup: Returned: code: 1 signal: null
12 info lifecycle uptime-kuma@~setup: Failed to exec setup script
13 verbose stack Error: uptime-kuma@ setup: `git checkout 1.0.0 && npm install && npm run build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid uptime-kuma@
15 verbose cwd /code/uptime-kuma
16 verbose Linux 5.8.0-1031-oracle
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "setup"
18 verbose node v10.19.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error uptime-kuma@ setup: `git checkout 1.0.0 && npm install && npm run build`
22 error Exit status 1
23 error Failed at the uptime-kuma@ setup script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Been running this a few days within my Docker stack with 17 other containers. After starting up my container I see this in my logs
> [email protected] start-server /app
> node server/server.js
Copy Database
Connect to Database
JWT secret is not found, generate one.
(node:18) UnhandledPromiseRejectionWarning: Error: SELECT COUNT(*) FROM `user` limit 1 - SQLITE_CORRUPT: database disk image is malformed
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
Where is the DB stored for this container as it is not in the config directory I specified either.
Add support to alert via twilio.
I've been looking at the code responsible for sending notifications when a service goes down mentioned in #21.
It looks like this would be quite reasonable to implement, as such I am writing a draft and am curious to see if ends up being any good.
I've had the issue many times now since using Uptime Kuma that my services get marked as down and I get a notification, when it was just a pinging issue.
I would actually try and implement this myself if that is welcome, however I am currently quite busy and don't know if I can follow up in a timely enough matter before someone else picks it up.
But making a draft is potentially helpful for the developer who ends up implementing it.
The steps would pretty much include (if I'm not mistaken, I only had 30 min or so to look at the codebase)
2
, indicating that the service is currently "disrupted")0
if the service has not reached maxRetries
. I believe this should go here in the catch section of the polling try block uptime-kuma/server/model/monitor.js
Line 112 in b3bff8d
uptime-kuma/server/model/monitor.js
Line 121 in b3bff8d
I also never worked with bean, so it's possible that a manual data migration would be necessary if a new field is added to the database. The documentation lists that bean does not have migration?
Does anyone know how @louislam is solving the migration task?
I think this would describe the minimum valuable product. Using the configured monitor ping interval doesn't require too many changes and requires little modification in the codebase.
What do you think?
Also I apologize that this issue is such a mess, I accidentally hit enter instead of backspace when editing the title so I essentially had to write the draft while the issue already existed 😢
I looked at notification.js following the new release and old code that I had removed as part of the Discord rework seems to have been reintroduced in 3e4a98b.
notification.js#L95,L177-187
May cause an error due to missed dependencies if a Discord notification is invoked.
Please add Pushover alerting
https://pushover.net
Settings page doesn't load behind NGiNX reverse proxy.
Could you add a png version of the icon so I or we can link the icon to our container in Unraid please?
Hello,
i tried to run your project as docker container with the following command docker run -p 3001:3001 louislam/uptime-kuma
on an x86_64 Ubuntu 20
server. Unfortunately i can't get it up and running. The following error occurs and the service cant be reached at all:
Connect to Database
Load JWT secret from database.
(node:20) UnhandledPromiseRejectionWarning: Error: SELECT COUNT(*) FROM `user` limit 1 - SQLITE_CORRUPT: database disk image is malformed
(Use `node --trace-warnings ...` to show where the warning was created)
(node:20) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:20) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
This error occurs for the latest version as well as version 1. Does anybody else have this issue and can it reproduce it?
First of all great work! Looks really awesome. Though I have a few enhancement requests to make it even greater! 👍
Keep up the good work!
2021-07-15 @ 3.20pm UTC:
Formatting changed to checkboxes per request @louislam
2021-07-15 @ 4.00pm UTC:
Added enhancements requested by @kvpt
2021-07-17 @ 8.00am UTC:
Added enhancements requested by @joe-eklund
2021-07-19 @ 8.02am UTC:
Added enhancements requested by @parityhero
2021-07-21 @ 9.04am UTC:
Added enhancements requested by @magicgg91
2021-07-29 @ 1.40pm UTC:
Added enhancements requested by @Spiritreader & @EclipseOfficeTech
2023-12-01 @ 17.20pm UTC:
Updated the todo list by @CommanderStorm
Hey, nice project there !
Just a feature idea : it would be nice to have the possibility to customize the HTTP(s) query, with custom headers, method, body, to monitor private APIs for instance.
Add public status page which can be available as read only without Auth!!!
Thanks for this project!
Its lean and seems to work so far!
What I'd really love to see extended is the notification functionality.
Wouldn't it be nice to have a threshold, for example for Pings, before an Alarm triggers?
my Internet pretty much disconnects every 8-48 hours once for 1-2 minutes.
Would be cool to tell Uptime Kuma to only send a notification if minimum X failed attempts happened.
Thanks for considering!
Would love to have a UDP port check.
Getting the following response on a SMTP port check (587 as well as 465)
connect EHOSTUNREACH xx.xx.xx.xx:587
The IP listed in the error above is my IP for my server.
(node:19) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 142.251.2.109:587
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16)
(node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 62)
I checked that IP in the log, and it looks like it belongs to google? It is not the IP of any of my servers.
HI.
It will be handy to be able to override and check for servers (HTTPS) with self signed certificates.
Thanks.
Getting this message with a "HTTP(s) - Keyword" service.
Let me know what you may need to help diagnose the issue, the logs are pretty empty.
Any chance someone might be able to get a systemd unit to work? I tried, but was failing. I ended up creating a basic bash script then calling that via systemd. Not the greatest, but works. I'd love to get that script out of the picture.
This is an amazing project, I had it up and running within minutes of your post on Reddit, thank you so much!
It would be awesome if you could add TLS monitoring alongside the "uptime" monitoring.
Although LetsEncrypt does a great job of auto-renewing certs, it would be great to monitor the following metrics as well:
I've been bitten by this so many times in the past!
Currently sending a test email via protonmail- bridge fails (and consequently email does not work), because kuma uses self-signed certificates.
Please allow additional options in SMTP settings to turn off SSL.
Depending on email client usually these settings need to be considered:
SYMFONY__ENV__MAILER_ENCRYPTION=null
or
DIUN_NOTIF_MAIL_SSL=false
DIUN_NOTIF_MAIL_INSECURESKIPVERIFY=true
Is proxy in front an answer too?
After pulling the latest docker build, the docker instance wont start and is stuck in a constant restarting loop.
The following command to see whats going on:
sudo docker logs --tail 20 --follow --timestamps containername
Results in:
2021-07-14T07:06:53.133558809Z #FailureMessage Object: 0xbeb5c24c
2021-07-14T07:07:54.433098117Z
2021-07-14T07:07:54.433180876Z
2021-07-14T07:07:54.433206784Z #
2021-07-14T07:07:54.433230784Z # Fatal error in , line 0
2021-07-14T07:07:54.433253876Z # unreachable code
2021-07-14T07:07:54.433276913Z #
2021-07-14T07:07:54.433299580Z #
2021-07-14T07:07:54.433322394Z #
2021-07-14T07:07:54.433345006Z #FailureMessage Object: 0xbeb3424c
2021-07-14T07:08:55.696356724Z
2021-07-14T07:08:55.696458391Z
2021-07-14T07:08:55.696482409Z #
2021-07-14T07:08:55.696504279Z # Fatal error in , line 0
2021-07-14T07:08:55.696525650Z # unreachable code
2021-07-14T07:08:55.696546816Z #
2021-07-14T07:08:55.696567557Z #
2021-07-14T07:08:55.696588168Z #
2021-07-14T07:08:55.696608686Z #FailureMessage Object: 0xbe9a224c
I just saw about this awesome project and really congrats.
It was missing from the opensource side.
The only thing missing by my side is a way to make a cluster with it. Because if it would be possible to run it on 2 servers + at the same time it will assure the server running uptime-kuma will never go down! 😃
Is it only me?
I tried on 2 different machines, 1 which had the 1.0.1 version and another that has never seen uptime-kuma.
However and wherever ever i pull / run with or without latest tag, I cant get the 1.0.3 running on my systems...
Any advise?
So I had an idea, why not allow for plugins, very basic/simple.
Have uptime-kuma look in a folder for specific scripts, executable. the name of the script can be the name in the drop down.
You can put whatever you want in the script, and it just returns a value for success or failure.
Hey, thanks for this, its great to have an alternative to statping
It would be awesome to be able to group monitors and have some kind of search filters. When you have many monitors, scrolling down looking for specific one is tedious task.
Error: ENOENT: no such file or directory, stat 'dist\index.html'
after starting backend (command: npm run start-server
)
I'm running Mailrise (https://github.com/YoRyan/mailrise) for my SMTP relay to then use any Apprise notifier. It works fine when I test it, but I can't save my settings as I don't have a username/password set. Any chance to remove that restriction?
Thanks for releasing with the Gotify PR included so soon!
Makes it easier a lot - I had used Webhook to NodeRed and from there relayed to my Gotify as a workaround in the meantime.
As commented on the Commit already, I'd really love to see priorities being supported. I use different notification classes in the Gotify Android App. This way I could react on critical failures fast, while not getting woken up by minor things in the night (just an example ;))
Thx!
Could you please explain the configuration for Telegram Notifications? I does not work for me
OK, so this is quite possibly taking the project way past what it was ever intended to be, but stay with me on this one...
It would be amazing if I could launch "remote executors" and install them on various devices/virtual instances but have them report back to a central Uptime-Kuma instance.
This is a feature that some of the more advanced site-monitoring tools have, and would allow me to spin up instances across the globe to see what the response time was from each region etc.
As a rough outline, I'd probably be looking for the agents to either post their results back to the "primary" setup via HTTPS, or just load the results onto an MQTT Queue and have the "primary" read those results and log them.
Having it as a lightweight app would also mean that I could deploy onto a Raspberry Pi or similar if I didn't want to use virtual machines in a cloud-provider.
Hi
is it possible to use self signed certificat email address?
When I tried to test my email address, it says “self signed certificate” and I had no mail
thanks !!
My web application firewall is categorizing the checking request as "Node.js (Hacking Tool) from United States" - bad bot, and triggering a CAPTCHA security check (a setting for bots that I turn on). I can see that the agent is:
User Agent:axios/0.21.1
I can add this to an allowed list, but I'd prefer to have the agent listed as something unique to Kuma.
Hello,
First, a huge thanks for this application. I was searching for an Uptime Robot alternative, and this is perfect.
A small idea for the next of this application: ability to set a periodic pause.
For example, I have an image automatic update of all of my containers in the night.
When I wake up, I see alerts for all containers updated and their "OK" state just after.
With an automatic pause to selected monitored endpoint, every day, at 3am, for 10 minutes, this "problem" is resolved.
So if we can set for a monitor, a pause with a cron, it should be perfect!
Thanks :)
Please add the ability to use Microsoft Teams for alerts. I would like to deploy this at work, where our alerts to go a certain channel with multiple members. I've generated an Incoming Webook in Teams and pasted the URL into the "Webhook" field in Uptime Kuma, but it doesn't alert.
as title :D
Instead of adding all the functionality of notifications, why not bake something in like Apprise (https://github.com/caronc/apprise) so it's already done for you? Not sure if that's possible but might save a bunch of trouble.
Removed old Docker image and setup latest 1.0.1. Added a check to a website that was successfully being checked prior. Getting this error:
Parse Error: Invalid header value char
Have another site that's still working fine. So this error is new with this new version.
I'd love to see the ability to retrieve, update, remove or add monitors via API calls. Maybe using an API key that's tied to the user. In a way that when spinning up a new docker container or doing an automated workflow like Terraform, the new device could be added to the software automatically.
Many of us use Prometheus to monitor the rest of our infrastructure, it would be great to include a /metrics
endpoint so we can scrape the various results for each site monitored
I'm a python guy, not a Node developer, and I'm struggling to understand how Vue hangs together, but in essence you'd want to add https://github.com/siimon/prom-client to the project and then setup custom metrics
I'd recommend converting the Friendly Name
to lower-case and replacing any special characters with underscores, then add that as a custom label so we can either pull just the individual metrics out or sum the whole lot very easily.
If this does get added, then #84 could add the remote executor name as a custom label as well, providing the ability to split the metrics based on target name, remote executor, or anything else that gets added in future.
So i installed uptime-kuma on my server and started it. When i did so, it showed me in the console "No user, need setup" so i went to /setup on the website. I entered my credentials for the admin user and clicked on create. Now i am stuck on this screen, the create button is pale and i can't click it and nothing is happening
Given that not many people are exposing Docker containers directly to the internet, having an example of a nginx or apache config that allows proxying could be beneficial. I tried looking at it myself, but all my attempts with apache are coming up moot. Hopefully someone smarter than me can figure this out.
Hey I recently switched to uptime kuma from statping and have been getting a lot of false down notifications since. Usually every few hours or so i'll get one or two services randomly "Timing Out".
[Rainloop] [🔴 Down] connect ETIMEDOUT 172.67.163.108:443
It's only happening to services behind Cloudflare and it previously did not happen with statping so I'm wondering if theres something that needs to be accommodated for cloudflare users?
apk add tzdata
to docker image and support TZ
environment variable to set the timezone. alpine is pretty straightforward. you just add this to the start up before running the app
cp -f "/usr/share/zoneinfo/${TZ}" /etc/localtime && echo "${TZ}" > /etc/timezone
.
I would suggest a script to run the cp and the npm startup and set the script as the entrypoint
Requesting having service grouping. Something simple but that can provide visual separation between different groups of services, Examples include "Infrastructure", "Media", "Storage", "External".
Suggestion is to base this off of tags. A single "Group" tag can be assigned to each service which will determine how it is displayed and what other services are displayed with it. Tags/Groups should be orderable. Services should be broadly orderable, and the order they show up in the larger list, should be how they show up within a group.
Another implementation would be enabling a "Add a new group" on the main page, which creates a group in the service list on the left, and enable drag and drop to move things around.
First of all, this project looks awesome, with statping being unmaintained this is an amazing replacement!
I would like to request the addition of some sort of public dashboard like other services have (statping, etc).
I use these apps to monitor the status of a few services I run and I would like for my users to be able to check the service's status (like I currently do with tinystatus, but also like statping)
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.