Page 1 of 1

NTI Environmental Unit On Nagios Core

Posted: Tue Aug 16, 2016 2:46 pm
by elnunezgib
Hi All,

wonder is someone can point me in the right direction. Current I have an NTI Environmental unit which I want to monitor.

Have created a cfg file for the NTI unit but getting the below error, would appreciate some advice

Error: Service check command 'check_nti_snmp.pl -H 10.186.0.150 -C public -m batch -p envSems2d' specified in service 'check_nti_snmp' for host 'envSems2d_10.186.0.150' not defined anywhere!
Checked 9 services.
Warning: Host 'envSems2d_10.186.0.150' has no default contacts or contactgroups defined!

Re: NTI Environmental Unit On Nagios Core

Posted: Tue Aug 16, 2016 3:02 pm
by rkennedy
Can you post your actual cfg file for us to look at?

Re: NTI Environmental Unit On Nagios Core

Posted: Wed Aug 17, 2016 2:31 am
by elnunezgib
This is the configuration file for the NTI Unit

Code: Select all

###############################################################################
#
# HOST DEFINITION
#
###############################################################################
###############################################################################

# Define a host for the local machine

define host{
        use                     generic-host            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               envSems2d_10.186.0.150
        alias                   Environmux-2D 10.186.0.150
        address                 10.186.0.150
        max_check_attempts     5
        }

###############################################################################
#
# HOST GROUP DEFINITION
#
###############################################################################

# Define an optional hostgroup for Linux machines

define hostgroup{
        hostgroup_name  generic-contact ; The name of the hostgroup
        alias           Environmental ; Long name of the group
        members         localhost ; Comma separated list of hosts that belong to this group
        }



###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################

# Define a service to "ping" the local machine

define service{
        use                             local-service         ; Name of service template to use
        host_name                       envSems2d_10.186.0.150
        service_description             check_nti_snmp
        check_command                   check_nti_snmp.pl -H 10.186.0.150 -C public -m batch -p envSems2d
        }

Re: NTI Environmental Unit On Nagios Core

Posted: Wed Aug 17, 2016 2:33 am
by elnunezgib
This is the configuration on the command.cfg

# Command definition for Network Technologies Inc SNMP plugin
define command{
command_name check_nti_snmp
command_line $USER1$/check_nti_snmp.pl -H $HOSTADDRESS$ $ARG1$
}
###############################################################################

Re: NTI Environmental Unit On Nagios Core

Posted: Wed Aug 17, 2016 11:34 am
by rkennedy

Code: Select all

        check_command                   check_nti_snmp.pl -H 10.186.0.150 -C public -m batch -p envSems2d
You'll want to adjust this, based on your check_nti_snmp command. We need to call to the define command, not directly to the plugin.

Code: Select all

        check_command                   check_nti_snmp!-C public -m batch -p envSems2d
The above should work, because you're already passing $HOSTADDRESS$ in the command definition. Everything after the ! is going to represent $ARG1$.