Code Monkey home page Code Monkey logo

plugin_syslog's Introduction

Cacti ™

Cacti Commit Audit Project Status Translation Status Average time to resolve an issue Percentage of open issues


Welcome to the Cacti GitHub Site!

Introduction

We currently have two functioning versions of Cacti on this site, and several Cacti plugins supported by The Cacti Group. Our current long lived version of Cacti in the 1.2.x branch. The current release version of this branch is Cacti 1.2.27.

This pending maintenance release has several bugs fixes, and significantly more welcomed feature enhancements. You can review the CHANGELOG for the 1.2.x branch for more information on that.

Additionally, we have the develop branch. This is now an active Development Branch. In this branch, we as a team have re-grouped and are introducing several new features. We hope to be able to deliver a Christmas present for Cacti enthusiasts, which will be a Cacti 1.3.0-beta release. If you want to get involved earlier, you can simply download the development release and knock yourselves out. The 1.3.0 release will include everything in th 1.2.27 release, as well as several additional features from our roadmap.

System requirements vary from Cacti point release to point release. The matrix below documents the minimum tool levels for each version. With our source distribution, all the vendor included packages are pre-packeged and tested by the Cacti group, so there is no reason to use package management tools to install those dependencies.

Dependency Cacti 1.2.x Cacti 1.3.x
MariaDB 5.5+ 10.2.x+
MySQL 5.5+ 5.7+
PHP 5.4+ 8.0+
RRDtool 1.4+ 1.8+
Net-SNMP 5.5+ 5.8+

For Cacti 1.2.x, it is reasonable to run with RHEL/CentOS 7 or equivalent. However, for Cacti 1.3.x, it would be better to run on RHEL/CentOS/Rocky 8 or equivalent as this OS version makes PHP8.0 available via a DNF Stream.

However, if you wish to run Cacti 1.3.x on the RHEL/CentOS 7 distribution you can do so if you use the REMI distributions of PHP. You will also in this case have to build RRDtool 1.8+ from source, which is straightforward.

In the sections below, you can find some important first steps before installing either the Cacti 1.2.x version of the pending Cacti 1.3.x version. Good luck and enjoy Cacti.

Most modern browsers are supported with the exception of ALL Internet Explorer versions as of Cacti version 1.2.x. Do NOT attempt to use Internet Explorer of any version with Cacti 1.2.x and above.

Running Cacti from the develop Branch

IMPORTANT

When using source or by downloading the code directly from the repository, it is important to note that periodically, you may have to rerun the database upgrade cli script to bring in new columns. You can use the --forcever=1.2.22 option to assume you are upgrading from an earlier cacti version:

php -q upgrade_database.php --forcever=1.2.22

If you experience SQL errors in your Cacti log, please open a case in our Cacti issue tracker here.

Upgrading from Pre-Cacti 1.x Releases

When Cacti was first developed nearly 20 years ago, MySQL was not as mature as it is now. When The Cacti Group went about engineering Cacti 1.x, a decision was made to force users to use the InnoDB storage engine for many of the Tables. This was done as the InnoDB storage engine provides a better user experience when your web site has several concurrent logins. Though a little slower, it also provides greater resiliency for the developers.

With that said, there are several changes that you MUST perform to MySQL/MariaDB before you upgrade, and a service restart is required. Depending on your release of MariaDB or MySQL, the following settings will either be required, or already enabled as default:

[mysqld]

# required for multiple language support
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

# Memory tunables - Cacti provides recommendations at upgrade time
max_heap_table_size = XXX
max_allowed_packet = 500M
tmp_table_size = XXX
join_buffer_size = XXX
sort_buffer_size = XXX

# important for compatibility
sql_mode=NO_ENGINE_SUBSTITUTION

# innodb settings - Cacti provides recommendations at upgrade time
innodb_buffer_pool_instances = XXX
innodb_flush_log_at_trx_commit = 2
innodb_buffer_pool_size = XXX
innodb_sort_buffer_size = XXX
innodb_doublewrite = ON

# required
innodb_file_per_table = ON
innodb_file_format = Barracuda
innodb_large_prefix = 1

# not all version support
innodb_flush_log_at_timeout = 3

# for SSD's/NVMe
innodb_read_io_threads = 32
innodb_write_io_threads = 16
innodb_io_capacity = 10000
innodb_io_capacity_max = 20000
innodb_flush_method = O_DIRECT

The required settings are very important. Otherwise, you will encounter issues upgrading. The settings with XXX, Cacti will provide a recommendation at upgrade time. It is not out of the ordinary to have to restart MySQL/MariaDB during the upgrade to tune these settings. Please make special note of this before you begin your upgrade.

Before you upgrade, you should make these required changes, then restart MySQL/MariaDB. After that, you can save yourself some time and potential errors by running the following scripts (assuming you are using bash):

for table in `mysql -e "SELECT TABLE_NAME FROM information_schema.TABLES WHERE table_schema='cacti' AND engine!='MEMORY'" cacti | grep -v TABLE_NAME`;
do
   echo "Converting $table";
   mysql -e "ALTER TABLE $table ENGINE=InnoDB ROW_FORMAT=Dynamic CHARSET=utf8mb4" cacti;
done

This will convert any tables that are either InnoDB or MyISAM to Barracuda file format, dynamic row format and utf8mb4. Note, that if you have been using MySQL or MariaDB without innodb_file_per_table set to on, you might be better in backing up your database, resetting InnoDB by removing your ib* files in the /var/lib/mysql directory, and after which restoring your database and MySQL/MariaDB tables and permissions. Before you take such a step, you should always practice on a test server until you feel comfortable with the change.

Good luck, and enjoy Cacti!

Running Database Upgrade Script

sudo -u cacti php -q cli/upgrade_database.php --forcever=`cat include/cacti_version`

Updating Cacti Version in Database

update version set cacti = '1.1.38';

Note: Change the above version to the correct version or risk the installer upgrading from a previous version.


About Cacti

Cacti is a complete network graphing solution designed to harness the power of RRDtool's data storage and graphing functionality providing the following features:

  • Remote and local data collectors

  • Device discovery

  • Automation of device and graph creation

  • Graph and device templating

  • Custom data collection methods

  • User, group and domain access controls

All of this is wrapped in an intuitive, easy to use interface that makes sense for both LAN-sized installations and complex networks with thousands of devices.

Developed in the early 2000s by Ian Berry as a high school project, it has been used by thousands of companies and enthusiasts to monitor and manage their Enterprise Networks and Data Centers.

Requirements

Cacti should be able to run on any Linux, UNIX, or Windows based operating system with the following requirements:

  • PHP 7.4+

  • MySQL 5.6+

  • RRDtool 1.3+, 1.5+ recommended

  • NET-SNMP 5.5+

  • Web Server with PHP support

PHP Must also be compiled as a standalone cgi or cli binary. This is required for data gathering via cron.

php-snmp

We mark the php-snmp module as optional. So long as you are not using ipv6 devices, or using snmpv3 engine IDs or contexts, then using php-snmp should be safe. Otherwise, you should consider uninstalling the php-snmp module as it will create problems. We are aware of the problem with php-snmp and looking to get involved in the php project to resolve these issues.

RRDtool

RRDtool is available in multiple versions and a majority of them are supported by Cacti. Please remember to confirm your Cacti settings for the RRDtool version if you having problem rendering graphs.

Documentation

Documentation is available with the Cacti releases and also available for viewing on the Documentation Repository.

Contribute

Check out the main Cacti web site for downloads, change logs, release notes and more!

Community forums

Given the large scope of Cacti, the forums tend to generate a respectable amount of traffic. Doing your part in answering basic questions goes a long way since we cannot be everywhere at once. Contribute to the Cacti community by participating on the Cacti Community Forums.

GitHub Documentation

Get involved in creating and editing Cacti Documentation! Fork, change and submit a pull request to help improve the documentation on GitHub.

GitHub Development

Get involved in development of Cacti! Join the developers and community on GitHub!


Functionality

Data Sources

Cacti handles the gathering of data through the concept of data sources. Data sources utilize input methods to gather data from devices, hosts, databases, scripts, etc... The possibilities are endless as to the nature of the data you are able to collect. Data sources are the direct link to the underlying RRD files; how data is stored within RRD files and how data is retrieved from RRD files.

Graphs

Graphs, the heart and soul of Cacti, are created by RRDtool using the defined data sources definition.

Templating

Bringing it all together, Cacti uses and extensive template system that allows for the creation and consumption of portable templates. Graph, data source, and RRA templates allow for the easy creation of graphs and data sources out of the box. Along with the Cacti community support, templates have become the standard way to support graphing any number of devices in use in today computing and networking environments.

Data Collection (The Poller)

Local and remote data collection support with the ability to set collection intervals. Check out Data Source Profile with in Cacti for more information. Data Source Profiles can be applied to graphs at creation time or at the data template level.

Remote data collection has been made easy through replication of resources to remote data collectors. Even when connectivity to the main Cacti installation is lost from remote data collector, it will store collected data until connectivity is restored. Remote data collection only requires MySQL and HTTP/HTTPS access back to the main Cacti installation location.

Network Discovery and Automation

Cacti provides administrators a series of network automation functionality in order to reduce the time and effort it takes to setup and manage devices.

  • Multiple definable network discovery rules

  • Automation templates that specify how devices are configured

Plugin Framework

Cacti is more than a network monitoring system, it is an operations framework that allows the extension and augmentation of Cacti functionality. The Cacti Group continues to maintain an assortment of plugins. If you are looking to add features to Cacti, there is quite a bit of reference material to choose from on GitHub.

Dynamic Graph Viewing Experience

Cacti allows for many runtime augmentations while viewing graphs:

  • Dynamically loaded tree and graph view

  • Searching by string, graph and template types

  • Viewing augmentation

  • Simple time span adjustments

  • Convenient sliding time window buttons

  • Single click realtime graph option

  • Easy graph export to csv

  • RRA view with just a click

User, Groups and Permissions

Support for per user and per group permissions at a per realm (area of Cacti), per graph, per graph tree, per device, etc... The permission model in Cacti is role based access control (RBAC) to allow for flexible assignment of permissions. Support for enforcement of password complexity, password age and changing of expired passwords.

RRDtool Graph Options

Cacti supports most RRDtool graphing abilities including:

Graph Options

  • Full right axis

  • Shift

  • Dash and dash offset

  • Alt y-grid

  • No grid fit

  • Units length

  • Tab width

  • Dynamic labels

  • Rules legend

  • Legend position

Graph Items

  • VDEFs

  • Stacked lines

  • User definable line widths

  • Text alignment


Copyright (c) 2004-2024 - The Cacti Group, Inc.

plugin_syslog's People

Contributors

aleksashka avatar bmfmancini avatar browniebraun avatar cigamit avatar ddb4github avatar gan-dalf avatar jpobeda avatar kim-fitness avatar linegod avatar netniv avatar ronytomen avatar seanmancini avatar smiles1969 avatar thewitness avatar weblate avatar wonderzone avatar xmacan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plugin_syslog's Issues

syslog.php in line 1038

$hosts = syslog_db_fetch_assoc("SELECT host_id, SUBSTRING_INDEX(host,'.',1) AS host FROM " . $syslogdb_default . ".syslog_hosts $hosts_where ORDER BY host");
when the host is an ipaddress in the syslog display is not normal;
mybe change like this
$hosts = syslog_db_fetch_assoc("SELECT host_id, host AS host FROM " . $syslogdb_default . ".syslog_hosts $hosts_where ORDER BY host");

Removal Rule error

Hello

I found some error When I add the removal rule .

Could you help me to fix it?

BR,
David
image

2017/07/12 08:51:07 - CMDPHP ERROR: A DB Exec Failed!, Error: Column 'facility_id' in where clause is ambiguous
2017/07/12 08:51:07 - DBCALL ERROR: A DB Exec Failed!, Error:1052, SQL:'INSERT INTO `syslog`.`syslog_removed` (logtime, priority_id, facility_id, program_id, host_id, message) SELECT TIMESTAMP(`date`, `time`), priority_id, facility_id, program_id, host_id, message FROM (SELECT si.date, si.time, si.priority_id, si.facility_id, spg.program_id, sh.host_id, si.message FROM `syslog`.`syslog_incoming` AS si INNER JOIN `syslog`.`syslog_facilities` AS sf ON sf.facility_id=si.facility_id INNER JOIN `syslog`.`syslog_priorities` AS sp ON sp.priority_id=si.priority_id INNER JOIN `syslog`.`syslog_programs` AS spg ON spg.program=si.program INNER JOIN `syslog`.`syslog_hosts` AS sh ON sh.host=si.host WHERE (facility_id = 1) AND status=97) AS merge'

Enable Plugin Button Not Working - Cacti v 1.1.2

Hi,

I've installed the plugin correctly but when I click enable nothing happens and the plugin doesn't come up.

No error logs or anything like that, little bit stuck.

Any help is much appreciated. Thanks!
Steve

Error in file functions.php on line: 511 with Alert Removed Rule

When I look Alert Role i have error in cacti log, because Alert Removed Rule have NULL om database table:

2017-02-08 13:01:01 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: class in file: /var/www/cacti/plugins/syslog/functions.php  on line: 511
2017-02-08 13:01:01 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/syslog/syslog.php: 90 syslog_messages)(/plugins/syslog/syslog.php: 1366 syslog_row_color)(/plugins/syslog/functions.php: 511 CactiErrorHandler)(/lib/functions.php: 4238 cacti_debug_backtrace)

SQL query:

SELECT syslog.*, sf.facility, sp.priority, spr.program, sa.name, sa.severity   FROM `cacti`.`syslog_logs` AS syslog   LEFT JOIN `cacti`.`syslog_facilities` AS sf   ON syslog.facility_id=sf.facility_id    LEFT JOIN `cacti`.`syslog_priorities` AS sp   ON syslog.priority_id=sp.priority_id    LEFT JOIN `cacti`.`syslog_alert` AS sa   ON syslog.alert_id=sa.id    LEFT JOIN `cacti`.`syslog_programs` AS spr   ON syslog.program_id=spr.program_id WHERE logtime BETWEEN '2017-02-08 11:45'    AND '2017-02-08 12:45'  
ORDER BY `sa`.`severity`  DESC LIMIT 0,30

10

syslog 2.1 compatible with cacti 0.8.8h

Hey Guys,

I'm trying to replace syslog 2.1 with our old 1.22.
Here were what I did:

  1. Disable old plugin.
  2. Uninstall old plugin.
  3. Remove old syslog folder.
  4. Rename and move new syslog folder to plugins.
  5. Go to cacti PIA, and trying to install new plugin. (issue happened)
    Then, my PIA manager won't show anything. Even the plugins I have installed. When I remove syslog folder, it back to normal. Any idea?

ERROR PHP WARNING in Plugin 'syslog': Illegal string offset 'host_id'

2017-01-26 16:35:30 - CMDPHP PHP ERROR WARNING Backtrace: (/graph_view.php: 306 grow_right_pane_tree)(/lib/html_tree.php: 1092 html_graph_area)(/lib/html.php: 184 graph_drilldown_icons)(/lib/html.php: 358 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 syslog_graph_buttons)(/plugins/syslog/setup.php: 1064 CactiErrorHandler)(/lib/functions.php: 4225 cacti_debug_backtrace)
2017-01-26 16:35:30 - ERROR PHP WARNING in  Plugin 'syslog': Illegal string offset 'host_id' in file: /var/www/cacti/plugins/syslog/setup.php  on line: 1064

[1.2.0] Automation errors after updating to 9cdd347e

Below is a small snapshot of repeated errors since updating to commit 9cdd347e

2018/08/22 01:05:05 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4884 cacti_debug_backtrace)
2018/08/22 01:05:05 - ERROR PHP ERROR: Uncaught Error: Call to undefined function create_complete_graph_from_template() in /usr/share/cacti/site/lib/api_automation.php:2432 Stack trace: #0 /usr/share/cacti/site/lib/api_automation.php(2135): create_dq_graphs('2', '1', Array) #1 /usr/share/cacti/site/lib/data_query.php(159): automation_execute_data_query('2', '1') #2 /usr/share/cacti/site/poller_commands.php(104): run_data_query('2', '1') #3 {main} thrown in file: /usr/share/cacti/site/lib/api_automation.php on line: 2432
2018/08/22 01:05:05 - PCOMMAND Device[Local Net-SNMP Machine] WARNING: Recache Event Detected for Device
2018/08/22 01:05:04 - SYSTEM STATS: Time:2.4681 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:23 RRDsProcessed:22
2018/08/22 01:04:07 - SYSTEM THOLD STATS: Time:0.1259 Tholds:1 TotalDevices:2 DownDevices:0 NewDownDevices:0
2018/08/22 01:04:06 - THOLD_DEBUG autocreate(2) - rra_list: array ( )
2018/08/22 01:04:06 - THOLD_DEBUG autocreate(2) - rra_sql: 'SELECT id, data_template_id FROM data_local WHERE host_id = ? AND data_template_id IN (30)'
2018/08/22 01:04:06 - THOLD_DEBUG autocreate(2) - host_template_id: 4
2018/08/22 01:04:05 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4884 cacti_debug_backtrace)
2018/08/22 01:04:05 - ERROR PHP ERROR: Uncaught Error: Call to undefined function create_complete_graph_from_template() in /usr/share/cacti/site/lib/api_automation.php:2432 Stack trace: #0 /usr/share/cacti/site/lib/api_automation.php(2135): create_dq_graphs('2', '1', Array) #1 /usr/share/cacti/site/lib/data_query.php(159): automation_execute_data_query('2', '1') #2 /usr/share/cacti/site/poller_commands.php(104): run_data_query('2', '1') #3 {main} thrown in file: /usr/share/cacti/site/lib/api_automation.php on line: 2432
2018/08/22 01:04:05 - PCOMMAND Device[Local Net-SNMP Machine] WARNING: Recache Event Detected for Device
2018/08/22 01:04:04 - SYSTEM STATS: Time:2.7213 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:23 RRDsProcessed:22
2018/08/22 01:03:44 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php: 38 form_save)(/graphs_new.php: 124 html_graph_new_graphs)(/lib/html_graph.php: 509 host_new_graphs_save)(/graphs_new.php: 215 create_save_graph)(/lib/template.php: 1456 create_complete_graph_from_template)(/lib/template.php: 1124 create_graph_has_custom_data_properties)(/lib/template.php: 1378 sizeof)(CactiErrorHandler)(/lib/functions.php: 4841 cacti_debug_backtrace)
2018/08/22 01:03:44 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/template.php on line: 1378
2018/08/22 01:03:44 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs_new.php: 38 form_save)(/graphs_new.php: 124 html_graph_new_graphs)(/lib/html_graph.php: 509 host_new_graphs_save)(/graphs_new.php: 215 CactiErrorHandler)(/lib/functions.php: 4846 cacti_debug_backtrace)
2018/08/22 01:03:44 - ERROR PHP NOTICE: Undefined variable: values in file: /usr/share/cacti/site/graphs_new.php on line: 215
2018/08/22 01:03:41 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php: 38 form_save)(/graphs_new.php: 124 html_graph_new_graphs)(/lib/html_graph.php: 509 host_new_graphs_save)(/graphs_new.php: 215 create_save_graph)(/lib/template.php: 1436 create_complete_graph_from_template)(/lib/template.php: 1124 create_graph_has_custom_data_properties)(/lib/template.php: 1378 sizeof)(CactiErrorHandler)(/lib/functions.php: 4841 cacti_debug_backtrace)
2018/08/22 01:03:41 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/template.php on line: 1378
2018/08/22 01:03:41 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php: 38 form_save)(/graphs_new.php: 124 html_graph_new_graphs)(/lib/html_graph.php: 509 host_new_graphs_save)(/graphs_new.php: 215 create_save_graph)(/lib/template.php: 1436 create_complete_graph_from_template)(/lib/template.php: 1124 create_graph_has_custom_data_properties)(/lib/template.php: 1378 sizeof)(CactiErrorHandler)(/lib/functions.php: 4841 cacti_debug_backtrace)
2018/08/22 01:03:41 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/template.php on line: 1378
2018/08/22 01:03:40 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php: 38 form_save)(/graphs_new.php: 124 html_graph_new_graphs)(/lib/html_graph.php: 509 host_new_graphs_save)(/graphs_new.php: 215 create_save_graph)(/lib/template.php: 1436 create_complete_graph_from_template)(/lib/template.php: 1124 create_graph_has_custom_data_properties)(/lib/template.php: 1378 sizeof)(CactiErrorHandler)(/lib/functions.php: 4841 cacti_debug_backtrace)
2018/08/22 01:03:40 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/template.php on line: 1378
2018/08/22 01:03:40 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php: 38 form_save)(/graphs_new.php: 124 html_graph_new_graphs)(/lib/html_graph.php: 509 host_new_graphs_save)(/graphs_new.php: 215 create_save_graph)(/lib/template.php: 1436 create_complete_graph_from_template)(/lib/template.php: 1124 create_graph_has_custom_data_properties)(/lib/template.php: 1378 sizeof)(CactiErrorHandler)(/lib/functions.php: 4841 cacti_debug_backtrace)
2018/08/22 01:03:40 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/template.php on line: 1378
2018/08/22 01:03:39 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs_new.php: 38 form_save)(/graphs_new.php: 124 html_graph_new_graphs)(/lib/html_graph.php: 509 host_new_graphs_save)(/graphs_new.php: 215 CactiErrorHandler)(/lib/functions.php: 4846 cacti_debug_backtrace)
2018/08/22 01:03:39 - ERROR PHP NOTICE: Undefined variable: values in file: /usr/share/cacti/site/graphs_new.php on line: 215

Feature request: Expand trigger condition logic.

It would be very useful to add to the trigger logic and reference the SQL tables for the source host specific info.

For example:

If host_id = "blah" and message contains "blah" and host_template = "blah" then send alert

I see there is currently a SQL Expression string match type, but I am unsure of it's use and can not find any docs to explain it.

Alert rule : Passing parameters to Alert Command

Hello Folks,
Configured Syslog alert rule which checks if syslog message matches the string "SYS-5-CONFIG_I" and a PHP script is run, which is defined in the Alert Command section as shown below:
-c 'php /nms/cacti/scripts/cisco_config_backup.php <HOSTNAME> <MESSAGE>'

To extract the user field who has changed the configuration, complete syslog message needs to be passed using . But for some reason the script is reading only initial words or truncated portion of the .

Any ideas how to fix the issue.

Install Issue

I pulled this down and tried to install it under the latest 1.0.0 Cacti dev branch (commit 2e51456). When I go to plugin managment, it shows in the list, but the only option listed is "Install Old Plugin" under actions when hovering over the gear icon. Clicking on the action gear does nothing.

[develop] when calling the function syslog_log_alert() an error occurs in the log like

2018/10/04 16:19:12 - SYSLOG WARNING: The Syslog Intance Alert 'Unauthenticated IP-MAC' with Severity 'Notice', has been Triggered, Count was '25', and Sequence ''
--
2018/10/04 16:19:12 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php[420]:syslog_log_alert(), /plugins/syslog/functions.php[664]:syslog_sql_save(), /plugins/syslog/database.php[129]:sql_save())
2018/10/04 16:19:12 - DBCALL ERROR: SQL Save on table '`cacti`.`syslog_logs`': Table does not exist, unable to save!

But everything works and the table exists.

syslog_remove_items issue

The following error occurred while setting the removal rule to "transfer".

2017-04-09 14:32:03 - DBCALL ERROR: A DB Exec Failed!, Error:1052, SQL:"INSERT INTO `cacti_syslog`.`syslog_removed`      (logtime, priority_id, facility_id, host_id, message)      SELECT TIMESTAMP(`date`, `time`),      priority_id, facility_id, host_id, message      FROM (SELECT date, time, priority_id, facility_id, host_id, message       FROM `cacti_syslog`.`syslog_incoming` AS si       INNER JOIN `cacti_syslog`.`syslog_facilities` AS sf       ON sf.facility=si.facility       INNER JOIN `cacti_syslog`.`syslog_priorities` AS sp       ON sp.priority=si.priority       INNER JOIN `cacti_syslog`.`syslog_hosts` AS sh       ON sh.host=si.host       WHERE message LIKE 'OK u:%' AND status=71) AS merge'
2017-04-09 14:32:03 - CMDPHP ERROR: A DB Exec Failed!, Error: Column 'priority_id' in field list is ambiguous
2017-04-09 14:32:03 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php: 238 syslog_remove_items)(/plugins/syslog/functions.php: 452 syslog_db_execute)(/plugins/syslog/database.php: 52 db_execute)(/lib/database.php: 113 db_execute_prepared)(/lib/database.php: 178 cacti_debug_backtrace)

I found some issues in SQL.

INSERT INTO 
	`cacti_syslog`.`syslog_removed`
(
	logtime,
	priority_id,
	facility_id,
	host_id, message
)
	SELECT
		TIMESTAMP(`date`, `time`),
		priority_id,
		facility_id,
		host_id,
		message
	FROM (
		SELECT 
			date,
			time,
			priority_id,				-- !! anbiguous !! Which is si.priority_id or sp.priority_id?
			facility_id,				-- !! anbiguous !! Which is si.facility_id or sf.facility_id?
			host_id,
			message
		FROM
			`cacti_syslog`.`syslog_incoming` AS si
			INNER JOIN
			`cacti_syslog`.`syslog_facilities` AS sf
		ON
			sf.facility=si.facility		-- !! "facility_id" rather than "facility" !!
		INNER JOIN
			`cacti_syslog`.`syslog_priorities` AS sp
		ON
			sp.priority=si.priority 	-- !! "priority_id" rather than "priority" !!
		INNER JOIN
			`cacti_syslog`.`syslog_hosts` AS sh
		ON
			sh.host=si.host
		WHERE
			message LIKE 'OK u:%'
		AND
			status=71
	) AS merge'

I thought that should fix as follows.

INSERT INTO 
	`cacti_syslog`.`syslog_removed`
(
	logtime,
	priority_id,
	facility_id,
	program_id,
	host_id,
	message
)
	SELECT 
		TIMESTAMP(`date`, `time`),
		priority_id,
		facility_id,
		program_id,
		host_id,
		message
	FROM (
		SELECT
			si.date AS date,
			si.time AS time,
			si.priority_id AS priority_id,
			si.facility_id AS facility_id,
			spg.program_id as program_id,
			sh.host_id AS host_id,
			si.message AS message
		FROM
			`cacti_syslog`.`syslog_incoming` AS si
		INNER JOIN
			`cacti_syslog`.`syslog_facilities` AS sf
		ON
			sf.facility_id=si.facility_id
		INNER JOIN
			`cacti_syslog`.`syslog_priorities` AS sp
		ON
			sp.priority_id=si.priority_id
		INNER JOIN
			`cacti_syslog`.`syslog_programs` AS spg
		ON
			si.program=spg.program
		INNER JOIN
			`cacti_syslog`.`syslog_hosts` AS sh
		ON
			sh.host=si.host
		WHERE
			message LIKE 'OK u:%' AND status=71
	) as merge

(Is this a bit verbose?)

In addition, I fixed that 'syslog_programs' table was ignoreing.
I modified functions.php#syslog_remove_items, and removal function is working cleanly.

--- functions.php.orig  2017-04-09 14:55:19.447175798 +0900
+++ functions.php       2017-04-09 17:08:21.941246973 +0900
@@ -232,15 +232,17 @@ function syslog_remove_items($table, $un
                        if ($table == 'syslog_incoming') {
                                if ($remove['method'] != 'del') {
                                        $sql1 = "INSERT INTO `" . $syslogdb_default . "`.`syslog_removed`
-                                               (logtime, priority_id, facility_id, host_id, message)
+                                               (logtime, priority_id, facility_id, program_id, host_id, message)
                                                SELECT TIMESTAMP(`" . $syslog_incoming_config['dateField'] . "`, `" . $syslog_incoming_config['timeField']     . "`),
-                                               priority_id, facility_id, host_id, message
-                                               FROM (SELECT date, time, priority_id, facility_id, host_id, message
+                                               priority_id, facility_id, program_id, host_id, message
+                                               FROM (SELECT si.date AS date, si.time AS time, si.priority_id AS priority_id, si.facility_id AS facility_id, spg.program_id AS program_id, sh.host_id AS host_id, si.message AS message
                                                        FROM `" . $syslogdb_default . "`.`syslog_incoming` AS si
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_facilities` AS sf
-                                                       ON sf.facility=si.facility
+                                                       ON sf.facility_id=si.facility_id
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_priorities` AS sp
-                                                       ON sp.priority=si.priority
+                                                       ON sp.priority_id=si.priority_id
+                                                       INNER JOIN `" . $syslogdb_default . "`.`syslog_programs` AS spg
+                                                       ON spg.program=si.program
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_hosts` AS sh
                                                        ON sh.host=si.host
                                                        WHERE " . $syslog_incoming_config["facilityField"] . "='" . $remove['message'] . "' AND status=" . $uniqueID . ") AS merge";
@@ -269,15 +271,17 @@ function syslog_remove_items($table, $un
                        if ($table == 'syslog_incoming') {
                                if ($remove['method'] != 'del') {
                                        $sql1 = "INSERT INTO `" . $syslogdb_default . "`.`syslog_removed`
-                                               (logtime, priority_id, facility_id, host_id, message)
+                                               (logtime, priority_id, facility_id, program_id, host_id, message)
                                                SELECT TIMESTAMP(`" . $syslog_incoming_config['dateField'] . "`, `" . $syslog_incoming_config['timeField']     . "`),
-                                               priority_id, facility_id, host_id, message
-                                               FROM (SELECT date, time, priority_id, facility_id, host_id, message
+                                               priority_id, facility_id, program_id, host_id, message
+                                               FROM (SELECT si.date AS date, si.time AS time, si.priority_id AS priority_id, si.facility_id AS facility_id, spg.program_id AS program_id, sh.host_id AS host_id, si.message AS message
                                                        FROM `" . $syslogdb_default . "`.`syslog_incoming` AS si
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_facilities` AS sf
-                                                       ON sf.facility=si.facility
+                                                       ON sf.facility_id=si.facility_id
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_priorities` AS sp
-                                                       ON sp.priority=si.priority
+                                                       ON sp.priority_id=si.priority_id
+                                                       INNER JOIN `" . $syslogdb_default . "`.`syslog_programs` AS spg
+                                                       ON spg.program=si.program
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_hosts` AS sh
                                                        ON sh.host=si.host
                                                        WHERE host='" . $remove['message'] . "' AND status=" . $uniqueID . ") AS merge";
@@ -306,15 +310,17 @@ function syslog_remove_items($table, $un
                        if ($table == 'syslog_incoming') {
                                if ($remove['method'] != 'del') {
                                        $sql1 = "INSERT INTO `" . $syslogdb_default . "`.`syslog_removed`
-                                               (logtime, priority_id, facility_id, host_id, message)
+                                               (logtime, priority_id, facility_id, program_id, host_id, message)
                                                SELECT TIMESTAMP(`" . $syslog_incoming_config['dateField'] . "`, `" . $syslog_incoming_config['timeField'] . "`),
-                                               priority_id, facility_id, host_id, message
-                                               FROM (SELECT date, time, priority_id, facility_id, host_id, message
+                                               priority_id, facility_id, program_id, host_id, message
+                                               FROM (SELECT si.date AS date, si.time AS time, si.priority_id AS priority_id, si.facility_id AS facility_id, spg.program_id AS program_id, sh.host_id AS host_id, si.message AS message
                                                        FROM `" . $syslogdb_default . "`.`syslog_incoming` AS si
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_facilities` AS sf
-                                                       ON sf.facility=si.facility
+                                                       ON sf.facility_id=si.facility_id
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_priorities` AS sp
-                                                       ON sp.priority=si.priority
+                                                       ON sp.priority_id=si.priority_id
+                                                       INNER JOIN `" . $syslogdb_default . "`.`syslog_programs` AS spg
+                                                       ON spg.program=si.program
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_hosts` AS sh
                                                        ON sh.host=si.host
                                                        WHERE message LIKE '" . $remove['message'] . "%' AND status=" . $uniqueID . ") AS merge";
@@ -341,15 +347,17 @@ function syslog_remove_items($table, $un
                        if ($table == 'syslog_incoming') {
                                if ($remove['method'] != 'del') {
                                        $sql1 = "INSERT INTO `" . $syslogdb_default . "`.`syslog_removed`
-                                               (logtime, priority_id, facility_id, host_id, message)
+                                               (logtime, priority_id, facility_id, program_id, host_id, message)
                                                SELECT TIMESTAMP(`" . $syslog_incoming_config['dateField'] . "`, `" . $syslog_incoming_config['timeField'] . "`),
-                                               priority_id, facility_id, host_id, message
-                                               FROM (SELECT date, time, priority_id, facility_id, host_id, message
+                                               priority_id, facility_id, program_id, host_id, message
+                                               FROM (SELECT si.date AS date, si.time AS time, si.priority_id AS priority_id, si.facility_id AS facility_id, spg.program_id AS program_id, sh.host_id AS host_id, si.message AS message
                                                        FROM `" . $syslogdb_default . "`.`syslog_incoming` AS si
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_facilities` AS sf
-                                                       ON sf.facility=si.facility
+                                                       ON sf.facility_id=si.facility_id
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_priorities` AS sp
-                                                       ON sp.priority=si.priority
+                                                       ON sp.priority_id=si.priority_id
+                                                       INNER JOIN `" . $syslogdb_default . "`.`syslog_programs` AS spg
+                                                       ON spg.program=si.program
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_hosts` AS sh
                                                        ON sh.host=si.host
                                                        WHERE message LIKE '%" . $remove['message'] . "%' AND status=" . $uniqueID . ") AS merge";
@@ -376,15 +384,17 @@ function syslog_remove_items($table, $un
                        if ($table == 'syslog_incoming') {
                                if ($remove['method'] != 'del') {
                                        $sql1 = "INSERT INTO `" . $syslogdb_default . "`.`syslog_removed`
-                                               (logtime, priority_id, facility_id, host_id, message)
+                                               (logtime, priority_id, facility_id, program_id, host_id, message)
                                                SELECT TIMESTAMP(`" . $syslog_incoming_config['dateField'] . "`, `" . $syslog_incoming_config['timeField'] . "`),
-                                               priority_id, facility_id, host_id, message
-                                               FROM (SELECT date, time, priority_id, facility_id, host_id, message
+                                               priority_id, facility_id, program_id, host_id, message
+                                               FROM (SELECT si.date AS date, si.time AS time, si.priority_id AS priority_id, si.facility_id AS facility_id, spg.program_id AS program_id, sh.host_id AS host_id, si.message AS message
                                                        FROM `" . $syslogdb_default . "`.`syslog_incoming` AS si
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_facilities` AS sf
-                                                       ON sf.facility=si.facility
+                                                       ON sf.facility_id=si.facility_id
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_priorities` AS sp
-                                                       ON sp.priority=si.priority
+                                                       ON sp.priority_id=si.priority_id
+                                                       INNER JOIN `" . $syslogdb_default . "`.`syslog_programs` AS spg
+                                                       ON spg.program=si.program
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_hosts` AS sh
                                                        ON sh.host=si.host
                                                        WHERE message LIKE '%" . $remove['message'] . "' AND status=" . $uniqueID . ") AS merge";
@@ -411,15 +421,17 @@ function syslog_remove_items($table, $un
                        if ($table == 'syslog_incoming') {
                                if ($remove['method'] != 'del') {
                                        $sql1 = "INSERT INTO `" . $syslogdb_default . "`.`syslog_removed`
-                                               (logtime, priority_id, facility_id, host_id, message)
+                                               (logtime, priority_id, facility_id, program_id, host_id, message)
                                                SELECT TIMESTAMP(`" . $syslog_incoming_config['dateField'] . "`, `" . $syslog_incoming_config['timeField'] . "`),
-                                               priority_id, facility_id, host_id, message
-                                               FROM (SELECT date, time, priority_id, facility_id, host_id, message
+                                               priority_id, facility_id, program_id, host_id, message
+                                               FROM (SELECT si.date AS date, si.time AS time, si.priority_id AS priority_id, si.facility_id AS facility_id, spg.program_id AS program_id, sh.host_id AS host_id, si.message AS message
                                                        FROM `" . $syslogdb_default . "`.`syslog_incoming` AS si
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_facilities` AS sf
-                                                       ON sf.facility=si.facility
+                                                       ON sf.facility_id=si.facility_id
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_priorities` AS sp
-                                                       ON sp.priority=si.priority
+                                                       ON sp.priority_id=si.priority_id
+                                                       INNER JOIN `" . $syslogdb_default . "`.`syslog_programs` AS spg
+                                                       ON spg.program=si.program
                                                        INNER JOIN `" . $syslogdb_default . "`.`syslog_hosts` AS sh
                                                        ON sh.host=si.host
                                                        WHERE (" . $remove['message'] . ") AND status=" . $uniqueID . ") AS merge";

Best regards.

Syslog Unable to Load With Large Programs Table (Plus a Solution)

Hi All,

tl;dr Probably need to add a query to cleanup orphaned entries in the syslog_programs table after running removal/delete rules. The following would work:

DELETE FROM syslog_programs where program_id not in (Select program_id from syslog) OR (Select program_id from syslog_removed)


I've had an issue for a while now where after some time of running without a problem, Syslog (the page) will take longer and longer to load, until it finally fails to load entirely - it'll simply display a blank page for several minutes until timeout or if using Chrome, the "Wait/Kill" window appears.

Now I've eventually narrowed it down to the syslog_programs table being quite full - when the table is emptied Syslog loads fine again without an issue, so it is an issue with the syslog_programs table having many entries (e.g. 90,000+ which slows down loading). Emptying the table is a bad idea, though, as syslog won't appear if there's no program_id tying it to syslog_programs.

What's interesting here is that those programs defined in syslog_programs are essentially orphaned - CentOS (this is what our Cacti is running on) is providing a different program ID every time cron runs polling, and I have a removal rule in place to remove any syslog entries created by the host (as these are in the Cacti Log tab). It looks like when Syslog processes the incoming messages, it creates the program entries in the syslog_programs table, and THEN deletes the syslog entry, leaving the entries in the syslog_program tables orphaned and unneeded - when it fills up, syslog slows down and we're stuck in the mud.

I found a temporary solution which I can run by hand, but it may be a good idea to incorporate this into the script for removals? I don't know enough about PHP programming to modify it myself!

So, take a look at the size of the syslog_programs table in this screenshot here and you'll see I have 27,740 entries.

I can find the "orphaned" syslog entries by using the SQL query:
SELECT * FROM syslog_programs where program_id not in (Select program_id from syslog)
See this picture here

I then delete the "orphaned" entries by using the query:
DELETE FROM syslog_programs where program_id not in (Select program_id from syslog)
See picture here
NB: In hindsite should probably use the following in case there are any rules which are for removal instead of deletion: DELETE FROM syslog_programs where program_id not in (Select program_id from syslog) OR (Select program_id from syslog_removed)

And now the table is back down to a reasonable size of 10 programs, see here

At the moment I'm running this query by hand when syslog slows down enough, but I'm thinking this should maybe be incorporated into the script for syslog removals?

Just and idea for a solution to my problems :)

errors when attempting to install syslog

I receive the following errors when attempting to install syslog from Console --> Plugin Management:



2017-01-10 13:15:58 - ERROR PHP WARNING in  Plugin 'syslog': include(/cacti/plugins/syslog/config.php): failed to open stream: No such file or directory in file: /cacti/plugins/syslog/setup.php  on line: 32
2017-01-10 13:15:58 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 32 plugin_syslog_install)(/plugins/syslog/setup.php: 32 CactiErrorHandler)(/lib/functions.php: 4201 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP WARNING in  Plugin 'syslog': include(): Failed opening '/cacti/plugins/syslog/config.php' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in file: /cacti/plugins/syslog/setup.php  on line: 32
2017-01-10 13:15:58 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 32 plugin_syslog_install)(/plugins/syslog/setup.php: 32 CactiErrorHandler)(/lib/functions.php: 4201 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP WARNING in  Plugin 'syslog': include(/cacti/plugins/syslog/config.php): failed to open stream: No such file or directory in file: /cacti/plugins/syslog/setup.php  on line: 145
2017-01-10 13:15:58 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 145 syslog_connect)(/plugins/syslog/setup.php: 145 CactiErrorHandler)(/lib/functions.php: 4201 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP WARNING in  Plugin 'syslog': include(): Failed opening '/cacti/plugins/syslog/config.php' for inclusion (include_path='.:/opt/rh/rh-php56/root/usr/share/pear:/opt/rh/rh-php56/root/usr/share/php') in file: /cacti/plugins/syslog/setup.php  on line: 145
2017-01-10 13:15:58 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 145 syslog_connect)(/plugins/syslog/setup.php: 145 CactiErrorHandler)(/lib/functions.php: 4201 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: database_hostname in file: /cacti/plugins/syslog/setup.php  on line: 150
2017-01-10 13:15:58 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 150 CactiErrorHandler)(/lib/functions.php: 4206 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: syslogdb_hostname in file: /cacti/plugins/syslog/setup.php  on line: 150
2017-01-10 13:15:58 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 150 CactiErrorHandler)(/lib/functions.php: 4206 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: syslogdb_default in file: /cacti/plugins/syslog/setup.php  on line: 151
2017-01-10 13:15:58 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 151 CactiErrorHandler)(/lib/functions.php: 4206 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: syslogdb_hostname in file: /cacti/plugins/syslog/setup.php  on line: 158
2017-01-10 13:15:58 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 158 CactiErrorHandler)(/lib/functions.php: 4206 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: syslogdb_username in file: /cacti/plugins/syslog/setup.php  on line: 158
2017-01-10 13:15:58 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 158 CactiErrorHandler)(/lib/functions.php: 4206 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: syslogdb_password in file: /cacti/plugins/syslog/setup.php  on line: 158
2017-01-10 13:15:58 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 158 CactiErrorHandler)(/lib/functions.php: 4206 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: syslogdb_default in file: /cacti/plugins/syslog/setup.php  on line: 158
2017-01-10 13:15:58 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 158 CactiErrorHandler)(/lib/functions.php: 4206 cacti_debug_backtrace)
2017-01-10 13:15:58 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: syslogdb_type in file: /cacti/plugins/syslog/setup.php  on line: 158
2017-01-10 13:15:58 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 34 syslog_connect)(/plugins/syslog/setup.php: 158 CactiErrorHandler)(/lib/functions.php: 4206 cacti_debug_backtrace)
2017-01-10 13:15:59 - ERROR PHP NOTICE in  Plugin 'syslog': Undefined variable: syslogdb_default in file: /cacti/plugins/syslog/setup.php  on line: 36
2017-01-10 13:15:59 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 36 CactiErrorHandler)(/lib/functions.php: 4206 cacti_debug_backtrace)
2017-01-10 13:15:59 - CMDPHP SQL Backtrace: (/plugins.php: 59 api_plugin_install)(/lib/plugins.php: 521 plugin_syslog_install)(/plugins/syslog/setup.php: 36 syslog_db_fetch_row)(/plugins/syslog/database.php: 83 db_fetch_row)(/lib/database.php: 250 db_fetch_row_prepared)(/lib/database.php: 297 cacti_debug_backtrace)
2017-01-10 13:16:02 - POLLER: Poller[1] NOTE: Detecting Resource Change.  Updating Resource Cache for '/cacti/plugins'

Duplicated partition named when reorganizing

Following discussion on forum.

DB is separated from Cacti BUT on the same host.

Settings at the time it happened

syslog_bug

First noticed the 20th and I found logs going back to the 17th when it seems to have started.

20/Aug/2018 00:52:35 - CMDPHP ERROR: A DB Exec Failed!, Error: Error in list of partitions to DROP
20/Aug/2018 00:52:35 - DBCALL ERROR: A DB Exec Failed!, Error:1507, SQL:'ALTER TABLE syslog.syslog DROP PARTITION d20180522'
20/Aug/2018 00:52:35 - CMDPHP ERROR: A DB Exec Failed!, Error: Error in list of partitions to DROP
20/Aug/2018 00:52:35 - DBCALL ERROR: A DB Exec Failed!, Error:1507, SQL:'ALTER TABLE syslog.syslog DROP PARTITION d20180522'
20/Aug/2018 00:52:35 - CMDPHP ERROR: A DB Exec Failed!, Error: Error in list of partitions to DROP
20/Aug/2018 00:52:35 - DBCALL ERROR: A DB Exec Failed!, Error:1507, SQL:'ALTER TABLE syslog.syslog DROP PARTITION d20180522'
20/Aug/2018 00:52:35 - CMDPHP ERROR: A DB Exec Failed!, Error: Error in list of partitions to DROP
20/Aug/2018 00:52:35 - DBCALL ERROR: A DB Exec Failed!, Error:1507, SQL:'ALTER TABLE syslog.syslog DROP PARTITION d20180522'
20/Aug/2018 00:52:35 - CMDPHP ERROR: A DB Exec Failed!, Error: Error in list of partitions to DROP
20/Aug/2018 00:52:35 - DBCALL ERROR: A DB Exec Failed!, Error:1507, SQL:'ALTER TABLE syslog.syslog DROP PARTITION d20180522'
20/Aug/2018 00:52:35 - CMDPHP ERROR: A DB Exec Failed!, Error: Error in list of partitions to DROP
20/Aug/2018 00:52:35 - DBCALL ERROR: A DB Exec Failed!, Error:1507, SQL:'ALTER TABLE syslog.syslog DROP PARTITION d20180522'
20/Aug/2018 00:52:35 - CMDPHP ERROR: A DB Exec Failed!, Error: Error in list of partitions to DROP
20/Aug/2018 00:52:35 - DBCALL ERROR: A DB Exec Failed!, Error:1507, SQL:'ALTER TABLE syslog.syslog DROP PARTITION d20180522'
20/Aug/2018 00:52:35 - CMDPHP ERROR: A DB Exec Failed!, Error: Error in list of partitions to DROP

17/Aug/2018 00:02:26 - DBCALL ERROR: A DB Exec Failed!, Error:1517, SQL:'ALTER TABLE syslog.syslog REORGANIZE PARTITION dMaxValue INTO ( PARTITION d20180817 VALUES LESS THAN (TO_DAYS('2018-08-18')), PARTITION dMaxValue VALUES LESS THAN MAXVALUE)'
17/Aug/2018 00:02:26 - DBCALL ERROR: A DB Exec Failed!, Error:1517, SQL:'ALTER TABLE syslog.syslog REORGANIZE PARTITION dMaxValue INTO ( PARTITION d20180817 VALUES LESS THAN (TO_DAYS('2018-08-18')), PARTITION dMaxValue VALUES LESS THAN MAXVALUE)'

Log [Total Lines: 3 - Admin View - Additional Filter in Affect]
18/Aug/2018 00:03:52 - DBCALL ERROR: A DB Exec Failed!, Error:1517, SQL:'ALTER TABLE syslog.syslog REORGANIZE PARTITION dMaxValue INTO ( PARTITION d20180818 VALUES LESS THAN (TO_DAYS('2018-08-19')), PARTITION dMaxValue VALUES LESS THAN MAXVALUE)'
18/Aug/2018 00:03:52 - DBCALL ERROR: A DB Exec Failed!, Error:1517, SQL:'ALTER TABLE syslog.syslog REORGANIZE PARTITION dMaxValue INTO ( PARTITION d20180818 VALUES LESS THAN (TO_DAYS('2018-08-19')), PARTITION dMaxValue VALUES LESS THAN MAXVALUE)'
18/Aug/2018 00:03:52 - DBCALL ERROR: A DB Exec Failed!, Error:1517, SQL:'ALTER TABLE syslog.syslog REORGANIZE PARTITION dMaxValue INTO ( PARTITION d20180818 VALUES LESS THAN (TO_DAYS('2018-08-19')), PARTITION dMaxValue VALUES LESS THAN MAXVALUE)'

Log [Total Lines: 1489 - Admin View - No Other Filter in Affect]
17/Aug/2018 00:03:27 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php: 159 syslog_partition_manage)(/plugins/syslog/functions.php: 114 syslog_partition_remove)(/plugins/syslog/functions.php: 166 syslog_db_execute)(/plugins/syslog/database.php: 52 db_execute)(/lib/database.php: 136 db_execute_prepared)(/lib/database.php: 209 cacti_debug_backtrace)
17/Aug/2018 00:03:27 - DBCALL ERROR: A DB Exec Failed!, Error:1507, SQL:'ALTER TABLE syslog.syslog DROP PARTITION d20180519'
17/Aug/2018 00:03:27 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php: 159 syslog_partition_manage)(/plugins/syslog/functions.php: 114 syslog_partition_remove)(/plugins/syslog/functions.php: 166 syslog_db_execute)(/plugins/syslog/database.php: 52 db_execute)(/lib/database.php: 136 db_execute_prepared)(/lib/database.php: 209 cacti_debug_backtrace)
17/Aug/2018 00:03:27 - DBCALL ERROR: A DB Exec Failed!, Error:1507, SQL:'ALTER TABLE syslog.syslog DROP PARTITION d20180519'
17/Aug/2018 00:03:27 - SYSTEM SYSLOG STATS:Time:595.89 Deletes:0 Incoming:37 Removes:0 XFers:37 Alerts:19 Alarms:17 Reports:4
17/Aug/2018 00:03:27 - SYSLOG WARNING: The Syslog Intance Alert 'Cisco DHCP Snooping Alerts' with Severity 'Warning', has been Triggered, Count was '20', and Sequence '2812'
17/Aug/2018 00:02:26 - SYSTEM SYSLOG: Removing old partition 'dd20180519'
17/Aug/2018 00:02:26 - SYSTEM SYSLOG: Removing old partition 'dd20180519'
17/Aug/2018 00:02:26 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php: 159 syslog_partition_manage)(/plugins/syslog/functions.php: 113 syslog_partition_create)(/plugins/syslog/functions.php: 140 syslog_db_execute)(/plugins/syslog/database.php: 52 db_execute)(/lib/database.php: 136 db_execute_prepared)(/lib/database.php: 209 cacti_debug_backtrace)
17/Aug/2018 00:02:26 - DBCALL ERROR: A DB Exec Failed!, Error:1517, SQL:'ALTER TABLE syslog.syslog REORGANIZE PARTITION dMaxValue INTO ( PARTITION d20180817 VALUES LESS THAN (TO_DAYS('2018-08-18')), PARTITION dMaxValue VALUES LESS THAN MAXVALUE)'
17/Aug/2018 00:02:26 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php: 159 syslog_partition_manage)(/plugins/syslog/functions.php: 113 syslog_partition_create)(/plugins/syslog/functions.php: 140 syslog_db_execute)(/plugins/syslog/database.php: 52 db_execute)(/lib/database.php: 136 db_execute_prepared)(/lib/database.php: 209 cacti_debug_backtrace)
17/Aug/2018 00:02:26 - DBCALL ERROR: A DB Exec Failed!, Error:1517, SQL:'ALTER TABLE syslog.syslog REORGANIZE PARTITION dMaxValue INTO ( PARTITION d20180817 VALUES LESS THAN (TO_DAYS('2018-08-18')), PARTITION dMaxValue VALUES LESS THAN MAXVALUE)'
17/Aug/2018 00:02:26 - SYSTEM SYSLOG STATS:Time:321.83 Deletes:0 Incoming:14 Removes:3 XFers:0 Alerts:19 Alarms:0 Reports:4
17/Aug/2018 00:02:26 - SYSTEM SYSLOG: Removing old partition 'dd20180519'
17/Aug/2018 00:02:05 - SYSTEM SYSLOG: Creating new partition 'd20180817'
17/Aug/2018 00:01:24 - SYSTEM SYSLOG STATS:Time:367.35 Deletes:0 Incoming:1 Removes:0 XFers:1 Alerts:19 Alarms:0 Reports:4
17/Aug/2018 00:01:23 - SYSLOG WARNING: The Syslog Intance Alert 'Cisco DHCP Snooping Alerts' with Severity 'Warning', has been Triggered, Count was '14', and Sequence '2811'
17/Aug/2018 00:01:23 - SYSTEM SYSLOG STATS:Time:424.15 Deletes:0 Incoming:0 Removes:0 XFers:0 Alerts:19 Alarms:0 Reports:4
17/Aug/2018 00:00:58 - SYSTEM SYSLOG: Creating new partition 'd20180817'
17/Aug/2018 00:00:15 - SYSTEM SYSLOG: Creating new partition 'd20180817'

Then when I tried to enable it again

20/Aug/2018 16:02:06 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/syslog/syslog_counter.php: 47 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
20/Aug/2018 16:02:06 - ERROR PHP NOTICE in Plugin 'syslog': Undefined index: Auto_increment in file: /usr/share/cacti-1.1.37/plugins/syslog/syslog_counter.php on line: 47
20/Aug/2018 16:02:06 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/syslog/syslog_counter.php: 44 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
20/Aug/2018 16:02:06 - ERROR PHP NOTICE in Plugin 'syslog': Undefined index: Auto_increment in file: /usr/share/cacti-1.1.37/plugins/syslog/syslog_counter.php on line: 44

So it seems that there isn't a way to recover from this state.

It's a bit of a pain because you've got to re create all the rules.

Error: Please rename your config.php.dist file in the syslog directory, and change setup your database before installing.

I am installing syslog on cacti, but when I click the plugin install button it will display an error message: "Error: change the config.php.dist file in the syslog directory and change the database configuration before installing."

I went to config.php.dist and changed the syslogdb_password, the rest left default. I do not know what I have and how I have to change the database

I still have the same problem when I click Install Install.

Can someone help me?

Alert rule

Hello,

This is my alert rule.
alert_rule


This is my syslog setting.
syslog_setting
When the rule was triggered,I received the mail, but found the content was null.
pls help me what shoud I do?

tks,
David

syslog_incoming is filling, but not being processed

I'm on the latest commit of cacti (712f4b2) and syslog (dffcc6e).
I have separate mysql users for my cacti and cacti_syslog DB, but the DB-specific users have access to each others DBs.
I'm curious why none of the entries from the syslog_incloming table are being processed? I don't see any errors in the cacti.log file or the mysqld.log file.

Feature request: Graphs for triggered alerts

It would be VERY useful to be able to graph how many times a particular syslog alert has been triggered over time, and also the number of times the same specific alert has come in within the poller interval period, for alerts that have thresholds before they trigger.

No logs showing from Ubiquiti Edgeswitch

Installed and configured, no logs populating from Ubiquiti Edgeswitch devices.

Tested environment with Cisco devices (syslogs show)
Tested with wireshark to show logs were being sent correctly to server

Below is wireshark capture of the log.

5 26.326881061 172.16.0.11 → 172.16.0.6 Syslog 194 USER.NOTICE: Jan 22 04:52:53 devicename TRAPMGR[trapTask]: traputil.c(735) 43784 %% Session 0 of type 3 ended for user username connected from 172.16.0.8.\000

Cacti 1.2.0 Latest - Syslog Latest - Search Error

Hi,
search filter for syslog statistics didn't work:

2018/05/16 16:10:37 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog.php: 96 syslog_statistics)(/plugins/syslog/syslog.php: 263 syslog_db_fetch_cell)(/plugins/syslog/database.php: 72 db_fetch_cell)(/lib/database.php: 245 db_fetch_cell_prepared)(/lib/database.php: 292 cacti_debug_backtrace)
2018/05/16 16:10:37 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog.php: 96 syslog_statistics)(/plugins/syslog/syslog.php: 248 get_stats_records)(/plugins/syslog/syslog.php: 389 syslog_db_fetch_assoc)(/plugins/syslog/database.php: 101 db_fetch_assoc)(/lib/database.php: 372 db_fetch_assoc_prepared)(/lib/database.php: 413 cacti_debug_backtrace)
2018/05/16 16:10:37 - DBCALL ERROR: SQL Assoc Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP BY sh.host, sh.host, sf.facility, sp.priority, spr.program, UNIX_TIMESTAMP' at line 1
2018/05/16 16:10:37 - DBCALL ERROR: SQL Assoc Failed!, Error:1064, SQL:'SELECT sh.host, sf.facility, sp.priority, spr.program, sum(ss.records) AS records, FROM_UNIXTIME(TRUNCATE(UNIX_TIMESTAMP(insert_time)/300,0)*300) AS insert_time FROM cacti.syslog_statistics AS ss LEFT JOIN cacti.syslog_facilities AS sf ON ss.facility_id=sf.facility_id LEFT JOIN cacti.syslog_priorities AS sp ON ss.priority_id=sp.priority_id LEFT JOIN cacti.syslog_programs AS spr ON ss.program_id=spr.program_id LEFT JOIN cacti.syslog_hosts AS sh ON ss.host_id=sh.host_id WHERE ss.program_id= GROUP BY sh.host, sh.host, sf.facility, sp.priority, spr.program, UNIX_TIMESTAMP(insert_time) DIV 300 ORDER BY host ASC LIMIT 0,100'
2018/05/16 16:10:37 - CMDPHP Input Validation Not Performed for 'program' Backtrace: (/plugins/syslog/syslog.php: 96 syslog_statistics)(/plugins/syslog/syslog.php: 248 get_stats_records)(/plugins/syslog/syslog.php: 354 get_request_var)(/lib/html_utility.php: 328 html_log_input_error)(/lib/html_validate.php: 44 cacti_debug_backtrace)
2018/05/16 16:10:34 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog.php: 96 syslog_statistics)(/plugins/syslog/syslog.php: 263 syslog_db_fetch_cell)(/plugins/syslog/database.php: 72 db_fetch_cell)(/lib/database.php: 245 db_fetch_cell_prepared)(/lib/database.php: 292 cacti_debug_backtrace)
2018/05/16 16:10:34 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog.php: 96 syslog_statistics)(/plugins/syslog/syslog.php: 248 get_stats_records)(/plugins/syslog/syslog.php: 389 syslog_db_fetch_assoc)(/plugins/syslog/database.php: 101 db_fetch_assoc)(/lib/database.php: 372 db_fetch_assoc_prepared)(/lib/database.php: 413 cacti_debug_backtrace)
2018/05/16 16:10:34 - DBCALL ERROR: SQL Assoc Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP BY sh.host, sh.host, sf.facility, sp.priority, spr.program, UNIX_TIMESTAMP' at line 1
2018/05/16 16:10:34 - DBCALL ERROR: SQL Assoc Failed!, Error:1064, SQL:'SELECT sh.host, sf.facility, sp.priority, spr.program, sum(ss.records) AS records, FROM_UNIXTIME(TRUNCATE(UNIX_TIMESTAMP(insert_time)/300,0)*300) AS insert_time FROM cacti.syslog_statistics AS ss LEFT JOIN cacti.syslog_facilities AS sf ON ss.facility_id=sf.facility_id LEFT JOIN cacti.syslog_priorities AS sp ON ss.priority_id=sp.priority_id LEFT JOIN cacti.syslog_programs AS spr ON ss.program_id=spr.program_id LEFT JOIN cacti.syslog_hosts AS sh ON ss.host_id=sh.host_id WHERE ss.host_id=245 AND ss.program_id= GROUP BY sh.host, sh.host, sf.facility, sp.priority, spr.program, UNIX_TIMESTAMP(insert_time) DIV 300 ORDER BY host ASC LIMIT 0,100'
2018/05/16 16:10:34 - CMDPHP Input Validation Not Performed for 'program' Backtrace: (/plugins/syslog/syslog.php: 96 syslog_statistics)(/plugins/syslog/syslog.php: 248 get_stats_records)(/plugins/syslog/syslog.php: 354 get_request_var)(/lib/html_utility.php: 328 html_log_input_error)(/lib/html_validate.php: 44 cacti_debug_backtrace)

thanks

syslog/syslog.sql issues.

Sorry, I'm not good at English and PHP...

in [syslog/syslog_process.php 2.0] line: 213

/* CODE START ----------------------------------------------------------------/
/
tally statistics for this interval /
if (read_config_option('syslog_statistics') == 'on') {
syslog_db_execute('INSERT INTO ' . $syslogdb_default . '.syslog_statistics (host_id, facility_id, priority_id, program_id, insert_time, records)
SELECT host_id, facility_id, priority_id, program_id, NOW(), SUM(records) AS records
FROM (SELECT host_id, facility_id, priority_id, program_id, COUNT(
) AS records
FROM syslog_incoming AS si
INNER JOIN syslog_hosts AS sh
ON sh.host=si.host
INNER JOIN syslog_programs AS sp
ON sp.program=si.program
WHERE status=' . $uniqueID . '
GROUP BY host_id, priority_id, facility_id, program_id) AS merge
GROUP BY host_id, priority_id, facility_id, program_id');
/* CODE END ------------------------------------------------------------------*/

Table 'syslog_statistics' DDL..

PRIMARY KEY (host_id,facility_id,priority_id,insert_time),

Problems will occur in case to...
host_id, facility_id, priority_id, program_id
1, 2, 3, 4
1, 2, 3, 5

insert_time is same if processed at the same time. Conflict with PRIMARY KEY constraints in case to Same host_id, facility_id, priority_id and insert_time and different program_id.

hmm...

I fixed it with BAD KNOWHOW..

I changed DDL...

-- CODE START ------------------------------------------------------------------
CREATE TABLE syslog_statistics (
host_id int(10) unsigned NOT NULL,
facility_id int(10) unsigned NOT NULL,
priority_id int(10) unsigned NOT NULL,
-- program_id int(10) unsigned DEFAULT NULL,
program_id int(10) unsigned NOT NULL DEFAULT 0,
insert_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
records int(10) unsigned NOT NULL,
-- PRIMARY KEY (host_id,facility_id,priority_id,insert_time),
PRIMARY KEY (host_id,facility_id,priority_id,program_id,insert_time),
KEY host_id (host_id),
KEY facility_id (facility_id),
KEY priority_id (priority_id),
KEY program_id (program_id),
KEY insert_time (insert_time)
) ENGINE=InnoDB COMMENT='Maintains High Level Statistics';
-- CODE END --------------------------------------------------------------------

And I executed the following...

insert into syslog_programs (program) values ('UNKNOWN');
select program_id from syslog_programs where program='UNKNOWN'; -- check program_id
update syslog_programs set program_id=0 where program_id=<program_id of 'UNKNOWN'>;

hmm...bitter smile.
Thanks.

Wrong SQL query for separated syslog db

Hi, I'm opening this as a bug to not mess up #9 issue.

At the end what I thought it was the syslog table, was the syslog database name.

I'm getting this error by simply adding a new alert rule using 'hostname is'. I'm surprised nobody else has got this issue.

DBCALL ERROR: SQL Assoc Failed!, Error:1054, SQL:'SELECT * FROM `syslog`.`syslog_incoming` WHERE host_id='myswitch3' AND status=2'
--
13/Nov/2017 15:10:56 - DBCALL ERROR: SQL Assoc Failed!, Error: Unknown column 'host_id' in 'where clause'

So I think there shouldn't be an space between the two if we intend to query FROM database.table, right?

Undefined Indexes min and hour

Running latest commits for cacti 1.0.0 and syslog plugin.

From cacti.log:

2016-08-26 16:25:38 - ERROR PHP NOTICE in Plugin 'syslog': Undefined index: min in file: /var/www/html/cacti/plugins/syslog/syslog_process.php on line: 527
2016-08-26 16:25:38 - CMDPHP PHP ERROR Backtrace: (/plugins/syslog/syslog_process.php: 527 CactiErrorHandler)(/lib/functions.php: 4108 cacti_debug_backtrace)
2016-08-26 16:25:38 - ERROR PHP NOTICE in Plugin 'syslog': Undefined index: min in file: /var/www/html/cacti/plugins/syslog/syslog_process.php on line: 528
2016-08-26 16:25:38 - CMDPHP PHP ERROR Backtrace: (/plugins/syslog/syslog_process.php: 528 CactiErrorHandler)(/lib/functions.php: 4108 cacti_debug_backtrace)
2016-08-26 16:25:38 - ERROR PHP NOTICE in Plugin 'syslog': Undefined index: hour in file: /var/www/html/cacti/plugins/syslog/syslog_process.php on line: 530
2016-08-26 16:25:38 - CMDPHP PHP ERROR Backtrace: (/plugins/syslog/syslog_process.php: 530 CactiErrorHandler)(/lib/functions.php: 4108 cacti_debug_backtrace)

CMDPHP PHP ERROR NOTICE Backtrace:

Hello,Pls help me how to fix it.

tks.

2017/06/26 17:25:59 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_view.php: 313 grow_right_pane_tree)(/lib/html_tree.php: 924 draw_navigation_text)(/lib/functions.php: 2783 CactiErrorHandler)(/lib/functions.php: 4364 cacti_debug_backtrace)
2017/06/26 17:25:59 - ERROR PHP NOTICE: Array to string conversion in file: /home/cacti/lib/functions.php on line: 2783
2017/06/26 17:25:57 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_view.php: 186 top_graph_header)(/lib/functions.php: 3397 include)(/include/top_graph_header.php: 130 draw_navigation_text)(/lib/functions.php: 2783 CactiErrorHandler)(/lib/functions.php: 4364 cacti_debug_backtrace)
2017/06/26 17:25:57 - ERROR PHP NOTICE: Array to string conversion in file: /home/cacti/lib/functions.php on line: 2783
2017/06/26 17:25:57 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_view.php: 186 top_graph_header)(/lib/functions.php: 3397 include)(/include/top_graph_header.php: 63 draw_navigation_text)(/lib/functions.php: 2783 CactiErrorHandler)(/lib/functions.php: 4364 cacti_debug_backtrace)
2017/06/26 17:25:57 - ERROR PHP NOTICE: Array to string conversion in file: /home/cacti/lib/functions.php on line: 2783
2017/06/26 17:25:49 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/syslog/syslog.php: 85 general_header)(/lib/functions.php: 3404 include)(/include/top_general_header.php: 96 draw_navigation_text)(/lib/functions.php: 2783 CactiErrorHandler)(/lib/functions.php: 4364 cacti_debug_backtrace)
2017/06/26 17:25:49 - ERROR PHP NOTICE: Array to string conversion in file: /home/cacti/lib/functions.php on line: 2783
2017/06/26 17:25:49 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/syslog/syslog.php: 85 general_header)(/lib/functions.php: 3404 include)(/include/top_general_header.php: 32 draw_navigation_text)(/lib/functions.php: 2783 CactiErrorHandler)(/lib/functions.php: 4364 cacti_debug_backtrace)
2017/06/26 17:25:49 - ERROR PHP NOTICE: Array to string conversion in file: /home/cacti/lib/functions.php on line: 2783

Syslog report message

Hey Guys,

We are using newest version. But the report only show Date and Message of that syslog. Is there anyway it can display host name and program?

Message contains quotes

When a syslog message contains quotes as part of the message, they are not being escaped/sanitized and results in an SQL error for example:

05/19/2016 12:20:02 PM - CMDPHP ERROR: A DB Exec Failed!, Error:1064, SQL:"INSERT INTO cacti.syslog_logs (seq, alert_id, logseq, logtime, logmsg, host, facility_id, priority_id, count, html) VALUES ("", "2", "2456", "2016-05-19 12:19:26", "Event for ONT "serial #: 49143, vendor: CXNK" at 2016/05/19 12:19:24.95: "ONT Event: Departure -- GPON port "1/2""", "lab_e7_2", "16", "6", "1", "<style type='text/css'>.body { font-size:12pt; font-family:Verdana,Arial,Helvetica,sans-serif;}.table { align:center; width:100%;}.table tr th.th { background: rgba(138,179,105,1); background: -moz-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(138,179,105,1)), color-stop(100%, rgba(63,117,15,1))); background: -webkit-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); background: -o-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); background: -ms-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); background: linear-gradient(to bottom, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8ab369', endColorstr='#3f750f', GradientType=0 );}.th { color: snow; font-weight:bold; vertical-align:bottom; text-align:left;}.td { color:black; font-family:Verdana,Arial,Helvetica,sans-serif; text-align:left;}.h1 { text-align:center; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:16pt;}.p { text-align:left; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:12pt;}</style>

Cacti Syslog Plugin Alert 'E7 ONT Departure'

HostnameDateSeverityPriotityMessage
lab_e7_22016-05-19 12:19:26WarningEvent for ONT "serial #: 49143, vendor: CXNK" at 2016/05/19 12:19:24.95: "ONT Event: Departure -- GPON port "1/2""
") ON DUPLICATE KEY UPDATE alert_id=VALUES(alert_id), logseq=VALUES(logseq), logtime=VALUES(logtime), logmsg=VALUES(logmsg), host=VALUES(host), facility_id=VALUES(facility_id), priority_id=VALUES(priority_id), count=VALUES(count), html=VALUES(html)'

Original syslog message:

May 19 12:19:26 lab_e7_2 : Event for ONT "serial #: 49143, vendor: CXNK" at 2016/05/19 12:19:24.95: "ONT Event: Departure -- GPON port "1/2""

It also causes issues with any resulting alert email message as the message breaks the HTML as well.

Syslog 2.1 database table population issue with new template

Per Cacti Guru User, I am putting in this issue:

Was having an issue with the proper tables being updated in syslog v2.1 while running Cacti v1.1.38. I kept receiving "db error (1054): Unknown column' errors in my database and all my syslogs were going into my SystemEvents table.

I followed the install direction on Github @ https://github.com/Cacti/plugin_syslog regarding the cacti.conf file in the rsyslog dir, but did nothing. I ended up having to copy "$template cacti_syslog,"INSERT INTO syslog_incoming(facility_id, priority_id, program, date, time, host, message)
values (%syslogfacility%, %syslogpriority%, '%programname%', '%timereported:::date-mysql%', '%timereported:::date-mysql%', '%HOSTNAME%', TRIM('%msg%'))", SQL" from the cacti.conf file and add this direclty to my rsyslog.conf file.

Here is a link back to the original thread:
https://forums.cacti.net/viewtopic.php?f=21&t=59097

syslog_reports.php creates two duplicate records.

Sorry again...

When create a new report, two duplicate records are created in the syslog_reports table. Probably because two <form> tags are generated by form_start() and draw_edit_form().
</form> and corresponding <javascript> are also duplicated by form_save_button() and form_end(), too.

[/cacti/plugins/syslog_reports.php]
415: form_start('syslog_reports.php');
416:
417: html_start_box($header_label, '100%', '', '3', 'center', '');
418:
419: draw_edit_form(
420: array(
421: 'config' => array('form_name' => 'chk'),
422: 'fields' => inject_form_variables($fields_syslog_report_edit, (isset($report) ? $report : array()))
423: )
424: );
425:
426: html_end_box();
427:
428: form_save_button('syslog_reports.php', '', 'id');
429:
430: form_end();

I using firefox 52.0.

Best Regards.

Syslog Plugin Installed but not showing up anywhere

I installed the Syslog plugin, enabled it in Plugin Management, and verified plugin permissions were set. I just do not see where to access it. This is a fairly new installation of Cacti on Centos using yum. The syslog_incoming table is being populated when I look at the database. I tried browsing to plugins/syslog/syslog.php, but it just shows a couple of tabs (System Logs and Alert Logs) without any data.

/var/log/cacti/cacti.log does not show any errors.

/var/log/httpd/ssl_error_log shows the following when I browse to plugins/syslog/syslog.php.
[Wed May 17 14:13:23.721518 2017] [:error] [pid 5820] [client x.x.x.x:50549] PHP Fatal error: Call to undefined function syslog_db_fetch_assoc() in /usr/share/cacti/plugins/syslog/syslog.php on line 823

Any advise is welcome.

Installation

Please add info about renaming file config.php.dist to config.php in ~/plugins/syslog directory. Without that you cannot install plugin in web interface.

Install Issue #2

I also ran into this:

[17-May-2016 16:10:02 America/Chicago] PHP Fatal error: Call to undefined function syslog_version() in /var/www/html/cacti/lib/snmpagent.php on line 394

and solved by adding this to setup.php

function syslog_version () {
return plugin_syslog_version();
}

After that, I was able to successfully install.

Plugin + Partitions Per Day + MariaDB

Howdy, scanning through the code, I excitedly found ...

https://github.com/Cacti/plugin_syslog/blob/develop/setup.php
Line 573

if ($db_version >= 5.5) { $fields_syslog_update['dayparts'] = array( 'method' => 'drop_array', 'friendly_name' => __('Partitions per Day', 'syslog'), 'description' => __('Select the number of partitions per day that you wish to create.', 'syslog'), 'value' => '1', 'array' => array( '1' => __('%d Per Day', 1, 'syslog'), '2' => __('%d Per Day', 2, 'syslog'), '4' => __('%d Per Day', 4, 'syslog'), '6' => __('%d Per Day', 6, 'syslog'), '12' => __('%d Per Day', 12, 'syslog') ) ); }

I am using the "Cacti Appliance" generated by (http://www.kevinnoall.com/blog/2015/03/06/cacti-virtual-appliance/centos7_cacti-v1-1-37/), which is Centos 7 and "10.1.34-MariaDB"

Any thoughts in adding another section in support of this MariaDB? And/or pointers on how to "trick" the runtime into permitting Partitions per Day, but with MariaDB?

Grateful for advise / direction

Syslog 2.1 - Doesn't show any register

Hi,
I'm running cacti 1.1.6 and syslog plugin 2.1. When i try to see some syslog register (Syslog tab - System logs), it doesn't show me any of them. But, i added alert roules and when i go to Alert Logs tab, registers are shown me correctly

I made the following,

  • I've check that the syslog plugin was installed correctly.
  • I've set up the config.php correcty.
  • I've checked that syslog messages are comming from devices and they are inserted into syslog_incomming table of MySQL.
  • I've checked that syslog_host table is filling up.
  • I've not have error messages in cacti logs.

So, I'd apprecite if you could tell me what can i see to resolve my issue
Regards.
Rodrigo

'Removal Handling' filtering issue

removal_handling_dropdown

The following error occurred when set the 'Removal Handling' drop down to "Removed Records".

2017-04-09 15:37:42 - DBCALL ERROR: SQL Assoc Failed!, Error:1066, SQL:"SELECT syslog.*, syslog_programs.program, 'remove' AS mtype    FROM `cacti_syslog`.`syslog_removed` AS syslog    LEFT JOIN  `cacti_syslog`.`syslog_programs` AS syslog    ON syslog.program_id=syslog_programs.program_id WHERE logtime BETWEEN '2017-04-09 15:07'    AND '2017-04-09 15:37'    ORDER BY logtime DESC     LIMIT 0,100"
2017-04-09 15:37:42 - DBCALL ERROR: SQL Assoc Failed!, Error: Not unique table/alias: 'syslog'
2017-04-09 15:37:42 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog.php: 94 syslog_messages)(/plugins/syslog/syslog.php: 1354 get_syslog_messages)(/plugins/syslog/syslog.php: 823 syslog_db_fetch_assoc)(/plugins/syslog/database.php: 92 db_fetch_assoc)(/lib/database.php: 320 db_fetch_assoc_prepared)(/lib/database.php: 359 cacti_debug_backtrace)

And I found duplicated alias name.

SELECT 
	syslog.*,
	syslog_programs.program,
	'remove' AS mtype
FROM
	`cacti_syslog`.`syslog_removed` AS syslog
LEFT JOIN
	`cacti_syslog`.`syslog_programs` AS syslog	-- !! Alias 'syslog' is duplicate !!
ON
	syslog.program_id=syslog_programs.program_id
WHERE
	logtime BETWEEN '2017-04-09 15:07'    AND '2017-04-09 15:37'
ORDER BY
	logtime DESC
LIMIT 0,100

I think for fix it, change alias name to 'syslog_programs', or delete 'AS syslog'.

--- syslog.php.orig     2017-04-09 15:46:48.678915810 +0900
+++ syslog.php  2017-04-09 15:47:06.156634877 +0900
@@ -796,7 +796,7 @@ function get_syslog_messages(&$sql_where
                }else{
                        $query_sql = "SELECT syslog.*, syslog_programs.program, 'remove' AS mtype
                                FROM `" . $syslogdb_default . "`.`syslog_removed` AS syslog
-                               LEFT JOIN  `" . $syslogdb_default . "`.`syslog_programs` AS syslog
+                               LEFT JOIN  `" . $syslogdb_default . "`.`syslog_programs`
                                ON syslog.program_id=syslog_programs.program_id " .
                                $sql_where . "
                                $sql_order

I delete 'AS syslog' just like coded around this code, and filter is working cleanly.

Best regards.

sql errors on 2.1

Hi,
I have imported syslog.sql from version 2.1 but in clog I have these errors:
May 14 19:10:12 cacti Cacti[587]: DBCALL: ERROR: SQL Assoc Failed!, Error:1146, SQL:"(SELECT syslog.*, syslog_programs.program, 'main' AS mtype FROM syslog.syslogAS syslog LEFT JOIN syslog.syslog_programs ON syslog.program_id=syslog_programs.program_id WHERE logtime BETWEEN '2017-05-14 18:40' AND '2017-05-14 19:10' ) UNION (SELECT syslog.*, syslog_programs.program, 'remove' AS mtype FROMsyslog.syslog_removedAS syslog LEFT JOIN syslog.syslog_programs ON syslog.program_id=syslog_programs.program_id WHERE logtime BETWEEN '2017-05-14 18:40' AND '2017-05-14 19:10') ORDER BY logtime DESC LIMIT 0,30" May 14 19:10:12 cacti Cacti[587]: DBCALL: ERROR: SQL Assoc Failed!, Error: Table 'syslog.syslog' doesn't exist
how to fix it?

Integration of CEMDB

Hi Folks, any plans to integrate Cisco error message database (CEMDB) into the plugin.

syslog/database.php issues.

Sorry, I'm not good at English and PHP...

in [syslog/database.php 2.0]

/* START CODE --------------------------------------------------------------- */
function syslog_db_replace($table_name, $array_items, $keyCols) {
return db_replace($table_name, $array_items, $keyCols);
}

function syslog_sql_save($array_items, $table_name, $key_cols = 'id', $autoinc = true) {
return sql_save($array_items, $table_name, $key_cols, $autoinc);
}
/* END CODE ----------------------------------------------------------------- */

For example, creating an alert rule with "$use_cacti_db = false;" setting will cause problems. Cacti will try to create record to Cacti-DB.
I changed it to...

/* START CODE --------------------------------------------------------------- */
function syslog_db_replace($table_name, $array_items, $keyCols) {
global $syslog_cnn;
return db_replace($table_name, $array_items, $keyCols, $syslog_cnn);
}

function syslog_sql_save($array_items, $table_name, $key_cols = 'id', $autoinc = true) {
global $syslog_cnn;
return sql_save($array_items, $table_name, $key_cols, $autoinc, $syslog_cnn);
}
/* END CODE ----------------------------------------------------------------- */

It looks like it was solved.
Thanks.

Email HTML not working

When Syslog send mail on HTML format, I recieved HTML code, not HTML mail.

.body { font-size:12pt; font-family:Verdana,Arial,Helvetica,sans-serif; } .table { align:center; width:100%; } .table tr th.th { background: rgba(138,179,105,1); background: -moz-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(138,179,105,1)), color-stop(100%, rgba(63,117,15,1))); background: -webkit-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); background: -o-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); background: -ms-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); background: linear-gradient(to bottom, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8ab369', endColorstr='#3f750f', GradientType=0 ); } .th { color: snow; font-weight:bold; vertical-align:bottom; text-align:left; } .td { color:black; font-family:Verdana,Arial,Helvetica,sans-serif; text-align:left; } .h1 { text-align:center; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:16pt; } .p { text-align:left; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:12pt; } Cacti Syslog Plugin Threshold Alert 'IPMB'Alert NameSeverityThresholdCountMatch StringIPMB Notice 1 5 Unauthenticated IP-MAC address and discarded by IMPB HostnameDateSeverityPriotityMessage172.18.101.122 2017-01-22 20:03:08 Notice 4 Unauthenticated IP-MAC address and discarded by IMPB(IP:, MAC:, Port) 172.18.103.94 2017-02-08 10:30:38 Notice 4 Unauthenticated IP-MAC address and discarded by IMPB(IP:, MAC:, Port) 172.18.103.97 2017-02-08 10:30:38 Notice 4 Unauthenticated IP-MAC address and discarded by IMPB(IP:, MAC:, Port) 172.18.101.127 2017-02-08 10:30:37 Notice 4 Unauthenticated IP-MAC address and discarded by IMPB(IP:, MAC:, Port) 172.18.101.127 2017-02-08 10:30:37 Notice 4 Unauthenticated IP-MAC address and discarded by IMPB(IP:, MAC:, Port)

Also mail recived from root user and email adress. From Email Address and From Display Name not working.

Cannot enable Syslog

Hi, I installed syslog plugin in my cacti machine, but I cannot enable it. I have the next error:
ERROR PHP ERROR in Plugin 'syslog': Call to undefined function get_current_page() in file: /usr/share/cacti/plugins/syslog/setup.php on line: 188
Can you help me, I did not use this plugin before.
I am using cacti v 1.1.2 on Centos 7
syslog v 2.1
Thanks

Plugin hooks?

Cacti log getting spammed with these:

05/17/2016 04:50:02 PM - CMDPHP SQL Backtrace: (/poller_reports.php: 71 include_once)(/include/global.php: 261 include_once)(/include/global_arrays.php: 1383 api_plugin_hook)(/lib/plugins.php: 70 syslog_config_arrays)(/plugins/syslog/setup.php: 915 db_fetch_cell)(/lib/database.php: 175 db_fetch_cell_prepared)(/lib/database.php: 220 cacti_debug_backtrace)
05/17/2016 04:50:02 PM - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php: 80 include)(/include/global.php: 261 include_once)(/include/global_arrays.php: 1383 api_plugin_hook)(/lib/plugins.php: 70 syslog_config_arrays)(/plugins/syslog/setup.php: 915 db_fetch_cell)(/lib/database.php: 175 db_fetch_cell_prepared)(/lib/database.php: 220 cacti_debug_backtrace)
05/17/2016 04:50:02 PM - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php: 80 include)(/include/global.php: 261 include_once)(/include/global_arrays.php: 1383 api_plugin_hook)(/lib/plugins.php: 70 syslog_config_arrays)(/plugins/syslog/setup.php: 914 db_fetch_cell)(/lib/database.php: 175 db_fetch_cell_prepared)(/lib/database.php: 220 cacti_debug_backtrace)
05/17/2016 04:50:02 PM - CMDPHP SQL Backtrace: (/poller_reports.php: 71 include_once)(/include/global.php: 261 include_once)(/include/global_arrays.php: 1383 api_plugin_hook)(/lib/plugins.php: 70 syslog_config_arrays)(/plugins/syslog/setup.php: 914 db_fetch_cell)(/lib/database.php: 175 db_fetch_cell_prepared)(/lib/database.php: 220 cacti_debug_backtrace)
05/17/2016 04:50:02 PM - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php: 80 include)(/include/global.php: 261 include_once)(/include/global_arrays.php: 1383 api_plugin_hook)(/lib/plugins.php: 70 syslog_config_arrays)(/plugins/syslog/setup.php: 915 db_fetch_cell)(/lib/database.php: 175 db_fetch_cell_prepared)(/lib/database.php: 220 cacti_debug_backtrace)

Help : Syslog plugin tab taking long time to load.

My syslog tab under cacti is taking long time to load. Message processing from syslog_incoming seems to be working correctly.

Log frequency per poller cycle is 1100 to 1600.

Cacti Version - 1.1.6
Syslog Version - 2.1
Table - InnoDB
PARTITION - Per Day

==================================

mysql> show create table syslog;
+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| syslog | CREATE TABLE syslog (
facility_id int(10) unsigned DEFAULT NULL,
priority_id int(10) unsigned DEFAULT NULL,
program_id int(10) unsigned DEFAULT NULL,
host_id int(10) unsigned DEFAULT NULL,
logtime datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
message varchar(1024) NOT NULL DEFAULT '',
seq bigint(20) unsigned NOT NULL AUTO_INCREMENT,
KEY seq (seq),
KEY logtime (logtime),
KEY program_id (program_id),
KEY host_id (host_id),
KEY priority_id (priority_id),
KEY facility_id (facility_id)
) ENGINE=InnoDB AUTO_INCREMENT=55207 DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (TO_DAYS(logtime))
(PARTITION d20170422 VALUES LESS THAN (736807) ENGINE = InnoDB,
PARTITION d20170423 VALUES LESS THAN (736808) ENGINE = InnoDB,
PARTITION d20170424 VALUES LESS THAN (736809) ENGINE = InnoDB,
PARTITION d20170425 VALUES LESS THAN (736810) ENGINE = InnoDB,
PARTITION d20170426 VALUES LESS THAN (736811) ENGINE = InnoDB,
PARTITION d20170427 VALUES LESS THAN (736812) ENGINE = InnoDB,
PARTITION d20170428 VALUES LESS THAN (736813) ENGINE = InnoDB,
PARTITION d20170429 VALUES LESS THAN (736814) ENGINE = InnoDB,
PARTITION d20170430 VALUES LESS THAN (736815) ENGINE = InnoDB,
PARTITION d20170501 VALUES LESS THAN (736816) ENGINE = InnoDB,
PARTITION d20170502 VALUES LESS THAN (736817) ENGINE = InnoDB,
PARTITION d20170503 VALUES LESS THAN (736818) ENGINE = InnoDB,
PARTITION d20170504 VALUES LESS THAN (736819) ENGINE = InnoDB,
PARTITION d20170505 VALUES LESS THAN (736820) ENGINE = InnoDB,
PARTITION d20170506 VALUES LESS THAN (736821) ENGINE = InnoDB,
PARTITION d20170507 VALUES LESS THAN (736822) ENGINE = InnoDB,
PARTITION d20170508 VALUES LESS THAN (736823) ENGINE = InnoDB,
PARTITION d20170509 VALUES LESS THAN (736824) ENGINE = InnoDB,
PARTITION d20170510 VALUES LESS THAN (736825) ENGINE = InnoDB,
PARTITION d20170511 VALUES LESS THAN (736826) ENGINE = InnoDB,
PARTITION d20170512 VALUES LESS THAN (736827) ENGINE = InnoDB,
PARTITION d20170513 VALUES LESS THAN (736828) ENGINE = InnoDB,
PARTITION d20170514 VALUES LESS THAN (736829) ENGINE = InnoDB,
PARTITION d20170515 VALUES LESS THAN (736830) ENGINE = InnoDB,
PARTITION d20170516 VALUES LESS THAN (736831) ENGINE = InnoDB,
PARTITION d20170517 VALUES LESS THAN (736832) ENGINE = InnoDB,
PARTITION d20170518 VALUES LESS THAN (736833) ENGINE = InnoDB,
PARTITION d20170519 VALUES LESS THAN (736834) ENGINE = InnoDB,
PARTITION d20170520 VALUES LESS THAN (736835) ENGINE = InnoDB,
PARTITION d20170521 VALUES LESS THAN (736836) ENGINE = InnoDB,
PARTITION d20170522 VALUES LESS THAN (736837) ENGINE = InnoDB,
PARTITION d20170523 VALUES LESS THAN (736838) ENGINE = InnoDB,
PARTITION dMaxValue VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ |
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
bind-address=127.0.0.1
key_buffer = 2048M
innodb_data_file_path = ibdata1:10M:autoextend
max_heap_table_size=4G
max_allowed_packet=16777216
tmp_table_size=64M
join_buffer_size=64M
innodb_buffer_pool_size=16760M
innodb_additional_mem_pool_size=2048M
innodb_flush_log_at_timeout=4
innodb_read_io_threads=32
innodb_write_io_threads=16
innodb_doublewrite=OFF
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.