pcp
[Top] [All Lists]

Re: [pcp] pmie support for string-typed metrics

To: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Subject: Re: [pcp] pmie support for string-typed metrics
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Sun, 1 May 2016 21:31:52 -0400 (EDT)
Cc: pcp <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <5726A8FC.7070303@xxxxxxxxxx>
References: <220069218.39805602.1460521052029.JavaMail.zimbra@xxxxxxxxxx> <733731954.39808417.1460522806449.JavaMail.zimbra@xxxxxxxxxx> <a54a13c7-4824-499c-8fa6-232cbd33ffaf.maildroid@localhost> <1337028064.40108627.1460601063575.JavaMail.zimbra@xxxxxxxxxx> <5726A8FC.7070303@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: 6rcZZzeri8iS6elopHoPn29Mvacwdg==
Thread-topic: pmie support for string-typed metrics
Hi Mark,

----- Original Message -----
> [...]
> 
> I've been thinking about this topic - not just for string valued metrics
> (btw: hinv.map.scsi is another one in this class), but also for discrete
> integer typed metrics, such as hinv.ndisk etc.

Its also a bit like the proc.psinfo.environ case that Martins came across,
I think.

> These metrics need to be logged more than "once"; rather more like "when
> changed".
> Once logged, they retain their discrete value (string or integer) until
> logged
> again with a new value. As an alternative to pmie monitoring these metrics
> and telling
> pmlogger to log them again via pmlc, maybe pmlogger could just maintain a
> cache
> (suitably indexed for efficiency) - when a discrete metric/instance/value
> with logging
> frequency of "when changed" changes, write it to the log again.
> 

I guess that would involve fetching these metrics like normal, but modifying
the pmResult to drop them, before writing to disk.  A bit like the inverse of
derived metrics, where the pmresult is added to with new metrics.

Might need a new pmlogger-language grouping keyword to indicate this new kind
of on-change-only behaviour for certain metrics?  (Or, automatically done for
all string-type metrics?)

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>