2009-08-15

SmokePing - How setup logging (or debuging)

SmokePing is an utility to keep track of the network latency from your network to various site. Its output are recorded in graph, for analysis purpose. Its configuration are simple and easy to setup. But some times, logging are needed to debug some probes failed to output to graph. The logging setup will need to edit some files to make sure it rotate itself and syslog needs to be notified.

Here is how you get your hands dirty :
1. Insert the below into /usr/local/etc/smokeping/config :
syslogfacility = local0
syslogpriority = debug
2. Insert the below into /etc/syslog.conf :
local0.*     /var/log/smokeping.log
3. Create the log file :
touch /var/log/smokeping.log
4. Make sure the ownership of smokeping process is able to write to the log file :
  • check the owner of the smokeping process :
ps aux | grep -i smokeping
  • change the ownership of the log file
chown smokeping:smokeping /var/log/smokeping.log
5. Optionally, rotate the log file daily. Insert the below line into /etc/newsyslog.conf :
/var/log/smokeping.log smokeping:smokeping 644 7 *    @T00  JC
6. Reload the necessary config files for the above changes to take effect :
/etc/rc.d/syslogd reload
/etc/rc.d/newsyslog reload
/usr/local/etc/rc.d/smokeping reload

Voilla !!!

No comments: