diff options
author | Ilya <ilyamaschenko@gmail.com> | 2017-07-13 16:01:14 +0900 |
---|---|---|
committer | Ilya <ilyamaschenko@gmail.com> | 2017-07-13 16:01:14 +0900 |
commit | 809ad9a426c44f3e42b43d87bd297e0a883dbb75 (patch) | |
tree | 30986844c061bb47349686ffc7aa4b84146082e8 /python.d | |
parent | a874b2ef9fbd18f901f691fc9ce19eb2ca67b133 (diff) |
elastic plugin: check if max_file_descriptors is in data before use it
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/elasticsearch.chart.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python.d/elasticsearch.chart.py b/python.d/elasticsearch.chart.py index 543f3de458..9ec08719c7 100644 --- a/python.d/elasticsearch.chart.py +++ b/python.d/elasticsearch.chart.py @@ -438,7 +438,7 @@ class Service(UrlService): key=key) except KeyError: continue - if 'open_file_descriptors' in to_netdata: + if 'open_file_descriptors' in to_netdata and 'max_file_descriptors' in to_netdata: to_netdata['file_descriptors_used'] = round(float(to_netdata['open_file_descriptors']) / to_netdata['max_file_descriptors'] * 1000) |