Re: Nagios client server configuration
Posted: Wed Nov 09, 2016 4:08 pm
I am testing ncpa passive checks. I am trying to test by adding custom plugins like the check_uptime. I have attached the ncpa config on the remote server below and below errors on the nagios server logs. Can you take a look a let me know how to add a custom plugin to the ncpa configuration
Code: Select all
1478725226] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1478725226] Successfully launched command file worker with pid 32253
[1478725235] SERVICE ALERT: backup1.devdfw.marquee.net;uptime;UNKNOWN;SOFT;1;Unable to run check on non-child node. Revise your query.
[1478725235] SERVICE ALERT: backup1.devdfw.marquee.net;uptime;UNKNOWN;SOFT;2;Unable to run check on non-child node. Revise your query.
[1478725235] SERVICE ALERT: backup1.devdfw.marquee.net;uptime;UNKNOWN;HARD;3;Unable to run check on non-child node. Revise your query.
[1478725235] SERVICE NOTIFICATION: nagiosadmin;backup1.devdfw.marquee.net;uptime;UNKNOWN;xi_service_notification_handler;Unable to run check on non-child node. Revise your query.
[1478725236] wproc: NOTIFY job 0 from worker Core Worker 32236 is a non-check helper but exited with return code 255
[1478725236] wproc: host=backup1.devdfw.marquee.net; service=uptime; contact=nagiosadmin
[1478725236] wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
[1478725236] wproc: GLOBAL SERVICE EVENTHANDLER job 0 from worker Core Worker 32240 is a non-check helper but exited with return code 255
[1478725236] wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
[1478725236] wproc: GLOBAL SERVICE EVENTHANDLER job 0 from worker Core Worker 32233 is a non-check helper but exited with return code 255
[1478725236] wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
[1478725236] wproc: GLOBAL SERVICE EVENTHANDLER job 0 from worker Core Worker 32242 is a non-check helper but exited with return code 255
[1478725236] wproc: early_timeout=0; exited_ok=1; wait_status=65280; error_code=0;
Code: Select all
[[email protected] var]# cat /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
loglevel = info
gid = nagcmd
sleep = 5
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid
[nrdp]
token = nagios
hostname = backup1.devdfw.marquee.net
parent = https://10.230.99.19/nrdp/
[nrds]
URL = None
CONFIG_VERSION = None
TOKEN = None
CONFIG_NAME = None
CONFIG_OS = None
[api]
community_string = nagiospassword
[plugin directives]
#plugin_path = plugins/ /usr/lib64/nagios/plugins/
plugin_path = /usr/lib64/nagios/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
%HOSTNAME%|uptime = /usr/lib64/nagios/plugins/check_uptime -w 60\: