jokob-sk / NetAlertX

πŸ–§πŸ” WIFI / LAN intruder detector. Scans for devices connected to your network and alerts you if new and unknown devices are found.
GNU General Public License v3.0
3.02k stars 182 forks source link

quick disk space check? #730

Closed hs6666 closed 1 month ago

hs6666 commented 3 months ago

Is there an existing issue for this?

Am I willing to test this? πŸ§ͺ

Can I help implement this? πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Is your feature request related to a problem? Please describe

No

Describe the solution you'd like

Hi,

Would love having a plugin that could ssh in to a device, returning the available free space, and then sending an email notification if it goes over 90% (same for cpu usage going OTT)

I am using netalertx to monitor devices over several tailscale overlay vpn networks, and have found these two simple metrics the most common problem that crops up

thanks

Harry

Describe alternatives you've considered

nagios etc ... to "heavy" for such a scenario

Anything else?

No

jokob-sk commented 3 months ago

Hey @hs6666 ,

I'm happy to approve a PR if you are interested. I'm currently pretty busy and won't be able to implement this in the next few months properly. Here is a quick video on how to create plugins, if you are interested (you can ignore the mapping to the CurrentScan table and check e.g. the https://github.com/jokob-sk/NetAlertX/tree/07164429d5e38f8517b3e761b65c14371cada028/front/plugins/website_monitor plugin for inspiration):

Watch the video

πŸŽ₯Watch the video

An in-depth guide for plugins can be found here:

https://github.com/jokob-sk/NetAlertX/blob/main/docs/PLUGINS_DEV.md

Once you have the basic plugin I'd have to implement a "greater-than" condition in the core app. πŸ™‚

vladaurosh commented 3 months ago

That sounds like going into the direction of monitoring application.

jokob-sk commented 3 months ago

@vladaurosh I was also on the fence, however, if the plugin is universal enough it could allow for specifying custom commands that could be used to monitor network-related insights. E.g. if there is a setting to change the command itself. I definitely don't have time to focus on it myself, but if someone from the community has then that's a nice middle ground in my opinion, with me focusing my time on the core network capabilities.

Still thinking about how to make the plugin management more robust though, so they don;t have to be looped thru every save. πŸ˜…

Anyway, let me hear your thoughts.

vladaurosh commented 3 months ago

Hey @jokob-sk Problem I see here, is how to handle one or multiple disks and how to present that data in current UI.

jokob-sk commented 3 months ago

Yes, was thinking the same at first, but OP said it would be an SSH and not an in-container check. UI presentation - there is already a WEBMON plugin showing plugin data, so basic display is already supported. I wouldn't show it anywhere else though: image

hs6666 commented 3 months ago

Hi jakob, thanks will look at that video

I really like the idea of a "universal script" plugin,, allowing you to ssh in to a monitored device and run custom scripts on that device

Would allow you to grab many of the custom scripts available online and with a few edits, make it compatible with the "rules" of the plugin (metrics from the script can then be shown/monitored in netalertx)

If that makes sense :)

Harry

jokob-sk commented 1 month ago

Keeping in the backlog -> closing for now