check_tcp works from CLI, not in nagios
Anthony Lieuallen
Anthony at PromoHut.com
Fri May 7 21:10:53 CEST 2004
>From: Marc Powell [mailto:marc at ena.com]
>Sent: Friday, May 07, 2004 11:27 AM
>To: Anthony Lieuallen; nagios-users at lists.sourceforge.net
>Subject: RE: [Nagios-users] check_tcp works from CLI, not in nagios
>Anthony Lieuallen <mailto:Anthony at PromoHut.com> wrote:
>> t-bone at 602744 [/usr/local/nagios/etc]# ../libexec/check_tcp -H
>> XXXHOSTNAMEHEREXXX -p 23
>> TCP OK - 0.031 second response time on port 23|time= 0.031
>>
>> Current Status: CRITICAL (Has been acknowledged)
>> Status Information: Connection refused by host Current Attempt: 4/4
>> State Type: HARD Last Check Type: ACTIVE
>You do know that Nagios isn't using the host_name but rather the
>host_address as it appears in the host definition when executing the
>service check, right? Have you tried using that and running check_tcp as
>the nagios user as opposed to root? It seems to me that there is a
>discrepency between those two addresses and the host_address doesn't
>have anything listening on port 23.
Yes. IP hidden but:
t-bone at 602744 [/usr/local/nagios/libexec]# sudo -u nagios ./check_tcp -H
xx.xxx.xxx.xxx -p 23
TCP OK - 0.030 second response time on port 23|time= 0.030
And:
>From: Slade Edmonds [mailto:slade at cryptoflow.net]
>Sent: Friday, May 07, 2004 12:27 PM
>To: Anthony Lieuallen
>Cc: 'nagios-users at lists.sourceforge.net'
>Subject: Re: [Nagios-users] check_tcp works from CLI, not in nagios
>I assume you have checked to be certain the address in hosts.cfg for
>that particular host is entered correctly? Is running tcpdump on your
>destination host (or connected firewall interface) an option? At least
>you could verify whether or not it is actually checking the correct host
>that way, even if your host definition seems to be in order. I can't
>imagine, though, that it would be checking the wrong host if your host
>definition is accurate.
Nagios can ping, and notes ping is up, for that host. But cannot
check_telnet. This is answering fine:
define service {
host_name XXXHOSTNAMEHEREXXX
service_description cisco
check_command check_ping!100.0:20%!500.0:60%
max_check_attempts 4
normal_check_interval 12
retry_check_interval 1
check_period always
notification_interval 0
notification_period always
notification_options w,u,c,r
contact_groups admin
}
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list