projects
/
invirt/scripts/munin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update Munin graphing scripts for new field names
[invirt/scripts/munin.git]
/
web
/
usage.cgi
diff --git
a/web/usage.cgi
b/web/usage.cgi
index
88d7552
..
e815d78
100755
(executable)
--- a/
web/usage.cgi
+++ b/
web/usage.cgi
@@
-50,7
+50,7
@@
my $type = $q->param("type") || "cpu";
$type =~ m|^(\w+)$| or die "Invalid graph type";
$type = $graph_types{$1} or die "Invalid graph type";
$type =~ m|^(\w+)$| or die "Invalid graph type";
$type = $graph_types{$1} or die "Invalid graph type";
-my $path = catfile(GRAPH_DIR, "*-$type-$uuid-?.rrd");
+my $path = catfile(GRAPH_DIR, "*-$type-uuid_$uuid-?.rrd");
my @files = glob $path or die "No data found";
push @args, "--start", "-".$days."d";
my @files = glob $path or die "No data found";
push @args, "--start", "-".$days."d";
@@
-84,6
+84,7
@@
sub die(@) {
$im->Read('label:'.join('', @_));
$format = 'png' unless exists($formats{$format});
$mime_type = $formats{$format};
$im->Read('label:'.join('', @_));
$format = 'png' unless exists($formats{$format});
$mime_type = $formats{$format};
+ $| = 1;
print $q->header(-type=>$mime_type);
$im->Write($format.':-');
CORE::die @_;
print $q->header(-type=>$mime_type);
$im->Write($format.':-');
CORE::die @_;