Passive checks with NCPA and NRDP
Posted: Thu Mar 12, 2015 3:52 am
Hi everyone!
I have always found a solution for my problem before thanks to this wonderful forum but this time I can't find a solution.
We are running Nagios core and this works great. Unfortunately we have a lot of Windows servers in our environment so we need to use check_nrpe to monitor CPU usage + a lot of other stuff. This is working most of the time but sometimes we get check timeout. Since this is an active check we have been thinking about using passive checks instead. Hopefully this will remove the timeout issues.
So, I have installed NCPA on a Windows server and configured NRPD on the Nagios server. On the Windows host I can't see any errors in the NCPA log. Only that the checks was sent successfully.
However at the Nagios server I see the following:
[1426124423] Error: Got check result for service 'Testcpu' on host 'Windowstest'. Unable to find service
Do I need to create this static service? Shouldn't it be created when it's received?
My ncpa.cfg:
[listener]
uid = nagios
certificate = adhoc
loglevel = debug
ip = 0.0.0.0
gid = nagcmd
logfile = var/ncpa_listener.log
port = 5693
pidfile = var/ncpa_listener.pid
[passive]
uid = nagios
handlers = nrdp
loglevel = debug
gid = nagcmd
sleep = 300
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid
[nrdp]
token =testtoken
hostname =Windowstest
parent =https://10.100.200.90/nrdp
[api]
community_string =
[plugin directives]
plugin_path = plugins/
.sh = /bin/sh $plugin_name $plugin_args
.ps1 = powershell -ExecutionPolicy Unrestricted -File $plugin_name $plugin_args
.vbs = cscript $plugin_name $plugin_args //NoLogo
[passive checks]
Testcpu|Windowstest = /cpu/percent --warning 20 --critical 30
I have always found a solution for my problem before thanks to this wonderful forum but this time I can't find a solution.
We are running Nagios core and this works great. Unfortunately we have a lot of Windows servers in our environment so we need to use check_nrpe to monitor CPU usage + a lot of other stuff. This is working most of the time but sometimes we get check timeout. Since this is an active check we have been thinking about using passive checks instead. Hopefully this will remove the timeout issues.
So, I have installed NCPA on a Windows server and configured NRPD on the Nagios server. On the Windows host I can't see any errors in the NCPA log. Only that the checks was sent successfully.
However at the Nagios server I see the following:
[1426124423] Error: Got check result for service 'Testcpu' on host 'Windowstest'. Unable to find service
Do I need to create this static service? Shouldn't it be created when it's received?
My ncpa.cfg:
[listener]
uid = nagios
certificate = adhoc
loglevel = debug
ip = 0.0.0.0
gid = nagcmd
logfile = var/ncpa_listener.log
port = 5693
pidfile = var/ncpa_listener.pid
[passive]
uid = nagios
handlers = nrdp
loglevel = debug
gid = nagcmd
sleep = 300
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid
[nrdp]
token =testtoken
hostname =Windowstest
parent =https://10.100.200.90/nrdp
[api]
community_string =
[plugin directives]
plugin_path = plugins/
.sh = /bin/sh $plugin_name $plugin_args
.ps1 = powershell -ExecutionPolicy Unrestricted -File $plugin_name $plugin_args
.vbs = cscript $plugin_name $plugin_args //NoLogo
[passive checks]
Testcpu|Windowstest = /cpu/percent --warning 20 --critical 30