Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Apr 19, 2019 1:55 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [SOLVED]Cacti Log file creation
PostPosted: Thu Mar 14, 2019 9:02 pm 
Offline
Cacti User

Joined: Mon Oct 01, 2018 10:09 am
Posts: 112
Hello All,

I am trying to set up a syslog server and a logging system using splunk
We plan to monitor the cacti.log file for "DOWN" devices, and devices "returning from "DOWN"

I notice when viewing the log file in the cacti web interface (using cacti-1.1.38) the error message
shows the name of the device [my-cisco-rtr1] and the ip [10.22.11.1] very nice.:
SPINE: Poller[Main Poller] Device[1] Device[my-cisco-rtr1] Hostname[10.22.11.1]] ERROR: HOST EVENT: Device is DOWN Message:

BUT when I go directly to the cactl.log file, and look up the error, the error line is this:
SPINE: Poller[1] Device[1] Hostname[192.168.1.8] ERROR: HOST EVENT: Device is DOWN

So the cacti.log file shows only the error, the device id, and the device ip.
I would like to get the device/host user friendly name as well. How can I do this?

As far as the GUI web page display, the the php file go out and do a mysql SELECT on the device id or hostname?

Please advise,

Thanks
eholz1


Last edited by eholz1 on Mon Mar 25, 2019 10:52 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Cacti Log file creation
PostPosted: Fri Mar 15, 2019 3:19 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2388
We made the GUI a lot more friendly for viewing log files by allowing the search and replacement of known identifiers with their text counter parts and a link to the relevant page. it is handled by the clog_regex_xxx functions and has hooks to allow plugins such as Threshold and Notifylists to hook into that subsystem and provide their own more descriptive links.

_________________
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: Cacti Log file creation
PostPosted: Fri Mar 15, 2019 3:20 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2388
You could suggest via a new feature request on GitHub that 1.3 have a CLI exporter of the logs that provided that same translation (sans the HTML parts).

_________________
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: Cacti Log file creation
PostPosted: Fri Mar 15, 2019 12:01 pm 
Offline
Cacti User

Joined: Mon Oct 01, 2018 10:09 am
Posts: 112
Hello Guru User,

Thanks, as always, for the excellent information.
I will go over to GitHub and enter a request for that funtionality.

I will think about ways to capture the data from the areas you mention:
clog_regex_xxx funtions and NotifyLists, etc.

Perhaps I can grap the email lines from the clog, and use those, as
they have the info I need.

Then I do not have to use some sort script to grab the data from the message
and the mysql db!!

Thank You Very Much,

eholz1


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 8 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