|
4 | 4 | import eventlet |
5 | 5 | import jmespath |
6 | 6 |
|
7 | | -from elastichq.service import NodeService, HQService |
| 7 | +from elastichq.service import HQService, NodeService |
8 | 8 | from ..globals import LOG, socketio |
9 | 9 |
|
10 | 10 | eventlet.monkey_patch() |
@@ -94,7 +94,68 @@ def run(self): |
94 | 94 | node_dict), |
95 | 95 | "fs_used_in_bytes": total_in_bytes - available_in_bytes, |
96 | 96 | "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 | + |
98 | 159 | } |
99 | 160 | nodes.append(node) |
100 | 161 | LOG.debug("Broadcast to room: " + self.room_name) |
|
0 commit comments