summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7a0db7f)
raw | patch | inline | side by side (parent: 7a0db7f)
author | Yuri D'Elia <wavexx@thregr.org> | |
Fri, 18 Dec 2009 11:33:31 +0000 (12:33 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 3 Jun 2010 12:57:55 +0000 (14:57 +0200) |
Also, improved default settings to match the collectd4 series.
Signed-off-by: Sebastian Harl <tokkee@debian.org>
Signed-off-by: Sebastian Harl <tokkee@debian.org>
contrib/collectd2html.pl | patch | blob | history |
index 7953d67ccab85b6cca88c54a9e906dce6c58a4dd..210fd646d34f22e9a757cab8291a25bce3f437ef 100644 (file)
--- a/contrib/collectd2html.pl
+++ b/contrib/collectd2html.pl
my $DIR = "/var/lib/collectd";
my $HOST = undef;
my $IMG_FMT = "PNG";
-my $RECURSIVE = 0;
+my $RECURSIVE = 1;
GetOptions (
"host=s" => \$HOST,
my @COLORS = (0xff7777, 0x7777ff, 0x55ff55, 0xffcc77, 0xff77ff, 0x77ffff,
0xffff77, 0x55aaff);
-my @tmp = `/bin/hostname`; chomp(@tmp);
+my @tmp = `/bin/hostname -f`; chomp(@tmp);
$HOST = $tmp[0] if (! defined $HOST);
my $svg_p = ($IMG_FMT eq "SVG");
my $IMG_SFX = $svg_p ? ".svg" : ".png";
}
chomp(@list);
-foreach my $rrd (sort @list){
+@list = sort @list;
+foreach my $rrd (@list){
$rrd =~ m/^$DIR\/(.*)\.rrd$/;
push(@rrds, $1);
}