Ticket #406 (new defect)

Opened 18 months ago

Last modified 18 months ago

NSCA send only 1 check to server

Reported by: gersondiesel Owned by: mickem
Priority: 1 Milestone: 0.3.9
Component: Core Version: 0.3.8
Severity: Bugs Keywords: nsca services
Cc:

Description (last modified by mickem) (diff)

In nightly version NSClient++-0.3.8-Win32-20100819-1840.msi, when I configure more than one check, the server receive only one check result

NSCA.ini

[NSCA Commands]
my_cpu_check=checkCPU warn=80 crit=90 time=20m time=10s time=4
my_mem_check=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=page
;my_svc_check=checkServiceState CheckAll exclude=wampmysqld exclude=MpfService
host_check=check_ok


nsclient.log:

2010-08-30 10:45:10: message:modules\FileLogger\FileLogger.cpp:86: Starting to log for: NSClient++ - 0.3.8.93 2010-08-19
2010-08-30 10:45:10: debug:CACHENSClient++.cpp:551: Attempting to start NSCLient++ - 0.3.8.93 2010-08-19
2010-08-30 10:45:10: debug:CACHENSClient++.cpp:969: Loading plugin: CheckDisk...
2010-08-30 10:45:10: debug:CACHENSClient++.cpp:969: Loading plugin: Event log Checker....
2010-08-30 10:45:10: debug:CACHENSClient++.cpp:969: Loading plugin: Check External Scripts...
2010-08-30 10:45:10: debug:CACHENSClient++.cpp:969: Loading plugin: Helper function...
2010-08-30 10:45:10: debug:CACHENSClient++.cpp:969: Loading plugin: CheckSystem...
2010-08-30 10:45:10: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:73: Autodetected w2k or later, using w2k PDH counters.
2010-08-30 10:45:10: debug:CACHENSClient++.cpp:969: Loading plugin: CheckWMI...
2010-08-30 10:45:10: debug:CACHENSClient++.cpp:969: Loading plugin: File logger...
2010-08-30 10:45:10: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:110: Using index to retrive counternames
2010-08-30 10:45:10: message:CACHEmodules\FileLogger\FileLogger.cpp:87: Log path is: C:\Arquivos de programas\NSClient++\\nsclient.log
2010-08-30 10:45:10: debug:CACHENSClient++.cpp:969: Loading plugin: NSCAAgent (w/ encryption)...
2010-08-30 10:45:10: debug:CACHEmodules\NSCAAgent\NSCAThread.cpp:77: Time difference for NSCA server is: 0
2010-08-30 10:45:10: debug:CACHEmodules\NSCAAgent\NSCAThread.cpp:87: Only reporting: ok,warning,critical,unknown
2010-08-30 10:45:10: debug:CACHEmodules\NSCAAgent\NSCAThread.cpp:119: Autodetected hostname: P8860708VB
2010-08-30 10:45:10: debug:NSClient++.cpp:671: NSCLient++ - 0.3.8.93 2010-08-19 Started!
2010-08-30 10:45:10: debug:modules\NSCAAgent\NSCAThread.cpp:188: Drifting: 0
2010-08-30 10:45:10: debug:modules\CheckSystem\PDHCollector.cpp:130: Found countername: CPU:    \Processador(_total)\% tempo de processador
2010-08-30 10:45:10: debug:modules\CheckSystem\PDHCollector.cpp:131: Found countername: UPTIME: \Sistema\Tempo de ativação do sistema
2010-08-30 10:45:10: debug:modules\CheckSystem\PDHCollector.cpp:132: Found countername: MCL:    \Memória\Limite de confirmação
2010-08-30 10:45:10: debug:modules\CheckSystem\PDHCollector.cpp:133: Found countername: MCB:    \Memória\Bytes confirmados
2010-08-30 10:45:20: debug:modules\NSCAAgent\NSCAThread.cpp:206: Executing (from NSCA): 
2010-08-30 10:45:20: debug:NSClient++.cpp:1106: Injecting: check_ok: 
2010-08-30 10:45:20: debug:NSClient++.cpp:1106: Injecting: CheckOK: Everything, is, fine!
2010-08-30 10:45:20: debug:NSClient++.cpp:1142: Injected Result: OK 'Everythingisfine!'
2010-08-30 10:45:20: debug:NSClient++.cpp:1143: Injected Performance Result: ''
2010-08-30 10:45:20: debug:NSClient++.cpp:1142: Injected Result: OK 'Everythingisfine!'
2010-08-30 10:45:20: debug:NSClient++.cpp:1143: Injected Performance Result: ''
2010-08-30 10:45:20: debug:modules\NSCAAgent\NSCAThread.cpp:206: Executing (from NSCA): my_cpu_check
2010-08-30 10:45:20: debug:NSClient++.cpp:1106: Injecting: checkCPU: warn=80, crit=90, time=20m, time=10s, time=4
2010-08-30 10:45:20: debug:NSClient++.cpp:1142: Injected Result: OK 'OK CPU Load ok.'
2010-08-30 10:45:20: debug:NSClient++.cpp:1143: Injected Performance Result: ''20m'=0%;80;90 '10s'=17%;80;90 '4'=0%;80;90'
2010-08-30 10:45:20: debug:modules\NSCAAgent\NSCAThread.cpp:206: Executing (from NSCA): my_mem_check
2010-08-30 10:45:20: debug:NSClient++.cpp:1106: Injecting: checkMem: MaxWarn=80%, MaxCrit=90%, ShowAll, type=page
2010-08-30 10:45:20: debug:NSClient++.cpp:1142: Injected Result: OK 'OK: page file: 310M'
2010-08-30 10:45:20: debug:NSClient++.cpp:1143: Injected Performance Result: ''page file %'=24%;80;90 'page file'=310.27MB;998.87;1123.73;0;1248.5'
2010-08-30 10:45:20: debug:modules\NSCAAgent\NSCAThread.cpp:272: Sending to server...
2010-08-30 10:45:20: debug:modules\NSCAAgent\NSCAThread.cpp:279: Looked up s8860mon1.refap.biz to 10.134.64.111
2010-08-30 10:45:20: debug:modules\NSCAAgent\NSCAThread.cpp:355: Finnished sending to server...

messages.log (in server)

Aug 30 10:45:20 S8860MON1 xinetd[1641]: START: nsca pid=10377 from=10.134.72.66
Aug 30 10:45:20 S8860MON1 nsca[10377]: Handling the connection...
Aug 30 10:45:20 S8860MON1 nsca[10377]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'Everythingisfine!|'
Aug 30 10:45:20 S8860MON1 nsca[10377]: End of connection...
Aug 30 10:45:20 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=10377 duration=0(sec)

If I disable host_check, only the first SERVICE CHECK is received on server:

in NSCA.ini :

[NSCA Commands]
my_cpu_check=checkCPU warn=80 crit=90 time=20m time=10s time=4
my_mem_check=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=page
;my_svc_check=checkServiceState CheckAll exclude=wampmysqld exclude=MpfService
;host_check=check_ok

in /var/log/messages:

Aug 30 10:42:39 S8860MON1 xinetd[1641]: START: nsca pid=8007 from=10.134.72.66
Aug 30 10:42:39 S8860MON1 nsca[8007]: Handling the connection...
Aug 30 10:42:39 S8860MON1 nsca[8007]: SERVICE CHECK -> Host Name: 'P8860708VB', Service Description: 'my_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=0%;80;90 '10s'=6%;80;90 '4'=1%;80;90'
Aug 30 10:42:39 S8860MON1 nsca[8007]: End of connection...
Aug 30 10:42:39 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=8007 duration=0(sec)

In stable version it works normally.

Change History

comment:1 Changed 18 months ago by gersondiesel

I found a new behavior.

The HOST CHECK is sent every time, but SERVICE CHECKS is sent sametimes. I would like the HOST and SERVICE CHESK is sent EVERY time, because I use "fheshness" in nagios.

/var/log/messages.log

Aug 30 11:02:19 S8860MON1 xinetd[1641]: START: nsca pid=27243 from=10.134.72.66 Aug 30 11:02:19 S8860MON1 nsca[27243]: Handling the connection... Aug 30 11:02:19 S8860MON1 nsca[27243]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:02:19 S8860MON1 nsca[27243]: End of connection... Aug 30 11:02:19 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27243 duration=0(sec) Aug 30 11:02:30 S8860MON1 xinetd[1641]: START: nsca pid=27474 from=10.134.72.66 Aug 30 11:02:30 S8860MON1 nsca[27474]: Handling the connection... Aug 30 11:02:30 S8860MON1 nsca[27474]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:02:30 S8860MON1 nsca[27474]: End of connection... Aug 30 11:02:30 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27474 duration=0(sec) Aug 30 11:02:39 S8860MON1 xinetd[1641]: START: nsca pid=27685 from=10.134.72.66 Aug 30 11:02:39 S8860MON1 nsca[27685]: Handling the connection... Aug 30 11:02:39 S8860MON1 nsca[27685]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:02:39 S8860MON1 nsca[27685]: End of connection... Aug 30 11:02:39 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27685 duration=0(sec) Aug 30 11:02:49 S8860MON1 xinetd[1641]: START: nsca pid=27836 from=10.134.72.66 Aug 30 11:02:49 S8860MON1 nsca[27836]: Handling the connection... Aug 30 11:02:49 S8860MON1 nsca[27836]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:02:49 S8860MON1 nsca[27836]: End of connection... Aug 30 11:02:49 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27836 duration=0(sec) Aug 30 11:03:00 S8860MON1 xinetd[1641]: START: nsca pid=27990 from=10.134.72.66 Aug 30 11:03:00 S8860MON1 nsca[27990]: Handling the connection... Aug 30 11:03:00 S8860MON1 nsca[27990]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:03:00 S8860MON1 nsca[27990]: SERVICE CHECK -> Host Name: 'P8860708VB', Service Description: 'pass_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=0%;80;90 '10s'=6%;80;90 '4'=4%;80;90' Aug 30 11:03:00 S8860MON1 nsca[27990]: End of connection... Aug 30 11:03:00 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27990 duration=0(sec) Aug 30 11:03:09 S8860MON1 xinetd[1641]: START: nsca pid=28081 from=10.134.72.66 Aug 30 11:03:09 S8860MON1 nsca[28081]: Handling the connection... Aug 30 11:03:09 S8860MON1 nsca[28081]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:03:09 S8860MON1 nsca[28081]: End of connection... Aug 30 11:03:09 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28081 duration=0(sec) Aug 30 11:03:19 S8860MON1 xinetd[1641]: START: nsca pid=28226 from=10.134.72.66 Aug 30 11:03:19 S8860MON1 nsca[28226]: Handling the connection... Aug 30 11:03:20 S8860MON1 nsca[28226]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:03:20 S8860MON1 nsca[28226]: SERVICE CHECK -> Host Name: 'P8860708VB', Service Description: 'pass_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=1%;80;90 '10s'=6%;80;90 '4'=5%;80;90' Aug 30 11:03:20 S8860MON1 nsca[28226]: SERVICE CHECK -> Host Name: 'P8860708VB', Service Description: 'pass_mem_check', Return Code: '0', Output: 'OK: page file: 313M|'page file %'=25%;80;90 'page file'=312.94MB;998.87;1123.73;0;1248.5' Aug 30 11:03:20 S8860MON1 nsca[28226]: End of connection... Aug 30 11:03:20 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28226 duration=1(sec) Aug 30 11:03:30 S8860MON1 xinetd[1641]: START: nsca pid=28455 from=10.134.72.66 Aug 30 11:03:30 S8860MON1 nsca[28455]: Handling the connection... Aug 30 11:03:30 S8860MON1 nsca[28455]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:03:30 S8860MON1 nsca[28455]: End of connection... Aug 30 11:03:30 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28455 duration=0(sec) Aug 30 11:03:39 S8860MON1 xinetd[1641]: START: nsca pid=28585 from=10.134.72.66 Aug 30 11:03:39 S8860MON1 nsca[28585]: Handling the connection... Aug 30 11:03:39 S8860MON1 nsca[28585]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:03:39 S8860MON1 nsca[28585]: SERVICE CHECK -> Host Name: 'P8860708VB', Service Description: 'pass_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=1%;80;90 '10s'=11%;80;90 '4'=6%;80;90' Aug 30 11:03:39 S8860MON1 nsca[28585]: End of connection... Aug 30 11:03:39 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28585 duration=0(sec) Aug 30 11:03:49 S8860MON1 xinetd[1641]: START: nsca pid=28666 from=10.134.72.66 Aug 30 11:03:49 S8860MON1 nsca[28666]: Handling the connection... Aug 30 11:03:49 S8860MON1 nsca[28666]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|' Aug 30 11:03:49 S8860MON1 nsca[28666]: End of connection... Aug 30 11:03:49 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28666 duration=0(sec)

comment:2 Changed 18 months ago by gersondiesel

I found a new behavior.

The HOST CHECK is sent every time, but SERVICE CHECKS is sent sametimes. I would like the HOST and SERVICE CHESK is sent EVERY time, because I use "fheshness" in nagios.

/var/log/messages.log

Aug 30 11:02:19 S8860MON1 xinetd[1641]: START: nsca pid=27243 from=10.134.72.66
Aug 30 11:02:19 S8860MON1 nsca[27243]: Handling the connection...
Aug 30 11:02:19 S8860MON1 nsca[27243]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:02:19 S8860MON1 nsca[27243]: End of connection...
Aug 30 11:02:19 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27243 duration=0(sec)
Aug 30 11:02:30 S8860MON1 xinetd[1641]: START: nsca pid=27474 from=10.134.72.66
Aug 30 11:02:30 S8860MON1 nsca[27474]: Handling the connection...
Aug 30 11:02:30 S8860MON1 nsca[27474]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:02:30 S8860MON1 nsca[27474]: End of connection...
Aug 30 11:02:30 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27474 duration=0(sec)
Aug 30 11:02:39 S8860MON1 xinetd[1641]: START: nsca pid=27685 from=10.134.72.66
Aug 30 11:02:39 S8860MON1 nsca[27685]: Handling the connection...
Aug 30 11:02:39 S8860MON1 nsca[27685]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:02:39 S8860MON1 nsca[27685]: End of connection...
Aug 30 11:02:39 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27685 duration=0(sec)
Aug 30 11:02:49 S8860MON1 xinetd[1641]: START: nsca pid=27836 from=10.134.72.66
Aug 30 11:02:49 S8860MON1 nsca[27836]: Handling the connection...
Aug 30 11:02:49 S8860MON1 nsca[27836]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:02:49 S8860MON1 nsca[27836]: End of connection...
Aug 30 11:02:49 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27836 duration=0(sec)
Aug 30 11:03:00 S8860MON1 xinetd[1641]: START: nsca pid=27990 from=10.134.72.66
Aug 30 11:03:00 S8860MON1 nsca[27990]: Handling the connection...
Aug 30 11:03:00 S8860MON1 nsca[27990]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:03:00 S8860MON1 nsca[27990]: SERVICE CHECK -> Host Name: 'P8860708VB', Service Description: 'pass_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=0%;80;90 '10s'=6%;80;90 '4'=4%;80;90'
Aug 30 11:03:00 S8860MON1 nsca[27990]: End of connection...
Aug 30 11:03:00 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=27990 duration=0(sec)
Aug 30 11:03:09 S8860MON1 xinetd[1641]: START: nsca pid=28081 from=10.134.72.66
Aug 30 11:03:09 S8860MON1 nsca[28081]: Handling the connection...
Aug 30 11:03:09 S8860MON1 nsca[28081]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:03:09 S8860MON1 nsca[28081]: End of connection...
Aug 30 11:03:09 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28081 duration=0(sec)
Aug 30 11:03:19 S8860MON1 xinetd[1641]: START: nsca pid=28226 from=10.134.72.66
Aug 30 11:03:19 S8860MON1 nsca[28226]: Handling the connection...
Aug 30 11:03:20 S8860MON1 nsca[28226]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:03:20 S8860MON1 nsca[28226]: SERVICE CHECK -> Host Name: 'P8860708VB', Service Description: 'pass_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=1%;80;90 '10s'=6%;80;90 '4'=5%;80;90'
Aug 30 11:03:20 S8860MON1 nsca[28226]: SERVICE CHECK -> Host Name: 'P8860708VB', Service Description: 'pass_mem_check', Return Code: '0', Output: 'OK: page file: 313M|'page file %'=25%;80;90 'page file'=312.94MB;998.87;1123.73;0;1248.5'
Aug 30 11:03:20 S8860MON1 nsca[28226]: End of connection...
Aug 30 11:03:20 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28226 duration=1(sec)
Aug 30 11:03:30 S8860MON1 xinetd[1641]: START: nsca pid=28455 from=10.134.72.66
Aug 30 11:03:30 S8860MON1 nsca[28455]: Handling the connection...
Aug 30 11:03:30 S8860MON1 nsca[28455]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:03:30 S8860MON1 nsca[28455]: End of connection...
Aug 30 11:03:30 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28455 duration=0(sec)
Aug 30 11:03:39 S8860MON1 xinetd[1641]: START: nsca pid=28585 from=10.134.72.66
Aug 30 11:03:39 S8860MON1 nsca[28585]: Handling the connection...
Aug 30 11:03:39 S8860MON1 nsca[28585]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:03:39 S8860MON1 nsca[28585]: SERVICE CHECK -> Host Name: 'P8860708VB', Service Description: 'pass_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=1%;80;90 '10s'=11%;80;90 '4'=6%;80;90'
Aug 30 11:03:39 S8860MON1 nsca[28585]: End of connection...
Aug 30 11:03:39 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28585 duration=0(sec)
Aug 30 11:03:49 S8860MON1 xinetd[1641]: START: nsca pid=28666 from=10.134.72.66
Aug 30 11:03:49 S8860MON1 nsca[28666]: Handling the connection...
Aug 30 11:03:49 S8860MON1 nsca[28666]: HOST CHECK -> Host Name: 'P8860708VB', Return Code: '0', Output: 'OK: Everything is going to be fine a|'
Aug 30 11:03:49 S8860MON1 nsca[28666]: End of connection...
Aug 30 11:03:49 S8860MON1 xinetd[1641]: EXIT: nsca status=0 pid=28666 duration=0(sec)

comment:3 Changed 18 months ago by mickem

  • Description modified (diff)

comment:4 Changed 18 months ago by mickem

  • Owner changed from MickeM to mickem
  • Version set to 0.3.8
  • Milestone changed from 0.3.8 to 0.3.9

Interesting this is something i "fixed" in the nightly as well...

I shall have to investigate again...

Michael Medin

Note: See TracTickets for help on using tickets.