From: Robert 'phaylon' Sedlacek Date: Mon, 28 May 2012 21:44:16 +0000 (+0000) Subject: docs for state class X-Git-Tag: v0.001_001~61 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd5c3d43909891cd8a83ea17d611fd3f079ed1f4;p=scpubgit%2FSystem-Introspector.git docs for state class --- diff --git a/lib/System/Introspector/State.pm b/lib/System/Introspector/State.pm index fae866e..064006a 100644 --- a/lib/System/Introspector/State.pm +++ b/lib/System/Introspector/State.pm @@ -88,3 +88,58 @@ sub _create_gatherer { } 1; + +=head1 NAME + +System::Introspector::State - Gather system state + +=head1 SYNOPSIS + + my $state = System::Introspector::State->new( + host => 'foo.example.com', + storage => $storage_obj, + config => { + introspect => [qw( ProbeName )], + }, + ); + + my $data = $state->fetch; + $state->fetch_and_store; + +=head1 DESCRIPTION + +Gathers system introspection data based on configuration and stores +it with a L object. + +=head1 ATTRIBUTES + +=head2 config + +A hash reference containing a C key with an array reference +value containing a list of probe names without the +C prefix. This attribute is required. + +=head2 host + +An optional hostname. If no hostname is supplied, the local configuration +data will be fetched. + +=head2 storage + +A L object. + +=head1 METHODS + +=head2 fetch + + my $data = $state->fetch; + +Fetches all probe data. + +=head2 fetch_and_store + + $state->fetch_and_store; + +Fetches all probe data and stores it in the L. + +=cut