I am having a strange issue with syslog msgs not showing up under the syslog tab. I can see the msgs in the MySQL database and I see the Cacti logs showing the msgs as XFer which makes it seem like they are being moved somewhere else. I know I must be missing something simple .
I have researched this extensively through all of the available documentation.
Any thoughts would be greatly appreciated
Here is my config from a clean install:
Here is my syslog config.phpUbuntu 16.04 LTS
Cacti 1.1.36
syslog plugin 2.1
syslog-ng 3.5
Using the cactidb for syslog storage
Code: Select all
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2007-2014 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/
global $config, $database_type, $database_default, $database_hostname;
global $database_username, $database_password, $database_port;
/* revert if you dont use the Cacti database */
$use_cacti_db = true;
if (!$use_cacti_db) {
$syslogdb_type = 'mysql';
$syslogdb_default = 'cactidb';
$syslogdb_hostname = 'localhost';
$syslogdb_username = 'someuser';
$syslogdb_password = 'somepassword';
$syslogdb_port = 3306;
}else{
$syslogdb_type = $database_type;
$syslogdb_default = $database_default;
$syslogdb_hostname = $database_hostname;
$syslogdb_username = $database_username;
$syslogdb_password = $database_password;
$syslogdb_port = $database_port;
}
/* field in the incomming table */
$syslog_incoming_config['dateField'] = 'date';
$syslog_incoming_config['timeField'] = 'time';
$syslog_incoming_config['priorityField'] = 'priority_id';
$syslog_incoming_config['facilityField'] = 'facility_id';
$syslog_incoming_config['hostField'] = 'host_id';
$syslog_incoming_config['textField'] = 'message';
$syslog_incoming_config['id'] = 'seq';
?>
Code: Select all
@version: 3.5
#Bare minimum syslog-ng configuration
# First, set some global options.
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
owner(root); group(adm); perm(0640); stats_freq(0);
bad_hostname(^gconfd);
};
# we are using udp, and this is a collector for net traffic only
source s_all { udp(); };
destination d_mysql {
sql(type(mysql)
host("localhost") username("someuser") password("somepassword")
database("cactidb") table("syslog_incoming")
columns("facility", "priority", "date", "time", "host", "message")
values("$FACILITY","","$YEAR-$MONTH-$DAY", "$HOUR:$MIN:$SEC","$HOST_FROM","$MSG")
indexes("facility", "priority", "date", "time", "host", "msg"));
};
log { source(s_all); destination(d_mysql); };
Code: Select all
03/07/2018 18:55:03 - SYSTEM SYSLOG STATS:Time:0.02 Deletes:0 Incoming:0 Removes:0 XFers:221 Alerts:0 Alarms:0 Reports:0
03/07/2018 18:55:03 - SYSTEM STATS: Time:1.2432 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:5 RRDsProcessed:5