NCPA agent & NRDP
NCPA agent & NRDP
Hi,
With recent help in regards to Monitoring Linux host I have now setup NRDP on my Nagios Core 4.1.1 and I have installed as test NCPA Agent 1.8.1 for Windows & Linux. I'm also monitoring Windows hosts using NSclient++ & NSCA config and that is working fine, no issues I can Monitor Host, Services, Uptime etc and it works great.
Problem I have is that using NCPA agent Nagios is reporting host is down (see image) but the default services are monitored and reporting fine (see log & image)
For NSCA I know I need to configure nsclient.ini and host_check. Do I need to do similar command in ncpa.cfg and what would that command be? Also apart from default passive checks commands below for NCPA agent are there any examples of specific service checks or disk usage checks.
[passive checks]
%HOSTNAME%|cpu usage = /cpu/percent --warning 20 --critical 30
%HOSTNAME%|swap usage = /memory/swap/percent --warning 40 --critical 80
%HOSTNAME%|memory usage = /memory/virtual/percent --warning 60 --critical 80
NSCA & NCPA/NRDP monitored hosts [root@nagios ~]# tail -f /var/log/messages | grep nagios
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: Server2008-1;cpu usage;2;CRITICAL: percent was 25%,54%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: Server2008-1;swap usage;1;WARNING: percent was 60%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: Server2008-1;memory usage;2;CRITICAL: percent was 81%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: owncloud;cpu usage;0;OK: percent was 0%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: owncloud;swap usage;0;OK: percent was 0%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: owncloud;memory usage;1;WARNING: percent was 65%
May 12 20:09:29 nagios nagios: Warning: The results of host 'Server2008-1' are stale by 0d 0h 0m 59s (threshold=0d 0h 2m 0s). I'm forcing an immediate check of the host.
May 12 20:09:29 nagios nagios: Warning: The results of host 'owncloud' are stale by 0d 0h 0m 59s (threshold=0d 0h 2m 0s). I'm forcing an immediate check of the host.
With recent help in regards to Monitoring Linux host I have now setup NRDP on my Nagios Core 4.1.1 and I have installed as test NCPA Agent 1.8.1 for Windows & Linux. I'm also monitoring Windows hosts using NSclient++ & NSCA config and that is working fine, no issues I can Monitor Host, Services, Uptime etc and it works great.
Problem I have is that using NCPA agent Nagios is reporting host is down (see image) but the default services are monitored and reporting fine (see log & image)
For NSCA I know I need to configure nsclient.ini and host_check. Do I need to do similar command in ncpa.cfg and what would that command be? Also apart from default passive checks commands below for NCPA agent are there any examples of specific service checks or disk usage checks.
[passive checks]
%HOSTNAME%|cpu usage = /cpu/percent --warning 20 --critical 30
%HOSTNAME%|swap usage = /memory/swap/percent --warning 40 --critical 80
%HOSTNAME%|memory usage = /memory/virtual/percent --warning 60 --critical 80
NSCA & NCPA/NRDP monitored hosts [root@nagios ~]# tail -f /var/log/messages | grep nagios
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: Server2008-1;cpu usage;2;CRITICAL: percent was 25%,54%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: Server2008-1;swap usage;1;WARNING: percent was 60%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: Server2008-1;memory usage;2;CRITICAL: percent was 81%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: owncloud;cpu usage;0;OK: percent was 0%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: owncloud;swap usage;0;OK: percent was 0%
May 12 20:09:19 nagios nagios: PASSIVE SERVICE CHECK: owncloud;memory usage;1;WARNING: percent was 65%
May 12 20:09:29 nagios nagios: Warning: The results of host 'Server2008-1' are stale by 0d 0h 0m 59s (threshold=0d 0h 2m 0s). I'm forcing an immediate check of the host.
May 12 20:09:29 nagios nagios: Warning: The results of host 'owncloud' are stale by 0d 0h 0m 59s (threshold=0d 0h 2m 0s). I'm forcing an immediate check of the host.
Last edited by superhik on Mon May 16, 2016 4:53 pm, edited 1 time in total.
Re: NCPA agent & NRDP
Can you post the host definitions for Server2008-1 and owncloud? I'd like to see how you have the actual hosts defined.
Usually, host checks are just simple ping checks, but it looks like you perhaps are using a passive check on their as well? Is ICMP blocked in your environment by any chance?
Usually, host checks are just simple ping checks, but it looks like you perhaps are using a passive check on their as well? Is ICMP blocked in your environment by any chance?
Former Nagios Employee
Re: NCPA agent & NRDP
Yes, correct, ping from Nagios to Host are disabled. I only use passive checks.
Re: NCPA agent & NRDP
Can you please post the host definitions for Server2008-1 and owncloud as requested by @rkennedy?
Former Nagios employee
Re: NCPA agent & NRDP
Hi, sorry could not post earlier did not have access to server. Please note that it all works fine using NSCA passive checks I only have problems with NCPA Agent__NRDP.
Below is my setup for Host, Templates & Command
Below is my setup for Host, Templates & Command
Code: Select all
define host {
use passive_host
host_name Server2008-1
address 192.168.137.6
alias Server2008-1
}
define host {
use passive_host
host_name owncloud
address 192.168.137.19
alias owncloud
}
define host {
use passive_host
host_name Server2012-1
address 192.168.137.10
alias Server2012-1
}
define host {
use generic-host
name passive_host
active_checks_enabled 0
passive_checks_enabled 1
flap_detection_enabled 0
register 0
check_period 24x7
check_freshness 1
freshness_threshold 120
max_check_attempts 1
check_interval 1
retry_interval 1
contact_groups admins
check_command check_passive
notification_interval 2
notification_period 24x7
notification_options d,u,r
}
define command {
command_name check_passive
command_line $USER1$/check_dummy 2 "Stale Data"
}
Last edited by tmcdonald on Mon May 16, 2016 9:19 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Reason: Please use [code][/code] tags around long output
Re: NCPA agent & NRDP
The NCPA agent doesn't have a host check, if the server is down, the service checks will notify you that there is an issue.
But, to fix the issue of the hosts being "Down", you would have to edit your passive_host template and disable check_freshness
Since, the Nagios server will never receive a host check, you can disable this and then run the host check manually from the nagios server and that should get rid of the host down for those hosts.
Let us know if that is what you are looking for.
But, to fix the issue of the hosts being "Down", you would have to edit your passive_host template and disable check_freshness
Since, the Nagios server will never receive a host check, you can disable this and then run the host check manually from the nagios server and that should get rid of the host down for those hosts.
Let us know if that is what you are looking for.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NCPA agent & NRDP
Hi, thanks for reply. When you say " run the host check manually from the nagios server" you mean ping? if it is, I cannot do that with the setup of Nagios that I have. Basically all of my clients are behind firewall and not on the same network. I'm sure there is easy way of Monitoring Linux/Windows client behind firewall using NRDP passive checks and agent, just yet to find it 
Re: NCPA agent & NRDP
Login to the Nagios Web interface, select the host and schedule an immediate host check. That should clear out the host check to an OK state.
Sorry if I wasn't clear earlier.
Sorry if I wasn't clear earlier.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NCPA agent & NRDP
sorry, forgot to say Thanks. Doh! so simple, cleared the error of host down and reporting as normal now.
Re: NCPA agent & NRDP
Good to hear that it is working for you.
Shall I close and lock up the post then?
Shall I close and lock up the post then?
Be sure to check out our Knowledgebase for helpful articles and solutions!