4 231
modifications
(→hptemp) |
(→hptemp) |
||
(4 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
* https://github.com/mhagander/munin-plugins | [[Category:serveur]] | ||
[[Category:debian]] | |||
[[Category:monitoring]] | |||
* src : https://github.com/mhagander/munin-plugins | |||
=hpacu HP Array Controllers= | =hpacu HP Array Controllers= | ||
Ligne 234 : | Ligne 238 : | ||
if ( $ARGV[0] and $ARGV[0] eq "config") { | if ( $ARGV[0] and $ARGV[0] eq "config") { | ||
print "graph_title HP Fans\n"; | print "graph_title HP Fans\n"; | ||
print "graph_category | print "graph_category sensors\n"; | ||
print "ok.label Fans OK\n"; | print "ok.label Fans OK\n"; | ||
print "ok.type GAUGE\n"; | print "ok.type GAUGE\n"; | ||
Ligne 271 : | Ligne 275 : | ||
<pre> | <pre> | ||
#!/usr/bin/env perl | #!/usr/bin/env perl | ||
# | # | ||
Ligne 335 : | Ligne 338 : | ||
if ( $ARGV[0] and $ARGV[0] eq "config") { | if ( $ARGV[0] and $ARGV[0] eq "config") { | ||
print "graph_title HP Power Supplies\n"; | print "graph_title HP Power Supplies\n"; | ||
print "graph_category | print "graph_category sensors\n"; | ||
print "ok.label Power Supplies OK\n"; | print "ok.label Power Supplies OK\n"; | ||
print "ok.type GAUGE\n"; | print "ok.type GAUGE\n"; | ||
Ligne 377 : | Ligne 380 : | ||
> if (/^\s*(\d+)\s*Basic Sensor\s+(CPU \(\d+\)|Processor Zone|I\/O Zone)\s+(\S+)\s+\d+F\/\s*(\d+)C\s+\d+F\/\s*(\d+)C/) { | > if (/^\s*(\d+)\s*Basic Sensor\s+(CPU \(\d+\)|Processor Zone|I\/O Zone)\s+(\S+)\s+\d+F\/\s*(\d+)C\s+\d+F\/\s*(\d+)C/) { | ||
</pre> | </pre> | ||
Cette regexp est susceptible d'évoluer ... en fonction des sensors de HP. | |||
working plugin: | working plugin: | ||
Ligne 446 : | Ligne 451 : | ||
next if /^\s*$/; | next if /^\s*$/; | ||
next if /^ID/; | next if /^ID/; | ||
if (/^\s*(\d+)\s*Basic Sensor\s+(CPU \(\d+\)|Ambient|Processor Zone|Memory Board|System Board|Pwr\. Supply Bay|I\/O Zone|SCSI Backplane)\s+(\S+)\s+\d+F\/\s*(\d+)C\s+\d+F\/\s*(\d+)C/) { | if (/^\s*(\d+)\s*Basic Sensor\s+(CPU \(\d+\)|Ambient|Processor Zone|Memory Board|System Board|Pwr\. Supply Bay|I\/O Zone|SCSI Backplane|Chassis)\s+(\S+)\s+\d+F\/\s*(\d+)C\s+\d+F\/\s*(\d+)C/) { | ||
push @sensors, { | push @sensors, { | ||
'id' => $1, | 'id' => $1, | ||
Ligne 463 : | Ligne 468 : | ||
if ( $ARGV[0] and $ARGV[0] eq "config") { | if ( $ARGV[0] and $ARGV[0] eq "config") { | ||
print "graph_title HP temperature\n"; | print "graph_title HP temperature\n"; | ||
print "graph_category | print "graph_category sensors\n"; | ||
for my $sensor (@sensors) { | for my $sensor (@sensors) { | ||
print "s" . $sensor->{'id'} . ".label " . $sensor->{'name'} . "\n"; | print "s" . $sensor->{'id'} . ".label " . $sensor->{'name'} . "\n"; |