The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Graphite::Reader - Access to Graphite's raw data

SYNOPSIS

  use Net::Graphite::Reader;

  my $gr = Net::Graphite::Reader->new(
             url => 'http://my.graphite.server',
           );

  my $response = $gr->query(
    target => 'some.cool.statistic',
    from   => '-24hours',
    to     => 'now',
  );

  my @metrics = $response->all_metrics;

  print "Average is " . $metrics[0]->average .  "\n";

ATTRIBUTES

uri

Base URI to your graphite instance

username

Username (if using basic auth)

password

Password (if using basic auth)

furl

Alternative Furl instance to use

METHODS

query

Arguments
target: The statistic or formula to retrieve, or an arrayref of such.
from: Begin date for stat retrieval
to: End date for stat retrieval
Returns
Net::Graphite::Reader::Response