X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=bindings%2Fperl%2FCollectd%2FUnixsock.pm;h=29fac3e9d2638414dabd17a5d28b0f746d275172;hb=3f2f61c7d74d9204405a4b0c21390451c98665a7;hp=3b8a91cfc3e206d745d49d7ab71e0afe9e5dbf99;hpb=7a8e55e284c85ec5cd63ed457515769509308cc5;p=collectd.git diff --git a/bindings/perl/Collectd/Unixsock.pm b/bindings/perl/Collectd/Unixsock.pm index 3b8a91cf..29fac3e9 100644 --- a/bindings/perl/Collectd/Unixsock.pm +++ b/bindings/perl/Collectd/Unixsock.pm @@ -1,8 +1,30 @@ +# +# collectd - Collectd::Unixsock +# Copyright (C) 2007,2008 Florian octo Forster +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; only version 2 of the License is applicable. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Author: +# Florian octo Forster +# + package Collectd::Unixsock; =head1 NAME -Collectd::Unixsock - Abstraction layer for accessing the functionality by collectd's unixsock plugin. +Collectd::Unixsock - Abstraction layer for accessing the functionality by +collectd's unixsock plugin. =head1 SYNOPSIS @@ -29,6 +51,8 @@ programmers to interact with the daemon. use strict; use warnings; +#use constant { NOTIF_FAILURE => 1, NOTIF_WARNING => 2, NOTIF_OKAY => 4 }; + use Carp (qw(cluck confess)); use IO::Socket::UNIX; use Regexp::Common (qw(number)); @@ -49,7 +73,7 @@ sub _create_socket =head1 VALUE IDENTIFIER -The values in the collectd are identified using an five-tupel (host, plugin, +The values in the collectd are identified using an five-tuple (host, plugin, plugin-instance, type, type-instance) where only plugin-instance and type-instance may be NULL (or undefined). Many functions expect an I<%identifier> hash that has at least the members B, B, and @@ -190,10 +214,10 @@ sub getval return ($ret); } # getval -=item I<$obj>-EB (I<%identifier>, B