{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/1034","labels_url":"https://api.github.com/repos/grafana/grafana/issues/1034/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/1034/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/1034/events","html_url":"https://github.com/grafana/grafana/issues/1034","id":48207471,"number":1034,"title":"Elasticsearch as timeseries datasource","user":{"login":"felixbarny","id":2163464,"avatar_url":"https://avatars.githubusercontent.com/u/2163464?v=3","gravatar_id":"","url":"https://api.github.com/users/felixbarny","html_url":"https://github.com/felixbarny","followers_url":"https://api.github.com/users/felixbarny/followers","following_url":"https://api.github.com/users/felixbarny/following{/other_user}","gists_url":"https://api.github.com/users/felixbarny/gists{/gist_id}","starred_url":"https://api.github.com/users/felixbarny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixbarny/subscriptions","organizations_url":"https://api.github.com/users/felixbarny/orgs","repos_url":"https://api.github.com/users/felixbarny/repos","events_url":"https://api.github.com/users/felixbarny/events{/privacy}","received_events_url":"https://api.github.com/users/felixbarny/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grafana/grafana/labels/feature%20request","name":"feature request","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":34,"created_at":"2014-11-09T17:32:41Z","updated_at":"2015-08-25T05:15:25Z","closed_at":null,"body":"I'm aware of #158, but in this issue I want to discuss whether Elasticsearch is a good fit for storing timeseries data and whether grafana's graph panel should support fetching timeseris data from elasticsearch. I'm not suggesting that grafana should also implement features like log analytics.\r\n\r\nElasticsearch offers the [date_histogram](http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_looking_at_time.html) aggregation that could be used to feed the graphs. When comparing the available [aggregations](http://influxdb.com/docs/v0.8/api/aggregate_functions.html) elasticsearch has to offer to InfluxDB's [aggregate functions](http://influxdb.com/docs/v0.8/api/aggregate_functions.html), you can see, that they are quite simmilar.\r\n\r\nOne could argue, that if InfluxDB already offers this features, why add 'yad' (yet another datasource)? Even though it looks like InfluxDB's development is moving fast, I think that elasticsearch is a more mature, easier to scale scaleable, and easier to install and operate. Also, because it's based on Java it just runs anywhere, even Windows and Solaris for example.\r\n\r\nBesides, a lot of people already use elasticsearch to store the dashboards and add annotations to the graphs. If elasticsearch could also be used as a timeseries datasource, you would just have to install one database which again reduces time and cost to install and operate the system.\r\n\r\nBecause you would store metrics in a json format, the ideas described in [metric 2.0](http://metrics20.org/) could be incorporated. \r\n\r\nA metric document could look something like this:\r\n```\r\n{\r\n\t\"@timestamp\" : \"2013-07-20T09:43:58.000+0000\",\r\n\t\"name\" : \"bulk-request-timer\",\r\n\t\"tags\" : {\r\n\t\t\"application\"  : \"my awesome app\",\r\n\t\t\"host\"  : \"host-1\",\r\n\t\t\"datacenter\"  : \"dc1\"\r\n\t},\r\n\t\"values\" : {\r\n\t\t\"count\" : 114,\r\n\t\t\"max\" : 109.681,\r\n\t\t\"mean\" : 5.439666666666667,\r\n\t\t\"min\" : 2.457,\r\n\t\t\"p50\" : 4.3389999999999995,\r\n\t\t\"p75\" : 5.0169999999999995,\r\n\t\t\"p95\" : 8.37175,\r\n\t\t\"p98\" : 9.6832,\r\n\t\t\"p99\" : 94.68429999999942,\r\n\t\t\"p999\" : 109.681,\r\n\t\t\"stddev\" : 9.956913151098842,\r\n\t\t\"m15_rate\" : 0.10779994503690074,\r\n\t\t\"m1_rate\" : 0.07283351433589833,\r\n\t\t\"m5_rate\" : 0.10101298115113727,\r\n\t\t\"mean_rate\" : 0.08251056571678642\r\n\t}\r\n}\r\n```\r\n\r\nFinally, I think that these features should rather be added to grafana than to kibana. IMHO kibana's focus just isn't displaying metrics but analytics. For example, it is not possible to add multiple graphs to one panel. For instance, if you wanted to display multiple percentiles of the response time in one panel, that's just not possible. Also there is no such functionality like grafana's templated queries. That could be implemented in grafana by performing a terms aggregation e.g. on the `host` field to populate the dropdown with all available hosts.\r\n\r\nI think @Dieterbe already experimented using elasticsearch as a timeseries database for his graphite-ng project. What are your experiences and thoughts about my thoughts? @torkelo what do you think about all of that?"},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/134477792","html_url":"https://github.com/grafana/grafana/issues/1034#issuecomment-134477792","issue_url":"https://api.github.com/repos/grafana/grafana/issues/1034","id":134477792,"user":{"login":"warroyo","id":616621,"avatar_url":"https://avatars.githubusercontent.com/u/616621?v=3","gravatar_id":"","url":"https://api.github.com/users/warroyo","html_url":"https://github.com/warroyo","followers_url":"https://api.github.com/users/warroyo/followers","following_url":"https://api.github.com/users/warroyo/following{/other_user}","gists_url":"https://api.github.com/users/warroyo/gists{/gist_id}","starred_url":"https://api.github.com/users/warroyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warroyo/subscriptions","organizations_url":"https://api.github.com/users/warroyo/orgs","repos_url":"https://api.github.com/users/warroyo/repos","events_url":"https://api.github.com/users/warroyo/events{/privacy}","received_events_url":"https://api.github.com/users/warroyo/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T05:15:25Z","updated_at":"2015-08-25T05:15:25Z","body":"+1"}}