NCPA and NRDS - ERROR... File contains no section headers.
Posted: Thu Jul 30, 2015 8:13 pm
Hello,
I can't seem to get nrds working on the ncpa client. Please see below:
===========================================================
Versions
===========================================================
Nagios Server (VMWare image): Nagios XI 2014R2.7
Nagios Client OS: SUSE Linux Enterprise Server 12 (x86_64) Service Pack 0
Nagios Client Agent: ncpa-1.8.1-1.os12.x86_64.rpm (downloaded from https://assets.nagios.com/downloads/ncpa/download.php)
===========================================================
ncpa log
===========================================================
rproxy1:~ # tail -f /usr/local/ncpa/var/ncpa_passive.log
2015-07-30 14:09:53,287 19229 INFO Establishing passive handler: Handler
2015-07-30 14:09:53,289 19229 INFO Starting new HTTPS connection (1): nagios1.mc.moneyswitch.net
2015-07-30 14:09:53,305 19229 INFO Starting new HTTPS connection (1): nagios1.mc.moneyswitch.net
2015-07-30 14:09:53,321 19229 ERROR NRDS config recieved from the server contained errors: File contains no section headers.
file: <fdopen>, line: 1
'CONFIG_VERSION="0.4"\n'
===========================================================
Contents of /usr/local/ncpa/etc/ncpa.cfg
===========================================================
[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
# Available versions: PROTOCOL SSLv2, SSLv3, TLSv1
ssl_version = TLSv1
[passive]
uid = nagios
#handlers = nrds,nrdp
handlers = nrds
loglevel = info
gid = nagcmd
sleep = 300
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid
[nrdp]
token = nrdptoken
hostname = yourhostname
parent = yourparent
[nrds]
URL = https://hostname/nrdp/
CONFIG_VERSION = 0
TOKEN = [removed]
CONFIG_NAME = ncpa_plugin_repository
CONFIG_OS = Linux
UPDATE_CONFIG = 1
UPDATE_PLUGINS = 1
[api]
community_string = [removed]
[plugin directives]
plugin_path = plugins/
.sh = /bin/sh $plugin_name $plugin_args
.ps1 = powershell -ExecutionPolicy Bypass -File $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
I can't seem to get nrds working on the ncpa client. Please see below:
===========================================================
Versions
===========================================================
Nagios Server (VMWare image): Nagios XI 2014R2.7
Nagios Client OS: SUSE Linux Enterprise Server 12 (x86_64) Service Pack 0
Nagios Client Agent: ncpa-1.8.1-1.os12.x86_64.rpm (downloaded from https://assets.nagios.com/downloads/ncpa/download.php)
===========================================================
ncpa log
===========================================================
rproxy1:~ # tail -f /usr/local/ncpa/var/ncpa_passive.log
2015-07-30 14:09:53,287 19229 INFO Establishing passive handler: Handler
2015-07-30 14:09:53,289 19229 INFO Starting new HTTPS connection (1): nagios1.mc.moneyswitch.net
2015-07-30 14:09:53,305 19229 INFO Starting new HTTPS connection (1): nagios1.mc.moneyswitch.net
2015-07-30 14:09:53,321 19229 ERROR NRDS config recieved from the server contained errors: File contains no section headers.
file: <fdopen>, line: 1
'CONFIG_VERSION="0.4"\n'
===========================================================
Contents of /usr/local/ncpa/etc/ncpa.cfg
===========================================================
[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
# Available versions: PROTOCOL SSLv2, SSLv3, TLSv1
ssl_version = TLSv1
[passive]
uid = nagios
#handlers = nrds,nrdp
handlers = nrds
loglevel = info
gid = nagcmd
sleep = 300
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid
[nrdp]
token = nrdptoken
hostname = yourhostname
parent = yourparent
[nrds]
URL = https://hostname/nrdp/
CONFIG_VERSION = 0
TOKEN = [removed]
CONFIG_NAME = ncpa_plugin_repository
CONFIG_OS = Linux
UPDATE_CONFIG = 1
UPDATE_PLUGINS = 1
[api]
community_string = [removed]
[plugin directives]
plugin_path = plugins/
.sh = /bin/sh $plugin_name $plugin_args
.ps1 = powershell -ExecutionPolicy Bypass -File $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