New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot dispatch fine-grained samples during plugin read #557

Open
pabigot opened this Issue Feb 18, 2014 · 1 comment

Comments

Projects
None yet
3 participants
@pabigot

pabigot commented Feb 18, 2014

I've written a plugin for the TED5000, which is like the TED device currently supported by collectd but has an IP interface and retains history internally at one second intervals. I'm querying the device at longer intervals and retrieving all samples measured since the last query. Since rrdtool does aggregation, I'd like each plugin read to dispatch each sample collected since the last read.

At a 10-second read interval, this means submitting ten samples for each of the observed quantities (power in watts, line voltage). An example of what I get from collectd-5.4.1 is:

[2014-02-18 08:02:03] ted5000 plugin: 10 samples after 1392732103 as MTU0
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732104
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732104
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732105
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732105
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732106
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732106
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732107
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732107
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732108
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732108
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732109
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732109
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732110
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732110
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732111
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732111
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732112
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732112
[2014-02-18 08:02:03] ted5000 plugin: sample watts at 1392732113
[2014-02-18 08:02:03] ted5000 plugin: sample voltage at 1392732113
[2014-02-18 08:02:03] Filter subsystem: Built-in target `write': Dispatching value to all write plugins failed with status -1.
[2014-02-18 08:02:03] uc_update: Value too old: name = ted5000/ted5000-MTU0/watts; value time = 1392732105.000; last cache update = 1392732109.000;
[2014-02-18 08:02:03] Filter subsystem: Built-in target `write': Dispatching value to all write plugins failed with status -1.
[2014-02-18 08:02:03] Filter subsystem: Built-in target `write': Dispatching value to all write plugins failed with status -1.
[2014-02-18 08:02:03] uc_update: Value too old: name = ted5000/ted5000-MTU0/voltage; value time = 1392732105.000; last cache update = 1392732113.000;
[2014-02-18 08:02:03] Filter subsystem: Built-in target `write': Dispatching value to all write plugins failed with status -1.
[2014-02-18 08:02:03] Filter subsystem: Built-in target `write': Dispatching value to all write plugins failed with status -1.

It appears that collectd is re-ordering the values rather than adding them in as-dispatched order. A subset of the data is making it to the database.

Should I be able to use collectd to periodically add multiple samples that were collected over the read interval? If so, any suggestion to what I'm doing wrong?

@pabigot

This comment has been minimized.

Show comment
Hide comment
@pabigot

pabigot Feb 18, 2014

If anybody's interested, the initial version of the plugin is at pabigot/collectd@41d029a. The problem only arises in Sample mode; the default mode Aggregate (and the grotesque additions to types.db) work around this issue.

pabigot commented Feb 18, 2014

If anybody's interested, the initial version of the plugin is at pabigot/collectd@41d029a. The problem only arises in Sample mode; the default mode Aggregate (and the grotesque additions to types.db) work around this issue.

@rpv-tomsk rpv-tomsk added the New plugin label Jul 7, 2018

@rpv-tomsk rpv-tomsk added this to the Features milestone Jul 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment