I am using Rsyslog and Cacti on the same server with Centos5.9
Cacti Version 0.8.8a
SNMP Version NET-SNMP version: 5.3.2.2
RRDTool Version RRDTool 1.4.x
PHP Version 5.3.23
Apache Version Apache/2.2.3 (CentOS).
Database: Mysql Server version: 5.5.30-cll
Code: Select all
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| Syslog |
| cacti |
| mysql |
| performance_schema |
| test |
+--------------------+
6 rows in set (0.00 sec)
All steps to enable syslog plugin are fine as below but not gethering log event from Rsyslog:
Plugin management:
On phpmyadmin:
Edit plugin/syslog/config.php:
Code: Select all
/* revert if you dont use the Cacti database */
$use_cacti_db = false;
if (!$use_cacti_db) {
$syslogdb_type = 'mysql';
$syslogdb_default = 'cacti';
$syslogdb_hostname = 'localhost';
$syslogdb_username = 'cactiuser';
$syslogdb_password = 'password';
$syslogdb_port = 3306;
}else{
$syslogdb_type = $database_type;
$syslogdb_default = $database_default;
$syslogdb_hostname = $database_hostname;
$syslogdb_username = $database_username;
$syslogdb_password = $database_password;
$syslogdb_port = $database_port;
Edit /etc/rsyslog.conf
Code: Select all
$template cacti_syslog,"INSERT INTO syslog_incoming(facility, priority, date, time, host, message) values (%syslogfacility%, %syslogpriority%, '%timereported:::date-mysql%', '%timereported:::date-mysql%', '%HOSTNAME%', '%msg%')", SQL
*.* >localhost,syslog,cactiuser,password;cacti_syslog
# Store all log files in MySQL DB :
*.* :ommysql:127.0.0.1,Syslog,rsyslog,password0
Code: Select all
mysql> source /usr/share/cacti/site/plugins/syslog/syslog.sql;
Each time when i restart rsyslog, i always received the error from rsyslog:
But syslog plugin still empty.
If i change:
Code: Select all
$use_cacti_db = false;
if (!$use_cacti_db) {
$syslogdb_type = 'mysql';
$syslogdb_default = 'cacti';
$syslogdb_hostname = 'localhost';
$syslogdb_username = 'cactiuser';
$syslogdb_password = 'password';
$syslogdb_port = 3306;
Code: Select all
$use_cacti_db = false;
if (!$use_cacti_db) {
$syslogdb_type = 'mysql';
$syslogdb_default = 'syslog';
$syslogdb_hostname = 'localhost';
$syslogdb_username = 'cactiuser';
$syslogdb_password = 'password';
$syslogdb_port = 3306;
What and where the step i am wrong?
Any help is appreciated,
Best regards,