Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-30-2014, 03:51 PM   #1
LQ Newbie
Registered: Aug 2014
Distribution: CentOS 7
Posts: 21

Rep: Reputation: 0
Monitoring solution + bash script

I prepared bash script in order to check connection to server and I would like to find some Nagios-like monitoring solution without having to install any agent/collector on the server.
Do you have any experience with something like that?

Old 08-30-2014, 05:30 PM   #2
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
snmp would work, but you'd have to write your own fancy front-end.
Old 09-01-2014, 06:59 AM   #3
LQ Newbie
Registered: Aug 2014
Distribution: CentOS 7
Posts: 21

Original Poster
Rep: Reputation: 0
I solved it like this (port version):

((nc localhost 22 </dev/null 2>&1 | grep -q SSH) && \
(nc localhost 25 </dev/null 2>&1 | grep -q fix) && \
(nc localhost 21 </dev/null 2>&1 | grep -q 220));
sudo echo "<p align="left"><font size="9">`date +%R`</font></b></p>" > /var/www/html/front.html
sudo echo '<p align="center"> <img src="/pix/ok.png" /></p>' >> /var/www/html/front.html
sudo echo '<p align="center"> <img src="/pix/ko.png" /></p>' >> /var/www/html/front.html

It is a little "amateur" but it suits my needs


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
bash script for monitoring file update epomqo Programming 3 01-30-2012 03:16 PM
Bash script server HDD monitoring mele Programming 1 05-19-2009 08:03 AM
Port Monitoring bash script twantrd Programming 15 01-29-2009 01:59 AM
Bash script for monitoring changes in a directory tree librano Linux - Software 4 10-30-2008 08:36 PM
bash script, monitoring running PID? thebover Programming 4 08-26-2004 03:42 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:13 PM.

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