"Connection refused" with check_tcp and derivates

shacky shacky83 at gmail.com
Thu Jul 30 17:02:09 CEST 2009


> Not without an example host, service and command definition. Without
> those, we'd be randomly guessing. All we can say at this point is what
> you're running on the command line is not what you've told nagios to
> run.

Oh, sorry. This is what you asked for:

commands.cfg:

# 'check_tcp' command definition
define command{
        command_name    check_tcp
        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
        }

# 'check_pop' command definition
define command{
        command_name    check_pop
        command_line    $USER1$/check_pop -H $HOSTADDRESS
        }



mailserver.domain.com.cfg:

define service{
        use                     generic-service
        host_name               mailserver.domain.com
        service_description     POP3
        check_command           check_pop
        }

define service{
        use                     local-service
        host_name               mailserver.domain.com
        service_description     ASSP
        check_command           check_tcp!55555
        }


server:/# su nagios -c "/usr/local/nagios/libexec/check_tcp -H
mailserver.domain.com -p 55555"
TCP OK - 0,023 second response time on port
55555|time=0,022614s;;;0,000000;10,000000

server:/# su nagios -c "/usr/local/nagios/libexec/check_pop -H
mailserver.domain.com"
POP OK - 0,044 second response time on port 110 [+OK IMAP server
ready.]|time=0,044441s;;;0,000000;10,000000

Thank you very much!

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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