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

"value" column to collectd #2412

Closed
kimor79 opened this issue Apr 23, 2015 · 2 comments
Closed

"value" column to collectd #2412

kimor79 opened this issue Apr 23, 2015 · 2 comments
Milestone

Comments

@kimor79
Copy link
Contributor

kimor79 commented Apr 23, 2015

https://github.com/influxdb/influxdb/blob/master/collectd/collectd.go#L174 adds a column named <plugin>_<value name> with the value. Some tools expect there to be a column named "value" with the value. Since the plugin and value name are already the name of the point, what about changing that line to

fields["value"] = data.Values[i].Value

Based on conversation in https://groups.google.com/d/msg/influxdb/JxRmWPom6ao/QAIw0H8Vi5QJ

(I would have submitted this as a patch but I don't have a dev/test environment at the moment)

@mnuessler
Copy link
Contributor

Same applies for the graphite plugin. When sending a value for a metric named, say "cpu_load_short", the value is stored in a column "cpu_load_short" instead of "value".

Example:
echo "host.server02.region.us-east.cpu_load_short 0.64 date +%s" | nc -q0 localhost 2003

Query:
SELECT * FROM cpu_load_short

Result:

{
    "results": [
        {
            "series": [
                {
                    "name": "cpu_load_short",
                    "columns": [
                        "time",
                        "cpu_load_short"
                    ],
                    "values": [
                        [
                            "2015-04-27T13:07:37Z",
                            0.99
                        ]
                    ]
                }
            ]
        }
    ]
}

Shouldn't the value stored in a column named 'value'? Otherwise in i.e. Grafana you have to create queries such as SELECT mean(cpu_load_short) FROM cpu_load_short GROUP BY time(10s) ORDER BY asc which seems kind of redundant.

@otoolep
Copy link
Contributor

otoolep commented May 1, 2015

All fixed in RC29.

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

No branches or pull requests

4 participants