I’m looking at improving this massively, possibly adding it as an editable HTML table to the Console > History DB page, along with the graphic. However, for the moment here’s a file [tt]graphite-editor.lua[/tt] which you should put into [tt]cmh-ludl/cgi/[/tt].
I actually invoke this from a link on my Grafana pages:
http://openLuupIP:3480/cgi/graphite-editor.lua
This brings up an HTML page with three sections:
[ul][li]READ - a form with three fields and a “Read” button
[list]
[li]Target - the finder pattern of the metric you want to edit, eg. openLuup.2*..Memo[/li]
[li]From - the start time, can be Graphite relative time (-1d, -3h) or ISO datetime (2018-11-28T16:45)[/li]
[li]Until - the stop time, same format (can also have the value ‘now’)[/li]
[/list]
[/li]
[li]Data field - initially blank, filled with the data from the above time interval once you press the Read button. This request goes directly to the Historian’s Graphite finder, so can include fully qualified metric names, or wildcards. It can, therefore, return data from multiple metrics, but try just to stick to one. The returned JSON data format is the standard Graphite render one.[/li]
[li]WRITE - a form with a single text field and a Write button[/li]
[list]
[li]POST content - here is where you put the revised data to write. The format is exactly the same as returned in the Data field, so the easiest thing by far is simply to cut and paste everything from the returned data to this field. Find and fix the incorrect data values, taking care not to screw up the JSON format or change any of the times. For this reason, It’s best to have homed in on the required part of the data by fine tuning the time intervals on the read request (which you can repeat as many times as you like.) Once you press the Write button, the revised data is sent to the relevant archive file and in the data area the points which have actually been changed are returned by way of verification.[/li]
[/list][/ul]
There are some subtleties. All archives older than the one retrieved and edited get updated using the correct aggregation function - this means that everything is taken care for you and you don’t need to do separate edits for each individual archive within the Whisper file, which will remain data consistent. BUT, the question is “which archive did you retrieve?” The answer depends on the OLDEST time interval that you asked for, and the definition of the file’s retentions, so you are best to set the From time to relatively close to the time of the errant sample, and do so as soon as you spot the error. It’s not a problem, though, because after a time all the younger archives will have been overwritten.
So, as I warned you, it is very crude, but quite easy to use - the explanation takes far longer to read than it does to make an edit.