Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#523 closed defect (worksforme)

CheckCounter checks returning zero

Reported by: ga15859 Owned by: mickem
Priority: 1 Milestone: 0.4.0
Component: CheckSystem Version: 0.4.0-rc
Severity: Bugs Keywords:
Cc:

Description

As of version 0.4.0.163, CheckCounter seems to return zero for at least most checks. The same checks worked in 3.9.328. Here are two examples that are always returning zero now:

./check_nrpe -H SERVER -t 150 -c CheckCounter -a "Counter=\\PhysicalDisk(_Total)\\% Idle Time" MinWarn=50
./check_nrpe -H SERVER -t 150 -c CheckCounter -a "Counter:proc=\\Processor(_total)\\% Processor Time" MinWarn=50 ShowAll

Change History (4)

comment:1 Changed 13 months ago by ga15859

  • Component changed from None to CheckSystem
  • Owner set to mickem

comment:2 Changed 13 months ago by mickem

I fixed some performance data related issues in 166 so please try a more recent build (found under nightly).

comment:3 Changed 13 months ago by mickem

  • Resolution set to worksforme
  • Status changed from new to closed

Not sure what values you are expecting but this is what I get on my machine sometimes 0 sometimes not which I think is expected right?

CheckCounter "Counter=\\Logisk disk(_Total)\\Ledig tid i procent" MinWarn=50 ShowAll                              
d rvice\NSClient++.cpp:923  Injecting: checkcounter...                                                            
d rvice\NSClient++.cpp:947  Result checkcounter: WARNING                                                          
l ce\simple_client.hpp:80   WARNING:WARNING: \Logisk disk(_Total)\Ledig tid i procent: 0 < warning                
l ce\simple_client.hpp:82    Performance data: '\Logisk disk(_Total)\Ledig tid i procent'=0;50;0                  
CheckCounter "Counter=\\Logisk disk(_Total)\\Ledig tid i procent" MinWarn=50 ShowAll                              
d rvice\NSClient++.cpp:923  Injecting: checkcounter...                                                            
d rvice\NSClient++.cpp:947  Result checkcounter: WARNING                                                          
l ce\simple_client.hpp:80   WARNING:WARNING: \Logisk disk(_Total)\Ledig tid i procent: 0 < warning                
l ce\simple_client.hpp:82    Performance data: '\Logisk disk(_Total)\Ledig tid i procent'=0;50;0                  
CheckCounter "Counter=\\Logisk disk(_Total)\\Ledig tid i procent" MinWarn=50 ShowAll                              
d rvice\NSClient++.cpp:923  Injecting: checkcounter...                                                            
d rvice\NSClient++.cpp:947  Result checkcounter: OK                                                               
l ce\simple_client.hpp:80   OK:OK: \Logisk disk(_Total)\Ledig tid i procent: 100                                  
l ce\simple_client.hpp:82    Performance data: '\Logisk disk(_Total)\Ledig tid i procent'=100;50;0                
CheckCounter "Counter=\\Logisk disk(_Total)\\Ledig tid i procent" MinWarn=50 ShowAll                              
d rvice\NSClient++.cpp:923  Injecting: checkcounter...                                                            
d rvice\NSClient++.cpp:947  Result checkcounter: OK                                                               
l ce\simple_client.hpp:80   OK:OK: \Logisk disk(_Total)\Ledig tid i procent: 100                                  
l ce\simple_client.hpp:82    Performance data: '\Logisk disk(_Total)\Ledig tid i procent'=100;50;0                
CheckCounter "Counter=\\Logisk disk(_Total)\\Ledig tid i procent" MinWarn=50 ShowAll                              
d rvice\NSClient++.cpp:923  Injecting: checkcounter...                                                            
d rvice\NSClient++.cpp:947  Result checkcounter: WARNING                                                          
l ce\simple_client.hpp:80   WARNING:WARNING: \Logisk disk(_Total)\Ledig tid i procent: 44.29 < warning            
l ce\simple_client.hpp:82    Performance data: '\Logisk disk(_Total)\Ledig tid i procent'=44.29;50;0              
CheckCounter "Counter=\\Logisk disk(_Total)\\Ledig tid i procent" MinWarn=50 ShowAll                              
d rvice\NSClient++.cpp:923  Injecting: checkcounter...                                                            
d rvice\NSClient++.cpp:947  Result checkcounter: OK                                                               
l ce\simple_client.hpp:80   OK:OK: \Logisk disk(_Total)\Ledig tid i procent: 100                                  
l ce\simple_client.hpp:82    Performance data: '\Logisk disk(_Total)\Ledig tid i procent'=100;50;0

Michael Medin

Last edited 13 months ago by mickem (previous) (diff)

comment:4 Changed 13 months ago by ga15859

Indeed, I would expect sometimes zero, but not always - any checks against physical disk idle time as of 4.0.163 constantly return zero. I double-checked my graphs in Nagios and it confirms - zero is always returned. I'll keep poking at it to see what I can find, but I can definitely confirm 3.9 works, 4.0 does not on my collection of non-prod servers (upgraded 12 at this point - 2003, 2008, 2008R2 - all show the same).

Note: See TracTickets for help on using tickets.