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

write opentsdb does something odd to tags #17

Open
dmehra opened this issue Feb 12, 2016 · 0 comments
Open

write opentsdb does something odd to tags #17

dmehra opened this issue Feb 12, 2016 · 0 comments
Labels

Comments

@dmehra
Copy link
Contributor

dmehra commented Feb 12, 2016

When I write a point with tags, the write works fine, but subsequent read doesn't show the tags, only time, name and value. However if I include a read filter on a tag, then all tags also show up in the result set.
The same behavior is not observed for points which weren't written in with juttle, but instead generated by tcollector that comes in this docker image; all their tags are shown in plain read.

Also, tag values that contain spaces do something even odder: the write succeeds, but I can't read back those points at all, see below.

Example of needing to filter on the tag in order to see tag value in the data:

juttle> emit -points [ { time: '2016-01-02T02:02:02.222Z', name: 'dm.my.test', value: 0.002, tag1: 'mytag1.22', tag2: 'mytag2.22', tag3: '52' } ] | write opentsdb 
juttle> read opentsdb -from :2016-01-01: -name 'dm.my.test'
┌────────────────────────────────────┬───────────────┬────────────────────────────────┐
│ time                               │ name          │ value                          │
├────────────────────────────────────┼───────────────┼────────────────────────────────┤
│ 2016-01-01T01:01:01.111Z           │ dm.my.test    │ 41                             │
├────────────────────────────────────┼───────────────┼────────────────────────────────┤
│ 2016-01-02T02:02:02.222Z           │ dm.my.test    │ 0.0020000000949949026          │
└────────────────────────────────────┴───────────────┴────────────────────────────────┘

juttle> read opentsdb -from :2016-01-01: -name 'dm.my.test' tag3 = '52'
┌────────────────────────────────────┬───────────────┬────────────────────────────────┬──────────────┬──────────────┬──────────┐
│ time                               │ name          │ value                          │ tag1         │ tag2         │ tag3     │
├────────────────────────────────────┼───────────────┼────────────────────────────────┼──────────────┼──────────────┼──────────┤
│ 2016-01-02T02:02:02.222Z           │ dm.my.test    │ 0.0020000000949949026          │ mytag1.22    │ mytag2.22    │ 52       │
└────────────────────────────────────┴───────────────┴────────────────────────────────┴──────────────┴──────────────┴──────────┘

juttle> read opentsdb -from :2016-01-01: -name 'df.bytes.used' |head 1
┌────────────────────────────────────┬────────────────────┬─────────────────┬──────────┬──────────────────┬───────────────┐
│ time                               │ name               │ value           │ fstype   │ host             │ mount         │
├────────────────────────────────────┼────────────────────┼─────────────────┼──────────┼──────────────────┼───────────────┤
│ 2016-02-12T07:34:04.000Z           │ df.bytes.used      │ 13029310464     │ ext4     │ f5796f87a78f     │ /etc/hosts    │
└────────────────────────────────────┴────────────────────┴─────────────────┴──────────┴──────────────────┴───────────────┘

Example of not reading back the data at all if the tag string contained spaces:

juttle> emit -points [ { time: '2016-01-01T01:01:02.112Z', name: 'test.test', value: 12, tag1: 'a little tag' } ] | write opentsdb
juttle> read opentsdb -from :2016-01-01: -name 'test.test'
└───────────┴───────────┘
juttle> read opentsdb -from :2016-01-01: -name 'test.test' tag1='a little tag'
└───────────┴───────────┘

juttle> emit -points [ { time: '2016-01-01T01:01:01.111Z', name: 'test.test', value: 11, tag1: 'a_little_tag' } ] | write opentsdb
juttle> read opentsdb -from :2016-01-01: -name 'test.test'
┌────────────────────────────────────┬──────────────┬──────────┬──────────────────┐
│ time                               │ name         │ value    │ tag1             │
├────────────────────────────────────┼──────────────┼──────────┼──────────────────┤
│ 2016-01-01T01:01:01.111Z           │ test.test    │ 11       │ a_little_tag     │
└────────────────────────────────────┴──────────────┴──────────┴──────────────────┘

As you can see, the point whose tag was a little tag (with spaces) doesn't get read back at all.

@dmehra dmehra added the bug label Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant