Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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...
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.