When a numeric metric value is Null, NaN, or Infinity the agent log contains a warning indicate the value is invalid. However, this value is not invalid in most cases. It is expected. For example, for a web application response time metrics. If the web application has not been accessed since the app started or its metric have been reset, average response time will be NaN due to no data to calculate. For the same resource, min response time and max response time are also NaN as they represent min = Long.MAX_VALUE and max = 0. The fact that this is logged as warning is very alarming when seen in the agent log. Instead, this should be logged at debug. WARN [MeasurementManager.sender-1] (rhq.core.pc.measurement.MeasurementCollectorRunner)-Numeric Servlet.averageResponseTime with id 645163 is invalid, value was 'NaN' Should be: DEBUG [MeasurementManager.sender-1] (rhq.core.pc.measurement.MeasurementCollectorRunner)-Numeric Servlet.averageResponseTime with id 645163 is invalid, value was 'NaN'
ips already committed this fix to master as 542a30ca6d0eaebbee5365c756955255ba367e4e: log message reporting invalid numeric metrics at DEBUG, rather than WARN, to avoid flooding the agent log with repetitive messages
Committed to release-3.0.1 as 43dedc8135a6ce802501810ff810af739b24ab11 - http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=43dedc8135a6ce802501810ff810af739b24ab11
Verified in master build#855 (Version: 4.3.0-SNAPSHOT Build Number: 74fe0df) The invalid numeric metrics log messages are not logged as warning. These are logged at DEBUG in agent log as below: 2011-12-22 15:22:09,348 DEBUG [MeasurementManager.sender-1] (rhq.core.pc.measurement.MeasurementSenderRunner)- Numeric metric [Servlet.AvgResponseTime] with schedule id [18225] is invalid - value is [Double.NaN]. 2011-12-22 15:22:09,348 DEBUG [MeasurementManager.sender-1] (rhq.core.pc.measurement.MeasurementSenderRunner)- Numeric metric [Servlet.MaxResponseTime] with schedule id [18226] is invalid - value is [Double.NaN]. 2011-12-22 15:22:09,348 DEBUG [MeasurementManager.sender-1] (rhq.core.pc.measurement.MeasurementSenderRunner)- Numeric metric [Servlet.MinResponseTime] with schedule id [18227] is invalid - value is [Double.NaN].