comnetgmbh / check_elasticsearch

Elasticsearch checks for Check_MK
GNU General Public License v3.0
5 stars 5 forks source link

max_file_descriptors KeyError #1

Open ivmiddj opened 6 years ago

ivmiddj commented 6 years ago

Hi, beim Aufruf des elasticsearch Plugins bekomme ich die folgende Fehlermeldung: elasticsearch <<>> status;green number_of_nodes;2 unassigned_shards;0 timed_out;False active_primary_shards;16 cluster_name;textmining-p relocating_shards;0 active_shards;24 initializing_shards;0 number_of_data_nodes;2 <<>> ptlxtmp02;timestamp;1525686533910 ptlxtmp02;open_file_descriptors;1018 Traceback (most recent call last): File "./elasticsearch", line 92, in print "%s;max_file_descriptors;%s" % (node_name, node["process"]["max_file_descriptors"]) KeyError: 'max_file_descriptors'

Ich nutze das Plugin unter SLES 11 SP3

Viele Grüsse,

Jörg

mludeke commented 6 years ago

Vermutlich ist die JSON-Ausgabe unvollständig oder ungültig. Das Plugin parsed den Response und dabei fehlt scheinbar der Key "max_file_descriptors". Prüfe doch mal, ob die Ausgabe vollständig ist:

~ # curl -H 'Content-Type: application/json' -X GET http://127.0.0.1:9200/_nodes/_local/stats/process | python -m json.tool

Ausgabe sollte in etwa so aussehen (IP durch eigene ersetzen):

{ "_nodes": { "failed": 0, "successful": 1, "total": 1 }, "cluster_name": "my-application", "nodes": { "0d1_YqXcS9i1l5GG1BHY-A": { "attributes": { "ml.enabled": "true", "ml.machine_memory": "2083885056", "ml.max_open_jobs": "20", "xpack.installed": "true" }, "host": "127.0.0.1", "ip": "127.0.0.1:9300", "name": "node-1", "process": { "cpu": { "percent": 0, "total_in_millis": 51670 }, "max_file_descriptors": 65536, "mem": { "total_virtual_in_bytes": 3747819520 }, "open_file_descriptors": 1023, "timestamp": 1529624276878 }, "roles": [ "master", "data", "ingest" ], "timestamp": 1529624276877, "transport_address": "127.0.0.1:9300" } } }