Files
Thomas Vincent cb29d10426 docs: fix stale version requirements and dead/insecure links (#208)
* docs: update stale PHP/MySQL/MariaDB version requirements

- Requirements.md: PHP 5.4 -> 8.1 (matches 1.2.31+ requirement note)
- Requirements.md: MySQL 5.6 -> 5.7, MariaDB 5.5 -> 10.2 (current minimums)
- Requirements.md: MySQL section header updated to >= 5.7 / 10.2
- Requirements.md, Install-Under-CentOS_LAMP.md,
  Install-Under-CentOS_LEMP.md, Installing-Under-Windows.md:
  comment out innodb_file_format and innodb_large_prefix (removed
  in MySQL 8.0 / MariaDB 10.3+)

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: upgrade http:// links to https:// and fix dead wiki URLs

- Upgrade http:// to https:// in 8 files:
  General-Installing-Instructions.md, Graph-Templates.md,
  How-To-SSH-Tunnels.md, Plugin-Development.md,
  Standards-Code-Formatting.md, Templates.md,
  Upgrading-Cacti-Under-Windows.md
- Replace two dead docs.cacti.net wiki links:
  How-To-SSH-Tunnels.md: old wiki SNMP guide -> Net-SNMP man page
  Plugin-Syslog.md: dead plugin:syslog.config -> plugin_syslog repo

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: fix technically inaccurate MySQL configuration recommendations

- innodb_additional_mem_pool_size: removed in MySQL 5.7.4 / MariaDB 10.0;
  replaced with removal notice in Requirements.md and comments in
  Install-Under-CentOS_LAMP.md and Install-Under-CentOS_LEMP.md
- max_heap_table_size: clarify ">= 5" means ">= 5% of system RAM"
- innodb_buffer_pool_size: clarify ">= 25" means ">= 25% of system RAM"

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: add missing required PHP extensions to Requirements.md

Add dom, mysqlnd, pcntl, Phar, and sqlite3 — all declared as required
in composer.json but absent from the module list. pcntl is Linux-only
(process control for the poller).

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: fix 36 spelling errors across 19 documentation files

Corrections detected by codespell:
- somone->someone, Walkthough->Walkthrough, GUAGE->GAUGE
- asociate->associate, messege->message, therefor->therefore
- get's->gets, Proxys->Proxies, paralelisation->parallelization
- parms->params (6 instances in script data query examples)
- finialise->finalise, buildin->built-in, everytime->every time
- Unistall->Uninstall, resiliant->resilient, build-in->built-in
- requriments->requirements (2 instances), explanitory->explanatory (3 instances)
- fro->for, invole->involve, reulting->resulting
- stauts->status, tge->the

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci: add codespell spelling check workflow for documentation

Adds GitHub Actions workflow that runs codespell==2.4.1 on all Markdown
files on every push/PR to main. Also adds .codespell.cfg to skip binary
and generated files (JSON, shell scripts, HTML, images).

Update .gitignore to allow .github directory (was blocked by .git* glob).

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: improve voice, consistency, and note formatting across 10 files

- Convert passive/impersonal constructions to active voice
- Standardize NOTE -> Note in blockquotes for consistency
- Reformat inline IMPORTANT/Note callouts as blockquotes
- Fix awkward phrasing in LXC container notes
- Consolidate fragmented note bullets into single blockquote

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: fix technical accuracy and correct typos across 10 files

- Requirements.md: clarify Composer is for source/develop installs only;
  RRDtool minimum updated to 1.5+ (1.8+ for 1.3.x); php-snmp section
  rewritten to describe selective fallback behavior; SELinux/AppArmor
  advice reworded to recommend policy exceptions over blanket disable
- Spine.md: fix PHP Script Server range (10 -> 15); fix 'senstivive'
  and 'Davices' typos
- Trees.md: fix broken table rows split across lines; 'Sporting' -> 'Sorting'
- Data-Sources.md: restructure storage table to standard 3-column layout;
  fix '19b' unit typo -> '19kb'
- How-To-SNMP-Custom-Script.md: convert bold/backtick commands to proper
  fenced code blocks; fix 'intex' and 'BNSMPD' typos
- Plugins.md: fix 'onfiguration' typo; fix YouTube thumbnail http -> https;
  fix 'Tuturial' typo
- Standards-Security.md: fix 'invalidate' -> 'invalid'
- template_apache_config.md: fix 'apcache2' -> 'apache2'
- device-template-specific-proxmox.md: replace service file edit with
  drop-in approach; remove ProtectSystem=off/ProtectHome=off; add note
  on minimal required systemd overrides
- resource/xml/query_interface_traffic.php: http -> https URL

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: rename CentOS install guides to Enterprise Linux; fix grammar, logic, and security flaws

- Rename Install-Under-CentOS_LAMP.md → Install-Under-Enterprise-Linux-LAMP.md
- Rename Install-Under-CentOS_LEMP.md → Install-Under-Enterprise-Linux-LEMP.md
- Update README.md ToC links to match new filenames and correct labels

LAMP fixes:
- Title updated to reflect RHEL/Rocky Linux/AlmaLinux coverage
- Fix step numbering: "2.Install" / "3.Enable" missing space after number
- Spine build deps: restructure for EL7/EL8/EL9+ separately; EL8 was
  missing package install after repo enable; EL9+ uses 'crb' not 'powertools'
- SELinux URL: fix quadruple-slash typo; switch to English wiki URL

LEMP fixes:
- Title: "CentOS 7" → "Enterprise Linux (RHEL / Rocky Linux / AlmaLinux)"
- TLS: remove TLSv1 and TLSv1.1 (RFC 8996 prohibited, fails OpenSSL 3.x);
  set ssl_protocols TLSv1.2 TLSv1.3
- Ciphers: remove DH+3DES (Sweet32 / CVE-2016-2183)
- HTTP redirect: uncomment return 301 (comment claiming nginx lacks support
  for 'return' has been wrong since nginx 0.8 / 2009)
- PHP location block: fix 'alias' → 'root' (alias breaks $document_root in
  fastcgi_param SCRIPT_FILENAME); add missing semicolon after index directive
- Cron: poller path was /var/www/html/cacti but install target throughout
  this guide is /usr/share/nginx/html/cacti — align them
- DB: split GRANT...IDENTIFIED BY into CREATE USER + GRANT (IDENTIFIED BY
  on GRANT removed in MySQL 8.0 / MariaDB 10.5.2)
- Fix comment typo: "Compression increases performance0" → remove trailing 0
- SELinux URL: fix quadruple-slash typo

README.md:
- Update section 3.1 and 3.2 links to new filenames
- Correct labels from "CentOS 7" to "Enterprise Linux"
- Fix "Reports Admistrative Interface" → "Administrative"
- Fix "requriments" (×2) → "requirements"

* docs: remove Install-Under-CentOS_LAMP.md (superseded by Install-Under-Enterprise-Linux-LAMP.md)

* docs: remove Install-Under-CentOS_LEMP.md (superseded by Install-Under-Enterprise-Linux-LEMP.md)

* docs: update README ToC links and fix typos

- Update 3.1 and 3.2 links from CentOS to Enterprise Linux filenames
- Correct labels: "CentOS 7" → "Enterprise Linux (RHEL/Rocky/AlmaLinux)"
- Fix "Reports Admistrative" → "Reports Administrative"
- Fix "requriments" (×2) → "requirements"

* docs: fix grammar, logic, and technical errors in remaining install/upgrade guides

Installing-Under-Windows.md:
- Replace php_mysql.dll with php_pdo_mysql.dll (php_mysql removed in PHP 7.0)
- Remove IIS ISAPI steps referencing php8isapi.dll (ISAPI dropped in PHP 8.0);
  replace with FastCGI instructions via php-cgi.exe
- Remove NO_AUTO_CREATE_USER from sql_mode (removed MySQL 8.0, breaks startup)
- sort_buffer_size = 200M → 32M with caveat (per-session; 200M causes OOM under load)
- Fix step numbering gaps: main list 5→8, IIS 3→5, Finishing 5→8
- "you will have to user 8.3 notation" → "use"
- "c:cygwin" → "c:\cygwin" (missing backslash)
- "it's subfolders" → "its subfolders"
- "A anm example" → "An example"
- "verify/udate" → "verify/update"

Installing-Under-Ubuntu-Debian.md:
- Cron user: apache → www-data (apache user does not exist on Ubuntu/Debian)
- CREATE DATABASE: use utf8mb4 directly; remove redundant ALTER DATABASE
- php8.1-mbstring listed twice in apt-get install; deduplicated
- "may received" → "may receive"
- Note php8.1 is EOL; recommend checking current supported release

Upgrading-Cacti-Under-Windows.md:
- Fix all steps numbered 1. → proper sequential numbering (1–10)
- Remove hardcoded MySQL 5.7 path; use generic %MYSQL_HOME% note

Upgrading-Cacti-Under-FreeBSD.md:
- mysqldump: remove contradictory -l / --lock-tables=false flags;
  replace with --single-transaction (correct for InnoDB, no locking)

How-To-SSH-Tunnels.md:
- Add prominent note: SSH -L is TCP-only; standard SNMP uses UDP; this
  guide requires TCP transport configured on snmpd and does not work for
  most network devices
- Fix unclosed code fence after ssh-keygen output block
- Replace rc.local persistence with systemd unit (rc.local is deprecated
  and disabled by default on systemd distros: Ubuntu 16.04+, Debian 9+)
- ssh-keygen: recommend ed25519 over RSA

* docs: correct PHP 8.1 EOL date, Net-SNMP link, and grammar

PHP 8.1 security support ended 31 December 2025, not November 2024. Point the
snmpd.conf link at www.net-snmp.org (the sourceforge.io mirror is bot-blocked).
Fix 'There a two ways extending' to 'There are two ways to extend'.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci: fix spelling workflow trigger to target develop, not main

The repo's default branch is develop; main hasn't moved since 2023.
The workflow's push/pull_request filters targeted main, so it never
ran on any PR opened against develop.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-08-16 20:34:31 +01:00

400 lines
13 KiB
Markdown

# syslog
The syslog plugin is a Cacti plugin that has been around for more than a decade.
It was inspired by the 'aloe' and 'h.aloe' plugins originally developed by the
Cacti users sidewinder and Harlequin in the early 2000's. As you will be able
to see from the ChangeLog, it has undergone several changes throughout the
years, and remains, even today when you have enterprise offering from both
Elastic and Splunk, remains a relevant plugin for small to medium sized
companies.
It provides a simple Syslog event search an Alert generation and notification
interface that can generate both HTML and SMS messages for operations personnel
who wish to receive notifications inside of a data or network operations center.
For log events that continue to be generated frequently on a device, such as
smartd's feature to notify every 15 minutes of an impending drive failure, can
be quieted using syslog's 'Re-Alert' setting.
Syslog also provides multipoller support which allows
for scalability and redundancy by leveraging multiple
servers rules can be created on the main poller and pushed
to the remotes for ease of management or each server can work independently
## Features
* Message filter
* Message search
* Output to screen or file
* Date time picker
* Event Alerter
* Event Removal (for Events you don't want to see)
* Filter events by Cacti Graph window from Cacti's Graph View pages
* Use of native MySQL and MariaDB database partitioning for larger installs
* Remote Log Server connection capabilities
* Custom column mappings between Remote Log Server and required Syslog columns
* Remote poller support
### Notes on upgrades
If you are upgrading to 2.0 from a prior install, you must first uninstall
syslog and ensure both the syslog, syslog_removal, and syslog_incoming tables
are removed, and recreated at install time.
In addition, the rsyslog configuration has changed in 2.5. So, for example, to
configure modern rsyslog for Cacti, you MUST create a file called cacti.conf in
the /etc/rsyslog.d/ directory:
### Cacti Configuration for RSYSLOG
Edit /etc/rsyslog.d/cacti.conf
```console
$ModLoad imudp
$UDPServerRun 514
$ModLoad ommysql
$template cacti_syslog,"INSERT INTO syslog_incoming(facility_id, priority_id,
program, logtime, host, message) \
values (%syslogfacility%, %syslogpriority%, '%programname%',
'%timegenerated:::date-mysql%', '%HOSTNAME%', TRIM('%msg%'))", SQL
*.* >localhost,my_database,my_user,my_password;cacti_syslog
```
This is a change from versions 2.0 to 2.4 and below, which had the following
file format:
```console
$ModLoad imudp
$UDPServerRun 514
$ModLoad ommysql
```
$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
*.* >localhost,my_database,my_user,my_password;cacti_syslog
for centos/rhel systems you will all need to install the rsyslog-mysql package
```shell
yum install rsyslog-mysql
systemctl resatrt rsyslog
```
If you are upgrading to version 2.5 from an earlier version, make sure that you
update this template format and restart rsyslog. You may lose some syslog
data, but doing this in a timely fashion, will minimize data loss.
Ensure you restart rsyslog after these changes are completed. Other logging
servers such as Syslog-NG are also supported with this plugin. Please see some
additional documentation in the [plugin_syslog repository](https://github.com/Cacti/plugin_syslog)
We are using the pure integer values that rsyslog provides to both the priority
and facility in this version syslog, which makes the data collection must less
costly for the database. We have also started including the 'program' syslog
column for searching and storage and alert generation.
### Device setup
To setup log forwarding from your network switches and routers, and from your
various Linux, UNIX, and other operating system devices, please see their
respective documentation.
For Cisco routers switches configuration may look something like this
```console
SW-3750#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW-3750(config)#logging host 192.168.1.194
SW-3750(config)#logging facility local7
SW-3750(config)#logging rate-limit 100
SW-3750(config)#
```
### Mariadb/MYSQL Specific configurations
Finally, it's important, especially in more recent versions of MySQL and MariaDB
to set a correct SQL Mode. These more recent SQL's prevent certain previously
allowable syntax such as an empty data and certain group by limitations in the
SQL itself. Therefore, you need to ensure that the SQL mode of the database is
correct. To do this, first start by editing either `/etc/my.cnf` or
`/etc/my.cnf.d/server.cnf` and inserting the SQL mode variable into the database
configuration. For example:
```ini
[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER
```
After this change, you should log into the mysql server and run the following
command:
```console
mysql> show global variables like 'sql_mode';
```
And ensure that it matches the setting that you placed in the database
configuration. If it does not, please search for the configuration that is
making this SQL mode other than what you required. More recent versions of
MySQL and MariaDB will source multiple database configuration files.
## Installing the plugin
1.) Copy the syslog files over to /var/www/html/cacti/plugins
2.) ensure permissions are correct the files
should typically be owned by the webserver user
```shell
chown -R apache:apache syslog
```
3.) copy config.php.dist to config.php
5.) You have two options for storing syslog information you can either use the existing
Cacti Database or use a dedicated database for syslog as syslog databases especially
for large networks can grow pretty quick it may be wise to create a dedicated database.
To use a dedicated DB first create a database
in mysql and assign a user you will then change
```console
$use_cacti_db = true;
to
$use_cacti_db = false;
```
if you intend to use the cacti DB leave config.php as default
6.) install the plugin in the plugins tab located
in Console >> configuration >> plugins
7.) You will be presented with the plugin install wizard with options on how
you would like the Syslog plugin to be installed options
include DB arch and retention time
### Note retention settings can be changed after install but db architecture will require a reinstall of the plugin
![install advisor](images/syslog_install_advisor.png)
You will also need to ensure the cacti user is granted select on the Syslog database
```shell
GRANT SELECT ON syslog.* TO 'cacti'@'localhost';
```
## SNMP Trap configuration
To leverage SNMP traps as mentioned you will need to install SNMPTT.
SNMPTT is used to translate OID information passed from the device to a readable
format SNMPTT will then write that data into syslog for the Syslog plugin to ingest.
Follow these steps to complete the setup
1.) yum install snmptt
2.) enable snmptt and snmptrapd
```console
systemctl enable snmptrapd
systemctl enable snmptt
systemctl start snmptt
systemctl start snmptrapd
```
3.) Now that snmptt and snmptrapd are started and enabled you will first need to
modify the snmptrapd systemd file to include -on in the startup options
the file is located in /etc/sysconfig/snmptrapd and should look like this after
```console
# snmptrapd command line options
# '-f' is implicitly added by snmptrapd systemd unit file
OPTIONS="-on"
```
4.) Now you need to modify the snmptrapd config file to receive snmptraps by
default snmptrapd will not process any traps until you configure it to do so
you will also need to tell snmptrapd to forward the received traps over to snmptt
Here is an example of configuring snmptrapd to receive snmptraps from a device
using the public snmp string and forwarding it over to snmptt
```console
# Example configuration file for snmptrapd
#
# No traps are handled by default, you must edit this file!
#
# authCommunity log,execute,net public
# traphandle SNMPv2-MIB::coldStart /usr/bin/bin/my_great_script cold
authCommunity log,execute,net public
traphandle default /usr/sbin/snmptthandler
```
after making all of the changes to the snmptrapd configuration restart
the snmptrapd process for the changes to take effect.
5.) configure snmptt.ini to operate in daemon mode
By default snmptt already writes data to syslog all that is left is to configure
daemon mode in snmptt.ini which is located in /etc/snmp
```console
# Set to either 'standalone' or 'daemon'
# standalone: snmptt called from snmptrapd.conf
# daemon: snmptrapd.conf calls snmptthandler
# Ignored by Windows. See documentation
mode = daemon
```
6.) use the snmptt cacti connector
By default since snmptt resides on the syslog server all of the IP information
will appear as if its coming from localhost
to fix this there is a cacti snmptt connector which will format the trap
to be ingested to the syslog db it is located in the contrib folder
## Remote poller deployment options
The syslog plugin can be deployed on each poller or select pollers
each poller will need to be configured with rsyslog
each poller will need to be configured with a syslog config_local file
There are a few deployment approaches
1.) Multiple Pollers with a load balancer for syslog
![multiple Pollers lb](images/syslog-multi-poller-lb.png)
2.) Multiple pollers no balancer but devices send syslog to multiple pollers
![multiple Pollers no lb](images/syslog-multi-poller-no-lb.png)
3.) Multiple pollers but devices are assigned to send Syslog to a specific poller
for example poller A and device A is at one location
![device per poller](images/syslog-device-per-poller.png)
## Remote poller setup
To setup each remote poller you will need to enable and configure
rsyslog with the following steps
1.) decide if you will use the cacti DB or a separate DB
### Note on using the cacti DB as mentioned earlier
You have two options for storing Syslog information you can either use the existing
Cacti Database or use a dedicated database for Syslog as Syslog databases especially
for large networks can grow pretty quickly it may be wise to create a dedicated database.
To use a dedicated DB first create a database in MySQL and assign a user then
```console
$use_cacti_db = true;
to
$use_cacti_db = false;
```
2.) If you decide to use the cacti database simply leave config_local.php default
```console
$use_cacti_db = true;
```
3.) If you decide to use a separate DB fill out the Database detailing config_local.php
4.) create a cacti.conf file in /etc/rsyslog.d and fill out either
your separate DB details or your main cacti DB details
```console
$ModLoad imudp
$UDPServerRun 514
$ModLoad ommysql
$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
*.* >localhost,my_database,my_user,my_password;cacti_syslog
```
5.) install rsyslog-mysql package to allow rsyslog to write to mysql
```console
yum install rsyslog-mysql
```
6.) restart rsyslog
```console
systemctl restart rsyslog
```
7.) if you would like for rules to be replicated from the main poller
to the remotes you will need to enable the following syslog settings
found in configuration >> settings >> syslog
![syslog settings ](images/syslog-multipoller-settings.png)
### note rules will be replicated within one polling cycle to the remote pollers
if you wish to have each poller operate independently there is no need to enable
these options.
### Syslog Alert Rules
Alert rules are used to generate alerts in the cacti log they are also used
to send out email alerts and command execution to cut tickets to upstream ticketing
systems or perform initial troubleshooting scripts can also be leveraged
to call on services such as slack or trello for alerting teams.
you can leverage the built in variable substitution to format the input to the script
![Alert Rules](images/syslog-alert-messeges.png)
### Syslog Removal Rules
The Syslog plugin allows administrators to delete incoming messages
so they are not stored in the DB.
For example, if you are not interested in seeing Syslog messages
every time a user logs into a device you may add a rule to delete the message.
to do this click on the Syslog settings tab in the console then click removal rules
![Removal Rules](images/syslog-remove-messeges.png)
## Possible Bugs and Feature Enhancements
Bug and feature enhancements for the syslog plugin are handled in GitHub. If you
find a first search the Cacti forums for a solution before creating an issue in
GitHub.
## Authors
The syslog plugin has been in development for well over a decade with increasing
functionality and stibility over that time. There have been several contributors
to thold over the years. Chief amongst them are Jimmy Conner, Larry Adams,
SideWinder, and Harlequin. We hope that version 2.0 and beyond are the most
stable and robust versions of syslog ever published. We are always looking for
new ideas. So, this won't be the last release of syslog, you can rest assured of
that.
---
Copyright (c) 2004-2026 The Cacti Group