Re: Server showing a Connection Refused
Posted: Wed Jun 03, 2015 10:59 am
Can you post the associated service checks for these and the remote host nsclient.ini file? (in code wraps?)
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
Windows.cfg
define host{
use generic-host ;
host_name TS10 ;
alias TS10 ;
address 192.168.87.80,192.168.87.81 ;
parents Datacentre Gateway ;
vrml_image rack-server.gif ;
statusmap_image rack-server.gd2 ;
}
#TS10 Monitoring Section
define service{
use generic-service
host_name TS10
service_description Check Uptime
check_command check_nt!N0rth3dgE!UPTIME
}
define service{
use generic-service
host_name TS10
service_description Check C Drive
check_command check_ntdsk!USEDDISKSPACE!C
}
define service{
use generic-service
host_name TS10
service_description CPU Load
check_command check_nt_cpu_avg!
}
Commands.cfg
# Checks Avaliable HD Space
define command{
command_name check_ntdsk
command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRE$
}
#CPU Load over 10 Min, 60 Min, 24 hrs
define command{
command_name check_nt_cpu_avg
command_line $USER1$/check_nt -H $HOSTADDRESS$ -s N0rth3dgE -p $
}
# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s $ARG1$ -v$
}
I don't see how any of these commands could work on any other hosts either. I suggest something like this:nathanplatt wrote: # Checks Avaliable HD Space
define command{
command_name check_ntdsk
command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRE$
}
#CPU Load over 10 Min, 60 Min, 24 hrs
define command{
command_name check_nt_cpu_avg
command_line $USER1$/check_nt -H $HOSTADDRESS$ -s N0rth3dgE -p $
}
# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s $ARG1$ -v$
}
[/code]
Code: Select all
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s MYSECRET -v $ARG1$
}Code: Select all
define service{
use generic-service
host_name TS10
service_description Check C Drive
check_command check_nt!USEDDISKSPACE -l C
}
define service{
use generic-service
host_name TS10
service_description CPU Load
check_command check_nt!CPULOAD -l 5,80,90
}
define service{
use generic-service
host_name TS10
service_description Check Uptime
check_command check_nt!UPTIME
}Code: Select all
define service{
use generic-service
host_name TS1,TS2,TS3,TS4,TS5,TS6,TS7,TS8,TS9,TS10
service_description CPU Load
check_command check_nt!CPULOAD -l 5,80,90
}Code: Select all
#Monitoring Section#
define service{
use generic-service
host_name DR1,DR2,DR3,DR Mail,SQL_DR,AD1,AD3,AD4,TS1,TS1-V,TS2,TS2-V,TS3-V,TS4,TS4-V,TS5,TS6,TS7,TS8,TS8-V,TS9,TS9-V,TS10,TS10-V,APP1,Kratos 3,Kr$
service_description Check Uptime
check_command check_nt!UPTIME
}
define service{
use generic-service
host_name DR1,DR2,DR3,DR Mail,SQL_DR,AD1,AD3,AD4,TS1,TS1-V,TS2,TS2-V,TS3-V,TS4,TS4-V,TS5,TS6,TS7,TS8,TS8-V,TS9,TS9-V,TS10,TS10-V,APP1,Kratos 3,Kr$
service_description Check C Drive
check_command check_nt!USEDDISKSPACE -l C
}
define service{
use generic-service
host_name DR1,DR2,DR3,DR Mail,SQL_DR,AD1,AD3,AD4,TS1,TS1-V,TS2,TS2-V,TS3-V,TS4,TS4-V,TS5,TS6,TS7,TS8,TS8-V,TS9,TS9-V,TS10,TS10-V,APP1,Kratos 3,Kr$
service_description CPU Load
check_command check_nt!CPULOAD -l 5,80,90
}
Code: Select all
# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s N0rth3dgE -v $ARG1$ $ARG2$ $ARG3$
}