louislam / uptime-kuma

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

Provide an optional Wake On LAN (WOL) feature, per entry #810

Open kdorff opened 2 years ago

kdorff commented 2 years ago

Describe the solution you'd like It would be nice is there was an option, per entry, to send a Wake On LAN (WOL) packet when a service was observed as down. And likely an IP address to send the WOL packet to. Perhaps a configuration "don't send more often than..."? I'm not sure what options are generally provided around sending WOL.

Describe alternatives you've considered Noticing the server is down (being notified by Kuma) and turning it back on manually.

deefdragon commented 2 years ago

This sounds like it could be implemented by having a notification type of Wake On Lan that sends the packet.

kdorff commented 2 years ago

This sounds like it could be implemented by having a notification type of Wake On Lan that sends the packet.

This sounds like a perfect, easy to understand solution.

e-p-s commented 2 years ago

+1

Computroniks commented 2 years ago

@kdorff Could you provide some information about a possible usecase for this feature. Would it be used to "Wake up" a server that has entered the low power state and has been detected down? I am not really sure of its usefulness as if a server is down, it is most likely because of a network error which wouldn't be helped by a WOL packet or the server has crashed (not sure if WOL would work here).

Meulator commented 1 year ago

@Computroniks I dont think it would be used with servers, but maybe with computers ; i think it would be useful, for people doing RDP to their fixed box from home for instance, having the opportunity to start it in case of power outage for instance.

arunoruto commented 1 year ago

@Meulator usually you can also set the PC to turn on right after the power is back.

This usually works if the environment is not prone to frequent subsequent outages in a row, e.g. the weather is bad and cows are flying through the skies. In such situations leaving the machine off would be better, and when the problem has been solved you could turn it on using WOL.

Meulator commented 1 year ago

@SoulEater45 yes, you're right, but we are in a very specific configuration ; putting too much PC on restart when power back might create another outage due to the surge on power-on ; anyways, we found a way to do so with a single php webpage so we're good :)

arunoruto commented 1 year ago

@Meulator that is true too, haven't thought about it! As for the WOL problem, I have also found a nice substitute called upsnap. It looks nice and has a network scan feature (which would be a nice addition to kuma, to make machine monitoring a bit easier/more convenient).

tomeurp commented 1 year ago

This would be very useful indeed. I run a sql server at my business which is shut down every night to save on power consumption. This is fine because it is normally only needed during business hours. Ocasionally, however, I need to access the server via RDP outside of business hours and it would be pretty neat to be able to just wake the server from the wonderful interface of uptime kuma. I actually acomplish this via a user-defined-script in my synology nas, but it is a bit cumbersome and not user friendly at all to have to log into dsm open the control panel and run the script. Hope this gets implemented soon. Thanks.