Subject: | Alter call back does NOT work as advertised (does not change record field values). |
The mkreport() method allows the user to supply a callback (referred
to as an alter callback) that claims to let the caller change the
values of fields in the availability record by setting the value of
the %F hash corresponding to the key with the field names that is to
be changed.
eg $F{TOTAL_TIME_DOWN} = 0 ;
Unofortunately, and pretty obviously, since the %F hash is loaded with
copies of the field values, the changes are not applied to the field
values in the record (and thence the report).
In other words, mkreport() does not at present allow any changes to
the fields in the reports other than appending new field values to the
record.
This creates a problem for those wishing to graph the data (by calling
excel_dump() to produce a workbook) with Excel. The Excel graph wizard
does not understand numbers with % suffices and so a graph of the
Nagios PERECENT fields (eg PERCENT_TOTAL_TIME_UP) requires the % chars
be removed by some other means (manually).