Page 1 of 2

Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Thu Feb 20, 2014 12:59 pm
by gti6cyl
Hi - getting a CPU status UNKNOWN error on our windows host. I have never supported Nagios, any direction would be much appreciated.
I think that's the check, but I'm sure I'm missing something. We have this happening on this and one other Windows host for another client on a completely different network, so my inkling is that it's a Windows update that could have caused it, but I really don't know how to begin troubleshooting.
Thanks!

{name xx-cpu-service ; The 'name' of this service template, referenced in
use service-pnp
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 10
retry_check_interval 3
contact_groups xx-admins
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
}

Re: Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Thu Feb 20, 2014 3:14 pm
by sreinhardt
Could you post the service and command definitions, not just the template for this one please? My guess is that you are using check_nt or check_nrpe with nsclient on the remote system, does that sound right?

Re: Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Fri Feb 21, 2014 10:57 am
by gti6cyl
I will try my best, thanks so much - I'm not sure if we're using NRPE or _nt, but I know the client machine does not have any files/folders or services/agent running on it.
I believe this is the correct command definition, but is it the right service def?

command:
define command {
command_name check_wsc_xx
command_line $USER1$/check_wsc.pl -H $HOSTADDRESS$ -r 192.168.1.26 -t $ARG1$ -p $ARG2$
}

service:
define servicegroup {
servicegroup_name xx-cpuservices
alias Client A cpu services
}

Re: Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Fri Feb 21, 2014 11:10 am
by tmcdonald
gti6cyl wrote:[...] I know the client machine does not have any files/folders or services/agent running on it.
That's the problem. In order for Nagios to view internal system metrics such as CPU load and memory usage, you need to have an agent running on the client. Otherwise it would be a huge security concern if any old machine could just view that information! The easiest route to take here is to use NCPA for your Windows machine:

http://assets.nagios.com/downloads/ncpa ... index.html

Re: Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Fri Feb 21, 2014 11:44 am
by gti6cyl
Thanks a lot for the advice, I will review that link today.

Is there a reason why it is working for some hosts on different networks? Is it perhaps a Windows update that is suddenly blocking it?

Re: Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Fri Feb 21, 2014 11:46 am
by tmcdonald
It could be a Windows update, but more likely the other hosts had agents on them and this one did not.

Re: Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Mon Feb 24, 2014 10:41 am
by gti6cyl
I downloaded and installed the NCPA as you suggested this morning. Would you have some time to help me along the installation if I have trouble this morning?

Thanks!

Re: Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Mon Feb 24, 2014 11:50 am
by abrist
Yep, we are in the office and into our second or third cup of coffee - So ask away if you have issues.

Re: Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Tue Feb 25, 2014 11:56 am
by gti6cyl
haha, ok - so I have it setup where I can ping the https://192.168.234.172:5693/ and I get all the stats, so that's sort of step1.
The next step is sending it to our 3.5 core server.

how do I do that/ I put in the parameters I think I need, but beyond that, I am stuck...
ncpa file has been updated on the client we want to monitor and the nagios core 3.5 server filled in also.

https://192.168.234.16/nagios/ (internal address of nagios server) Do I need to specify the public IP in the config file below instead?

[listener]
uid = root
certificate = adhoc
loglevel = debug
ip = 0.0.0.0
gid = root
logfile = var/ncpa_listener.log
port = 5693
pidfile = var/ncpa_listener.pid

[passive]
uid = root
handlers = nrdp
loglevel = debug
gid = root
sleep = 300
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid

[nrdp]
token =xxx
hostname =testhost
parent =https://192.168.234.16/nagios/

[nrds]
url =
CONFIG_VERSION =0
token =Boston211145
CONFIG_NAME =test
CONFIG_OS = None
PLUGIN_DIR=plugins/
UPDATE_CONFIG=1
UPDATE_PLUGINS=1

[api]
community_string =xxx

[plugin directives]
plugin_path = plugins/
.sh = /bin/sh $plugin_name $plugin_args
.ps1 = powershell -ExecutionPolicy Unrestricted $plugin_name $plugin_args
.vbs = cscript $plugin_name $plugin_args //NoLogo

[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

Re: Nagios core, version 3.5.0 (CPU error on windows host)

Posted: Tue Feb 25, 2014 2:40 pm
by slansing
Since it sounds like you can reach the information through the NCPA http server's API you should be able to follow the configuration steps at the NCPA documentation site to set up some checks:

http://assets.nagios.com/downloads/ncpa ... ation.html