orthecreedence/check_elasticsearch

Minor issue in perfdata line

Closed this issue · 3 comments

OK - elasticsearch (MDMcluser) is running. status: green; timed_out: false; number_of_nodes: 3; number_of_data_nodes: 3; active_primary_shards: 13; active_shards: 29
100.0; relocating_shards: 0; initializing_shards: 0; delayed_unassigned_shards: 0; unassigned_shards: 0  | 'active_primary'=13 'active'=29
100.0 'relocating'=0 'init'=0 'delay_unass'=0 'unass'=0

the line break on active label cuts off all the other perfdata.

there are now 2 matching strings for active_shards in temporary file output, so this modification resolves the problem (the escaped quote).

active_shards=grep active_shards\" ${filename} | awk '{print $3}' | sed 's|[\r",]||g'

The other match is active_shards_percent_as_number , and can be added to the output.

Any chance you can open a PR for this? I haven't actually used this script in a while. Most of the changes come from PRs. Thanks!

I'll try in a few days.