vimeo / graph-explorer

A graphite dashboard powered by structured metrics
http://vimeo.github.io/graph-explorer/
Apache License 2.0
1.06k stars 93 forks source link

update_metrics.py error #91

Closed gavinzhou closed 10 years ago

gavinzhou commented 10 years ago

./update_metrics.py
2014-02-05 12:54:37,847 - update_metrics - INFO - fetching/saving metrics from graphite...
2014-02-05 12:54:39,954 - update_metrics - INFO - generating structured metrics data...
2014-02-05 12:54:39,955 - update_metrics - DEBUG - loading metrics
2014-02-05 12:54:40,957 - update_metrics - DEBUG - removing outdated targets
2014-02-05 12:54:40,957 - update_metrics - DEBUG - making sure index exists..
2014-02-05 12:54:40,957 - update_metrics - ERROR - sorry, something went wrong: 'StructuredMetrics' object has no attribute 'es'
Traceback (most recent call last):
  File "./update_metrics.py", line 36, in 
    backend.update_data(s_metrics)
  File "/opt/graph-explorer/backend.py", line 73, in update_data
    s_metrics.remove_metrics_not_in(metrics)
  File "/opt/graph-explorer/structured_metrics/__init__.py", line 308, in remove_metrics_not_in
    self.assure_index()
  File "/opt/graph-explorer/structured_metrics/__init__.py", line 292, in assure_index
    self.es.indices.create(index=self.es_index, body=body)
AttributeError: 'StructuredMetrics' object has no attribute 'es'
Dieterbe commented 10 years ago

looks like you updated the code from git, but didn't bring your config up to date.

I'll add some config checking to prevent issues like these

Dieterbe commented 10 years ago

you probably miss the 'es_index' setting

gavinzhou commented 10 years ago

I miss es_index setting thank you

Dieterbe commented 10 years ago

added config validation to avoid cases like this in the future. 3222fd7ad602c3b1b71c49b2c3cc9b07582638d4