ganglia / monitor-core

Ganglia Monitoring core
BSD 3-Clause "New" or "Revised" License
491 stars 246 forks source link

Pass in correct slope enumeration value constructing root summary RRD. #230

Closed OrestZborowski-SIG closed 6 years ago

OrestZborowski-SIG commented 9 years ago

The write_root_summary function calls write_data_to_rrd, passing in metric->slope for the slope parameter. However, metric->slope is a string offset into the strings buffer and not a valid ganglia_slope_t value. This results in an incorrectly constructed RRD, and many warning messages emitted for every subsequent update.

The fix is to use cstr_to_slope() to translate the slope string into a proper ganglia_slope_t value.