check_tcp works from CLI, not in nagios

Slade Edmonds slade at cryptoflow.net
Fri May 7 18:26:55 CEST 2004


Anthony Lieuallen wrote:

>Excerpts from services.cfg, checkcommands.cfg, the CLI, and the nagios page
>below.
>I have numerous services (check_ dns, tcp, smtp, ping) all set up and
>working, except this particular tcp (_telnet) check fails, but works from
>the command line.
>I'm stumped.
>
>define service {
>        host_name               XXXHOSTNAMEHEREXXX
>        service_description     telnet
>        check_command           check_telnet
>        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
>}
>
># 'check_telnet' command definition
>define command{
>        command_name    check_telnet
>        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p 23
>        }
>
>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 
>  
>
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.

Slade


-------------------------------------------------------
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