From 12c8396be3a479e0621d7dcdc231bcd2be56158e Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 21 Dec 2023 14:09:42 +0100 Subject: [PATCH] Adjust default values for stor dev --- zabbix_scripts/check_stor_dev_sudo | 16 ++++++++-------- zabbix_scripts/disco_stor_dev_sudo | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/zabbix_scripts/check_stor_dev_sudo b/zabbix_scripts/check_stor_dev_sudo index 7300b94..8cd4148 100644 --- a/zabbix_scripts/check_stor_dev_sudo +++ b/zabbix_scripts/check_stor_dev_sudo @@ -30,14 +30,14 @@ if (not defined $dev or $dev !~ m|^/dev/\w+(/\w+)?$| or not -e $dev){ } my $json = { - temperature_celsius => -1, - power_on_hours => -1, - power_cycle_count => -1, - reallocated_sector_count => -1, - current_pending_sector => -1, - offline_uncorrectable => -1, - percent_lifetime_remain => -1, - firmware_version => -1 + temperature_celsius => 25, + power_on_hours => 0, + power_cycle_count => 0, + reallocated_sector_count => 0, + current_pending_sector => 0, + offline_uncorrectable => 0, + percent_lifetime_remain => 100, + firmware_version => 0 }; my $smartctl = which('smartctl'); diff --git a/zabbix_scripts/disco_stor_dev_sudo b/zabbix_scripts/disco_stor_dev_sudo index 6d82bbe..d7bb091 100644 --- a/zabbix_scripts/disco_stor_dev_sudo +++ b/zabbix_scripts/disco_stor_dev_sudo @@ -52,7 +52,7 @@ foreach my $device (@{$smart_scan->{devices}}){ '{#STOR_DEV_DESC}' => $device->{info_name}, '{#STOR_DEV_TYPE}' => $device->{type}, '{#STOR_DEV_PROTO}' => $device->{protocol}, - '{#STOR_DEV_MODEl}' => $model, + '{#STOR_DEV_MODEL}' => $model, '{#STOR_DEV_SN}' => $sn, '{#STOR_DEV_SMART}' => int $has_smart };