Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Dec 16, 2018 5:34 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: central syslog issue
PostPosted: Mon Jul 31, 2017 11:59 pm 
Offline

Joined: Fri Jul 07, 2017 4:28 am
Posts: 6
Hi
I am new cacti user, I want to separate syslog to another server, I setup 2 VMs with Ubuntu 14.04, VM1(192.168.10.1) is cacti server, VM2(192.168.10.2) is central log server. in the Vm1 the /etc/rsyslog.conf is:
Code:
$ModLoad ommysql
$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
*.*       >192.168.10.2,Syslog,cacti,!QA2ws3ed;cacti_syslog

*.*      >192.168.10.2

and I also config the file /usr/share/cacti/site/plugins/syslog/config.php
Code:
global $config, $database_type, $database_default, $database_hostname;
global $database_username, $database_password, $database_port;

/* revert if you dont use the Cacti database */
$use_cacti_db = false;

if (!$use_cacti_db) {
        $syslogdb_type     = 'mysql';
        $syslogdb_default  = 'Syslog';
        $syslogdb_hostname = 'localhost';
        $syslogdb_username = 'cacti';
        $syslogdb_password = '!QA2ws3ed';
        $syslogdb_port     = 3306;


in the VM2, I configured /etc/rsyslog.conf

Code:
$ModLoad ommysql
$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,cacti,!QA2ws3ed;cacti_syslog
# Load modules
module(load=imtcp) # For TCP input support
module(load=ommysql) # For MySQL output support
#### RULES ####

# Create a ruleset
ruleset(name=.rsRemoteTCP.) {
*.* action(
type=ommysql
server=localhost
serverport=4403
db=Syslog
uid=cacti
pwd=!QA2ws3ed
)
}

# Bind the ruleset to tcp input
input(
type=imtcp
port=514
ruleset=rsRemoteTCP
)


I can't see any log in the central log server, someone can help me? thanks.

BR//LP


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group