App-Device-Chip-sensor
view release on metacpan or search on metacpan
bin/device-chip-sensor-exporter view on Meta::CPAN
my $name = $sensor->name;
my $units = $sensor->units;
my $chip = $sensor->chip;
my $chipname = ( ref $chip ) =~ s/^Device::Chip:://r;
# Convert some common characters that Prometheus will get upset by
if( defined $units ) {
$units =~ s{/}{_per_};
$units =~ s/%/percentage/g;
$units =~ s/°/degrees/g;
$units =~ s/µ/micro/g;
$units =~ s/m²/square_metre/g;
$units =~ s/m³/cubic_metre/g;
}
$got{$name}++ and next;
my $m = "make_" . $sensor->type;
( run in 0.410 second using v1.01-cache-2.11-cpan-709fd43a63f )