added the ability to include a title for every group of disks. #283

This commit is contained in:
Jordi Sanfeliu 2020-07-08 09:41:18 +02:00
parent 75c7f6b304
commit 6ba51f1cb0
3 changed files with 30 additions and 0 deletions

View File

@ -880,6 +880,17 @@ sub disk_cgi {
if($title) { if($title) {
push(@output, " </td>\n"); push(@output, " </td>\n");
push(@output, " </tr>\n"); push(@output, " </tr>\n");
if($disk->{desc}->{$k}) {
push(@output, " <tr>\n");
push(@output, " <td bgcolor='$colors->{title_bg_color}' colspan='2'>\n");
push(@output, " <font face='Verdana, sans-serif' color='$colors->{title_fg_color}'>\n");
push(@output, " <font size='-1'>\n");
push(@output, " <b>&nbsp;&nbsp;$disk->{desc}->{$k}<b>\n");
push(@output, " </font></font>\n");
push(@output, " </td>\n");
push(@output, " </tr>\n");
}
push(@output, main::graph_footer()); push(@output, main::graph_footer());
} }
$e++; $e++;

View File

@ -1326,6 +1326,8 @@ If you see good results as above, you can add it to the group 0 like this:
<list> <list>
.br .br
0 = /dev/sda, /dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:0 0 = /dev/sda, /dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:0
.br
1 = /dev/sdc, /dev/sdd
.br .br
</list> </list>
.RE .RE
@ -1348,6 +1350,21 @@ This list complements the \fBlist\fP option. It basically allows you to change t
.RE .RE
.RE .RE
.P .P
.BI desc
.RS
This list complements the \fBlist\fP option. It basically allows you to include a title for every group of disk drives. The title will appear in the bottom of the graph.
.P
.RS
<desc>
.br
0 = Local disks
.br
1 = Remote disks
.br
</desc>
.RE
.RE
.P
.BI realloc_enabled .BI realloc_enabled
.RS .RS
This section enables or disables one of the alert capabilities for this graph; the alert for the number of reallocated sectors in disk. It works as follows: This section enables or disables one of the alert capabilities for this graph; the alert for the number of reallocated sectors in disk. It works as follows:

View File

@ -309,6 +309,8 @@ secure_log_date_format = %b %e
<list> <list>
0 = /dev/sda, /dev/sdb, /dev/sdc 0 = /dev/sda, /dev/sdb, /dev/sdc
</list> </list>
<desc>
</desc>
<alerts> <alerts>
realloc_enabled = n realloc_enabled = n
realloc_timeintvl = 0 realloc_timeintvl = 0