8000 Can't get Nodes Stats Indices Get data · Issue #1 · untergeek/es_stats · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Can't get Nodes Stats Indices Get data #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdiorio opened this issue Apr 18, 2016 · 3 comments · Fixed by #2
Closed

Can't get Nodes Stats Indices Get data #1

mdiorio opened this issue Apr 18, 2016 · 3 comments · Fixed by #2

Comments

@mdiorio
Copy link
mdiorio commented Apr 18, 2016

Anything under the get leaf is failing. I'm calling this via es_stats_zabbix.py

# ./zabbix_get -s localhost -k nodestats[node-1,indices.get.current]
Traceback (most recent call last):
  File "/usr/bin/es_stats_zabbix", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.6/site-packages/es_stats_zabbix/es_stats_zabbix.py", line 173, in main
    cli(obj={})
  File "/usr/lib/python2.6/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.6/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.6/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.6/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.6/site-packages/click/core.py", line 86, in augment_usage_errors
    yield
  File "/usr/lib/python2.6/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/es_stats_zabbix/es_stats_zabbix.py", line 117, in single
    result = apiobj.get(ztuple[2], name=ztuple[1])
  File "/usr/lib/python2.6/site-packages/es_stats/es_stats.py", line 69, in get
    return get_value(self.stats, key)
  File "/usr/lib/python2.6/site-packages/es_stats/utils.py", line 23, in get_value
    return eval("dotted." + notation)
  File "<string>", line 1, in <module>
AttributeError: 'function' object has no attribute 'current'

Viewing the JSON through port 9200 shows that the key is there and exists in http://server:9200/_nodes/stats

Thanks.

@untergeek
Copy link
Owner

Which version of Elasticsearch are you using? And which version of the Elasticsearch-py module?

@mdiorio
Copy link
Author
mdiorio commented Apr 19, 2016

Elasticsearch 2.2.0
Python Modules:
elasticsearch==2.3.0
es-stats==0.1.0
es-stats-zabbix==0.1.3

@untergeek
Copy link
Owner

This seems to be a limitation of DotMap if the key "get" is somewhere in the line.

>>> s.indices.suggest
DotMap(current=0, total=0, time_in_millis=0)
>>> s.indices["get"]
DotMap(missing_total=0, exists_total=0, current=0, time_in_millis=0, missing_time_in_millis=0, exists_time_in_millis=0, total=0)
>>> s.indices.get
<bound method DotMap.get of DotMap(completion=DotMap(size_in_bytes=0), suggest=DotMap(current=0, total=0, time_in_millis=0),

Note the "bound method DotMap.get". This is why this is a problem. I will see if there's a way I can code around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0