ElasticHQ / elasticsearch-HQ

Monitoring and Management Web Application for ElasticSearch instances and clusters.
http://www.elastichq.org
Other
4.96k stars 531 forks source link

Error getting node diagnostics when client nodes in cluster #63

Closed jaredstehler closed 11 years ago

jaredstehler commented 11 years ago

Getting the following error when clicking "Node Diagnostics" for my cluster:

Uncaught TypeError: Cannot read property 'actual_used_in_bytes' of undefined @ NodeStatsListView.js:128

This is because my client nodes don't seem to have a populated 'os' object:

"os": {
    "timestamp": 1373898334033
},

I'm running elasticsearch 0.90.1. Here's a longer snippet of the response for /cluster/node/stats?all=1 (github won't let me post the whole thing):

{
    "cluster_name": "prod",
    "nodes": {
        "j7-A1ow6RyyJ_T_9wxxxxx": {
            "timestamp": 1373898334033,
            "name": "foo.bar.com client",
            "transport_address": "inet[/xx.xx.xx.xx:9300]",
            "hostname": "foo",
            "attributes": {
                "client": "true",
                "aws_availability_zone": "us-east-1e",
                "data": "false"
            },
            "indices": {
                "docs": {
                    "count": 0,
                    "deleted": 0
                },
                "store": {
                    "size": "0b",
                    "size_in_bytes": 0,
                    "throttle_time": "0s",
                    "throttle_time_in_millis": 0
                },
                "indexing": {
                    "index_total": 0,
                    "index_time": "0s",
                    "index_time_in_millis": 0,
                    "index_current": 0,
                    "delete_total": 0,
                    "delete_time": "0s",
                    "delete_time_in_millis": 0,
                    "delete_current": 0
                },
                "get": {
                    "total": 0,
                    "get_time": "0s",
                    "time_in_millis": 0,
                    "exists_total": 0,
                    "exists_time": "0s",
                    "exists_time_in_millis": 0,
                    "missing_total": 0,
                    "missing_time": "0s",
                    "missing_time_in_millis": 0,
                    "current": 0
                },
                "search": {
                    "open_contexts": 0,
                    "query_total": 0,
                    "query_time": "0s",
                    "query_time_in_millis": 0,
                    "query_current": 0,
                    "fetch_total": 0,
                    "fetch_time": "0s",
                    "fetch_time_in_millis": 0,
                    "fetch_current": 0
                },
                "merges": {
                    "current": 0,
                    "current_docs": 0,
                    "current_size": "0b",
                    "current_size_in_bytes": 0,
                    "total": 0,
                    "total_time": "0s",
                    "total_time_in_millis": 0,
                    "total_docs": 0,
                    "total_size": "0b",
                    "total_size_in_bytes": 0
                },
                "refresh": {
                    "total": 0,
                    "total_time": "0s",
                    "total_time_in_millis": 0
                },
                "flush": {
                    "total": 0,
                    "total_time": "0s",
                    "total_time_in_millis": 0
                },
                "warmer": {
                    "current": 0,
                    "total": 0,
                    "total_time": "0s",
                    "total_time_in_millis": 0
                },
                "filter_cache": {
                    "memory_size": "0b",
                    "memory_size_in_bytes": 0,
                    "evictions": 0
                },
                "id_cache": {
                    "memory_size": "0b",
                    "memory_size_in_bytes": 0
                },
                "fielddata": {
                    "memory_size": "0b",
                    "memory_size_in_bytes": 0,
                    "evictions": 0
                }
            },
            "os": {
                "timestamp": 1373898334033
            },
            "process": {
                "timestamp": 1373898334033,
                "open_file_descriptors": 107
            },
            "jvm": {
                "timestamp": 1373898334033,
                "uptime": "23 hours, 46 minutes, 2 seconds and 551 milliseconds",
                "uptime_in_millis": 85562551,
                "mem": {
                    "heap_used": "29.8mb",
                    "heap_used_in_bytes": 31293640,
                    "heap_committed": "56.9mb",
                    "heap_committed_in_bytes": 59703296,
                    "non_heap_used": "69.1mb",
                    "non_heap_used_in_bytes": 72472536,
                    "non_heap_committed": "69.5mb",
                    "non_heap_committed_in_bytes": 72876032,
                    "pools": {
                        "Code Cache": {
                            "used": "5.9mb",
                            "used_in_bytes": 6196992,
                            "max": "48mb",
                            "max_in_bytes": 50331648,
                            "peak_used": "5.9mb",
                            "peak_used_in_bytes": 6205184,
                            "peak_max": "48mb",
                            "peak_max_in_bytes": 50331648
                        },
                        "Eden Space": {
                            "used": "634.5kb",
                            "used_in_bytes": 649792,
                            "max": "273mb",
                            "max_in_bytes": 286326784,
                            "peak_used": "15.8mb",
                            "peak_used_in_bytes": 16580608,
                            "peak_max": "273mb",
                            "peak_max_in_bytes": 286326784
                        },
                        "Survivor Space": {
                            "used": "983.1kb",
                            "used_in_bytes": 1006776,
                            "max": "34.1mb",
                            "max_in_bytes": 35782656,
                            "peak_used": "1.9mb",
                            "peak_used_in_bytes": 2031608,
                            "peak_max": "34.1mb",
                            "peak_max_in_bytes": 35782656
                        },
                        "Tenured Gen": {
                            "used": "28.2mb",
                            "used_in_bytes": 29639352,
                            "max": "682.6mb",
                            "max_in_bytes": 715849728,
                            "peak_used": "39.2mb",
                            "peak_used_in_bytes": 41144808,
                            "peak_max": "682.6mb",
                            "peak_max_in_bytes": 715849728
                        },
                        "Perm Gen": {
                            "used": "63.2mb",
                            "used_in_bytes": 66275544,
                            "max": "82mb",
                            "max_in_bytes": 85983232,
                            "peak_used": "63.2mb",
                            "peak_used_in_bytes": 66275544,
                            "peak_max": "82mb",
                            "peak_max_in_bytes": 85983232
                        }
                    }
                },
                "threads": {
                    "count": 52,
                    "peak_count": 57
                },
                "gc": {
                    "collection_count": 1572,
                    "collection_time": "10 seconds and 513 milliseconds",
                    "collection_time_in_millis": 10513,
                    "collectors": {
                        "Copy": {
                            "collection_count": 1561,
                            "collection_time": "8 seconds and 105 milliseconds",
                            "collection_time_in_millis": 8105
                        },
                        "MarkSweepCompact": {
                            "collection_count": 11,
                            "collection_time": "2 seconds and 408 milliseconds",
                            "collection_time_in_millis": 2408
                        }
                    }
                }
            },
            "thread_pool": {
                "generic": {
                    "threads": 1,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 4,
                    "completed": 8573
                },
                "index": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 0,
                    "completed": 0
                },
                "get": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 0,
                    "completed": 0
                },
                "snapshot": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "largest": 0,
                    "completed": 0
                },
                "merge": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "largest": 0,
                    "completed": 0
                },
                "bulk": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 0,
                    "completed": 0
                },
                "warmer": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "largest": 0,
                    "completed": 0
                },
                "flush": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "largest": 0,
                    "completed": 0
                },
                "search": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 0,
                    "completed": 0
                },
                "percolate": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 0,
                    "completed": 0
                },
                "management": {
                    "threads": 1,
                    "queue": 0,
                    "active": 1,
                    "largest": 2,
                    "completed": 3982
                },
                "refresh": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "largest": 0,
                    "completed": 0
                }
            },
            "network": {},
            "fs": {
                "timestamp": 1373898334033,
                "data": []
            },
            "transport": {
                "server_open": 27,
                "rx_count": 437206,
                "rx_size": "19.8mb",
                "rx_size_in_bytes": 20850893,
                "tx_count": 419705,
                "tx_size": "459.7mb",
                "tx_size_in_bytes": 482115522
            },
            "http": {
                "current_open": 0,
                "total_opened": 0
            }
        },
        "CPfvd6WDRtmMjV_hzvxxxx": {
            "timestamp": 1373898334034,
            "name": "foo2.bar.com",
            "transport_address": "inet[/xx.xx.xx.xx:9300]",
            "hostname": "foo2",
            "attributes": {
                "aws_availability_zone": "us-east-1a",
                "master": "true"
            },
            "indices": {
                "docs": {
                    "count": 52102205,
                    "deleted": 360470
                },
                "store": {
                    "size": "100.5gb",
                    "size_in_bytes": 107994078799,
                    "throttle_time": "24.7m",
                    "throttle_time_in_millis": 1485474
                },
                "indexing": {
                    "index_total": 202159,
                    "index_time": "3.7m",
                    "index_time_in_millis": 227931,
                    "index_current": 1,
                    "delete_total": 1061944,
                    "delete_time": "1.2m",
                    "delete_time_in_millis": 73749,
                    "delete_current": 0
                },
                "get": {
                    "total": 0,
                    "get_time": "0s",
                    "time_in_millis": 0,
                    "exists_total": 0,
                    "exists_time": "0s",
                    "exists_time_in_millis": 0,
                    "missing_total": 0,
                    "missing_time": "0s",
                    "missing_time_in_millis": 0,
                    "current": 0
                },
                "search": {
                    "open_contexts": 0,
                    "query_total": 20698,
                    "query_time": "10.1m",
                    "query_time_in_millis": 611394,
                    "query_current": 0,
                    "fetch_total": 0,
                    "fetch_time": "0s",
                    "fetch_time_in_millis": 0,
                    "fetch_current": 0
                },
                "merges": {
                    "current": 0,
                    "current_docs": 0,
                    "current_size": "0b",
                    "current_size_in_bytes": 0,
                    "total": 4372,
                    "total_time": "38.7m",
                    "total_time_in_millis": 2323805,
                    "total_docs": 22930571,
                    "total_size": "21.9gb",
                    "total_size_in_bytes": 23554462286
                },
                "refresh": {
                    "total": 70807,
                    "total_time": "9.7m",
                    "total_time_in_millis": 587140
                },
                "flush": {
                    "total": 3080,
                    "total_time": "50.9s",
                    "total_time_in_millis": 50986
                },
                "warmer": {
                    "current": 0,
                    "total": 68125,
                    "total_time": "9.2s",
                    "total_time_in_millis": 9207
                },
                "filter_cache": {
                    "memory_size": "1.5mb",
                    "memory_size_in_bytes": 1577280,
                    "evictions": 0
                },
                "id_cache": {
                    "memory_size": "0b",
                    "memory_size_in_bytes": 0
                },
                "fielddata": {
                    "memory_size": "47.9mb",
                    "memory_size_in_bytes": 50294546,
                    "evictions": 0
                }
            },
            "os": {
                "timestamp": 1373898334036,
                "uptime": "1028 hours, 59 minutes and 16 seconds",
                "uptime_in_millis": 3704356000,
                "load_average": [
                    0.12,
                    0.06,
                    0.06
                ],
                "cpu": {
                    "sys": 1,
                    "user": 5,
                    "idle": 77,
                    "stolen": 0
                },
                "mem": {
                    "free": "175.5mb",
                    "free_in_bytes": 184119296,
                    "used": "3.4gb",
                    "used_in_bytes": 3757789184,
                    "free_percent": 45,
                    "used_percent": 54,
                    "actual_free": "1.6gb",
                    "actual_free_in_bytes": 1782591488,
                    "actual_used": "2gb",
                    "actual_used_in_bytes": 2159316992
                },
                "swap": {
                    "used": "0b",
                    "used_in_bytes": 0,
                    "free": "0b",
                    "free_in_bytes": 0
                }
            },
            "process": {
                "timestamp": 1373898334037,
                "open_file_descriptors": 10016,
                "cpu": {
                    "percent": 6,
                    "sys": "11 minutes, 58 seconds and 230 milliseconds",
                    "sys_in_millis": 718230,
                    "user": "58 minutes, 20 seconds and 540 milliseconds",
                    "user_in_millis": 3500540,
                    "total": "1 hour, 10 minutes, 18 seconds and 770 milliseconds",
                    "total_in_millis": 4218770
                },
                "mem": {
                    "resident": "1.7gb",
                    "resident_in_bytes": 1905299456,
                    "share": "6.4mb",
                    "share_in_bytes": 6729728,
                    "total_virtual": "2.9gb",
                    "total_virtual_in_bytes": 3196252160
                }
            },
            "jvm": {
                "timestamp": 1373898334043,
                "uptime": "23 hours, 51 minutes, 43 seconds and 607 milliseconds",
                "uptime_in_millis": 85903607,
                "mem": {
                    "heap_used": "1.2gb",
                    "heap_used_in_bytes": 1302068352,
                    "heap_committed": "1.9gb",
                    "heap_committed_in_bytes": 2138767360,
                    "non_heap_used": "50.2mb",
                    "non_heap_used_in_bytes": 52643464,
                    "non_heap_committed": "75mb",
                    "non_heap_committed_in_bytes": 78667776,
                    "pools": {
                        "Code Cache": {
                            "used": "10.9mb",
                            "used_in_bytes": 11498496,
                            "max": "48mb",
                            "max_in_bytes": 50331648,
                            "peak_used": "10.9mb",
                            "peak_used_in_bytes": 11508864,
                            "peak_max": "48mb",
                            "peak_max_in_bytes": 50331648
                        },
                        "Eden Space": {
                            "used": "59.6mb",
                            "used_in_bytes": 62572592,
                            "max": "66.5mb",
                            "max_in_bytes": 69795840,
                            "peak_used": "66.5mb",
                            "peak_used_in_bytes": 69795840,
                            "peak_max": "66.5mb",
                            "peak_max_in_bytes": 69795840
                        },
                        "Survivor Space": {
                            "used": "1.4mb",
                            "used_in_bytes": 1550168,
                            "max": "8.3mb",
                            "max_in_bytes": 8716288,
                            "peak_used": "8.3mb",
                            "peak_used_in_bytes": 8716288,
                            "peak_max": "8.3mb",
                            "peak_max_in_bytes": 8716288
                        },
                        "CMS Old Gen": {
                            "used": "1.1gb",
                            "used_in_bytes": 1237945592,
                            "max": "1.9gb",
                            "max_in_bytes": 2060255232,
                            "peak_used": "1.4gb",
                            "peak_used_in_bytes": 1552041096,
                            "peak_max": "1.9gb",
                            "peak_max_in_bytes": 2060255232
                        },
                        "CMS Perm Gen": {
                            "used": "39.2mb",
                            "used_in_bytes": 41144968,
                            "max": "166mb",
                            "max_in_bytes": 174063616,
                            "peak_used": "39.2mb",
                            "peak_used_in_bytes": 41144968,
                            "peak_max": "166mb",
                            "peak_max_in_bytes": 174063616
                        }
                    }
                },
                "threads": {
                    "count": 38,
                    "peak_count": 50
                },
                "gc": {
                    "collection_count": 12732,
                    "collection_time": "3 minutes, 54 seconds and 841 milliseconds",
                    "collection_time_in_millis": 234841,
                    "collectors": {
                        "Copy": {
                            "collection_count": 12727,
                            "collection_time": "3 minutes, 54 seconds and 546 milliseconds",
                            "collection_time_in_millis": 234546
                        },
                        "ConcurrentMarkSweep": {
                            "collection_count": 5,
                            "collection_time": "295 milliseconds",
                            "collection_time_in_millis": 295
                        }
                    }
                },
                "buffer_pools": {
                    "direct": {
                        "count": 30,
                        "used": "5.8mb",
                        "used_in_bytes": 6130606,
                        "total_capacity": "5.8mb",
                        "total_capacity_in_bytes": 6130606
                    },
                    "mapped": {
                        "count": 0,
                        "used": "0b",
                        "used_in_bytes": 0,
                        "total_capacity": "0b",
                        "total_capacity_in_bytes": 0
                    }
                }
            },
            "thread_pool": {
                "generic": {
                    "threads": 2,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 10,
                    "completed": 31810
                },
                "warmer": {
                    "threads": 1,
                    "queue": 0,
                    "active": 0,
                    "largest": 1,
                    "completed": 68126
                },
                "index": {
                    "threads": 1,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 1,
                    "completed": 202160
                },
                "flush": {
                    "threads": 1,
                    "queue": 0,
                    "active": 0,
                    "largest": 1,
                    "completed": 3086
                },
                "get": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 0,
                    "completed": 0
                },
                "search": {
                    "threads": 3,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 3,
                    "completed": 20698
                },
                "snapshot": {
                    "threads": 1,
                    "queue": 0,
                    "active": 0,
                    "largest": 1,
                    "completed": 31960
                },
                "merge": {
                    "threads": 1,
                    "queue": 0,
                    "active": 0,
                    "largest": 1,
                    "completed": 70854
                },
                "percolate": {
                    "threads": 0,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 0,
                    "completed": 0
                },
                "refresh": {
                    "threads": 1,
                    "queue": 0,
                    "active": 0,
                    "largest": 1,
                    "completed": 70774
                },
                "management": {
                    "threads": 5,
                    "queue": 0,
                    "active": 1,
                    "largest": 5,
                    "completed": 371090
                },
                "bulk": {
                    "threads": 1,
                    "queue": 0,
                    "active": 0,
                    "rejected": 0,
                    "largest": 1,
                    "completed": 2752
                }
            },
            "network": {
                "tcp": {
                    "active_opens": 163456,
                    "passive_opens": 157111,
                    "curr_estab": 100,
                    "in_segs": 771187592,
                    "out_segs": 454825276,
                    "retrans_segs": 11593,
                    "estab_resets": 22420,
                    "attempt_fails": 1276,
                    "in_errs": 71,
                    "out_rsts": 57486
                }
            },
            "fs": {
                "timestamp": 1373898334044,
                "data": [
                    {
                        "path": "/usr/share/elasticsearch/prod/nodes/0",
                        "mount": "/usr/share/elasticsearch",
                        "dev": "/mnt/elasticsearch",
                        "total": "393.6gb",
                        "total_in_bytes": 422722060288,
                        "free": "292.5gb",
                        "free_in_bytes": 314079289344,
                        "available": "272.5gb",
                        "available_in_bytes": 292606238720
                    }
                ]
            },
            "transport": {
                "server_open": 45,
                "rx_count": 1627701,
                "rx_size": "3.2gb",
                "rx_size_in_bytes": 3521000847,
                "tx_count": 1443421,
                "tx_size": "29.6gb",
                "tx_size_in_bytes": 31837642676
            },
            "http": {
                "current_open": 4,
                "total_opened": 2905
            }
        },
...
}
royrusso commented 11 years ago

I'll fix this and update the issue when complete. Thanks!

royrusso commented 11 years ago

Re-open if the individual node monitor screens fail. They use similar code.