diff --git a/zabbix_scripts/disco_sensors b/zabbix_scripts/disco_sensors index 50cd3b2..411fafe 100644 --- a/zabbix_scripts/disco_sensors +++ b/zabbix_scripts/disco_sensors @@ -18,7 +18,7 @@ my $json; my $cfg = new Config::Simple; $cfg->read('/etc/zabbix/sensors.ini'); my %sensors = (); -foreach my $k (keys $cfg->vars){ +foreach my $k (keys %{$cfg->vars}){ $k =~ s/\..*$//; $sensors{$k} = 1 unless $sensors{$k}; }