[collectd] [PATCH 1/2] Add collectd-flush command line utility.

Sebastian Harl sh at tokkee.org
Mon Aug 9 22:25:56 CEST 2010


Hi again :-)

On Mon, Aug 09, 2010 at 12:17:50AM +0200, Sebastian Harl wrote:
> Some possible TODOs:
> 
>  * Add support for "PUTVAL" and "PUTNOTIF". The latter would have to be
>    added to libcollectclient first. The former is a bit hard to
>    implement since lcc_putval() expects the data-type to be passed along
>    with the data-set. Not sure yet, how to properly solve that.

I've added support for "PUTVAL" in sh/next now. I'm using the following
(a bit) dirty trick to tell apart "gauge" or "counter" values ("derive"
and "absolute" are handled exactly the same by lcc, so there's no point
in handling them differently in the client): any value containing a dot
is considered a "gauge" value, while everything else is a "counter".
Since lcc uses that information for formatting the values only, this is
a feasible approach imho. Another possible approach that came to my mind
would be to introduce a new data-type (in lcc) called something like
"automatic_t" which would be passed to lcc as a string and then passed
along to the daemon without further touching it. Personally, I like that
approach a bit better (after all, it's the daemon's job to handle types
and, in theory, it might use different type definitions anyway) but it's
more intrusive, so, I've used the other approach for now. Florian, if
you have any preferences on that, please tell me and I'll change the
code ;-)

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100809/735cc763/attachment.pgp 


More information about the collectd mailing list