check_junos: chassis_environment: Add temp values to perf-data.

This commit is contained in:
Sebastian Harl 2012-01-02 14:15:24 +01:00
parent 90915aa6a8
commit 2614e18db7

View file

@ -331,6 +331,27 @@ foreach my $check (@{$conf{'checks'}}) {
$plugin->add_message($state, $class . " $name: status " . $plugin->add_message($state, $class . " $name: status " .
$status); $status);
} }
my $temp = get_object_value_by_spec($item, 'temperature');
if (! $temp) {
next;
}
($temp) = $temp =~ m/(\d+) degrees C/;
if (! defined($temp)) {
next;
}
my $label = "$name-temp";
$label =~ s/ /_/g;
$plugin->add_perfdata(
label => "'$label'",
value => $temp,
min => undef,
max => undef,
uom => '',
threshold => undef,
);
} }
if (! $items_count) { if (! $items_count) {