Netflix / inviso

Other
205 stars 65 forks source link

Cluster charts doesn't work #7

Closed kgs closed 9 years ago

kgs commented 9 years ago

Hi,

I've configured both python scripts and they work (I see new data in elastic search), tabs 'Search' and 'Profiler' work, but 'Cluster' doesn't.

Here is what I see: screenshot from 2014-12-05 09 32 51

When opening Cluster tab, there is only one request to ElasticSearch:

POST /inviso-cluster/metrics/_search?size=0

with form data: {"query":{"bool":{"must":[{"range":{"timestamp":{"gte":1416559166153,"lte":1417768766154}}}]}},"aggs":{"clusters":{"terms":{"field":"cluster","size":50}}}}:

and response: {"took":5,"timed_out":false,"_shards":{"total":6,"successful":6,"failed":0},"hits":{"total":1077,"max_score":0.0,"hits":[]},"aggregations":{"clusters":{"buckets":[{"key":"hefajstos","doc_count":1077}]}}}

What could be wrong? I don't see any errors neither in tomcat log or elasticsearch log.

danielcweeks commented 9 years ago

kgs,

The cluster view only gathers data from the elasticsearch index 'inviso-cluster'. There are three requests that should be made:

  1. Get the names of all recent clusters (which is what you see)
  2. Get the apps for the selected cluster (top graph)
  3. Get the metrics for the resource view (bottom graph)

It's possible that the second two requests aren't triggering correctly. Can you make sure you're on the latest version?

To diagnose, put a breakpoint on cluster.js in 'initClusterView' and 'loadSelectedCluster' to see if they're getting hit.

-Dan

kgs commented 9 years ago

Yes, I am using the latest version.

When I set breakpoints, I see that 'initClusterView' is getting called, but 'loadSelectedCluster' is not.

danielcweeks commented 9 years ago

Ok, I think I figured out what's going wrong. If you don't have a default cluster specified in settings.js, it wasn't initializing the selected cluster correctly. You can either pull the latest version or update your settings.js to have a default cluster that matches the name of one of your clusters.

Let me know if that doesn't work.

kgs commented 9 years ago

Yes, changing default to my cluster name in settings.js fixed this issue :) Thanks!