For one of the hosts, service state using below command gives OK.
Code: Select all
define service {
use sgn-generic-service
hostgroup_name ActiveDirectory
service_description AD Domain NTDS Service
contact_groups SME,SUPPORT_DL
check_command check_nt!SERVICESTATE!-d SHOWALL -l NTDS -s $USER2$
}
Code: Select all
define command {
command_name check_free_disk_win
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -n -t 30 -c check_drivesize -a 'warn=free lt 3' 'crit=free lt 2'
}
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.184.176.6 -n -t 60 -c check_drivesize
below is nmap output for destination server.
Code: Select all
nmap -Pn 10.184.176.6 -p 12489
Starting Nmap 6.40 ( http://nmap.org ) at 2018-10-17 18:08 UTC
Nmap scan report for 10.184.176.6
Host is up (0.020s latency).
PORT STATE SERVICE
12489/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds
Code: Select all
netstat -a -n | findstr 12489
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP 10.184.176.6:12489 10.184.32.86:40382 TIME_WAIT
TCP 10.184.176.6:12489 10.184.32.86:40490 TIME_WAIT
TCP 10.184.176.6:12489 10.184.32.86:40830 TIME_WAIT
TCP 10.184.176.6:12489 10.184.32.86:40906 TIME_WAIT
TCP 10.184.176.6:12489 10.184.32.86:40964 TIME_WAIT
TCP [::]:12489 [::]:0 LISTENING
TCP [::]:12489 [::]:0 LISTENING
Code: Select all
018-10-17 18:59:17: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: CheckDisk
2018-10-17 18:59:17: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: CheckEventLog
2018-10-17 18:59:17: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: CheckExternalScripts
2018-10-17 18:59:17: debug:c:\source\master\modules\CheckExternalScripts\CheckExternalScripts.cpp:127: No aliases found (adding default)
2018-10-17 18:59:17: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: CheckSystem
2018-10-17 18:59:17: debug:c:\source\master\service\plugin_manager.cpp:227: Loading plugin: NRPEServer
2018-10-17 18:59:17: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:86: Allowed hosts definition: 127.0.0.1(255.255.255.255), ****my Nagios server ips”
2018-10-17 18:59:17: debug:c:\source\master\include\socket/server.hpp:111: Binding to: [::]:12489(ipv6)
2018-10-17 18:59:17: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: [::]:12489(ipv6)
2018-10-17 18:59:17: debug:c:\source\master\include\socket/server.hpp:107: Binding to: 0.0.0.0:12489(ipv4), reopen: true, reuse: true
2018-10-17 18:59:17: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: 0.0.0.0:12489(ipv4)
2018-10-17 18:59:17: debug:c:\source\master\service\NSClient++.cpp:317: NSClient++ - 0.5.2.35 2018-01-28 Started!
2018-10-17 18:59:17: debug:c:\source\master\service\NSClient++.cpp:441: Starting: DONE
can you please help?