Skip to content
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

Influxdb 1.2. Collectd service. Multiple data sources for measurement don't work correctly. #8426

Closed
cinek810 opened this issue May 25, 2017 · 3 comments
Assignees

Comments

@cinek810
Copy link

cinek810 commented May 25, 2017

Bug report

System info: Influxdb 1.2, collectd-4.10

Steps to reproduce:

  1. enable collectd service in influxdb
  2. enable df plugin in collectd, configure collectd to send data to influx collectd service
  3. check measurements created in influxdb
  4. use types.db with:
    df used:GAUGE:0:1125899906842623, free:GAUGE:0:1125899906842623

Expected behavior:
Expected is to have one measurement df with values stored in fileds named "used" and "free".
At least it's how it's described on mailing list:
https://mailman.verplant.org/pipermail/collectd/2015-June/006551.html

Actual behavior:
Two separate measurements
df_used, df_free created

Additional info:
I've tried changing the ds names in types.db from used to df_used, the result was creation of measurement:
df_df_used
I suspect that data source is simply concatenated to the measurement name instead of beeing used as filed name in case of multiple values returned from measurement.

@cinek810 cinek810 changed the title Influxdb 1.2. Multiple datasources for measurement don't work. Influxdb 1.2. Collectd service. Multiple data sources for measurement don't work correctly. May 25, 2017
@rbetts rbetts self-assigned this May 31, 2017
@rbetts
Copy link
Contributor

rbetts commented May 31, 2017

@cinek810 I've spent some time reading the influxdb collectd service code. I think what is happening is by design - good or bad.

The construction of the InfluxDB measurement name is done here:
https://github.com/influxdata/influxdb/blob/master/services/collectd/service.go#L395 . This, as you guessed, is concatenating collectd's ValueList.Identifier.Plugin field and ValueList.DSName for each value in the ValueList.

Identifier.Plugin is from collectd here: https://github.com/collectd/go-collectd/blob/master/api/main.go#L47

DSName is from collected here: https://github.com/collectd/go-collectd/blob/master/api/main.go#L82

Changing this behavior seems pretty straight forward but would require a configuration flag to opt in to the new measurement name encoding.

@cinek810
Copy link
Author

cinek810 commented May 31, 2017 via email

@rbetts
Copy link
Contributor

rbetts commented Jun 29, 2017

Resolved by #8523

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

No branches or pull requests

4 participants