Syslog Plugin issue about classification

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
zshwww9187
Posts: 14
Joined: Sat Aug 14, 2010 9:11 am

Syslog Plugin issue about classification

Post by zshwww9187 »

I installd syslog 1.22 plugin at cacti 0.8.7h,but I found it have no classification
Image
the Facility and Priority is number,and didn't have colour
the next picture is ok
Image
what I do?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Syslog Plugin issue about classification

Post by TheWitness »

Reconfigure rsyslog/syslog-ng to push Text values into the syslog_incoming table and not numeric values.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Chaosratt
Posts: 34
Joined: Sun Oct 28, 2007 3:31 am
Location: St. Pete, FL
Contact:

Re: Syslog Plugin issue about classification

Post by Chaosratt »

TheWitness wrote:Reconfigure rsyslog/syslog-ng to push Text values into the syslog_incoming table and not numeric values.
Would you mind explaining this a little more?
I followed the instructions to install the plugin and everything works OK, but just like OP I only get numerical values for priority and facility.
Current /etc/rsyslog.d/mysql.conf:

Code: Select all

### Configuration file for rsyslog-mysql
### Changes are preserved

$ModLoad ommysql
#*.* :ommysql:localhost,Syslog,rsyslog,<snip>
$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,rsyslog,<snip>;cacti_syslog
If I change it to this:

Code: Select all

### Configuration file for rsyslog-mysql
### Changes are preserved

$ModLoad ommysql
#*.* :ommysql:localhost,Syslog,rsyslog,<snip>
$template cacti_syslog,"INSERT INTO syslog_incoming(facility, priority, date, time, host, message) values (%syslogfacility-text%, %syslogpriority-text%,  '%timereported:::date-mysql%', '%timereported:::date-mysql%', '%HOSTNAME%', '%msg%')", SQL
*.* >localhost,Syslog,rsyslog,<snip>;cacti_syslog
Then I stop getting any new data into the database, and syslog seems to stop working completly with this as the final message:

Code: Select all

Dec  7 03:22:51 <hostname> rsyslogd: db error (1054): Unknown column 'info' in 'field list'
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Syslog Plugin issue about classification

Post by TheWitness »

You need to put quotes around the facility-text and the priority-text.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
zshwww9187
Posts: 14
Joined: Sat Aug 14, 2010 9:11 am

Re: Syslog Plugin issue about classification

Post by zshwww9187 »

TheWitness wrote:You need to put quotes around the facility-text and the priority-text.
thank you very much! :P Now,it works!But the event background colorsis gray,what I do?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests