fixed collection deamon integration

git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1175 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
maniacikarus
2008-02-02 17:46:51 +00:00
parent 5a4cd5a836
commit 4a52eae459
7 changed files with 19 additions and 15 deletions

View File

@@ -29,7 +29,7 @@ LoadPlugin iptables
#LoadPlugin irq
LoadPlugin load
#LoadPlugin logfile
#LoadPlugin mbmon
LoadPlugin mbmon
#LoadPlugin memcached
LoadPlugin memory
#LoadPlugin multimeter
@@ -119,10 +119,10 @@ LoadPlugin syslog
# File STDOUT
#</Plugin>
#<Plugin mbmon>
# Host "127.0.0.1"
# Port "411"
#</Plugin>
<Plugin mbmon>
Host "127.0.0.1"
Port "411"
</Plugin>
#<Plugin memcached>
# Host "127.0.0.1"

View File

@@ -8,3 +8,4 @@ usr/local/bin/makegraphs
usr/sbin/collectd
var/ipfire/graphs.pl
var/ipfire/menu.d/20-status.menu
var/ipfire/langs

View File

@@ -4,3 +4,7 @@ extract_files
ln -s /etc/rc.d/rc0.d/K50collectd /etc/init.d/collectd
ln -s /etc/rc.d/rc3.d/S20collectd /etc/init.d/collectd
ln -s /etc/rc.d/rc6.d/K50collectd /etc/init.d/collectd
GATEWAY=$(cat /var/ipfire/red/remote-ipaddress)
echo "$GATEWAY gateway" >> /etc/hosts
/etc/init.d/collectd start
perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"

View File

@@ -51,7 +51,6 @@ if ($cgigraphs[1] =~ /(cpu)/) {&Graphs::updatecpugraph ("hour");&Graphs::updatec
if ($cgigraphs[1] =~ /(memory|swap)/) {&Graphs::updatememgraph ("hour");&Graphs::updatememgraph ("week");&Graphs::updatememgraph ("month");&Graphs::updatememgraph ("year");}
if ($cgigraphs[1] =~ /disk/){
my @devices = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`;
push(@devices,"uba");
foreach (@devices) {
my $device = $_;
chomp($device);

View File

@@ -151,10 +151,10 @@ sub graphbox {
&Header::openbox('100%', 'center', "$graph $Lang::tr{'graph'}");
if (-e "$graphdir/mbmon-$graph-week.png"){
my $ftime = localtime((stat("$graphdir/mbmon-$graph-day.png"))[9]);
my $ftime = localtime((stat("$graphdir/mbmon-$graph-week.png"))[9]);
print "<center>";
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
print "<img src='/graphs/mbmon-$graph-day.png' border='0' /><hr />";
print "<img src='/graphs/mbmon-$graph-week.png' border='0' /><hr />";
}
else{print $Lang::tr{'no information available'};}
&Header::closebox();

View File

@@ -51,7 +51,7 @@ $cgiparams[1] = '' unless defined $cgiparams[1];
if ($cgiparams[1] =~ /red/) {
&Header::openpage($Lang::tr{'network traffic graphs external'}, 1, '');
push (@graphs, ($netsettings{'RED_DEV'}));
push (@graphs, ("ipsec0"));
if (-e "/var/log/rrd/collectd/localhost/interface/if_octets-ipsec0.rrd") {push (@graphs, ("ipsec0"));
}elsif ($cgiparams[1] =~ /other/) {
&Header::openpage($Lang::tr{'network traffic graphs others'}, 1, '');
push (@graphs, ("lq"));

View File

@@ -11,15 +11,15 @@ case "$1" in
/usr/sbin/collectd -C /etc/collectd.conf
evaluate_retval
# for disk in `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`; do boot_mesg "Bringing up hddtemp daemon for $disk ..."; /usr/sbin/hddtemp $disk -d -l localhost; evaluate_retval; done
# boot_mesg "Bringing up mbmon daemon..."
# /usr/bin/mbmon -P 411 -r
# evaluate_retval
boot_mesg "Bringing up mbmon daemon..."
/usr/bin/mbmon -P 411 -r
evaluate_retval
;;
stop)
# boot_mesg "Stopping mbmon daemon..."
# killproc /usr/bin/mbmon
# evaluate_retval
boot_mesg "Stopping mbmon daemon..."
killproc /usr/bin/mbmon
evaluate_retval
# boot_mesg "Stopping hddtemp daemon..."
# killproc /usr/sbin/hddtemp
# evaluate_retval