New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
a better script to monitor all your VPS
i decided to modify Netomx script in order to monitor my VPS. I spent less than one hour on it, maybe i'll rewrite it in a few days if i find a major bug.
add to your crontab to run it every 5 or 10 minutes.
it has a quite a few improvements:
-) it's a bash script
-) first verifies the monitoring host is connected to the net
-) less false positive errors (a host must fail 2 scheduled run before triggering the alarm)
-) you get notifed only once, when a host goes up or down
-) simple, configurable and easy to modify short script
Your ideas and improvements are welcome!
Comments
Nice modification. Maybe you can use the last modification, I fix some serious things haha.
And my script also just nitify when it is up or down.. maybe you just check the 1st edition, it was buggy haha
@netomx it's not a modification of your script, it's quite a different beast.
This script will email you only when a VPS goes down (and stay down for at least 5 minutes) or gets back up. It won't send lots of mail but just try to be smart and reliable in notifying you when a problem arises.
Like mine, but you use BASH. How did you manage to send email through BASH? using sendmail?
@netomx lol you speak to him like an asshole and then you can't even just read his fucking code
@bobinfo Troll? I never say he's an asshole, in fact, he made his script because he prefers BASH. I never say that. And I read the code... damn I have found mailx, I didn't find it before.
netomx: probably mis interpreted your 'haha', sorry for that
yeah, my "haha" was about my coding issues, never check what I upload
ok, sorry & thanks both of you for sharing your work
I just upped a new version with a few improvements.
http://pastebin.com/UzUtxwXy
Very nice, thank you for sharing this.
I've also modified the script to make it run on Mac OSX Server.
Script here: http://pastebin.com/qwXcU160
Launchd plist here: http://pastebin.com/gF2uUrET
The jobs will run every 250 seconds by default, you can change it by editing com.mowd.check_vps.plist.
Just type this command below to enable:
launchctl load /Users/YOU/com.mowd.check_vps.plist
If you don't want it anymore, simply type:
launchctl unload /Users/YOU/com.mowd.check_vps.plist