.log should also be skipped.
Thanks, Fengguang
On Tue, Mar 02, 2021 at 09:30:06AM +0800, Wang Chenglong wrote:
[Why] The 'xxx.message' in es-jobs just show the error message, it doesn't has to be summed.
before: sum.stats.ansible_test.error.No-package-yum-utils-available.message: 1 sum.stats.ansible_test.error.No-package-yum-utils-available: 1 raw.stats.ansible_test.error.No-package-yum-utils-available.message: ["{"ansible_loop_var": "item", "changed": false, "failures": ["No package yum-utils available."], "item": ["yum-utils", "device-mapper-persistent-data", "lvm2"], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}"] raw.stats.ansible_test.error.No-package-yum-utils-available: [1]
after: sum.stats.ansible_test.error.No-package-yum-utils-available: 1 raw.stats.ansible_test.error.No-package-yum-utils-available.message: ["{"ansible_loop_var": "item", "changed": false, "failures": ["No package yum-utils available."], "item": ["yum-utils", "device-mapper-persistent-data", "lvm2"], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}"] raw.stats.ansible_test.error.No-package-yum-utils-available: [1]
Signed-off-by: Wang Chenglong 18509160991@163.com
lib/es_jobs.rb | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/lib/es_jobs.rb b/lib/es_jobs.rb index c5c0f0d..b0d0fb2 100644 --- a/lib/es_jobs.rb +++ b/lib/es_jobs.rb @@ -124,6 +124,8 @@ class ESJobs
def stats_count(result) result['raw.stats'].each do |key, value|
next if key.end_with?('.message')
if function_stat?(key) result['sum.stats'][key] = value.compact.size else
-- 2.23.0