Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Remote monitor multiple Linux servers on LAN (isolated)

Remote monitor multiple Linux servers on LAN (isolated)

Remote monitor multiple Linux servers on LAN (isolated)


Inside my isolated local LAN I have one Linux box working as a deployment host (Orchestrator) Monitoring multiple Linux boxes Box1, Box2....Boxn. On the deployment Linux box, i have installed smstools to send me sms.
I want to build a script placed on the deployment host to monitor specific process on each linux box, and give me on daily basis SMS messages which kind on process running.

for host in $(cat /home/operator/shellscripts/host.txt)
echo -n > /home/operator/shellscripts/$host.txt
for process in $(cat /home/operator/shellscripts/process.txt)
ssh $host "ps ax | grep $process | grep -v grep" > /home/operator/shellscripts/$host.txt
if [[ -s /home/operator/$host.txt ]] ; then
echo $process is running in $host
echo $process is not running in $host
fi ;

in the host, file stated all hosts IP's I need to monitor

in the process.txt stated all process i need to monitor on each box (for example i have to look if NTP and HTTP working on the fist host X.X.X.X) and so on

ntp http
oracle cluster
https http

in the phonelist.txt stated all numbers of whitelisted operators, they should be notified about all hosts
009yyyyyyyyyyyy #op2
009zzzzzzzzzzzz #op3

in the authen.txt stated the username/password of the operator to login via ssh on each server, each server has its own authentication credential.
operator1 password1 #box1
operator2 password2 #box2

The output should be like this inside the SMS
named, http running in x.x.x.x (OK)
https not runnning in x.x.x.x
mysql running in y.y.y.y (OK)

RE: Remote monitor multiple Linux servers on LAN (isolated)

Do you have a question? I didn't see one in your post.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close