Hello!
I dont know if anybody has this issue. I've seen that my registers are being inserted in the database with the priority field as "1" "2", etc, and not with the names of the table "syslog_priorities".
I've searched for this in the browser, but i have not found anything, so I do this post.
The cause appears to be an error on the installation doc, that says:
$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
*.* >{mysql_server},{db_name},{db_users},{db_pass};cacti_syslog
I've replaced this with 'syslogpriority-text' (don't forget the ' '), and now i'm getting the correct pri on the tables.
Now, i have a trouble with the background color of the events.
Thanks!
Rsyslogd Template modification to insert in database
Moderators: Developers, Moderators
Re: Rsyslogd Template modification to insert in database
Totally agree with you.bpablo wrote:Hello!
I dont know if anybody has this issue. I've seen that my registers are being inserted in the database with the priority field as "1" "2", etc, and not with the names of the table "syslog_priorities".
I've searched for this in the browser, but i have not found anything, so I do this post.
The cause appears to be an error on the installation doc, that says:
$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
*.* >{mysql_server},{db_name},{db_users},{db_pass};cacti_syslog
I've replaced this with 'syslogpriority-text' (don't forget the ' '), and now i'm getting the correct pri on the tables.
Now, i have a trouble with the background color of the events.
Thanks!
I had the same issue but in addition I changed the syslogfacility to text.
However, I don't have any issue with colors now.
In my case it was necessary to use fromhost-ip while I added the syslogtag.
$template cacti_syslog,"INSERT INTO syslog_incoming(facility, priority, date, time, host, message) values ('%syslogfacility-text%', '%syslogpriority-text%', '%timereported:::date-mysql%', '%timereported:::date-mysql%', '%fromhost-ip%', '%syslogtag% %msg%')", SQL
Who is online
Users browsing this forum: No registered users and 3 guests