Lines 649-658
sub process_node {
Link Here
|
649 |
elsif ($global_headers == 1) |
649 |
elsif ($global_headers == 1) |
650 |
{ |
650 |
{ |
651 |
push (@rrd, "COMMENT:" . (" " x $max_field_len)); |
651 |
push (@rrd, "COMMENT:" . (" " x $max_field_len)); |
652 |
push (@rrd, "COMMENT: Cur:"); |
652 |
push (@rrd, "COMMENT: Cur\\:"); |
653 |
push (@rrd, "COMMENT:Min:"); |
653 |
push (@rrd, "COMMENT:Min\\:"); |
654 |
push (@rrd, "COMMENT:Avg:"); |
654 |
push (@rrd, "COMMENT:Avg\\:"); |
655 |
push (@rrd, "COMMENT:Max: \\j"); |
655 |
push (@rrd, "COMMENT:Max\\: \\j"); |
656 |
$global_headers++; |
656 |
$global_headers++; |
657 |
} |
657 |
} |
658 |
|
658 |
|
Lines 725-737
sub process_node {
Link Here
|
725 |
} |
725 |
} |
726 |
else |
726 |
else |
727 |
{ |
727 |
{ |
728 |
push (@rrd, "COMMENT: Cur:") unless $global_headers; |
728 |
push (@rrd, "COMMENT: Cur\\:") unless $global_headers; |
729 |
push (@rrd, "GPRINT:c$rrdname:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, "yes")?"%s":"") . ""); |
729 |
push (@rrd, "GPRINT:c$rrdname:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, "yes")?"%s":"") . ""); |
730 |
push (@rrd, "COMMENT: Min:") unless $global_headers; |
730 |
push (@rrd, "COMMENT: Min\\:") unless $global_headers; |
731 |
push (@rrd, "GPRINT:i$rrdname:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
731 |
push (@rrd, "GPRINT:i$rrdname:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
732 |
push (@rrd, "COMMENT: Avg:") unless $global_headers; |
732 |
push (@rrd, "COMMENT: Avg\\:") unless $global_headers; |
733 |
push (@rrd, "GPRINT:g$rrdname:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
733 |
push (@rrd, "GPRINT:g$rrdname:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
734 |
push (@rrd, "COMMENT: Max:") unless $global_headers; |
734 |
push (@rrd, "COMMENT: Max\\:") unless $global_headers; |
735 |
push (@rrd, "GPRINT:a$rrdname:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j"); |
735 |
push (@rrd, "GPRINT:a$rrdname:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j"); |
736 |
push (@{$total_pos{'min'}}, "i$rrdname"); |
736 |
push (@{$total_pos{'min'}}, "i$rrdname"); |
737 |
push (@{$total_pos{'avg'}}, "g$rrdname"); |
737 |
push (@{$total_pos{'avg'}}, "g$rrdname"); |
Lines 792-804
sub process_node {
Link Here
|
792 |
|
792 |
|
793 |
push (@rrd, "CDEF:dpostotal=ipostotal,UN,ipostotal,UNKN,IF"); |
793 |
push (@rrd, "CDEF:dpostotal=ipostotal,UN,ipostotal,UNKN,IF"); |
794 |
push (@rrd, "LINE1:dpostotal#000000:" . $node->{client}->{$service}->{graph_total} . (" " x ($max_field_len - length ($node->{client}->{$service}->{graph_total}) + 1))); |
794 |
push (@rrd, "LINE1:dpostotal#000000:" . $node->{client}->{$service}->{graph_total} . (" " x ($max_field_len - length ($node->{client}->{$service}->{graph_total}) + 1))); |
795 |
push (@rrd, "COMMENT: Cur:") unless $global_headers; |
795 |
push (@rrd, "COMMENT: Cur\\:") unless $global_headers; |
796 |
push (@rrd, "GPRINT:gpostotal:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
796 |
push (@rrd, "GPRINT:gpostotal:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
797 |
push (@rrd, "COMMENT: Min:") unless $global_headers; |
797 |
push (@rrd, "COMMENT: Min\\:") unless $global_headers; |
798 |
push (@rrd, "GPRINT:ipostotal:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
798 |
push (@rrd, "GPRINT:ipostotal:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
799 |
push (@rrd, "COMMENT: Avg:") unless $global_headers; |
799 |
push (@rrd, "COMMENT: Avg\\:") unless $global_headers; |
800 |
push (@rrd, "GPRINT:gpostotal:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
800 |
push (@rrd, "GPRINT:gpostotal:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); |
801 |
push (@rrd, "COMMENT: Max:") unless $global_headers; |
801 |
push (@rrd, "COMMENT: Max\\:") unless $global_headers; |
802 |
push (@rrd, "GPRINT:apostotal:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j"); |
802 |
push (@rrd, "GPRINT:apostotal:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j"); |
803 |
} |
803 |
} |
804 |
|
804 |
|
Lines 810-818
sub process_node {
Link Here
|
810 |
# Do the header (title, vtitle, size, etc...) |
810 |
# Do the header (title, vtitle, size, etc...) |
811 |
push @complete, @{&get_header ($node, $config, $domain, $name, $service, $time)}; |
811 |
push @complete, @{&get_header ($node, $config, $domain, $name, $service, $time)}; |
812 |
push @complete, @rrd; |
812 |
push @complete, @rrd; |
|
|
813 |
my $loctime = localtime($lastupdate); |
814 |
push (@complete, "COMMENT:Last update\\: " . escape($loctime) . "\\r"); |
813 |
|
815 |
|
814 |
push (@complete, "COMMENT:Last update: " . localtime($lastupdate) . "\\r"); |
|
|
815 |
|
816 |
if (time - 300 < $lastupdate) |
816 |
if (time - 300 < $lastupdate) |
817 |
{ |
817 |
{ |
818 |
push @complete, "--end",(int($lastupdate/$resolutions{$time}))*$resolutions{$time}; |
818 |
push @complete, "--end",(int($lastupdate/$resolutions{$time}))*$resolutions{$time}; |
Lines 841-847
sub process_node {
Link Here
|
841 |
push @rrd_sum, "--end",(int($lastupdate/$resolutions{$time}))*$resolutions{$time}; |
841 |
push @rrd_sum, "--end",(int($lastupdate/$resolutions{$time}))*$resolutions{$time}; |
842 |
} |
842 |
} |
843 |
push @rrd_sum, @rrd; |
843 |
push @rrd_sum, @rrd; |
844 |
push (@rrd_sum, "COMMENT:Last update: " . localtime($lastupdate) . "\\r"); |
844 |
my $loctime = localtime($lastupdate); |
|
|
845 |
push (@rrd_sum, "COMMENT:Last update\\: " . escape($loctime) ."\\r"); |
845 |
|
846 |
|
846 |
my $labelled = 0; |
847 |
my $labelled = 0; |
847 |
my @defined = (); |
848 |
my @defined = (); |