You are viewing a single comment's thread.

view the rest of the comments →

[–] sakuramboo 2 points 13 points (+15|-2) ago  (edited ago)

PROXY= # Put ip address there

ping -c 1 -t 5 $PROXY > /dev/null
if [ $? != 0 ]; then
     echo "Subject: Proxy server issue" | sendmail -v $EMAIL

It's rudimentary, but quick host monitor. Put it in cron and run every hour.

0 */1 * * * /opt/

[–] PuttItOut 1 points 41 points (+42|-1) ago 

Now I'm getting DDOS spammed at my private email address. :)

[–] sakuramboo 1 points 6 points (+7|-1) ago 

echo > /var/spool/mail/puttitout

Do I have to do everything? :D

[–] PepeFarmRemembers 0 points 1 points (+1|-0) ago 

[–] NiggersPost 0 points 0 points (+0|-0) ago 


[–] 9-11 23 points -21 points (+2|-23) ago 

Dun goofd

[–] love_rape 0 points 8 points (+8|-0) ago 

Not such a useful suggesting; a proxy server will be making HTTP requests, whether you can ping it is largely irrelevant.

Besides if the server really is struggling you'll want more useful metrics; you want to have a HTTP-health end-point and you want to poll it, handling timeouts, backoff, and flap-detection.

The worst thing you need is an email every minute saying "Yup, still fucked". Instead you want an email "Response time degraded 5%", "Response time degraded 10%", "Timeout", then every 30 minutes "Yup, still fucked". Or better yet "99% percentile returning to normal".

Sure you can code up a simple script invoking curl, but it's not enough for real monitoring. (For example you want to do tests "externally", running curl against localhost is 99% of the time a mistake; doesn't catch DNS errors, doesn't handle DoS attacks, doesn't test the same experience a user would have.)

[–] Shilly_Mc_Shillface 0 points 4 points (+4|-0) ago 

Voat is pretty cool. Where else can you get a qualified reply from a User named: love_rape ??

[–] sakuramboo 0 points 3 points (+3|-0) ago 

I said it was rudimentary.

[–] Caesarkid1 0 points 6 points (+6|-0) ago 

Hey look at that an actual suggestion!

[–] ptr55 0 points 1 points (+1|-0) ago 

You so fancy.

ping -c 1 -t 5 $PROXY > /dev/null  &&  echo "Subject: Proxy server issue" | sendmail -v $EMAIL 

ttl of 5, that proxy server better not have many hops.