tsuru/tsuru-dashboard

metrics on graphite

vmalaga opened this issue · 7 comments

Hello

I am using bs to dump units metrics to statsd and then sending it to graphite.

I use this variables:

METRICS_BACKEND=statsd
METRICS_STATSD_HOST=statsd_host

but now the variable GRAPHITE_HOST is not used and a new variable METRICS_ELASTICSEARCH_HOST seems to be used by the dashboard to paint the graph, but i have not any elasticsearch server receiving metrics from tsuru

Graphite is not longer used receiving metric from tsuru ?
I need logstash-elasticsearch for store metrics ?

Hi @vmalaga,
We rewrote the tsuru code that collect and shows metrics. Doing this we have ported the collector to works with logstash and statsd but in the dashboard we dont have created the graphite "backend" yet.

The idea is to support both, but it is not done yet.

My suggestion is to use logstash + elastic search if you can. IMHO elastic search is a better tool to show metrics, is faster than graphite, scalable and easier to maintain. If do you have plans to use "autoscale" based on metrics, elastic search is a better choice.

Yes we use elk for tsuru apps logs, but the metrics was sending to graphite until now.

I am reading bs docs and I am going to implement elk metrics

regards

@vmalaga if you need help to use elk metrics, let us know

Hi @andrewsmedina

I just have tsuru metrics on elk with records like this, but at the dashboard I only get empty graph's.

My config is this:

root@tsrmgr:~/tsurudashboard# tsuru-admin bs-info |grep METRIC
| METRICS_LOGSTASH_HOST      | elk01.qdqmedia.com             |
| METRICS_LOGSTASH_CLIENT    | tsuru                          |
| METRICS_BACKEND            | logstash                       |
| METRICS_LOGSTASH_PORT      | 1984                           |
| METRICS_ELASTICSEARCH_HOST | http://elk01.qdqmedia.com:9200 |
root@tsrmgr:~/tsurudashboard# tsuru env-get 
METRICS_ELASTICSEARCH_HOST=http://elk01.qdqmedia.com:9200
{
  "_shard": 0,
  "_node": "NY0vIgcCS0GvwVbNzu45cA",
  "_index": ".measure-tsuru-2015.11.30",
  "_type": "cpu_max",
  "_id": "AVFVtT2DWLil-UVOMpsW",
  "_score": 1,
  "fields": {
    "message": [
      "{\"app\":\"rabbiteye\",\"client\":\"tsuru\",\"count\":1,\"host\":\"403304e02c96\",\"metric\":\"cpu_max\",\"process\":\"web\",\"value\":0.0177548}"
    ],
    "process": [
      "web"
    ],
    "@timestamp": [
      "2015-11-30T00:05:18.968Z"
    ],
    "app": [
      "rabbiteye"
    ],
    "host": [
      "403304e02c96"
    ],
    "client": [
      "tsuru"
    ],
    "count": [
      1
    ],
    "metric": [
      "cpu_max"
    ],
    "value": [
      0.0177548
    ],
    "@version": [
      "1"
    ]
  },
  "sort": [
    1
  ],
  "_explanation": {
    "value": 1,
    "description": "ConstantScore(*:*), product of:",
    "details": [
      {
        "value": 1,
        "description": "boost"
      },
      {
        "value": 1,
        "description": "queryNorm"
      }
    ]
  }
}

@vmalaga can you check the logstash conf? You can see an example here: http://docs.tsuru.io/en/master/advanced_topics/metrics.html

Hi @vmalaga, are you still having issues configuring your metrics? Or is it ok for me to close this issue?
Thanks.

I sorry, now is working