File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -744,7 +744,11 @@ let from_xml input =
744
744
let name = get_el " name" i in
745
745
let type_ = get_el " type" i in
746
746
let min_hb = get_el " minimal_heartbeat" i in
747
- let min = get_el " min" i in
747
+ (* CA-408126 - work around negative data in historical RRDs
748
+ where ds_min could have been incorrectly set to neg_infinity.
749
+ Setting ds_min to 0. means Fring.make below will turn negative
750
+ historical values to NaNs.*)
751
+ let min = max (float_of_string (get_el " min" i)) 0. in
748
752
let max = get_el " max" i in
749
753
ignore (get_el " last_ds" i) ;
750
754
let value = get_el " value" i in
@@ -767,7 +771,7 @@ let from_xml input =
767
771
failwith " Bad format"
768
772
)
769
773
; ds_mrhb= float_of_string min_hb
770
- ; ds_min= float_of_string min
774
+ ; ds_min= min
771
775
; ds_max= float_of_string max
772
776
; ds_last= VT_Unknown
773
777
; (* float_of_string "last_ds"; *)
You can’t perform that action at this time.
0 commit comments