[smokeping-users] Multiple probe configuration not working correctly.
Kelly Shutt
kelly at websitesource.com
Tue Oct 30 04:01:09 CET 2007
OK, so get this... If I run smokeping from the command line, with
smokeping --debug-daemon like you suggested, then it works fine and I
see all the probes running and populating data fine. However, I then
stopped it and restarted again with the init script and it doesn't work
again; not getting anything from FPing, but the DNS probe works fine.
I'm thinking it has something to do with the way gentoo calls the
application with start-stop-daemon; but I don't know enough to
start-stop-daemon to troubleshoot farther. Here's a copy of the init
script; have a look and see if you have any ideas.
Thanks,
Kelly
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
opts="start stop dump restore"
depend() {
use dns
need net
}
checkconfig() {
if [[ ! -e "/usr/bin/smokeping" ]] ; then
eerror "You need /usr/bin/smokeping to run smokeping!"
return 1
fi
if [[ ! -e "/etc/smokeping" ]] ; then
eerror "You need /etc/smokeping to run smokeping!"
return 1
fi
einfo "Please remember to setup smokeping at /etc/smokeping!"
}
start() {
checkconfig || return 1
ebegin "Starting smokeping"
LC_ALL=C \
start-stop-daemon --start --name smokeping \
--exec /usr/bin/smokeping \
--chuid smokeping:smokeping
eend $?
}
stop() {
ebegin "Stopping smokeping"
start-stop-daemon --stop \
--pidfile /var/lib/smokeping/smokeping.pid
eend $?
}
dump() {
ebegin "Dumping smokeping rrd files to XML for backup or upgrade
use"
if service_started "${myservice}" ; then
eerror "You need to stop smokeping before dumping files!"
return 1
fi
for f in `find /var/lib/smokeping -name '*.rrd' -print` ; do
f_xml=`dirname $f`/`basename $f .rrd`.xml
rrdtool dump "$f" > "${f_xml}"
chown root:0 "${f_xml}"
done
eend $?
}
restore() {
ebegin "Restoring smokeping rrd files from XML dump files"
if service_started "${myservice}" ; then
eerror "You need to stop smokeping before restoring files!"
return 1
fi
for f in `find /var/lib/smokeping -name '*.xml' -print` ; do
f_rrd=`dirname $f`/`basename $f .xml`.rrd
mv -f "${f_rrd}" "${f_rrd}.bak"
chown root:0 "${f_rrd}.bak"
rrdtool restore "$f" "${f_rrd}"
chown smokeping:smokeping "${f_rrd}"
done
eend $?
}
More information about the smokeping-users
mailing list