We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In ES5 there are new limits, see: elastic/elasticsearch#14983
The text was updated successfully, but these errors were encountered:
I believe this patch fixes the issue
diff --git a/bin/check-es-indices-field-count.rb b/bin/check-es-indices-field-count.rb index 55deea8..2e17a3a 100755 --- a/bin/check-es-indices-field-count.rb +++ b/bin/check-es-indices-field-count.rb @@ -127,7 +127,7 @@ class ESIndicesFieldCount < Sensu::Plugin::Check::CLI fieldcount = if type_mapping['properties'].nil? 0 else - type_mapping['properties'].length + countnestedfields(type_mapping['properties']) end type_field_count[type] = fieldcount end @@ -139,6 +139,19 @@ class ESIndicesFieldCount < Sensu::Plugin::Check::CLI index_field_count end + def countnestedfields(fields) + fieldcount = 0 + fields.each do |field, value| + fieldcount += if value.key?('properties') + countnestedfields(value['properties']) + else + 1 + end + end + + fieldcount + end + def fieldlimitsetting field_limit_setting = {} settings = client.indices.get_settings index: config[:index]
Sorry, something went wrong.
No branches or pull requests
In ES5 there are new limits, see: elastic/elasticsearch#14983
The text was updated successfully, but these errors were encountered: