# Prerequisite: Install the Haloe (Syslog) plug-in
# You should already have Cacti
+ Plug-in Architecture installed
# http://download.cactiusers.org/downloads/haloe.tar.gz
# It won't be fully functional until you complete everything below
# NOTE: You should
have already completed these next 9 lines back when you setup
Cacti's Plug-ins!
# Create the syslog database and import the table structures used by
Haloe (Syslog) Cacti plugin
# mysqladmin --user=mysql create syslog
# /opt/mysql/bin/mysql syslog < /opt/apache/htdocs/cacti/plugins/haloe/syslog.sql
# Give permission for the cacti
database user to access the syslog database tables
# /usr/local/bin/mysql --user=mysql --password=mysqlpassword mysql
# GRANT ALL ON syslog.* TO
cactiuser@localhost IDENTIFIED BY 'cactipassword';
# GRANT ALL ON syslog.* TO cactiuser@"%" IDENTIFIED BY 'cactipassword';
# flush privileges;
# exit
# Edit the Syslog-ng conf
vi /usr/local/etc/syslog-ng/syslog-ng.conf
# Create the fifo pipe for syslog-ng to export out logs
mkfifo /var/log/mysql.pipe
# Restart syslog-ng process
killall syslog-ng
/usr/local/sbin/syslog-ng
# This script is used to pipe syslog-ng to mysql
vi
/usr/local/www/data/cacti/plugins/syslog/syslog-ng-to-mysql.sh
# Make the new script executable
chmod a+x /usr/local/www/data/cacti/plugins/syslog/syslog-ng-to-mysql.sh
# Run the script - Syslog messages should now be dumped into the
database as they come in
/usr/local/www/data/cacti/plugins/syslog/syslog-ng-to-mysql.sh &
# Create a startup script so logging to the
database restarts after each reboot
vi /usr/local/etc/rc.d/syslog-ng-fifo-mysql.sh
# Make the new script
executable
chmod a+x /usr/local/etc/rc.d/syslog-ng-fifo-mysql.sh