Skip to content

Conversation

@kongfei605
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings November 20, 2025 03:09
Copy link
Contributor

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 PR updates the SNMP Zabbix plugin templates to be compatible with Categraf by removing dashboard-related structures from the Go template definitions and simplifying YAML templates by removing DEPENDENT items in favor of direct SNMP_AGENT items.

Key Changes:

  • Removed Dashboard, DashboardPage, and Widget structs from template.go
  • Replaced full-featured Zabbix templates with simplified "Compatible" versions for Windows, Linux, and Huawei devices
  • Converted discovery rules to use walk[] SNMP OIDs with SNMP_WALK_TO_JSON preprocessing instead of DEPENDENT item types

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.

File Description
inputs/snmp_zabbix/template.go Removed dashboard-related struct definitions (Dashboard, DashboardPage, Widget) and the Dashboards field from Template struct
conf/zbx_templates/os/windows_snmp/template_os_windows_snmp.yaml Replaced comprehensive Windows SNMP template with simplified compatible version, removing DEPENDENT items, triggers, graphs, and dashboards
conf/zbx_templates/os/linux_snmp_snmp/template_os_linux_snmp_snmp.yaml Replaced comprehensive Linux SNMP template with simplified compatible version, removing DEPENDENT items, CPU discovery, block device discovery, and complex preprocessing
conf/zbx_templates/net/huawei_snmp/template_net_huawei_snmp.yaml Replaced comprehensive Huawei VRP SNMP template with simplified compatible version, streamlining discovery rules and removing advanced features

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

type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}'
key: 'net.if.status[{#IFNAME}]'

Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Missing value_type field for the operational status item. This item should likely have a value_type specified (e.g., UNSIGNED or FLOAT) to properly store the SNMP status value.

Suggested change
value_type: UNSIGNED

Copilot uses AI. Check for mistakes.
type: SNMP_AGENT
snmp_oid: .1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}
key: 'net.if.status[{#IFDESCR}]'

Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Missing value_type field for the operational status item. This item should likely have a value_type specified (e.g., UNSIGNED or FLOAT) to properly store the SNMP status value.

Suggested change
value_type: UNSIGNED

Copilot uses AI. Check for mistakes.
@kongfei605 kongfei605 merged commit 8c97b41 into flashcatcloud:main Nov 20, 2025
9 checks passed
@kongfei605 kongfei605 deleted the zbx_tpls branch November 20, 2025 03:42
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.

1 participant