Skip to content

Commit f62af43

Browse files
committed
Fixes #387
1 parent e059f67 commit f62af43

File tree

5 files changed

+471
-178
lines changed

5 files changed

+471
-178
lines changed

elastichq/config/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TestSettings(BaseSettings):
6161
# static
6262
HQ_SITE_URL = 'http://elastichq.org'
6363
HQ_GH_URL = 'https://github.com/ElasticHQ/elasticsearch-HQ'
64-
API_VERSION = 'v3.5.0'
64+
API_VERSION = 'v3.4.0'
6565
ES_V2_HOST = '127.0.0.1'
6666
ES_V2_PORT = '9200'
6767
ES_V5_HOST = '127.0.0.1'
@@ -121,7 +121,7 @@ class ProdSettings(BaseSettings):
121121
# static
122122
HQ_SITE_URL = 'http://elastichq.org'
123123
HQ_GH_URL = 'https://github.com/ElasticHQ/elasticsearch-HQ'
124-
API_VERSION = '3.5.0'
124+
API_VERSION = '3.4.0'
125125
SERVER_NAME = None
126126

127127
# cluster settings: specific settings for each cluster and how HQ should handle it.

elastichq/model/Task.py

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import eventlet
55
import jmespath
66

7-
from elastichq.service import NodeService, HQService
7+
from elastichq.service import HQService, NodeService
88
from ..globals import LOG, socketio
99

1010
eventlet.monkey_patch()
@@ -94,7 +94,68 @@ def run(self):
9494
node_dict),
9595
"fs_used_in_bytes": total_in_bytes - available_in_bytes,
9696
"fs_free_in_bytes": available_in_bytes,
97-
"index_total": jmespath.search("indices.indexing.index_total", node_dict)
97+
"index_total": jmespath.search("indices.indexing.index_total", node_dict),
98+
99+
# JVM
100+
"jvm_gc_old_count": jmespath.search("jvm.gc.collectors.old.collection_count",
101+
node_dict),
102+
"jvm_gc_young_count": jmespath.search("jvm.gc.collectors.young.collection_count",
103+
node_dict),
104+
"jvm_threads_count": jmespath.search("jvm.threads.count", node_dict),
105+
106+
# Transport
107+
"transport_rx_count": jmespath.search("transport.rx_count", node_dict),
108+
"transport_rx_size_in_bytes": jmespath.search("transport.rx_size_in_bytes", node_dict),
109+
"transport_tx_count": jmespath.search("transport.tx_count", node_dict),
110+
"transport_tx_size_in_bytes": jmespath.search("transport.tx_size_in_bytes", node_dict),
111+
"http_current_open": jmespath.search("http.current_open", node_dict),
112+
"http_total_opened": jmespath.search("http.total_opened", node_dict),
113+
114+
# OS
115+
"os_load_average": jmespath.search("os.load_average", node_dict),
116+
"os_cpu_percent": jmespath.search("os.cpu_percent", node_dict),
117+
"os_mem_free_in_bytes": jmespath.search("os.mem.free_in_bytes", node_dict),
118+
"os_mem_used_in_bytes": jmespath.search("os.mem.used_in_bytes", node_dict),
119+
"os_swap_free_in_bytes": jmespath.search("os.swap.free_in_bytes", node_dict),
120+
"os_swap_used_in_bytes": jmespath.search("os.swap.used_in_bytes", node_dict),
121+
"process_open_file_descriptors": jmespath.search("process.open_file_descriptors",
122+
node_dict),
123+
124+
# Thread Pools
125+
"tp_bulk_completed": jmespath.search("thread_pool.bulk.completed", node_dict),
126+
"tp_bulk_queue": jmespath.search("thread_pool.bulk.queue", node_dict),
127+
"tp_get_completed": jmespath.search("thread_pool.get.completed", node_dict),
128+
"tp_get_queue": jmespath.search("thread_pool.get.queue", node_dict),
129+
"tp_index_completed": jmespath.search("thread_pool.index.completed", node_dict),
130+
"tp_index_queue": jmespath.search("thread_pool.index.queue", node_dict),
131+
"tp_search_completed": jmespath.search("thread_pool.search.completed", node_dict),
132+
"tp_search_queue": jmespath.search("thread_pool.search.queue", node_dict),
133+
134+
# Indexing
135+
"indexing_total": jmespath.search("indices.indexing.index_total", node_dict),
136+
"indexing_failed": jmespath.search("indices.indexing.index_failed", node_dict),
137+
"delete_total": jmespath.search("indices.indexing.delete_total", node_dict),
138+
139+
# Fetching
140+
"get_total": jmespath.search("indices.get.total", node_dict),
141+
"fetch_total": jmespath.search("indices.search.fetch_total", node_dict),
142+
"exists_total": jmespath.search("indices.get.exists_total", node_dict),
143+
"missing_total": jmespath.search("indices.get.missing_total", node_dict),
144+
"query_total": jmespath.search("indices.search.query_total", node_dict),
145+
"scroll_total": jmespath.search("indices.search.scroll_total", node_dict),
146+
147+
"cache_fd_evictions": jmespath.search("indices.fielddata.evictions", node_dict),
148+
"cache_fd_memory_size_in_bytes": jmespath.search(
149+
"indices.fielddata.memory_size_in_bytes", node_dict),
150+
151+
"cache_qc_hit_count": jmespath.search("indices.query_cache.hit_count", node_dict),
152+
"cache_qc_memory_size_in_bytes": jmespath.search(
153+
"indices.query_cache.memory_size_in_bytes", node_dict),
154+
"cache_qc_miss_count": jmespath.search("indices.query_cache.miss_count", node_dict),
155+
"cache_qc_cache_size": jmespath.search("indices.query_cache.cache_size", node_dict),
156+
"cache_qc_cache_count": jmespath.search("indices.query_cache.cache_count", node_dict),
157+
"cache_qc_evictions": jmespath.search("indices.query_cache.evictions", node_dict)
158+
98159
}
99160
nodes.append(node)
100161
LOG.debug("Broadcast to room: " + self.room_name)

0 commit comments

Comments
 (0)