check_tcp: Port must be a positive integer
Marc Powell
marc at ena.com
Mon Aug 24 15:49:45 CEST 2009
On Aug 24, 2009, at 1:52 AM, K Ramanujan wrote:
> My definition is
> Command definition is
>
> define command{
> command_name check_tcp
> command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p
> $ARG1$ $ARG2$
>
> }
>
>
> Service definition is
>
>
> define service{
> use generic-service
> hostgroup_name windows-servers
> service_description TCP Print Server
> check_command check_tcp! Xxx (port)
If this is what you've got in there literally, it's not going to work
as $ARG1$ == 'Xxx', which is not a numeric port. If you've obfuscated
this for some reason, I don't understand why you did so. Assuming that
'Xxx (port)' is just a literal port *number* (i.e. 21) then this
should work fine.
To see what nagios is trying to execute, and hopefully provide
direction for you, change the command_line above to be
command_line echo "$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
$ARG2$" >> /tmp/tcp.out
and check the contents of /tmp/tcp.out.
--
Marc
------------------------------------------------------------------------------
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