Custom Object Variables

Eric Emerson eemerson at safecore.com
Tue Nov 17 20:33:00 CET 2009


Nagios Version 3.1.2 running on FC11

//I am trying to set up some custom Object Variables based on the following
docs but I must be misunderstanding something:
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
http://nagios.sourceforge.net/docs/3_0/customobjectvars.html
http://nagios.sourceforge.net/docs/3_0/macros.html

//The following definitions return an UNKNOWN status with the following
entry in the nagios.log:
//---------------------------------------------------------------------------------------------------------------------------------------
[1258485573] SERVICE ALERT:
someSpecificHostName;SSH;UNKNOWN;SOFT;1;check_ssh: Port number must be a
positive integer - $


If I change the check_command to read check_ssh!-p 22 it works perfect.
Can someone please point me in a direction, thanks.


define host{
        use                     someStandardHostTemplate
        host_name          someSpecificHostName
        alias                   someSpecificHostAlias
        address              11.22.33.44
        _sshPort                22                      #the port number for
ssh connections specific to this host
        }

define service{
        use                             someStandardServiceTemplate
        host_name                   someSpecificHostName
        service_description        SSH
        check_command           check_ssh!-p $_HOSTsshPort$
        }

define command{
        command_name    check_ssh
        command_line    $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
        }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091117/2fb64adc/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
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