A Zabbix module that enhances the native host.view page by adding real-time CPU, Memory, and Disk metrics directly into the host list table.
- CPU Metrics: Utilization percentage and number of cores
- Memory Metrics: Utilization percentage, available memory, and total memory
- Disk Metrics: Disk usage percentage
- Color-coded values: Green (OK), Orange (Warning), Red (Critical)
- Theme support: Compatible with Blue and Dark themes
- Auto-refresh: Metrics persist after page auto-refresh
- Non-invasive: Implemented as a module, no core file modifications required
- Zabbix 7.0 or higher
- Hosts must have the following items configured:
system.cpu.util- CPU utilizationsystem.cpu.num- CPU coresvm.memory.utilizationorvm.memory.size[pavailable]- Memory utilizationvm.memory.size[available]- Available memoryvm.memory.size[total]- Total memoryvfs.fs.size[/,pused]- Disk usage percentage
cd /usr/share/zabbix/modules
git clone <repository-url> HostMetricsOr manually create the directory structure:
/usr/share/zabbix/modules/HostMetrics/
├── manifest.json
├── Module.php
├── actions/
│ └── CControllerHostMetricsData.php
└── assets/
├── css/
│ └── host-metrics.css
└── js/
└── host-metrics.js
chown -R www-data:www-data /usr/share/zabbix/modules/HostMetrics
chmod -R 755 /usr/share/zabbix/modules/HostMetricsNote: Replace
www-datawith your web server user (e.g.,apache,nginx,zabbix)
- Log in to Zabbix as an administrator
- Navigate to Administration → General → Modules
- Click Scan directory
- Find Host Metrics Enhancer in the list
- Click Enable
Press Ctrl + Shift + R (or Cmd + Shift + R on Mac) to clear cache and reload the page.
- Navigate to Monitoring → Hosts
- The following columns will be automatically added before the "Tags" column:
- CPU Util %
- CPU Cores
- Memory Util %
- Memory Available
- Memory Total
- Disk Used %
- Green: Value ≤ 60% (OK)
- Orange: Value > 60% and ≤ 80% (Warning)
- Red: Value > 80% (Critical)
- Check if the module is enabled in Administration → General → Modules
- Verify that your hosts have the required items configured
- Open browser console (F12) and check for errors
- Ensure items are monitored and have recent data
This should not happen with the latest version. If it does:
- Clear browser cache completely
- Disable and re-enable the module
- Check browser console for JavaScript errors
# Fix ownership
chown -R www-data:www-data /usr/share/zabbix/modules/HostMetrics
# Fix permissions
chmod -R 755 /usr/share/zabbix/modules/HostMetrics- Go to Administration → General → Modules
- Find Host Metrics Enhancer
- Click Disable
- Optionally, delete the module directory:
rm -rf /usr/share/zabbix/modules/HostMetrics- manifest.json: Module configuration and metadata
- Module.php: Main module class
- actions/CControllerHostMetricsData.php: API controller for fetching metrics
- assets/js/host-metrics.js: Frontend JavaScript for DOM manipulation
- assets/css/host-metrics.css: Styling for metric columns
- JavaScript detects when the host.view page is loaded
- It injects new column headers into the table
- Extracts host IDs from the table rows
- Calls the backend API (
hostmetrics.data) to fetch metrics - Injects metric values into the table with appropriate styling
- Monitors for form replacement (refresh) and re-injects metrics
This module is provided as-is without any warranty.
Monzphere
Contributions are welcome! Please feel free to submit issues or pull requests.