Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am hoping someone can give me some help, as I am pretty new to Nginx. Thanks in advance.

Premise: I have a load balancing server (nginx upstream) in a test environment, load balancing between two web servers. I use the fail_timeout parameter because, if one server goes down, I cannot have it re-introduced until I have manually intervened, due to data integrity issues between the two.

Issue: I need to know that the server in question has been taken out of the loop. Email might be asking too much, but any event I can trigger would be very helpful.

Note: Whilst I have systems monitoring the servers, which should notify me if one goes down, it is more important that I know when the Nginx 'thinks' a server is down, in case the load balancing server cannot contact a given server, whilst the monitoring systems can, for whatever reason that might be.

share|improve this question
    
What are you using to monitor the systems? You may be able to set it up to monitor the Nginx error logs, so when an upstream server looks down to Nginx and it gets logged, you can be informed by the monitoring software. –  Toquonce Feb 4 '13 at 16:22
    
The system is a propriety one that checks a given website loads and emails out if it does not. I could create a cron job to check the log file and send an email, I suppose. I was just hoping for something tidier and more reliable. –  Dom Feb 4 '13 at 17:23
add comment

1 Answer

up vote 1 down vote accepted

Sounds like an ideal situation for monit, specifically the notifications feature. If the Nginx log spits out "server down" or some such, monit can email you or, better yet, email to your cell phone's text number registering an SMS message, or an email to Pagerduty to trigger it to call you. You call on how much noise you want it to make ;)

  • edit: was working on collectd while writing this. My bad; monit's the way to go here!
share|improve this answer
    
I'll do something like that, thanks. –  Dom Feb 6 '13 at 16:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.