I am currently without a UPS for all my network equipment, although I am saving for one and should have one within a month. I have an FX-6300 server, a small managed switch, a pfSense ITX box, and a single Unifi AP. I am wondering if I can get the server to check the weather every few minutes and verify that there is no lightning in the area. Based on that info, it could shut down some of the nonessential VMs and also send a text alert to me. How exactly would I go about doing this (or is there a similar program already?)?
Its running Proxmox VE on the bare metal system. I suppose I could do this within a VM though.
If you want to do it as a bash script (you could run it directly from the proxmox server in a screen that way) here is something you could look at: http://bash.sidenote.hu/projects/bash-weather/
Hi i'm kinda new here but a while back I created a program in c# that would send email alerts if my server was spiking at 100% I did it in visual studio and it's fairly straight forward using the .net network diagnostic library. If you want I could show you some of the code for that project maybe it would give you an idea for what you would need to do. The only problem is that the complier creates a .exe file so your vm would have to run windows. But I will say this creating a c# emailing/text alert program that checsk various websites for common weather data is really easy to do with c#.
Again i'm not sure if any of this useful information or not.
I forgot exactly how I did it, but at one point I had a similar concept going with GKRELLM system monitor on Linux, I had it run a script that sent me an SMS alert . if anyone is interested I can try to find it but idk if it needs a GUI to run
I don't have it (I deleted it by accident, curse you past me) but I remember it being very simple (would've had to be, I was a bloody idiot with Linux a year ago :P) it used a free SMS gateway that used curl to send SMS. It was just a curl command that gkrellm was set up to run whenever it got to a certain load.
The SMS gateway is called textbelt. Just Google it and their website comes up with instructions. On Debian based distros you'll need to do apt-get install curl before it will work, but from there its pretty straightforward. GKrellm is actually a great system monitor. Although I started using Zabbix recently and I must say once I learned how to speak the Zabbix language its amazing! Haven't got SMS set up yet, but supposedly its possible.
Good luck, let me know how it works out, I may re-implement this!
If you don't have the capability to run Linux I can loan you a simple Debian VPS to try this on. If you could get this working where you just configure your ZIP code in a config and then run the script at boot, that would be freaking amazing. I'll help any way I can, but I don't know how to program.