empty perfdata not put on perfdata channels anymore in 3.3.1

Michael Friedrich michael.friedrich at univie.ac.at
Tue Jul 26 16:34:25 CEST 2011


hi,

this is one of those patches i did not yet get an idea on how to make it 
portable from icinga to nagios. since there was a release rushed into 
today, i decided to throw this just "as is" onto the list as it seems 
that no-one else tested/encountered this yet. most likely users will ask 
about that soon - so get to know that prior to installing and debugging 
this release.

feel free to create your own working patch out of it.

https://dev.icinga.org/issues/1413


main issue will be with 3.3.1 that nagiosgrapher and ohcp/oscp won't 
work anymore with not sent perfdata if the plugin output does not 
provide any (because it's empty and not processed in the macro 
calculation in xdata/xpddefault.c). a possible workaround is to make 
sure each plugin provides perfdata output (like it should be).


i decided to make it a config option in icinga 1.4.0 to allow those 
users not needing it, to explicitely disable that. for the others, 
icinga 1.4.0 got that fixed thanks to various icinga users out there.
it's not the cleanest patch, but i'll leave it here for porting it into 
nagios upstream.

https://git.icinga.org/?p=icinga-core.git;a=commit;h=465f5aa1710f60e41db012ba7915e66fdfdce06e

kind regards,
michael


ps: some tests on the released source to proof it right away.

define command{
         command_name    process-service-perfdata-file
         command_line    /bin/mv /usr/local/nagios/var/service-perfdata 
/usr/local/nagios/var/perfdata/service-perfdata.$TIMET$
}

define command{
         command_name    process-host-perfdata-file
         command_line    /bin/mv /usr/local/nagios/var/host-perfdata 
/usr/local/nagios/var/perfdata/host-perfdata.$TIMET$
}


process_performance_data=1

host_perfdata_process_empty_results=1
service_perfdata_process_empty_results=1

service_perfdata_file=/usr/local/nagios/var/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file

host_perfdata_file=/usr/local/nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file





nagios 3.3.1

~/nagios/nagios $ tail -f /usr/local/nagios/var/service-perfdata
DATATYPE::SERVICEPERFDATA       TIMET::1311688921       
HOSTNAME::localhost     SERVICEDESC::HTTP       
SERVICEPERFDATA::time=0.064582s;;;0.000000 size=508B;;;0        
SERVICECHECKCOMMAND::check_http      HOSTSTATE::UP   
HOSTSTATETYPE::SOFT     SERVICESTATE::OK        SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311688961       
HOSTNAME::localhost     SERVICEDESC::PING       
SERVICEPERFDATA::rta=0.035000ms;100.000000;500.000000;0.000000 
pl=0%;20;60;0SERVICECHECKCOMMAND::check_ping!100.0,20%!500.0,60%      
HOSTSTATE::UP   HOSTSTATETYPE::HARD     SERVICESTATE::OK        
SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311689001       
HOSTNAME::localhost     SERVICEDESC::Root Partition     
SERVICEPERFDATA::/=636MB;3172;3569;0;3966       
SERVICECHECKCOMMAND::check_local_disk!20%!10%!/      HOSTSTATE::UP   
HOSTSTATETYPE::HARD     SERVICESTATE::OK        SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311689071       
HOSTNAME::localhost     SERVICEDESC::Swap Usage 
SERVICEPERFDATA::swap=975MB;0;0;0;1027  
SERVICECHECKCOMMAND::check_local_swap!20!10  HOSTSTATE::UP   
HOSTSTATETYPE::HARD     SERVICESTATE::OK        SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311689151       
HOSTNAME::localhost     SERVICEDESC::Current Load       
SERVICEPERFDATA::load1=0.080;5.000;10.000;0; load5=0.030;4.000;6.000;0; 
load15=0.010;3.000;4.000;0;  
SERVICECHECKCOMMAND::check_local_load!5.0,4.0,3.0!10.0,6.0,4.0  
HOSTSTATE::UP   HOSTSTATETYPE::HARD     SERVICESTATE::OK        
SERVICESTATETYPE::HARD

removed empty perfdata checks

~/nagios/nagios $ tail -f /usr/local/nagios/var/service-perfdata
DATATYPE::SERVICEPERFDATA       TIMET::1311690425       
HOSTNAME::localhost     SERVICEDESC::HTTP       
SERVICEPERFDATA::time=0.000690s;;;0.000000 size=508B;;;0        
SERVICECHECKCOMMAND::check_http      HOSTSTATE::UP   
HOSTSTATETYPE::HARD     SERVICESTATE::OK        SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311690465       
HOSTNAME::localhost     SERVICEDESC::PING       
SERVICEPERFDATA::rta=0.035000ms;100.000000;500.000000;0.000000 
pl=0%;20;60;0SERVICECHECKCOMMAND::check_ping!100.0,20%!500.0,60%      
HOSTSTATE::UP   HOSTSTATETYPE::HARD     SERVICESTATE::OK        
SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311690495       
HOSTNAME::localhost     SERVICEDESC::Root Partition     
SERVICEPERFDATA::/=636MB;3172;3569;0;3966       
SERVICECHECKCOMMAND::check_local_disk!20%!10%!/      HOSTSTATE::UP   
HOSTSTATETYPE::HARD     SERVICESTATE::OK        SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311690535       
HOSTNAME::localhost     SERVICEDESC::SSH *SERVICEPERFDATA:: 
*SERVICECHECKCOMMAND::check_ssh  HOSTSTATE::UP   HOSTSTATETYPE::HARD  
SERVICESTATE::OK        SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311690575       
HOSTNAME::localhost     SERVICEDESC::Swap Usage 
SERVICEPERFDATA::swap=975MB;0;0;0;1027  
SERVICECHECKCOMMAND::check_local_swap!20!10  HOSTSTATE::UP   
HOSTSTATETYPE::HARD     SERVICESTATE::OK        SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311690615       
HOSTNAME::localhost     SERVICEDESC::Total Processes *SERVICEPERFDATA:: 
*SERVICECHECKCOMMAND::check_local_procs!250!400!RSZDT HOSTSTATE::UP   
HOSTSTATETYPE::HARD     SERVICESTATE::OK        SERVICESTATETYPE::HARD
DATATYPE::SERVICEPERFDATA       TIMET::1311690645       
HOSTNAME::localhost     SERVICEDESC::Current Load       
SERVICEPERFDATA::load1=0.000;5.000;10.000;0; load5=0.020;4.000;6.000;0; 
load15=0.000;3.000;4.000;0;  
SERVICECHECKCOMMAND::check_local_load!5.0,4.0,3.0!10.0,6.0,4.0  
HOSTSTATE::UP   HOSTSTATETYPE::HARD     SERVICESTATE::OK        
SERVICESTATETYPE::HARD

-- 
DI (FH) Michael Friedrich

Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria

email: 	michael.friedrich at univie.ac.at
phone: 	+43 1 4277 14359
mobile: +43 664 60277 14359
fax: 	+43 1 4277 14338
web:	http://www.univie.ac.at/zid
	http://www.aco.net

Icinga Core&  IDOUtils Developer
http://www.icinga.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110726/12af090e/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list