LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-18-2010, 02:20 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Rep: Reputation: 33
Check server down and do something


Hello,

I'm looking for an easy way to check if some server is down, and then act upon it.

This check needs to be done from the backup-server.

So if the backup-server thinks the production server is down, then in some bash script I want to execute a rule.

My question: what is an easy way to check another server ?

1. I know about Nagios. It's great, but to large to use here.
2. I could ping the server, put a ping that fails does not necessarily mean the server is down.
 
Old 10-18-2010, 02:36 AM   #2
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Rep: Reputation: 113Reputation: 113
There are many server monitoring tools. You need to be more specific on what kind of server you are referring to as some monitoring tool specifics may fit your situation a little bit better.

Nagios is a great server monitoring tool you can consider but not sure if it will work for you.
Cacti I heard great things about it but it has more dependencies then Nagios.
 
Old 10-18-2010, 02:40 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Even if you think that Nagios is too big, its never too big to monitor your production server. And you need not put it on some server. You could just dedicate some system for Nagios and install it there and keep monitoring. It can send you emails for failures as well. There are other monitoring packages like Zabbix as well.
And if you are looking for monitoring certain processes, then you can use bash scripts and include top or ps commands. But you need to be specific for the same.
 
Old 10-18-2010, 02:41 AM   #4
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by jmc1987 View Post
There are many server monitoring tools. You need to be more specific on what kind of server you are referring to as some monitoring tool specifics may fit your situation a little bit better.

Nagios is a great server monitoring tool you can consider but not sure if it will work for you.
Cacti I heard great things about it but it has more dependencies then Nagios.
As I mentionned in my first post, Nagios, Cacti,... are indeed great tools but too large for my situation...

I just want to know if a server is down/unreachable. So very basic monitoring via a cron or so...
 
Old 10-18-2010, 02:55 AM   #5
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Rep: Reputation: 113Reputation: 113
I do Apologize for not seeing your comment at the bottom. Perhaps a ping shell script from your remote server. Im not sure what kind of server you are using so I can't really give much detail. By pinging your server it will show its online but it won't show you whether is it functioning properly. Sorry I can't help much more.
 
Old 10-18-2010, 03:52 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
It would be difficult to write a shell script that would monitor your every process. And if you miss out on something, you could fail miserably. But as said in my previous post, you could use the output from ps and top to see if your required process is up and running and listening. And then you could use cron to schedule the script per your requirement. But as jmc said, unless we know what your requirement is or what server are you running, it would be difficult to help you accurately.
 
Old 10-18-2010, 04:13 AM   #7
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
monit
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
check tftp server yhus Linux - Software 2 06-13-2006 01:17 AM
Health Check / Server Completion Check Software? tells Linux - Enterprise 0 04-20-2006 11:03 AM
How I can check my proxy server shahg_shahg Linux - Networking 0 01-17-2005 01:41 AM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 02:10 AM
What to check after a server crash? J_Szucs Linux - General 1 02-26-2003 01:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration