Permalink
Browse files

Merge branch 'devel'

  • Loading branch information...
2 parents 04cc02d + c488585 commit e183377c6f011ac171f81669fa05a56dd28edf5b @steveschnepp steveschnepp committed Jul 30, 2012
View
@@ -160,6 +160,9 @@ JFLAGS := -g -source 1.5 -target 1.5 -Xlint
JAR := jar
# Check if the java compiler works
+# Note that we defer JCVALID evaluation to runtime,
+# since $(JC) can be redefined later in a specific Makefile.config
+# The core Makefile.config is then used as a Makefile.default
JCVALID = $(shell $(JC) -version >/dev/null 2>/dev/null && echo "yes")
# Check whether setruid functionality can be used
@@ -77,7 +77,7 @@ my $nb_request_max = 0;
my $graph_fh = new IO::File($config->{dbdir} . "/graphs");
while (my $path = <$graph_fh>) {
my $pinpoint = undef;
- print "Request path is $path";
+ INFO "Request path is $path";
# The full URL looks like this:
# Case 1:
@@ -331,13 +331,8 @@ sub draw_graph_or_complain {
if (! -f $ret) {
my ($dom, $host, $serv, $scale, $filename ) = @_;
WARN "[WARNING] Could not draw graph \"$filename\": $ret";
- print "Status: 500\r\n",
- "Content-Type: text/plain\r\n",
- "\r\n",
- "Could not draw graph \"$filename\"\r\n";
return 0;
} else {
- print "X-Graph-Duration: $graph_duration\r\n";
return $ret;
}
}
@@ -334,7 +334,7 @@ sub graph_startup {
sub graph_check_cron {
# Are we running from cron and do we have matching graph_strategy
- if (&munin_get($config, "graph_strategy", "cgi") ne "cron" and $cron) {
+ if (&munin_get($config, "graph_strategy") eq "cgi" and $cron) {
# Strategy mismatch: We're run from cron, but munin.conf says
# we use dynamic graph generation
@@ -269,6 +269,19 @@ sub emit_comparison_template {
push((@$comparepeers), {"name" => $peer->{"name"}, "link" => $comparelink});
}
+ foreach my $cat(@{$key->{'comparecategories'}}) {
+ foreach my $service(@{$cat->{'services'}}) {
+ foreach my $node(@{$service->{'nodes'}}) {
+ foreach my $imgsrc(qw(imgday imgweek imgmonth imgyear
+ cimgday cimgweek cimgmonth cimgyear
+ zoomday zoomweek zoommonth zoomyear)) {
+ next unless defined($node->{$imgsrc});
+ $node->{$imgsrc} =~ s|^\.\./\.\./|../|;
+ }
+ }
+ }
+ }
+
$comparisontemplates{$t}->param(
INFO_OPTION => 'Groups on this level',
NAME => $key->{'name'},
@@ -373,6 +386,16 @@ sub emit_category_template {
DEBUG "[DEBUG] Creating global category page ".$filename;
+ foreach my $graphs(@{$key->{'graphs'}}) {
+ foreach my $graph(@{$graphs->{'graphs'}}) {
+ foreach my $imgsrc(qw(imgday imgweek imgmonth imgyear
+ cimgday cimgweek cimgmonth cimgyear
+ zoomday zoomweek zoommonth zoomyear)) {
+ $graph->{$imgsrc} =~ s|^\.\./||
+ }
+ }
+ }
+
$graphtemplate->param(
PATH => $key->{'path'},
CSS_NAME => get_css_name(),
@@ -87,7 +87,7 @@ use Munin::Plugin;
# For these devices use the mount point, the device is useless
my %usemntpt = ( tmpfs => 1, none => 1, udev => 1 );
-my $exclude = $ENV{'exclude'} || 'none unknown iso9660 squashfs udf romfs ramfs vfat debugfs simfs nilfs2 rootfs';
+my $exclude = $ENV{'exclude'} || 'none unknown iso9660 squashfs udf romfs ramfs vfat debugfs simfs nilfs2 rootfs reiserfs';
my $dfopts = "-P -l -i ".join(' -x ',('',split('\s+',$exclude)));
my $mode = ($ARGV[0] or "print");
@@ -150,6 +150,8 @@ while (<DF>) {
next if skip($name, $mountpt);
+ next unless ($used =~ '^\d+$' && $avail =~ '^\d+$');
+
# Calculate percentage used
my $ps = 0;
$ps = ($used / ($used+$avail)) * 100 if $used;

0 comments on commit e183377

Please sign in to comment.