Skip to content

[zabbix] Add Linux: prefix support for Zabbix 6.2+ template item names#2967

Closed
shin25818 wants to merge 1 commit into
DataDog:masterfrom
shin25818:fix/zabbix-linux-prefix-support
Closed

[zabbix] Add Linux: prefix support for Zabbix 6.2+ template item names#2967
shin25818 wants to merge 1 commit into
DataDog:masterfrom
shin25818:fix/zabbix-linux-prefix-support

Conversation

@shin25818
Copy link
Copy Markdown

Summary

Zabbix 6.2 (released July 2022) changed the naming convention of template
item names by adding prefixes such as "Linux: " to item names.

For example:

  • Before 6.2: Load average (1m avg)
  • After 6.2: Linux: Load average (1m avg)

The current METRICS list only contains the old naming convention, causing
Metric Samples to remain at 0 for all users running Zabbix 6.2 or later.

Changes

Added Linux: prefixed versions of existing metric mappings to support
Zabbix 6.2+ while maintaining backward compatibility with older versions.

Testing

Verified with Zabbix 6.4.21 that all item names are now found in metric
mapping (previously logged as "Item name Linux: XXX not found in metric mapping").

Impact

  • No impact on users running Zabbix 6.0 or earlier
  • Fixes metric collection for users running Zabbix 6.2 or later

@shin25818
Copy link
Copy Markdown
Author

Additional Note

While this PR adds support for the Linux: prefix, I realized that Zabbix 6.2+
also introduced prefixes for other OS templates, such as:

  • Windows: CPU utilization
  • macOS: CPU utilization
  • etc.

A more robust solution might be to normalize item names by stripping the prefix
before matching against the METRICS dictionary in check.py:

normalized_name = item_name.split(': ', 1)[-1] if ': ' in item_name else item_name
if normalized_name in METRICS:

This would handle all OS prefixes without needing to enumerate each one explicitly.
I'm happy to update this PR if the maintainer prefers this approach.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

This pull request has not been updated for more than 21 days. If there are no updates to this PR within 7 days, it will be closed. If you'd like to re-open this PR after it's been closed, you can start from the latest master branch or pull the latest changes into your branch and create a new pull request.

@github-actions github-actions Bot added the stale label May 7, 2026
@github-actions
Copy link
Copy Markdown

This pull request was not updated after an additional 7 days of no activity. If you would like to continue work on this PR, please re-open this PR or create a fresh branch off of the latest master branch.

@github-actions github-actions Bot closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant