LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-08-2011, 07:05 AM   #1
SeRi@lDiE
Member
 
Registered: Jun 2006
Location: /dev/null
Distribution: Slackware 13.1, Slackware 13.37, aptosid, rhel
Posts: 547
Blog Entries: 7

Rep: Reputation: 55
Arrow nagios help


I am trying to change the default port for check_http but is not working...

here is what I have in the commands.cfg

$USER1$/check_http -I $HOSTADDRESS$ -p 10000 $ARG1$ $ARG2$

and here is my localhost.cfg

Code:
define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             HTTP
        check_command                   check_http
        notifications_enabled           0
        }
nagios is reporting the service as down with

Code:
Name or service not known
HTTP CRITICAL - Unable to open TCP socket
The server only listens in port 10000 and to the LAN IP ie 10.30.4.77 and localhost resolves to 10.30.4.77 and to 127.0.0.1

How can I have nagios check this?

Any ideas?

TIA!
 
Old 09-08-2011, 07:08 AM   #2
SeRi@lDiE
Member
 
Registered: Jun 2006
Location: /dev/null
Distribution: Slackware 13.1, Slackware 13.37, aptosid, rhel
Posts: 547

Original Poster
Blog Entries: 7

Rep: Reputation: 55
By the way as nagios user I can run the command just fine.

nagios@externo:~$ /usr/libexec/nagios/check_http -l localhost -p 20000
HTTP OK: HTTP/1.1 200 OK - 310 bytes in 0.001 second response time |time=0.000729s;;;0.000000 size=310B;;;0
 
Old 09-08-2011, 07:43 AM   #3
SeRi@lDiE
Member
 
Registered: Jun 2006
Location: /dev/null
Distribution: Slackware 13.1, Slackware 13.37, aptosid, rhel
Posts: 547

Original Poster
Blog Entries: 7

Rep: Reputation: 55
Got it.

Thanks!
 
Old 10-15-2015, 03:45 PM   #4
sadamson
LQ Newbie
 
Registered: Oct 2015
Posts: 3

Rep: Reputation: Disabled
To check HTTP server example

In Nagios macro file definitions should be as following:

Code:
define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             HTTP
        check_command                   check_http!www.linuxquestions.org
        notifications_enabled           0
        }

Last edited by sadamson; 10-15-2015 at 03:48 PM.
 
  


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
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 07:26 AM
ould not create external command file '/usr/local/nagios/var/rw/nagios.cmd gerard.zapata Linux - Newbie 2 09-14-2012 01:57 PM
LXer: April Nagios Training Dates Include Advanced Nagios Class LXer Syndicated Linux News 0 03-18-2011 09:30 AM
Fail to install Nagios Pluggin nagios-plugins-1.4.15.tar.gz fred_xlf Linux - Software 1 11-27-2010 06:09 AM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:00 AM.

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