From 67015b8a38a4d8b2be15bd778a482793bad04720 Mon Sep 17 00:00:00 2001 From: UrBnW <40244829+UrBnW@users.noreply.github.com> Date: Mon, 21 Sep 2020 08:44:44 +0200 Subject: [PATCH] enh(freebsd) Add new labels (#2219) --- os/freebsd/snmp/mode/memory.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os/freebsd/snmp/mode/memory.pm b/os/freebsd/snmp/mode/memory.pm index 4452cdc20..86ea9c0d9 100644 --- a/os/freebsd/snmp/mode/memory.pm +++ b/os/freebsd/snmp/mode/memory.pm @@ -118,10 +118,10 @@ sub run { $nobuf_value . " " . $nobuf_unit, $prct_used, $cached_value . " " . $cached_unit)); - $self->{output}->perfdata_add(label => "cached", unit => 'B', + $self->{output}->perfdata_add(label => "cached", nlabel => 'memory.cached.bytes', unit => 'B', value => $cached_used, min => 0); - $self->{output}->perfdata_add(label => "used", unit => 'B', + $self->{output}->perfdata_add(label => "used", nlabel => 'memory.usage.bytes', unit => 'B', value => $nobuf_used, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size, cast_int => 1), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size, cast_int => 1), @@ -151,7 +151,7 @@ sub run { $swap_used_value . " " . $swap_used_unit, $prct_used, $swap_free_value . " " . $swap_free_unit, (100 - $prct_used))); - $self->{output}->perfdata_add(label => "swap", unit => 'B', + $self->{output}->perfdata_add(label => "swap", nlabel => 'swap.usage.bytes', unit => 'B', value => $swap_used, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-swap', total => $total_size, cast_int => 1), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-swap', total => $total_size, cast_int => 1),