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

plugin statsd does not allow field #1876

Closed
rolele opened this issue Oct 11, 2016 · 4 comments
Closed

plugin statsd does not allow field #1876

rolele opened this issue Oct 11, 2016 · 4 comments

Comments

@rolele
Copy link

rolele commented Oct 11, 2016

Bug report

telegraf statsd plugin behave strangely with fields of the line protocol
[key+tags] [fields] [timestamp]

System info:

Telegraf - version 1.0.1

Steps to reproduce:

I am using python (note the space between [key+tags] [fields])

import statsd
c = statsd.StatsClient('telegraf', 8125)
c.timing('example.timing7,service=payroll,region=us-west value=22,test=666', 1200)

Expected behavior:

key = example.timing7
tags = service=payroll,region=us-west
fields = value=22,test=666

Actual behavior:

key = example.timing7
tags = service=payroll,region=us-west,

> SELECT * FROM example_timing7
name: example_timing7
---------------------
time                    count   host            lower   mean    metric_type     service stddev  test    upper
2016-10-11T02:49:50Z    1       e26dcbf784ab    1200    1200    timing          payroll 0       666     1200

> SHOW FIELD KEYS FROM example_timing7
name: example_timing7
---------------------
fieldKey        fieldType
count           integer
lower           float
mean            float
stddev          float
upper           float


> SHOW TAG KEYS FROM example_timing7
name: example_timing7
---------------------
tagKey
host
metric_type
service
test

> SHOW series
example_timing7,host=e26dcbf784ab,metric_type=timing,service=payroll,test=666

> SHOW TAG VALUES FROM example_timing7 WITH KEY = test
name: example_timing7
---------------------
key     value
test    666

Additional info:

it looks like "test" in considered as a tag and "value" is completely ignored
I tried with another label then "value" to see if the term "value" was the problem but it is not.

Feature Request

I could see that the statsd plugin was announcing the field line protocol implementation since 3 Nov 2015, Do you have any plan to add it?

Use case: [Why is this important (helps with prioritizing requests)]

Statsd is used by a lot of companies. I think the adoption of telegraf (and influxdb) depend on plugins such as statsd. I think telegraf is a huge step forward to promote the adoption of influxdb already (compared to graphite). But I feel frustrated by the way statsd plugin behave. Maybe I am doing something wrong.

@rolele
Copy link
Author

rolele commented Oct 11, 2016

It appears that the python client that I am using could format the udp request in a different way that I originally written.
I decided to go with simple curl command to telegraf to test the behaviors of each query.
It appears that I easily can add tags to influxdb using

echo "glork4,service=payroll,region=us-west:100|ms|@0.9" | nc -u -w0 192.168.99.100 8125

> select * from glork4
name: glork4
------------
time                    count   host            lower   mean    metric_type     region  service stddev  upper
1476159310000000000     1       cac7d1665671    100     100     timing          us-west payroll 0       100

but I can not see how I can send field to be indexed as well.

I can reproduce the error I see before just doing

echo "glork5,service=payroll,region=us-west value=22,test=666:100|ms|@0.9" | nc -u -w0 192.168.99.100 8125

> select * from glork5
name: glork5
------------
time                    count   host            lower   mean    metric_type     service stddev  test    upper
1476159750000000000     1       cac7d1665671    100     100     timing          payroll 0       666     100

the first field value is ignore and test is included in the tags

@sparrc
Copy link
Contributor

sparrc commented Oct 11, 2016

the statsd protocol is separate from influx line-protocol. Only a single "field" is supported. see https://github.com/influxdata/telegraf/tree/master/plugins/inputs/statsd

@sparrc sparrc closed this as completed Oct 11, 2016
@rolele
Copy link
Author

rolele commented Oct 11, 2016

@sparrc
What about this claim that was made last year: "COMING SOON: there will be a way to specify multiple fields."
Is there any plan to implement this?

@sparrc
Copy link
Contributor

sparrc commented Oct 11, 2016

no, sorry, I will remove that

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

2 participants