LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-13-2006, 07:58 AM   #1
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Posts: 681

Rep: Reputation: Disabled
nagios check service


I want to check a service via nagios which could be something like "netstat | grep port" or "ps aux/ef | grep service_name". Is there any plugin which would be very easy to use do this job?
 
Old 07-13-2006, 02:04 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
What service would you like to check? Ideally you don't test a service by
looking at an open port or process in a list, but by connecting to it at
intervals; that way you make sure it's not only present but also working.


Cheers,
Tink
 
Old 07-15-2006, 06:34 AM   #3
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Posts: 681

Original Poster
Rep: Reputation: Disabled
I am trying to check the availability of a sybase database & I checked the sybase plugin which cannot connect to a remote server to check the avalibility.

So I decided to do a tcp check instead. That is, the TCP check will see if the service is listening on the sybase port in the remote machine. If it is, then it is available; otherwise, it isn't.

Last edited by noir911; 07-15-2006 at 06:35 AM.
 
Old 07-15-2006, 04:46 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
In that case I'd suggest a nmap against the machine ... Or you could
modify the plugin to work ;}



Cheers,
Tink
 
Old 07-24-2006, 04:55 AM   #5
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Posts: 681

Original Poster
Rep: Reputation: Disabled
I just added the "tcp_check" plugin for this problem. It checks for that certain port on that host. If the service is *not* listening on that port then the host is down.
 
Old 07-24-2006, 06:12 PM   #6
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
Yup, the check_tcp plugin is great for TCP checks. The plugin package that comes with Nagios is pretty good. Comes with the most common checks you need to monitor your servers/services.

Nagios is pretty modular so it's also fairly simple to design your own plugins as well.

-twantrd
 
  


Reply


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
Nagios - Return code of 127 for check of service sriramsreedhar Linux - General 4 02-22-2014 04:54 PM
way to check and see if a service is running nephish Linux - Software 10 02-11-2006 04:36 PM
Service check script MPowers Linux - Networking 1 01-24-2006 01:42 AM
Nagios and Check.cgi kopite2012 Linux - Newbie 1 04-08-2004 05:42 AM
Problem when Nagios Monitoring runs ping service sanfran49 Linux - Software 0 08-22-2003 01:12 PM


All times are GMT -5. The time now is 12:51 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration