Currently the API is limited to collecting/storing/displaying only one set of data per metric. I'm not really sure how to handle the situation where you want to store data for multiple intervals of the same metric (say, one weekly set and one monthly set).

Possible options for consideration:

  1. Collect and store the smallest interval, and handle other intervals with display logic.
  2. Make an extra copy of the plugin for each extra interval you want to store, effectively exposing new metrics to the API. I believe this would only involve making a new .inc plugin file (the code logic for processing the metric should be reusable), so it's not as bad as it sounds.
  3. Add support directly to the API. Haven't thought through how hard this would be, depends on the approach.
  4. Add a "Resampler" submodule whose job is to produce less granular result sets from stored metrics.