Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

* docs: Add a NOTICE file and a SPDX `.license` file for every recommendation catalogue, and `copyright`, `license`, `license_url` and `source` fields in each catalogue's JSON. The vendor-derived catalogues are marked as separate works aggregated with the plugin and not licensed under the GPL; the NVIDIA catalogue's Cumulus Linux records are identified as CC BY-NC-SA 4.0
* change: The Cisco recommendation catalogue (docs/cisco.json.gz) is no longer loaded automatically on install or upgrade; every catalogue is now imported only on request. Records an earlier upgrade loaded are kept
* feature: Add a manually importable, hand-written Linux recommendation catalogue in docs/linux-curated.json.gz: 70 pattern recommendations with recommended actions for kernel memory, lockup, crash, hardware, storage, filesystem, RAID, network, time, authentication, security-module, systemd and logging messages, built from contrib/recommendations/linux-curated.json, whose sample messages the unit tests replay
* feature: Among matching pattern recommendations, the details flyout now shows those with a recommended action first, so curated advice wins over description-only records whichever catalogue was imported first; patterns are now stored exactly as written instead of having surrounding spaces trimmed
* feature: Add a manually importable Linux pattern recommendation catalogue in docs/linux-wazuh.json.gz with 411 records converted from 315 rules of the Wazuh 4.14.11 ruleset (GPL-2.0), covering core Linux services, mail, network services and databases; contrib/recommendations/extract_wazuh_rules.py converts the rules and decoders, and build_catalogues.py now keeps the regex and program fields
* docs: Add a Recommendation sources and licensing table to the README naming, for every bundled catalogue, its vendor, source, copyright holder and license, and how it was obtained
* feature: Add pattern recommendations. A recommendation may carry a PCRE pattern (`regex`) and an optional syslog program (`program`, which may start or end with a `*` wildcard); it is then matched by the pattern instead of its identifier, after identifier matches, and applies to every sender except a Cacti device recognised as a different vendor. Patterns are validated on save and import (they must compile, be at most 1,024 characters and not match an empty message), run under a reduced PCRE backtracking limit, and are loaded once per request (at most 2,000, within PHP's compiled-pattern cache). Flagging a page of messages runs at most 200,000 pattern evaluations, and a failed pattern load reports that recommendations could not be loaded. The Recommendations page gains Pattern and Program fields, a Pattern column and a Match By filter; import and export carry the new fields only for records that use them. Upgrades add the `regex` and `program` columns to `syslog_recommendations`
Expand Down
3 changes: 3 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Openly licensed catalogues, distributed under their own licenses:
Trend Micro, Inc. (OSSEC). GPL-2.0-only, so the
"or later" option of the plugin's license does
not extend to this file.
docs/linux-curated.json.gz Written for this plugin (source:
contrib/recommendations/linux-curated.json).
Copyright The Cacti Group. GPL-2.0-or-later.

Vendor-derived catalogues:

Expand Down
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -850,15 +850,18 @@ matched by that regular expression instead, and its identifier only names it
that does not compile, contains control characters or line breaks, is longer
than 1,024 characters, or matches an empty message (and therefore every
message) is rejected, as is a program without a pattern.
* Pattern recommendations are tried after identifier recommendations, oldest
first. At most 2,000 of them are used, which keeps them within PHP's cache of
compiled patterns. A pattern that needs excessive backtracking on a message is
treated as not matching it. When a page of messages is flagged, pattern
checks stop after 200,000 pattern evaluations, so a very large page (such as
Show All) cannot stall the request; rows beyond that point show only
identifier matches, and opening a message still lists its pattern matches.
* A pattern recommendation with the same vendor, message and explanation as one
already matched is skipped, so a recommendation split into several patterns
* Pattern recommendations are shown after identifier recommendations. Among
matching patterns, those with a recommended action come first, then the
oldest, so curated advice is preferred over description-only records
whichever catalogue was imported first. At most 2,000 of them are used, which
keeps them within PHP's cache of compiled patterns. A pattern that needs
excessive backtracking on a message is treated as not matching it. When a
page of messages is flagged, pattern checks stop after 200,000 pattern
evaluations, so a very large page (such as Show All) cannot stall the
request; rows beyond that point show only identifier matches, and opening a
message still lists its pattern matches.
* A pattern recommendation with the same vendor, message, explanation and
recommended action as one already matched is skipped, so a recommendation split into several patterns
(for example one per program) is listed once.

```json
Expand Down Expand Up @@ -916,6 +919,7 @@ lists the source documents, versions and retrieval dates of each file, and
| `docs/mikrotik.json.gz` | MikroTik | 11 | RouterOS has no message IDs and MikroTik publishes no message catalogue; only documented messages that carry a distinctive word are included (for example `hashtype`, `auto-initialization`, `hw-limit`, `bpdu-guard`, `CTSYNC`, `deassigned`). |
| `docs/linux.json.gz` | Linux | 102 | systemd's journal message catalog (systemd v262.2), keyed on the 32-digit hexadecimal journal `MESSAGE_ID`, such as `be02cf6855d2428ba40df7e9d022f03d` for a failed unit start. Covers units, PID 1, journald, logind, core dumps, the OOM killer, shutdown and time changes. Only matches when the forwarder appends the ID; see [Linux and systemd message IDs](#linux-and-systemd-message-ids). |
| `docs/linux-wazuh.json.gz` | Linux | 411 | [Pattern recommendations](#pattern-recommendations) converted from the Wazuh 4.14.11 ruleset: core Linux (syslog, kernel, sshd, PAM, su, sudo, systemd, auditd, AppArmor, firewalld, Docker, USB), mail (Postfix, Sendmail, Exim, Dovecot, Courier and others), network services (BIND, Unbound, FTP servers, Samba, Apache, nginx, Squid, OpenVPN and others) and databases and applications (MySQL, MariaDB, PostgreSQL, MongoDB, Redis, ClamAV, Puppet, FreeIPA). Matched by message text and program, so no forwarder change is needed. Explanations are Wazuh's one-line rule descriptions with its classification; there are no recommended actions. |
| `docs/linux-curated.json.gz` | Linux | 70 | Hand-written pattern recommendations **with recommended actions** for the most important Linux kernel and service messages: out-of-memory kills, soft and hard lockups, hung tasks, RCU stalls, panics and oopses, machine-check and EDAC memory errors, thermal events, block, SATA, SCSI and NVMe errors, ext4, XFS and Btrfs errors, read-only remounts, full filesystems, software RAID, SMART, multipath, NFS and iSCSI, link, bonding, NIC and connection-tracking problems, time synchronisation, sshd, sudo, PAM, SELinux, AppArmor and audit events, systemd unit failures and crashes, and journald and rsyslog message loss. Import it together with `docs/linux-wazuh.json.gz`: recommendations with an action are shown first. |

Numeric identifiers, such as HPE event IDs, Fortinet log IDs and FRRouting
error codes, only match messages from a Cacti device whose vendor is recognised
Expand Down Expand Up @@ -1015,9 +1019,11 @@ it applies to and where its records come from. **Copyright and license** names
who owns the source material and the terms it is published under. **How it was
obtained** summarises how the records were produced.

Two catalogues come from openly licensed sources: the systemd catalogue
(LGPL-2.1-or-later) and the Wazuh-derived catalogue (GPL-2.0 only, so the
plugin's "or later" option does not extend to that file). Those records keep
Three catalogues are openly licensed: the systemd catalogue
(LGPL-2.1-or-later), the Wazuh-derived catalogue (GPL-2.0 only, so the
plugin's "or later" option does not extend to that file), and the curated
Linux catalogue, which was written for this plugin and is covered by its own
GPL-2.0-or-later. Those records keep
their source's license and copyright notices. All the others are condensed from
vendors' public documentation, which remains the copyright of the vendor under
the website terms linked below. They are **not covered by this plugin's GPL**:
Expand Down Expand Up @@ -1051,6 +1057,7 @@ advice. Source documents, versions and retrieval dates are listed in
| Juniper | `docs/juniper.json.gz` | Juniper System Log Explorer (EX Series `ESWD` messages) | © Juniper Networks, Inc.; proprietary documentation, [Juniper Legal Notices](https://www.juniper.net/us/en/legal-notices.html) | Hand-curated from 14 EX Series entries in Juniper's public System Log Explorer. |
| Linux | `docs/linux.json.gz` | systemd journal message catalog (systemd v262.2) | systemd contributors; open source, [LGPL-2.1-or-later](https://github.com/systemd/systemd/blob/v262.2/catalog/systemd.catalog.in) | Converted from systemd's `catalog/systemd.catalog.in` with `contrib/recommendations/extract_systemd_catalog.py`. |
| Linux | `docs/linux-wazuh.json.gz` | Wazuh ruleset 4.14.11 (rules and decoders, based on OSSEC) | © Wazuh Inc., portions © Trend Micro Inc.; open source, [GPL-2.0](https://github.com/wazuh/wazuh/blob/v4.14.11/LICENSE) | Converted from the Wazuh rule and decoder XML with `contrib/recommendations/extract_wazuh_rules.py`. |
| Linux | `docs/linux-curated.json.gz` | Written for this plugin; each record's `reference` links to the Linux kernel, man page or project documentation it relies on | © The Cacti Group; open source, [GPL-2.0-or-later](LICENSE), the plugin's own license | Written for this plugin from the linked documentation and kept, with sample messages that the unit tests check, in `contrib/recommendations/linux-curated.json`. |
| MikroTik | `docs/mikrotik.json.gz` | RouterOS documentation pages on help.mikrotik.com | MikroTik; no license or terms are stated for the documentation | Hand-picked from messages documented on public RouterOS help pages. |
| Nokia | `docs/nokia.json.gz` | SR OS 25.10 Log Events Guide | © Nokia; proprietary documentation, [Nokia Terms of Use](https://www.nokia.com/notices/terms/) | Extracted from the public SR OS Log Events Guide HTML pages. |
| NVIDIA | `docs/nvidia.json.gz` | Cumulus Linux 5.18 switchd and FRRouting Log Message References, Xid errors, Fabric Manager SXid errors | © NVIDIA Corporation & affiliates. The Cumulus Linux switchd and FRRouting records come from NVIDIA networking documentation licensed [CC BY-NC-SA 4.0](https://docs.nvidia.com/networking-ethernet-software/license/) (non-commercial sharing with attribution, under the same license; not GPL-compatible). The Xid and SXid records come from documentation under the [NVIDIA Terms of Service](https://www.nvidia.com/en-us/about-nvidia/terms-of-service/). The FRRouting `[EC nnnnnnnn]` code numbers are defined by the GPL-2.0-or-later FRRouting software. | Extracted from NVIDIA's public Cumulus Linux, Xid and Fabric Manager documentation. |
Expand Down
9 changes: 6 additions & 3 deletions contrib/recommendations/build_catalogues.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
the plugin's docs/ directory.

Usage: build_catalogues.py VENDOR < extracted/<vendor>.json
VENDOR is one of: arista cisco dell fortinet hpe huawei juniper linux linux-wazuh mikrotik nokia nvidia
paloalto
VENDOR is one of: arista cisco dell fortinet hpe huawei juniper linux linux-curated linux-wazuh mikrotik
nokia nvidia paloalto

For linux, the extracted JSON comes from extract_systemd_catalog.py; for
linux-wazuh, from extract_wazuh_rules.py. cisco and juniper have no extractor;
linux-wazuh, from extract_wazuh_rules.py. linux-curated is built from the
hand-written contrib/recommendations/linux-curated.json. cisco and juniper have no extractor;
refresh their licensing metadata without touching their records with
build_catalogues.py --metadata-only cisco (it reads docs/cisco.json.gz itself).

Expand Down Expand Up @@ -64,6 +65,8 @@
'linux': ('systemd contributors', 'LGPL-2.1-or-later',
'https://github.com/systemd/systemd/blob/v262.2/LICENSE.LGPL2.1',
'https://github.com/systemd/systemd/blob/v262.2/catalog/systemd.catalog.in'),
'linux-curated': ('The Cacti Group', 'GPL-2.0-or-later', 'https://github.com/Cacti/plugin_syslog/blob/develop/LICENSE',
'Written for the Cacti syslog plugin: contrib/recommendations/linux-curated.json'),
'linux-wazuh': ('Wazuh, Inc.; Trend Micro, Inc. (OSSEC)', 'GPL-2.0-only',
'https://github.com/wazuh/wazuh/blob/v4.14.11/LICENSE',
'https://github.com/wazuh/wazuh/tree/v4.14.11/ruleset'),
Expand Down
Loading
Loading