mirror of https://github.com/mikaku/Monitorix.git
3.0: small update
This commit is contained in:
parent
1c864e7279
commit
456b203849
|
@ -427,7 +427,7 @@ sub kern_cgi {
|
|||
}
|
||||
if(lc($kern{graph_mode}) eq "r") {
|
||||
$vlabel = "Percent (%)";
|
||||
if(lc($kern{data}->{user}) eq "y") {
|
||||
if(lc($kern{list}->{user}) eq "y") {
|
||||
push(@tmp, "AREA:user#4444EE:user");
|
||||
push(@tmpz, "AREA:user#4444EE:user");
|
||||
push(@tmp, "GPRINT:user:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -435,7 +435,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:user:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:user:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{nice}) eq "y") {
|
||||
if(lc($kern{list}->{nice}) eq "y") {
|
||||
push(@tmp, "AREA:nice#EEEE44:nice");
|
||||
push(@tmpz, "AREA:nice#EEEE44:nice");
|
||||
push(@tmp, "GPRINT:nice:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -443,7 +443,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:nice:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:nice:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{sys}) eq "y") {
|
||||
if(lc($kern{list}->{sys}) eq "y") {
|
||||
push(@tmp, "AREA:sys#44EEEE:system");
|
||||
push(@tmpz, "AREA:sys#44EEEE:system");
|
||||
push(@tmp, "GPRINT:sys:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -451,7 +451,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:sys:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:sys:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{iow}) eq "y") {
|
||||
if(lc($kern{list}->{iow}) eq "y") {
|
||||
push(@tmp, "AREA:iow#EE44EE:I/O wait");
|
||||
push(@tmpz, "AREA:iow#EE44EE:I/O wait");
|
||||
push(@tmp, "GPRINT:iow:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -460,7 +460,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:iow:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if($config->{os} eq "Linux") {
|
||||
if(lc($kern{data}->{irq}) eq "y") {
|
||||
if(lc($kern{list}->{irq}) eq "y") {
|
||||
push(@tmp, "AREA:irq#888888:IRQ");
|
||||
push(@tmpz, "AREA:irq#888888:IRQ");
|
||||
push(@tmp, "GPRINT:irq:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -468,7 +468,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:irq:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:irq:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{sirq}) eq "y") {
|
||||
if(lc($kern{list}->{sirq}) eq "y") {
|
||||
push(@tmp, "AREA:sirq#E29136:softIRQ");
|
||||
push(@tmpz, "AREA:sirq#E29136:softIRQ");
|
||||
push(@tmp, "GPRINT:sirq:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -476,7 +476,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:sirq:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:sirq:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{steal}) eq "y") {
|
||||
if(lc($kern{list}->{steal}) eq "y") {
|
||||
push(@tmp, "AREA:steal#44EE44:steal");
|
||||
push(@tmpz, "AREA:steal#44EE44:steal");
|
||||
push(@tmp, "GPRINT:steal:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -484,7 +484,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:steal:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:steal:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{guest}) eq "y") {
|
||||
if(lc($kern{list}->{guest}) eq "y") {
|
||||
push(@tmp, "AREA:guest#448844:guest");
|
||||
push(@tmpz, "AREA:guest#448844:guest");
|
||||
push(@tmp, "GPRINT:guest:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -492,23 +492,23 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:guest:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:guest:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
push(@tmp, "LINE1:guest#1F881F") unless lc($kern{data}->{guest} ne "y");
|
||||
push(@tmpz, "LINE1:guest#1F881F") unless lc($kern{data}->{guest} ne "y");
|
||||
push(@tmp, "LINE1:steal#00EE00") unless lc($kern{data}->{steal} ne "y");
|
||||
push(@tmpz, "LINE1:steal#00EE00") unless lc($kern{data}->{steal} ne "y");
|
||||
push(@tmp, "LINE1:sirq#D86612") unless lc($kern{data}->{sirq} ne "y");
|
||||
push(@tmpz, "LINE1:sirq#D86612") unless lc($kern{data}->{sirq} ne "y");
|
||||
push(@tmp, "LINE1:irq#CCCCCC") unless lc($kern{data}->{irq} ne "y");
|
||||
push(@tmpz, "LINE1:irq#CCCCCC") unless lc($kern{data}->{irq} ne "y");
|
||||
push(@tmp, "LINE1:guest#1F881F") unless lc($kern{list}->{guest} ne "y");
|
||||
push(@tmpz, "LINE1:guest#1F881F") unless lc($kern{list}->{guest} ne "y");
|
||||
push(@tmp, "LINE1:steal#00EE00") unless lc($kern{list}->{steal} ne "y");
|
||||
push(@tmpz, "LINE1:steal#00EE00") unless lc($kern{list}->{steal} ne "y");
|
||||
push(@tmp, "LINE1:sirq#D86612") unless lc($kern{list}->{sirq} ne "y");
|
||||
push(@tmpz, "LINE1:sirq#D86612") unless lc($kern{list}->{sirq} ne "y");
|
||||
push(@tmp, "LINE1:irq#CCCCCC") unless lc($kern{list}->{irq} ne "y");
|
||||
push(@tmpz, "LINE1:irq#CCCCCC") unless lc($kern{list}->{irq} ne "y");
|
||||
}
|
||||
push(@tmp, "LINE1:iow#EE00EE") unless lc($kern{data}->{iow} ne "y");
|
||||
push(@tmpz, "LINE1:iow#EE00EE") unless lc($kern{data}->{iow} ne "y");
|
||||
push(@tmp, "LINE1:sys#00EEEE") unless lc($kern{data}->{sys} ne "y");
|
||||
push(@tmpz, "LINE1:sys#00EEEE") unless lc($kern{data}->{sys} ne "y");
|
||||
push(@tmp, "LINE1:nice#EEEE00") unless lc($kern{data}->{nice} ne "y");
|
||||
push(@tmpz, "LINE1:nice#EEEE00") unless lc($kern{data}->{nice} ne "y");
|
||||
push(@tmp, "LINE1:user#0000EE") unless lc($kern{data}->{user} ne "y");
|
||||
push(@tmpz, "LINE1:user#0000EE") unless lc($kern{data}->{user} ne "y");
|
||||
push(@tmp, "LINE1:iow#EE00EE") unless lc($kern{list}->{iow} ne "y");
|
||||
push(@tmpz, "LINE1:iow#EE00EE") unless lc($kern{list}->{iow} ne "y");
|
||||
push(@tmp, "LINE1:sys#00EEEE") unless lc($kern{list}->{sys} ne "y");
|
||||
push(@tmpz, "LINE1:sys#00EEEE") unless lc($kern{list}->{sys} ne "y");
|
||||
push(@tmp, "LINE1:nice#EEEE00") unless lc($kern{list}->{nice} ne "y");
|
||||
push(@tmpz, "LINE1:nice#EEEE00") unless lc($kern{list}->{nice} ne "y");
|
||||
push(@tmp, "LINE1:user#0000EE") unless lc($kern{list}->{user} ne "y");
|
||||
push(@tmpz, "LINE1:user#0000EE") unless lc($kern{list}->{user} ne "y");
|
||||
} else {
|
||||
$vlabel = "Stacked Percent (%)";
|
||||
push(@tmp, "CDEF:s_nice=user,nice,+");
|
||||
|
@ -526,7 +526,7 @@ sub kern_cgi {
|
|||
push(@tmpz, "CDEF:s_steal=s_sirq,steal,+");
|
||||
push(@tmp, "CDEF:s_guest=s_steal,guest,+");
|
||||
push(@tmpz, "CDEF:s_guest=s_steal,guest,+");
|
||||
if(lc($kern{data}->{guest}) eq "y") {
|
||||
if(lc($kern{list}->{guest}) eq "y") {
|
||||
push(@tmp, "AREA:s_guest#448844:guest");
|
||||
push(@tmpz, "AREA:s_guest#448844:guest");
|
||||
push(@tmp, "GPRINT:guest:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -534,7 +534,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:guest:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:guest:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{steal}) eq "y") {
|
||||
if(lc($kern{list}->{steal}) eq "y") {
|
||||
push(@tmp, "AREA:s_steal#44EE44:steal");
|
||||
push(@tmpz, "AREA:s_steal#44EE44:steal");
|
||||
push(@tmp, "GPRINT:steal:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -542,7 +542,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:steal:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:steal:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{sirq}) eq "y") {
|
||||
if(lc($kern{list}->{sirq}) eq "y") {
|
||||
push(@tmp, "AREA:s_sirq#E29136:softIRQ");
|
||||
push(@tmpz, "AREA:s_sirq#E29136:softIRQ");
|
||||
push(@tmp, "GPRINT:sirq:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -550,7 +550,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:sirq:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:sirq:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{irq}) eq "y") {
|
||||
if(lc($kern{list}->{irq}) eq "y") {
|
||||
push(@tmp, "AREA:s_irq#888888:IRQ");
|
||||
push(@tmpz, "AREA:s_irq#888888:IRQ");
|
||||
push(@tmp, "GPRINT:irq:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -559,7 +559,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:irq:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
}
|
||||
if(lc($kern{data}->{iow}) eq "y") {
|
||||
if(lc($kern{list}->{iow}) eq "y") {
|
||||
push(@tmp, "AREA:s_iow#EE44EE:I/O wait");
|
||||
push(@tmpz, "AREA:s_iow#EE44EE:I/O wait");
|
||||
push(@tmp, "GPRINT:iow:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -567,7 +567,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:iow:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:iow:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{sys}) eq "y") {
|
||||
if(lc($kern{list}->{sys}) eq "y") {
|
||||
push(@tmp, "AREA:s_sys#44EEEE:system");
|
||||
push(@tmpz, "AREA:s_sys#44EEEE:system");
|
||||
push(@tmp, "GPRINT:sys:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -575,7 +575,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:sys:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:sys:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{nice}) eq "y") {
|
||||
if(lc($kern{list}->{nice}) eq "y") {
|
||||
push(@tmp, "AREA:s_nice#EEEE44:nice");
|
||||
push(@tmpz, "AREA:s_nice#EEEE44:nice");
|
||||
push(@tmp, "GPRINT:nice:LAST: Current\\: %4.1lf%%");
|
||||
|
@ -583,7 +583,7 @@ sub kern_cgi {
|
|||
push(@tmp, "GPRINT:nice:MIN: Min\\: %4.1lf%%");
|
||||
push(@tmp, "GPRINT:nice:MAX: Max\\: %4.1lf%%\\n");
|
||||
}
|
||||
if(lc($kern{data}->{user}) eq "y") {
|
||||
if(lc($kern{list}->{user}) eq "y") {
|
||||
push(@tmp, "AREA:user#4444EE:user");
|
||||
push(@tmpz, "AREA:user#4444EE:user");
|
||||
push(@tmp, "GPRINT:user:LAST: Current\\: %4.1lf%%");
|
||||
|
|
|
@ -94,7 +94,7 @@ alert_rootfs_script = /path/to/script.sh
|
|||
graph_mode = r
|
||||
rigid = 2
|
||||
limit = 100
|
||||
<data>
|
||||
<list>
|
||||
user = y
|
||||
nice = y
|
||||
sys = y
|
||||
|
@ -103,7 +103,7 @@ alert_rootfs_script = /path/to/script.sh
|
|||
sirq = y
|
||||
steal = y
|
||||
guest = y
|
||||
</data>
|
||||
</list>
|
||||
</kern>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue