LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 06:58 AM   #1
noir911
Member
 
Registered: Apr 2004
Posts: 682

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, 01:04 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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, 05:34 AM   #3
noir911
Member
 
Registered: Apr 2004
Posts: 682

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 05:35 AM.
 
Old 07-15-2006, 03:46 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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, 03:55 AM   #5
noir911
Member
 
Registered: Apr 2004
Posts: 682

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, 05:12 PM   #6
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

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



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 5 11-14-2016 02:32 PM
way to check and see if a service is running nephish Linux - Software 10 02-11-2006 03:36 PM
Service check script MPowers Linux - Networking 1 01-24-2006 12:42 AM
Nagios and Check.cgi kopite2012 Linux - Newbie 1 04-08-2004 04:42 AM
Problem when Nagios Monitoring runs ping service sanfran49 Linux - Software 0 08-22-2003 12:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:31 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