Configuring Cacti to log to Syslog

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Caracarn
Posts: 17
Joined: Thu Nov 27, 2008 6:30 pm

Configuring Cacti to log to Syslog

Post by Caracarn »

Hello,

I'd like critical entries in the Cacti log file ie Host down, to be sent to the Syslog file on the same server. All my switches/routers are already doing this successfully.

I am running Cacti 0.8.7d on an ubuntu 8.10 server with the Monitor, Clog, Thold and Settings plugins installed. I have modified the settings to log to a syslog server, but nothing appears in the log file.

Below I have screenshots of the 2 relevant Settings screens.

My questions are, do I need the Syslog plugin? When I read the description on cactiusers, it didnt seem to be what I wanted.

Why is there nowhere to put the syslog server's IP address? Do I need to make some configuration changes somewhere else?

Any help appreciated.
Attachments
cactiscr1.JPG
cactiscr1.JPG (83.85 KiB) Viewed 1714 times
cactiscr2.JPG
cactiscr2.JPG (97.71 KiB) Viewed 1714 times
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

If you want to log to syslog, then you'll need some sort of "handler" to process the messages. I'd recommend syslog-ng (because it's what I use). If you do a search in google for "syslog openmaniak", this should give you a useful "how to"

Remember to substitute "haloe" for "syslog" - haloe was the original name, but it's called syslog.. I had this up and running in about 10 mins, with the cact log (only errors, threshold breaches, host down etc) being logged as well.

The things to remember are:

Sustitute "haloe" for "syslog"
Create a pipe file (there is a good script provided)
Allow UDP in syslog-ng.conf
Append syslog-ng.conf with the variables provided
Stop and restart syslog-ng

If you are running ubuntu, you can do

apt-get install syslog-ng

Then download the syslog plugin from http://cactiusers.org

Hope this helps some. Let me know / drop me a PM if you'd like some help with this. I modified the 0.5.2 version of syslog to suit my needs in terms of colours etc, and some of the layout.

Failing that, if you don't want to use syslog, and like the look of Web 2.0, take a look at CAMM from gthe.

Regds
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Caracarn
Posts: 17
Joined: Thu Nov 27, 2008 6:30 pm

Post by Caracarn »

Thanks for your detailed reply.

Looking at the info you posted I have to install syslog-ng which replaces my existing syslogd, why do I need to do this?

I'm still unsure why I need to install the syslog plugin, as far as I can tell it lets me view the syslog file within Cacti, but I don't want to do this. I just want to send critical Cacti messages to my existing syslog file, is this not possible? Do I need to install the plugin to get the funcionality I require?

Thanks for your help.
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The Settings Plugin provides the first screen shot. It is not a core part of Cacti, but is for many plugins. The logging section in Cacti speaks specifically as to how log messages are to be delivered to Syslog out of Cacti, whereas the Settings plugin talks about pre-set's for Plugins that wish to log to syslog.

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests