Skip to content

Need help on Alerts Rules not working anymore #459

Closed

Description

@arno-st

Hello,
In the latest syslog 5.0, I saw my old alert rules, so far so good, but none are processed.

Example I have rule that check for the message as SQL Expression:

`message` LIKE '%SYS-5-CONFIG_I: Configured from%'

So any change of a config, should move the message under alert.
This message should be selected:
Nov 17 08:25:27.184: %SYS-5-CONFIG_I: Configured from console by <user> on vty0 (172.21.10.94)
An using the test rule function didn't show it either.
Any path to check it why ?
And I read that some alert rules has to be moved to device alert, but I have general rule, that need to be applied for all devices.

Activity

  1. somethingwithproof commented on Nov 17, 2026

    @somethingwithproof
    Member

    Your SQL expression matches in an isolated Docker instance running Syslog develop 6c8238f, PHP 8.2.35, MariaDB 11.8 and Cacti 1.2.x (bc5a1a1). I queued a message with the same %SYS-5-CONFIG_I: Configured from text and ran the real syslog_process.php --debug:

    Before processing: SQL rule preview count=1
    Processing Alerts...
    Found       1 - Alert Rule(s) to process
    Found       1 - Matching Records.
    Alert Rule 'issue-459-repro' has been triggered
    Moved       1 - Message(s) to the syslog table
    After processing: SQL rule preview count=0
    

    The message was recorded in syslog_logs as well as the main syslog table. For SQL Expression rules, “Test rule” only queries syslog_incoming; it does not search messages already processed into the main table. A zero preview after processing does not establish that the rule failed. Filter Builder rules have a historical preview fallback, but legacy SQL rules do not.

    A general message rule can stay under Alert Rules. I also processed matching messages from two different hosts with the same rule and no Device Alert Rules configured. Device Alert Rules provide device handling such as muting and maintenance exceptions; this expression does not need to be moved there.

    First check whether Syslog is still enabled: #458 reproduces a fatal error that makes Cacti disable the plugin, which would prevent subsequent processing. After re-enabling it, avoid “Save view defaults” until that bug is fixed. With a new matching message queued, run the following as the normal poller account, from the Cacti directory, when another Syslog processor is not running:

    php -q plugins/syslog/syslog_process.php --debug

    If it still does not alert, please share the relevant “Processing Alerts” output, any SQL errors, and the rule's enabled state, reporting method/threshold, destination and suppression/maintenance settings, with private data redacted. The matching path works in this test; the cause on your upgraded instance still needs those details.

  2. somethingwithproof commented on Nov 17, 2026

    @somethingwithproof
    Member

    Related fix in #460: saving view defaults no longer disables Syslog, and SQL Expression previews now explain that they search only queued incoming messages. The general SQL alert rule matched and generated alerts in the Docker test. This issue remains open and marked unverified until we can confirm whether re-enabling Syslog resolves processing on the upgraded installation or inspect the processor output requested above.

  3. arno-st commented on Nov 18, 2026

    @arno-st
    ContributorAuthor

    So quick return, here is the output of the debug

    php -q plugins/syslog/syslog_process.php --debug
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Syslog Table IS Partitioned
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Max Sequence ID = 66929973
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Found      55 - New Message(s) to process
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Updating Reference Tables from New Syslog Records
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Processing Removal Rules...
    12:46:24 SYSLOG DEBUG: Found       8 - Removal Rule(s) to process
    12:46:24 SYSLOG DEBUG: Removed    54 - Record(s) from syslog_incoming
    12:46:24 SYSLOG DEBUG: Xferred    54 - Record(s) to the syslog_removed table
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Processing Alerts...
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Found       6 - Alert Rule(s) to process
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Processing    - Config changed
    12:46:24 SYSLOG DEBUG: Format/CSS Ok - Report Tag missing
    12:46:24 SYSLOG DEBUG: Found       0 - Matching Records.
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Processing    - MariaDB
    12:46:24 SYSLOG DEBUG: Format/CSS Ok - Report Tag missing
    12:46:24 SYSLOG DEBUG: Found       0 - Matching Records.
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Processing    - ACI
    12:46:24 SYSLOG DEBUG: Format/CSS Ok - Report Tag missing
    12:46:24 SYSLOG DEBUG: Found       0 - Matching Records.
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Processing    - PKI error
    12:46:24 SYSLOG DEBUG: Format/CSS Ok - Report Tag missing
    12:46:24 SYSLOG DEBUG: Found       0 - Matching Records.
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Processing    - WSREP
    12:46:24 SYSLOG DEBUG: Format/CSS Ok - Report Tag missing
    12:46:24 SYSLOG DEBUG: Found       0 - Matching Records.
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Moving or Removing Processed Records
    12:46:24 SYSLOG DEBUG: Moved       1 - Message(s) to the syslog table
    12:46:24 SYSLOG DEBUG: Deleted     1 - Already Processed Message(s) from incoming
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Processing Reports...
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Format/CSS Ok - Report Tag missing
    12:46:24 SYSLOG DEBUG: We have 0 Reports in the database to check
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Post Processing/Maintenance of Syslog Tables
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Deleted     0 - Syslog alarm log Record(s)
    12:46:24 SYSLOG DEBUG: Deleted     0 - Syslog Host Record(s)
    12:46:24 SYSLOG DEBUG: Deleted     0 - Old programs from programs table
    12:46:24 SYSLOG DEBUG: Deleted     0 - Syslog Host/Facility Record(s)
    12:46:24 SYSLOG DEBUG: -------------------------------------------------------------------------------------
    12:46:24 SYSLOG DEBUG: Time:0.11 Deletes:0 Incoming:55 Removes:54 XFers:54 Alerts:6 Alarms:0 Reports:0
    
  4. added a commit that references this issue on Nov 18, 2026
    37df2a0
  5. arno-st commented on Nov 19, 2026

    @arno-st
    ContributorAuthor

    It's look like It's working, at least I got 1 events who was put in the 'alert' view.

    It's a validation setup, so I have less than my prod config.. And I don't have that much error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions