check_graylog: update perfdata name
This commit is contained in:
parent
380bfa411c
commit
52e465a791
|
@ -129,7 +129,7 @@ def main():
|
||||||
|
|
||||||
# Some metric names are changed for better readability
|
# Some metric names are changed for better readability
|
||||||
perfdata.update({
|
perfdata.update({
|
||||||
f'{input_name_clean}_incoming_messages_rate_per_sec_last_minute': {
|
f'{input_name_clean}_incoming_messages_rate_per_sec_1min': {
|
||||||
'value': metrics_data['incomingMessages_one_minute'],
|
'value': metrics_data['incomingMessages_one_minute'],
|
||||||
'min': 0,
|
'min': 0,
|
||||||
},
|
},
|
||||||
|
@ -261,7 +261,7 @@ def main():
|
||||||
text_result = text_result + f' JVM memory usage: {int((perfdata["jvm_memory_used"]["value"] / metrics_data["jvm_memory_heap_max"]) * 100)}%'
|
text_result = text_result + f' JVM memory usage: {int((perfdata["jvm_memory_used"]["value"] / metrics_data["jvm_memory_heap_max"]) * 100)}%'
|
||||||
|
|
||||||
if args.input:
|
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_last_minute"]["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)}'
|
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)}'
|
||||||
exit_code = nagios.STATE_OK
|
exit_code = nagios.STATE_OK
|
||||||
else:
|
else:
|
||||||
text_result = text_result + '\n' + notif_str
|
text_result = text_result + '\n' + notif_str
|
||||||
|
|
Loading…
Reference in New Issue