louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
55.67k stars 5k forks source link

Add auto installer for npm and for pm2 for the interactive cli installer (for local installs) #3646

Open MozerBYU opened 1 year ago

MozerBYU commented 1 year ago

⚠️ Please verify that this feature request has NOT been suggested before.

🏷️ Feature Request Type

Other

🔖 Feature description

While running the auto installer on the Readme, it fails with an error that pm2 couldn't be installed. Doing a bit of digging and following this article listed in the error (https://pm2.keymetrics.io/docs/usage/quick-start/) I found that npm wasn't installed and that the auto installer doesn't attempt to install npm to rectify the issue. Instead the user has to do that installation manually,

I feel it could be beneficial to have it auto install npm and the pm2 package in addition to the other packages it already installs (like node-js). This would ensure that the installer is more hands-off to the user and less user-error prone.

I'd be more than happy to submit a pull request if you'd like that accomplishes the above.

✔️ Solution

I envision that you have the installer check for an npm installation before trying to install the pm2 package. If one doesn't exist, go ahead and install npm for the user. Then continue to proceed with the pm2 package installation.

❓ Alternatives

No response

📝 Additional Context

No response

MozerBYU commented 1 year ago

Clarified some language in the feature request.

CommanderStorm commented 1 year ago

We have added help texts to the installer in https://github.com/louislam/uptime-kuma/pull/3603 Note that the installer has to run on both linux/mac + windows ⇒ installing npm via the guide we now link is easier and less likely to result in serious/hard to debug defects imo, but if you provide a PR Louis can judge this risk

CommanderStorm commented 1 year ago

Do I read you correctly that you have node, but not npm installed? What was the error message shown? (did we show the correct error mesage?)

jult commented 11 months ago

Maybe get it to run as snaps or similar? UK is one of the least reliable packages on my home debian cluster, not exactly what you'd expect from a monitoring server-package. The dependencies with pm2, npm, node-js, and a reverse proxy are a multitude of points of failure, you'll need an entire system to watchdog and monitor your uptime-kuma.

louislam commented 11 months ago

running the auto installer on the Readme

I think I will remove the installer later, because it is really hard to maintain such things in Linux. Normally npm will be installed along with Node.js, but in some cases, it doesn't.

Maybe get it to run as snaps or similar

May need someone to do that, I am not interested in it. As far as I know, someone made it for Arch Linux (https://aur.archlinux.org/packages/uptime-kuma)

The dependencies with pm2, npm, node-js, and a reverse proxy are a multitude of points of failure, you'll need an entire system to watchdog and monitor your uptime-kuma.

Sorry I don't get what you mean here. Are you expecting a JavaScript application running without Node.js and npm? And are you expecting to "reverse-proxy" without a reverse proxy?

Talk is cheap. If you think you can write this app in a single executable file without dependencies. Just show it to the world.

jult commented 8 months ago

I've switched to ntopng (the free community edition). May look overwhelming at first, but it's way more sophisticated (first created in 1998), and once you get the hang of adding alerts and pings, it's super logical, and your dashboard is entirely configurable.