[collectd] plugin tail as source for smartcl tmp

Florian Forster octo at verplant.org
Tue Apr 13 22:56:59 CEST 2010


Hi Bruno,

On Tue, Apr 13, 2010 at 10:40:24PM +0200, Bruno Friedmann wrote:
> I've seen the contrib exec-smartctl but my smartctld also log into
> syslog the Temp change. so i think tail plugin would be more
> appropriate. Right ?

in theory, yes. The "smartd" logs data irregularly, however. You can see
in your example entries, that there are no entries between 20:26:27 and
20:56:26 – a 30 minute gap.

collectd usually collects data a lot more frequently; once every 10
seconds by default. If there has not been a matching line in the last 10
seconds (very likely), the tail plugin will not re-use the last read
value but will return "NaN" ("not a number", meaning "unknown" in this
context). So with a 30 minute gap and an interval of 10 seconds you will
get one valid data point and 179 NaNs, resulting in a basically empty
graph.

I think it would be possible to add a "persistency" configuration
option. For example a new "DSType" called "GaugeLastPersist" which
returns the last matched value until a new match is found. I think that
would make your use-case possible.

Regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100413/595ea383/attachment.pgp 


More information about the collectd mailing list