een written to in the $interval (by default last day).
use 5.14.1;
use Graphite::Enumerator;
use JSON;
use Getopt::Long;
my $interval = '1day';
my $basepath = '';
GetOptions(
"interval=s" => \$i
t=json&from=-$interval&target=summarize($path,%22$interval%22,%22max%22,true)";
my $res = $gren->ua->get($last_hour_data_url);
if ($res->is_success) {
my $last_hour_data = decode_json(
package Graphite::Enumerator;
use 5.14.1;
use Carp qw/croak/;
use LWP::UserAgent;
use JSON;
use Scalar::Util 'reftype';
our $VERSION = '0.03';
# Recognized constructor options:
# - host (base URL)
my $completer_answer = eval { decode_json($res->content) };
if (!$completer_answer) {
$self->log_warning("URL <$url>: Couldn't decode JSON string: <" . $res->content . ">: $@");