{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/4626","repository_url":"https://api.github.com/repos/influxdata/telegraf","labels_url":"https://api.github.com/repos/influxdata/telegraf/issues/4626/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/telegraf/issues/4626/comments","events_url":"https://api.github.com/repos/influxdata/telegraf/issues/4626/events","html_url":"https://github.com/influxdata/telegraf/issues/4626","id":356544632,"node_id":"MDU6SXNzdWUzNTY1NDQ2MzI=","number":4626,"title":"jti_openconfig_telemetry unexpected behavior when str_as_tags = true","user":{"login":"makzdot","id":17712073,"node_id":"MDQ6VXNlcjE3NzEyMDcz","avatar_url":"https://avatars3.githubusercontent.com/u/17712073?v=4","gravatar_id":"","url":"https://api.github.com/users/makzdot","html_url":"https://github.com/makzdot","followers_url":"https://api.github.com/users/makzdot/followers","following_url":"https://api.github.com/users/makzdot/following{/other_user}","gists_url":"https://api.github.com/users/makzdot/gists{/gist_id}","starred_url":"https://api.github.com/users/makzdot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makzdot/subscriptions","organizations_url":"https://api.github.com/users/makzdot/orgs","repos_url":"https://api.github.com/users/makzdot/repos","events_url":"https://api.github.com/users/makzdot/events{/privacy}","received_events_url":"https://api.github.com/users/makzdot/received_events","type":"User","site_admin":false},"labels":[{"id":244649246,"node_id":"MDU6TGFiZWwyNDQ2NDkyNDY=","url":"https://api.github.com/repos/influxdata/telegraf/labels/need%20more%20info","name":"need more info","color":"d4d7dd","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-09-03T15:25:17Z","updated_at":"2018-09-08T21:28:06Z","closed_at":null,"author_association":"NONE","body":"### Relevant telegraf.conf:\r\n[[inputs.jti_openconfig_telemetry]]\r\n  ## List of device addresses to collect telemetry from\r\n  servers = [\"myrouter:50051\"]\r\n  username = \"blah\"\r\n  password = \"blahblah\"\r\n  client_id = \"gobbler\"\r\n\r\n  sample_frequency = \"5000ms\"\r\n\r\n  sensors = [\r\n   \"jti_interfaces /interfaces\",\r\n   \"10000ms jti_bgp /network-instances/network-instance/protocols/protocol/bgp\",\r\n   \"300000ms jti_components /components\",\r\n   \"300000ms jti_firewall /junos/system/linecard/firewall\"\r\n  ]\r\n\r\n  retry_delay = \"1000ms\"\r\n  str_as_tags = true\r\n\r\n### System info:\r\n[Include Telegraf version, operating system name, and other relevant details]\r\nTelegraf v1.7.4 (git: release-1.7 578db7ef)\r\nUbuntu 18.04.1 LTS\r\n\r\n### Steps to reproduce:\r\n1. \r\nConfigure the jti_openconfig_telemetry with **str_as_tags = true**\r\n[[inputs.jti_openconfig_telemetry]]\r\n  ## List of device addresses to collect telemetry from\r\n  servers = [\"myrouter:50051\"]\r\n  username = \"blah\"\r\n  password = \"blahblah\"\r\n  client_id = \"gobbler\"\r\n\r\n  sample_frequency = \"5000ms\"\r\n\r\n  sensors = [\r\n   \"jti_interfaces /interfaces\",\r\n   \"10000ms jti_bgp /network-instances/network-instance/protocols/protocol/bgp\",\r\n   \"300000ms jti_components /components\",\r\n   \"300000ms jti_firewall /junos/system/linecard/firewall\"\r\n  ]\r\n  retry_delay = \"1000ms\"\r\n  str_as_tags = **true**\r\n\r\n2. Explore the database:\r\n`show tag values from \"jti_interfaces\" with key = \"/interfaces/interface/state/description\"`\r\nThis returns a list of tag values. This is al as expected.\r\n\r\nWhen I want to search on these tag values only _timestamp, component_id and sequence is returned. I would expect that all counter values for interfaces with that description is returned.\r\n\r\n### Expected behavior:\r\n\r\nWhen setting str_as_tag to true I would expect (or want) all counter values for that tag to be somehow associated to it.  ie\r\n\r\nSELECT \"/interfaces/interface/state/counters/out-pkts\" AS blah FROM \"jti_interfaces\" WHERE (\"/interfaces/interface/state/description\" = 'some description') AND time >= now() - 1m\r\n\r\nThis query should return all out-pkts for metrics with tag \"some description\" \r\n\r\n### Actual behavior:\r\n\r\nReturns no values when searching for a tag\r\n\r\n### Additional info:\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/comments/419674006","html_url":"https://github.com/influxdata/telegraf/issues/4626#issuecomment-419674006","issue_url":"https://api.github.com/repos/influxdata/telegraf/issues/4626","id":419674006,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTY3NDAwNg==","user":{"login":"ajhai","id":431988,"node_id":"MDQ6VXNlcjQzMTk4OA==","avatar_url":"https://avatars1.githubusercontent.com/u/431988?v=4","gravatar_id":"","url":"https://api.github.com/users/ajhai","html_url":"https://github.com/ajhai","followers_url":"https://api.github.com/users/ajhai/followers","following_url":"https://api.github.com/users/ajhai/following{/other_user}","gists_url":"https://api.github.com/users/ajhai/gists{/gist_id}","starred_url":"https://api.github.com/users/ajhai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajhai/subscriptions","organizations_url":"https://api.github.com/users/ajhai/orgs","repos_url":"https://api.github.com/users/ajhai/repos","events_url":"https://api.github.com/users/ajhai/events{/privacy}","received_events_url":"https://api.github.com/users/ajhai/received_events","type":"User","site_admin":false},"created_at":"2018-09-08T21:28:06Z","updated_at":"2018-09-08T21:28:06Z","author_association":"CONTRIBUTOR","body":"@danielnelson This is flattened hierarchical data being emitted as key value pairs. So key here is essentially a path from root of the tree to that level. We are breaking this xpath key back into that hierarchy creating one field per key element at a level with keys at parent levels as tags.\r\n\r\nIn this\r\n```\r\njti_interfaces,/interfaces/interface/@name=xe-1/0/3,device=asd001a-jnx-01-tst.dcn.surf.net,host=librenms,path=sensor_1000_1_1:/junos/system/linecard/interface/:/interfaces/:PFE,system_id=asd001a-jnx-01-tst-re0 _timestamp=1536242460454i,_component_id=1i,_subcomponent_id=0i,/interfaces/interface/state/high-speed=10000i,/interfaces/interface/state/counters/in-multicast-pkts=779835i,/interfaces/interface/state/counters/carrier-transitions=27i,/interfaces/interface/init_time=1528363849i,_sequence=0i 1536242460060437223\r\njti_interfaces,/interfaces/interface/@name=xe-1/0/4,device=asd001a-jnx-01-tst.dcn.surf.net,host=librenms,path=sensor_1000_1_1:/junos/system/linecard/interface/:/interfaces/:PFE,system_id=asd001a-jnx-01-tst-re0 /interfaces/interface/state/high-speed=10000i,/interfaces/interface/state/counters/carrier-transitions=7i,/interfaces/interface/init_time=1528363849i,_sequence=0i,_timestamp=1536242460454i,_component_id=1i,_subcomponent_id=0i 1536242460060437223\r\n```\r\nwe have different values for /interfaces/interface/@name. \r\n\r\nhttps://www.juniper.net/documentation/en_US/junos/topics/concept/open-config-grpc-junos-telemetry-interface-understanding.html is the documentation that is currently available for JTI"}}
{"actor":{"display_login":"ajhai"}}