NSClient++ Help (#1) - Issue with NSCA (#588) - Message List
Hi,
I'm trying to implement NSCA passive checks.
I've a problem with NSclient++ configuration. No service status checks are submitted to Nagios.
Here is my NSClient++ configuration:
[modules]
NRPEListener.dll
NSClientListener.dll
NSCAAgent.dll
CheckWMI.dll
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
CheckEventLog.dll
CheckHelpers.dll
[Settings]
use_file=1
allowed_hosts=172.23.0.83
password=AWcurity
[log]
debug=1
[Script Wrappings]
vbs=cscript.exe //T:30 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%
ps1=cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
bat=scripts\%SCRIPT% %ARGS%
[External Scripts]
;check_es_long=scripts\long.bat
;check_es_ok=scripts\ok.bat
;check_es_nok=scripts\nok.bat
;check_vbs_sample=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs
;check_powershell_warn=cmd /c echo scripts\powershell.ps1 | powershell.exe -command -
[External Alias]
alias_cpu=checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_cpu_ex=checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_disk=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
alias_service=checkServiceState CheckAll
alias_process=checkProcState $ARG1$=started
alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=physical
alias_up=checkUpTime MinWarn=1d MinWarn=1h
alias_file_age=checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"
alias_file_size=checkFile2 filter=out "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%"
alias_file_size_in_dir=checkFile2 filter=out pattern=*.txt "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%"
alias_event_log_old=CheckEventLog file=application file=system filter=new filter=out MaxWarn=1 MaxCrit=1 filter-generated=>2d filter-severity==success filter-severity==informational truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
alias_event_log_new=CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational')" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
alias_event_log=alias_event_log_new
check_ok=CheckOK Everything is fine!
[NSCA Agent]
interval=30
hostname=awe-testhost-nsca
nsca_host=172.23.0.83
nsca_port=5667
[NSCA Commands]
check_nrpe_wmi_service_bkpdhcp=checkServiceState Dhcp
[NRPE Client Handlers]
check_other=-H 192.168.0.1 -p 5666 -c remote_command -a arguments
When I try to update the service status using send_nsca.exe, it works without any problem.
>send_nsca.exe -H 172.23.0.83 -d , -c send_nsca.cfg awe-testhost-nsca,check_nrpe_wmi_service_bkpdhcp,0,OK
Here's NSclient debug log file:
2010-05-31 12:08:25: debug:modules\NSCAAgent\NSCAThread.cpp:205: Executing (from NSCA): check_nrpe_wmi_service_bkpdhcp 2010-05-31 12:08:25: debug:NSClient++.cpp:1106: Injecting: checkServiceState: Dhcp 2010-05-31 12:08:25: debug:NSClient++.cpp:1142: Injected Result: OK 'OK: All services are in their appropriate state.' 2010-05-31 12:08:25: debug:NSClient++.cpp:1143: Injected Performance Result: '' 2010-05-31 12:08:25: debug:modules\NSCAAgent\NSCAThread.cpp:261: Sending to server... 2010-05-31 12:08:25: debug:modules\NSCAAgent\NSCAThread.cpp:268: Looked up 172.23.0.83 to 172.23.0.83 2010-05-31 12:08:25: debug:modules\NSCAAgent\NSCAThread.cpp:340: Finnished sending to server...
TCPDump on Groundwork server:
12:08:23.940340 IP p6906.aweurope.be.1924 > awe-nagios.nsca: Flags [S], seq 184278343, win 65535, options [mss 1460,nop,nop,sackOK], length 0 12:08:23.940356 IP awe-nagios.nsca > p6906.aweurope.be.1924: Flags [S.], seq 2658629253, ack 184278344, win 5840, options [mss 1460,nop,nop,sackOK], length 0 12:08:23.940604 IP p6906.aweurope.be.1924 > awe-nagios.nsca: Flags [.], ack 1, win 65535, length 0 12:08:23.941589 IP awe-nagios.nsca > p6906.aweurope.be.1924: Flags [P.], seq 1:133, ack 1, win 5840, length 132 12:08:24.042497 IP p6906.aweurope.be.1924 > awe-nagios.nsca: Flags [P.], seq 1:721, ack 133, win 65403, length 720 12:08:24.042509 IP awe-nagios.nsca > p6906.aweurope.be.1924: Flags [.], ack 721, win 7200, length 0 12:08:24.042512 IP p6906.aweurope.be.1924 > awe-nagios.nsca: Flags [F.], seq 721, ack 133, win 65403, length 0 12:08:24.042579 IP awe-nagios.nsca > p6906.aweurope.be.1924: Flags [F.], seq 133, ack 722, win 7200, length 0 12:08:24.043253 IP p6906.aweurope.be.1924 > awe-nagios.nsca: Flags [.], ack 134, win 65403, length 0
But nothing in nagios.log ...
If a send a nsca message with send_nsca.exe, i've the following in nagios.log:
[1275300128] PASSIVE SERVICE CHECK: awe-testhost-nsca;check_nrpe_wmi_service_bkpdhcp;2;KO
Does anyone have an idea?
-
Message #1794
Check syslog (or where you send your NSCA events from the NSCA server).
NSCA will never "return" an error to the client so the only place to find any configuration misshap is the eventlog of the "Nagios server" (as in the linux one).
THis is in the guide so feel free to follow that when settings up things doc/usage/nagios/nsca.
MickeM
mickem05/31/10 14:50:50 (21 months ago)-
Message #1795
With Groundwork NSCA is embedded in Nagios Event Broker, so the logs are in nagios.log.
The default configuration is encryption=1 and no password. When I send NSCA messages with send_nsca.exe (from the same machine that has NSClient++ running), my Nagios service is updated and I see something in nagios.log.
It seems that NSClient sends correctly the data because I see them with TCPDump (and also in nsclient logs on the windows machine), every 30 secondes as I set in the configuration file. The problem is there isn't any service update.
So I'm wondering if my nsclient config file is correct... I followed the guide.
jvoisin05/31/10 15:05:26 (21 months ago)-
Message #1797
Humm...
Seems to me that if you have "data on the wire" it is (again given the protocol) a "problem with the server" if it is not receiving correctly or it gets malformed data it should log that somewhere.
Is there any options to set debug level on the server side?
Is there some way to get ground works setup "simply" so i could check that you locally? I have only ever used the "normal NSCA server" so it could be some issues if you are using another tool.
Your config looks good and the most common issue here is: 1, time problems (clocks are not in sync) 2, password problems 3, encryption problems.
There is some issues with length so a good idea is to check using a single command CheckOK or something "simple" just to make sure that is not the problem.
Michael Medin
mickem05/31/10 15:48:43 (21 months ago)-
Message #1798
You can get the binary installer here : http://sourceforge.net/projects/gwmos/files/
You just have to setup a linux distrib (ubuntu server or centos) and install groundwork. Apache, MySQL and syslog-ng comes with gwos.
I'm going to further investigate the probleme this morning, I'll keep you updated.
jvoisin06/01/10 09:17:56 (21 months ago)
-
-
-







