SmokePing – How setup logging (or debuging)

smokeping-logo


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 :

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 !!!

More post - related

Please sponsor my coffee if you find my posts worth reading, thanks!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*
-->
Improve the web with Nofollow Reciprocity.