• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

Linux scripted action tool needed - Relative Newb

I am a Windows guy who has had to play a lot of "catch up" in Linux after taking a new position. I am in need of a rather simple tool that will ping a small number of hosts at  short intervals and proceed to run an existing script if any of those hosts do not reply.

I have been searching around for an app or script that may already do this, but nothing found so far. I could easily do this in Windows, but my low level of proficiency in Linux is making this trickier than I anticipated.
0
JPasterniak
Asked:
JPasterniak
1 Solution
 
dextermainCommented:
The best free tool to monitor server/routers/switches on linux is using Nagios.

It is a bit difficult to setup but documentation is well written,.

See http://www.nagios.org/

Nagios can send emails run scripts etc.
Look into bash scripting if you want some custom script to run
0
 
JPasterniakAuthor Commented:
Thanks, but I've already looked at Nagios and it's much more robust of a system than I need. All I need to do is ping 6 different hosts every few seconds  and run one script if any one of the hosts stops responding.

I'm working on getting familiar with Bash scripting, but I need to find a solution more quickly than I can learn how to write one myself.
0
 
ghostdog74Commented:
here's a pseudocode
e
while true
do
  while read line
  do 
    ping -c 2 $line > /dev/null 2>&1
    if [ $? -ne 0 ]; then
 
    fi
   done < my_ping_list
  sleep 5 #
done

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now