[SOLVED]Cacti Log file creation

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
eholz1
Cacti User
Posts: 129
Joined: Mon Oct 01, 2018 10:09 am

[SOLVED]Cacti Log file creation

#1 Post by eholz1 » Thu Mar 14, 2019 9:02 pm

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.

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: Cacti Log file creation

#2 Post by netniV » Fri Mar 15, 2019 3:19 am

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.

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: Cacti Log file creation

#3 Post by netniV » Fri Mar 15, 2019 3:20 am

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).

eholz1
Cacti User
Posts: 129
Joined: Mon Oct 01, 2018 10:09 am

Re: Cacti Log file creation

#4 Post by eholz1 » Fri Mar 15, 2019 12:01 pm

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

Post Reply