Skip to content

Conversation

@bmfmancini
Copy link
Member

No description provided.

@bmfmancini bmfmancini requested a review from TheWitness April 16, 2025 02:04
bmfmancini and others added 6 commits April 15, 2025 22:12
mismathc between syslog_incoming and syslog table
Don't assume that $hosts returns an array, it can return false, which will generate a fatal error.
More light formatting.
@bmfmancini bmfmancini requested a review from Copilot November 21, 2025 02:20
Copilot finished reviewing on behalf of bmfmancini November 21, 2025 02:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds functionality to map syslog hosts (particularly those sending from IP addresses) to their corresponding Cacti host descriptions, and increases the syslog message column size to accommodate longer messages.

  • Adds a new configuration option to enable mapping syslog hosts to Cacti database hosts
  • Increases the message column size from 1024 to 2048 characters in the partitioned syslog table
  • Implements host-to-Cacti mapping logic that validates IP addresses and updates incoming syslog records

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
setup.php Increases message column length and adds new configuration checkbox for host mapping feature
functions.php Implements the host mapping logic with new function and integration into reference table updates; adds guard check for existing hostname validation
CHANGELOG.md Documents the new feature and column length fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1816 to +1817
WHERE host = ?",
array($cacti_hostname, $host['host']));
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UPDATE statement is missing a filter on the status column. This could potentially update hosts from other processing batches. Add AND status = ? to the WHERE clause and include $uniqueID in the parameters array, similar to the pattern used in line 1834-1837.

Suggested change
WHERE host = ?",
array($cacti_hostname, $host['host']));
WHERE host = ? AND status = ?",
array($cacti_hostname, $host['host'], $uniqueID));

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know about this one

bmfmancini and others added 2 commits November 20, 2025 21:24
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants