Nagios Core 4.0 with NCPA and NRDP

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios Core 4.0 with NCPA and NRDP

Post by abrist »

Can post the newest ncpa log entries?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: Nagios Core 4.0 with NCPA and NRDP

Post by skynardo »

Sorry for the delay, got side tracked on a couple other projects. Below are the current ncpa_passive.log entries:
I am no longer getting the /tmp files piling up on my nagios server.

2013-10-24 16:39:18,940 27885 INFO Meta output from NRDP server: 3 checks processed.
2013-10-24 16:44:19,035 27885 INFO Hostname is being assigned as the domain name of this computer.
2013-10-24 16:44:19,036 27885 INFO HOSTNAME was not explicitly declared. Using devut514
2013-10-24 16:44:19,036 27885 INFO Hostname is being assigned as the domain name of this computer.
2013-10-24 16:44:19,036 27885 INFO HOSTNAME was not explicitly declared. Using devut514
2013-10-24 16:44:19,037 27885 INFO Hostname is being assigned as the domain name of this computer.
2013-10-24 16:44:19,037 27885 INFO HOSTNAME was not explicitly declared. Using devut514
2013-10-24 16:44:20,051 27885 INFO Starting new HTTP connection (1): nagiosserver.myco.com
2013-10-24 16:44:20,065 27885 INFO Message from NRDP server: OK
2013-10-24 16:44:20,065 27885 INFO Meta output from NRDP server: 3 checks processed.
2013-10-24 16:49:20,158 27885 INFO Hostname is being assigned as the domain name of this computer.
2013-10-24 16:49:20,158 27885 INFO HOSTNAME was not explicitly declared. Using devut514
2013-10-24 16:49:20,159 27885 INFO Hostname is being assigned as the domain name of this computer.
2013-10-24 16:49:20,159 27885 INFO HOSTNAME was not explicitly declared. Using devut514
2013-10-24 16:49:20,159 27885 INFO Hostname is being assigned as the domain name of this computer.
2013-10-24 16:49:20,159 27885 INFO HOSTNAME was not explicitly declared. Using devut514
2013-10-24 16:49:21,176 27885 INFO Starting new HTTP connection (1): nagiosserver.myco.com
2013-10-24 16:49:21,190 27885 INFO Message from NRDP server: OK
2013-10-24 16:49:21,190 27885 INFO Meta output from NRDP server: 3 checks processed.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Core 4.0 with NCPA and NRDP

Post by slansing »

Did you define a host a host for NCPA's NRDS to send to? Is that a valid configuration in NRDP on the nagios server?
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: Nagios Core 4.0 with NCPA and NRDP

Post by skynardo »

Are you talking about the host definition for the machine where the NCPA client is running? If so, this is that definition:

define host{
use linux-server
host_name devut514
alias devut514
address devut514.unigroupinc.com
}

Or do you mean I need to define my nagios Host as well ?

Here is the current service status
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios Core 4.0 with NCPA and NRDP

Post by sreinhardt »

He means on the NCPA server, did you specify the configuration options for the NRDP receiver (generally on the nagios machine)? Since NRDP is passive, the agent needs to know where to send data back to.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Nagios Core 4.0 with NCPA and NRDP

Post by yancy »

skynardo,

Can you run the following on your Nagios Core box

Code: Select all

cat corelog.newobjects
Thanks,

-Yancy
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: Nagios Core 4.0 with NCPA and NRDP

Post by skynardo »

OK, ncpa is sending the 3 checks to my nagios server (where nrdp server is installed)
nagios.log is complaining about the host being ""

[1382730952] Successfully launched command file worker with pid 3615
[1382731171] Error: Got host checkresult for '', but no such host can be found
[1382731171] Error: Got host checkresult for '', but no such host can be found
[1382731171] Error: Got host checkresult for '', but no such host can be found

My ncpa.cfg on devut514 is shown below:
Note, I changed %HOSTNAME% to devut514 in the [passive checks] stanza, but still having the same issue

[listener]
uid = nagios
certificate = adhoc
loglevel = info
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 = info
gid = nagcmd
sleep = 300
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid

[nrdp]
token = mytoken
hostname = devut514
parent = http://naigosserver.myco.com/nrdp/

[nrds]
url = None
CONFIG_VERSION = None
token = None
CONFIG_NAME = Freddy
CONFIG_OS = None

[api]
community_string = myapistring

[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]
devut514|cpu usage = /cpu/percent --warning 20 --critical 30
devut514|swap usage = /memory/swap/percent --warning 9 --critical 80
devut514|memory usage = /memory/virtual/percent --warning 60 --critical 80


Yancy,

I did a find from root on my nagios server and could not find a file named corelog.newobjects
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Core 4.0 with NCPA and NRDP

Post by slansing »

You still have not told us if you created the configuration for "devut514" on the nagios server. It would be created in:

Code: Select all

http://<ipaddress.of.nagios.server>/nrdp
Does "Freddy" exist?

In one of your original posts you indicated a passive check result coming from "devhost":
### NRDP Check ###
start_time=1382019953.0
# Time: Thu, 17 Oct 2013 09:25:53 -0500
host_name=
devhost

check_type=1
early_timeout=1
exited_ok=1
return_code=1
output=
WARNING: Percent was 11.8%|'percent_0'=11.8%;9;80
If this is the case "Freddy" may have the wrong configuration.
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: Nagios Core 4.0 with NCPA and NRDP

Post by skynardo »

I apologize, when you asked about creating a configuration for devut514 on the nagios server, I thought you were referring to the nagios host definition under /usr/loca/nagios/etc. For NRDP, I only followed the INSTALL.TXT file found in /usr/local/nrdp which does not mention creating configurations for clients that are sending passive checks to NRDP server (which is what I think you are saying I need to do). Freddy==devhost==devut514. I was initially trying to strip out actual host names, but in later posts failed to do so.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Core 4.0 with NCPA and NRDP

Post by slansing »

No problem at all this can get a bit confusing at times..

So, you do have Freddy listed as the host on the nagios server?
Freddy==devhost==devut514
Because NCPA's NRDS must send to a valid and current host configuration.
Locked