check_graylog: show more data when only cluster mode
This commit is contained in:
parent
52e465a791
commit
3c4315f14a
|
@ -209,7 +209,7 @@ def main():
|
|||
'value': elastisearch_active_shards,
|
||||
'min': 0
|
||||
},
|
||||
'indexder_failures': {
|
||||
'indexer_failures': {
|
||||
'value': indexer_failures['total'],
|
||||
'min': 0,
|
||||
},
|
||||
|
@ -258,7 +258,12 @@ def main():
|
|||
if args.crit_notif:
|
||||
exit_code = nagios.STATE_CRIT # force crit
|
||||
|
||||
if args.input:
|
||||
# show less data
|
||||
text_result = text_result + f' JVM memory usage: {int((perfdata["jvm_memory_used"]["value"] / metrics_data["jvm_memory_heap_max"]) * 100)}%'
|
||||
else:
|
||||
# show more data
|
||||
text_result = text_result + f' JVM memory usage: {int((perfdata["jvm_memory_used"]["value"] / metrics_data["jvm_memory_heap_max"]) * 100)}%, throughput last 1 second: {human_readable_size(perfdata["throughput_input_1_sec_rate"]["value"])} in - {human_readable_size(perfdata["throughput_output_1_sec_rate"]["value"])} out, elastisearch_active_shards: {perfdata["elastisearch_active_shards"]["value"]}'
|
||||
|
||||
if args.input:
|
||||
text_result = text_result + f' {input_name_clean} events/second for last minute: {perfdata[f"{input_name_clean}_incoming_messages_rate_per_sec_1min"]["value"]}, {input_name_clean}_connections: {perfdata[f"{input_name_clean}_connections"]["value"]}, {input_name_clean}_network_in_total: {human_readable_size(perfdata[f"{input_name_clean}_network_in_total"]["value"], decimal_places=0)}'
|
||||
|
|
Loading…
Reference in New Issue