Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Mar 22, 2019 9:42 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: problems installing syslog plugin
PostPosted: Mon Nov 26, 2018 10:28 am 
Offline

Joined: Mon Nov 26, 2018 9:49 am
Posts: 3
Hi there,

I'm currently migrating the old cacti 0.8.8 environment to a new server on ubuntu 18.04.
I use the syslog plugin from github on version 2.1
Cacti version is 1.1.38
rsyslogd version is 8.32.0

I'm running into problems starting rsyslogd. The errormessage is
Code:
error during parsing file /etc/rsyslog.d/cacti.conf, on or before line 15: errors occured in file '/etc/rsyslog.d/cacti.conf' around line 15 [v8.32.0 try http://www.rsyslog.com/e/2207 ]

The mentioned line in the config file is the last one of this snippet, i merely omitted some comments and newlines

contents of /etc/rsyslog.d/cacti.conf
Code:
$ModLoad imudp   
$UDPServerRun 514
$ModLoad ommysql
$template cacti_syslog,"INSERT INTO syslog_incoming(facility_id, priority_id, program,date, time, host, message) \
values (%syslogfacility%, %syslogpriority%, '%programname%', '%timereported:::date-mysql%', '%timereported:::date-mysql%', '%HOSTNAME%', TRIM('%msg%'))", SQL
# all > server, table, user, password; template
*.*>localhost,syslog,cacti,password;cacti_syslog


does anybody have an idea on why this doesn't work? what is wrong with that line?

contents of config.php
Code:
        $syslogdb_type     = 'mysql';
$syslogdb_default  = 'syslog';
$syslogdb_hostname = 'localhost';
$syslogdb_username = 'cacti';
$syslogdb_password = 'password';
$syslogdb_port     = 3306;


Top
 Profile  
 
 Post subject: Re: problems installing syslog plugin
PostPosted: Mon Nov 26, 2018 10:50 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2296
I'm pretty sure that has been answered either on these forums or on the plugin_syslog GitHub issues section.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: problems installing syslog plugin
PostPosted: Mon Nov 26, 2018 11:11 am 
Offline

Joined: Mon Nov 26, 2018 9:49 am
Posts: 3
Well, there's this guy, who mentions a similar problem.
https://forums.cacti.net/viewtopic.php?f=14&t=59315&sid=770e4331e37d2888985814acf9717aa0
The suggested solution, changing localhost to 127.0.0.1, doesn't help in my case. Maybe i should have mentioned that i already tried. My bad.

On the Github Issue tracker, there is no issue whawtsoever with the same kind of problem.

So please, kindly, answer the question, since you seem to know the answer.
Thank you.


EDIT: added link


Top
 Profile  
 
 Post subject: Re: problems installing syslog plugin
PostPosted: Mon Nov 26, 2018 11:54 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2296
Actually I don't. I just recall reading it somewhere. If that answer was not what you were after, or did not work for you, then I could be equally rude and say search harder.

Instead, all I will say is that I don't personally use that plugin, but I have tried to help people out and this post may help you:
https://github.com/Cacti/plugin_syslog/ ... -415304630

Alex suggested a config that worked for him. Whether that will work for you, I know not.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: problems installing syslog plugin
PostPosted: Tue Nov 27, 2018 7:50 am 
Offline

Joined: Mon Nov 26, 2018 9:49 am
Posts: 3
Hello NetniV, thank you for pointing me to that issue.

However, that config didn't work for me and i went and configured it myself in a way that works.

I'll post the config below, in case somebody else has a similar problem.

Code:
$ModLoad imudp
$UDPServerRun 514
module (load="ommysql")
template(name="cacti_syslog" type="list" option.sql="on") {
         constant(value="INSERT INTO syslog_incoming(facility_id, priority_id, program, date, time, host, message)")
                 constant(value="values ('")
                 property(name="syslogfacility")
                 constant(value="' , '")
                 property(name="syslogpriority")
                 constant(value="' , '")
                 property(name="programname")
                 constant(value="' , '")
                 property(name="timereported" dateFormat="mysql")
                 constant(value="' , '")
                 property(name="timereported" dateFormat="mysql")
                 constant(value="' , '")
                 property(name="hostname")
                 constant(value="' , '")
                 property(name="msg")
                 constant(value="')")
                 }
*.* action(type="ommysql" server="127.0.0.1" serverport="3306" db="syslog" uid="syslog" pwd="password" template="cacti_syslog")


Top
 Profile  
 
 Post subject: Re: problems installing syslog plugin
PostPosted: Wed Nov 28, 2018 6:33 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2296
Looks good. One of these days I may actually get around to trying this out. Just need a large block of time to wade for proper testing / implementation as no doubt something will peak my attention with looking out of place.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 12 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