LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-25-2011, 07:42 AM   #1
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Rep: Reputation: 18
ping similar command for checking server services


hello
I am looking for a command line utility like ping that can use for checking appropriate services on a server . I do not want do any port scan . I just want to use it for checking apache , mail,ftp and other services on a server if they are running or down.

Thanks.
 
Old 01-25-2011, 10:18 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
You may be interested in nagios check_whatever plugins. They are command line utilities and return output on stdout. For instance, the check_http plugin returns:
Code:
# check_http -H intranet
HTTP OK HTTP/1.1 200 OK - 518 bytes in 0.003 seconds |time=0.002892s;;;0.000000 size=518B;;;0
check_http has cmd line options that can be used to test a specific page or returned value.

There are plugins for services like oracle, mail, ftp, ldap, postfix, smtp, etc....
There is also, check_nrpe, which allows you to check for a specific service on a server even this service is not networked-based. Basically you create a script or program in any language that check for the status of the service and return the status on stdout. Then you configure nrpe to call this program when check_nrpe is run from a remote host.

You don't need to install and setup the whole nagios if you are interested in having basic checking on a terminal.

Last edited by marozsas; 01-25-2011 at 10:20 AM.
 
Old 01-25-2011, 12:05 PM   #3
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Original Poster
Rep: Reputation: 18
I didn't understand do I have to install nagios first?
 
Old 01-25-2011, 01:52 PM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
It depends.

If you are installing it (nagios plugins; nagios plugins extra and nagios nrpe) through a packet manager like rpm/yum/apt-get/whatever, them you may need to install nagios server to satisfy the dependencies. But you don't need to configure or start nagios server itself.

If you installing the plugins only using a tarball, then you don't need to install anything else.

On a CentOS 5.x (I guess it is similar in Fedora and RH), the packages are:
Code:
nagios-plugins-setuid-1.4.15-1.el5.rf
nagios-plugins-1.4.15-1.el5.rf
nagios-plugins-nrpe-2.12-1.el5.rf
nagios-nrpe-2.12-1.el5.rf
ANd the binaries will be at /usr/lib/nagios/plugins/ folder.

The nagios server itself (the one you don't need) is nagios.i386 0:3.2.3-3.el5.rf.

If you can, prefer the one that are installed by the package manager.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What's the best way to handle checking for a similar previous password? abefroman Linux - Security 15 10-27-2010 05:12 AM
Admin tool similar to services.msc mplike Linux - Server 1 04-09-2008 07:48 AM
vpn server with dynamic ip withought using dyndns or similar services alemao Linux - Networking 3 02-05-2007 08:19 AM
Media Services on Linux platform similar to Windows Media Services happyok Linux - Software 3 05-27-2006 04:36 PM
something similar to Terminal Services willdem Linux - General 2 02-21-2005 04:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:37 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
Open Source Consulting | Domain Registration