Syslog NG Cacti Plugin

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
zarahel
Posts: 33
Joined: Wed Feb 06, 2008 3:49 pm

Syslog NG Cacti Plugin

Post by zarahel »

Good morning to you all

I need your help

I have the Syslog NG plugin intalled in Cacti, and it´s working fine. But I wanted to create separate views for optimization purposes.

For instance, I want to create a folder named Cisco 386 for all my cisco 386 equipment syslog. And another folder named Cisco 2801 for all my cisco 2801 equipment syslogs...and so on.

Is that possible? Is there any way to create different views in Cacti Syslog NG plugin, so I can sort my different hosts through out the different folders?

I apreciate any help

Thkx
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Yes it is very possible. It could be mapped based upon the Host Template for example. Is that where you are going with this, or would it be more elaborate than that? Jimmy and I are working on some changes, but timing is elusive.

Regards,

TheWitness
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?
zarahel
Posts: 33
Joined: Wed Feb 06, 2008 3:49 pm

Post by zarahel »

TheWitness

No...it´s not something very elaborated. I just want to create separate views in cacti plugin and order my hosts separately in the folders by choice.

Is there any current way of doing it? If so, could you post or send me the step by step procedure of doing it? (I´m kinda of a newbie in linux)

Thkx a lot
zarahel
Posts: 33
Joined: Wed Feb 06, 2008 3:49 pm

Post by zarahel »

TheWitness

Do you have any update on the subject?
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I am attempting to prioritize my schedule at the moment... I have a 5 hour flight on Sunday. Maybe that will be enough time...

TheWitness
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?
palbandoz
Posts: 12
Joined: Wed May 07, 2008 11:20 am

Post by palbandoz »

I've got a problem inserting some log to the mySQL database.

I'm not sure if the log format is completely correct (almost sure it isn't), but the fact is that the only problem is when using the $MSG variable with certain log entries.

I'm sending the same log lines to a file also; here it is a valid log entry:
May 27 14:20:01 172.21.100.239 CRON[2420]: (pam_unix) session opened
$MSG = CRON[2420]: (pam_unix) session opened

Here it is an invalid log entry:
May 27 14:20:01 172.21.100.239 cibadmin: [2451]: info: Invoked: cibadmin -Q
$MSG = cibadmin: [2451]:
instead of $MSG = cibadmin: [2451]: info: Invoked: cibadmin -Q
Even when trying to insert it in the database an error occurs.

The SQL operation used by syslog-ng is:
pipe("/tmp/mysql.pipe"
template("INSERT INTO syslog_incoming (host, facility, priority, date, time, message) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC'. '$MSG' );\n")
template_escape(yes));
I've checked that the only variable that fails is $MSG. It seems that the log input is not valid, since if it has more than one : it splits the message and fails. But if the content of $MSG should be the end of the parsed line... why does it check for more : 's? Is there any way to get the rest of the message into $MSG?

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests