A Prometheus exporter for Xiraid RAID systems. This exporter collects metrics from Xiraid arrays using the xicli command-line tool and exposes them in Prometheus format.
- Modular collector system with enable/disable flags
- Monitors RAID array health and status
- Tracks device health and wear levels
- Monitors memory usage per array
- Tracks faulty sector counts per drive
- Monitors license status and expiration
- Collects mail, pool, and settings configuration
- Exposes metrics in Prometheus format
The exporter provides multiple collectors that can be individually enabled or disabled:
Collects basic RAID array information from xicli raid show:
- RAID configuration and status
- Array states (online, initialized, etc.)
- Memory usage
- Device states
Collects extended RAID metrics from xicli raid show --extended:
- CPU allocation
- Priority settings (init, recon, restripe, SDC)
- Memory limits and preallocation
- Merge settings
- Device health and wear percentages
Collects faulty sector counts per drive from xicli drive faulty-count show.
Collects license information from xicli license show:
- License validity and expiration
- Disk count and usage
Collects mail notification configuration from xicli mail show.
Collects spare pool information from xicli pool show.
Collects various system settings from multiple xicli settings commands:
- Authentication settings
- Cluster settings
- EULA status
- Faulty count thresholds
- Mail polling intervals
- Pool replace delays
- Scanner settings
xiraid_raid_info- RAID array information with static parameters as labelsxiraid_raid_config- RAID array in configuration (1=yes, 0=no)xiraid_raid_active- RAID array block device is active (1=active, 0=inactive)xiraid_raid_size_bytes- RAID array total size in bytesxiraid_raid_state- RAID array state (enumerated for all possible states)xiraid_raid_memory_usage_bytes- RAID array memory usage in bytesxiraid_raid_device_state- RAID device state (1=online, 2=offline, 0=none)
xiraid_raid_cpu_allowed_count- Number of CPUs allowedxiraid_raid_init_priority- Initialization priorityxiraid_raid_recon_priority- Reconstruction priorityxiraid_raid_restripe_priority- Restripe priorityxiraid_raid_sdc_priority- Silent Data Corruption scan priorityxiraid_raid_request_limit- Request limitxiraid_raid_scheduler_enabled- Scheduler enabledxiraid_raid_memory_limit_bytes- Memory limit in bytesxiraid_raid_memory_prealloc_bytes- Preallocated memory in bytesxiraid_raid_adaptive_merge- Adaptive merge enabledxiraid_raid_merge_read_enabled- Merge read enabledxiraid_raid_merge_read_max_microseconds- Merge read max microsecondsxiraid_raid_merge_read_wait_microseconds- Merge read wait microsecondsxiraid_raid_merge_write_enabled- Merge write enabledxiraid_raid_merge_write_max_microseconds- Merge write max microsecondsxiraid_raid_merge_write_wait_microseconds- Merge write wait microsecondsxiraid_device_health_percent- RAID device health percentagexiraid_device_wear_percent- RAID device wear percentage
xiraid_drive_faulty_sectors_total- Total number of faulty sectors on drive
xiraid_license_valid- License is valid (1=valid, 0=invalid)xiraid_license_expiry_timestamp_seconds- License expiry timestamp in seconds since epochxiraid_license_disks_total- Total number of disks allowed by licensexiraid_license_disks_in_use- Number of disks currently in use
xiraid_mail_configured- Mail notification is configured
xiraid_pool_info- Pool information with labels
xiraid_settings_auth_port- Authentication service portxiraid_settings_cluster_pool_autoactivate- Pool autoactivate settingxiraid_settings_cluster_raid_autostart- RAID autostart settingxiraid_settings_eula_accepted- EULA acceptance statusxiraid_settings_faulty_count_threshold- Faulty sector count thresholdxiraid_settings_mail_polling_interval_seconds- Mail polling intervalxiraid_settings_mail_progress_polling_interval_seconds- Mail progress polling intervalxiraid_settings_pool_replace_delay_seconds- Pool drive replace delayxiraid_settings_scanner_loed_enabled- Scanner LOED enabledxiraid_settings_scanner_polling_interval_seconds- Scanner polling intervalxiraid_settings_scanner_smart_interval_seconds- Scanner SMART polling interval
xiraid_scrape_error- Whether an error occurred during the last scrape (per collector)
- Go 1.23 or later
- Xiraid system with
xiclicommand-line tool installed - Access to execute
xiclicommands
git clone https://github.com/E4-Computer-Engineering/xiraid-exporter.git
cd xiraid-exporter
go build -o xiraid-exporter .goreleaser release --snapshot --skip=publish --clean./xiraid-exporter [flags]--web.listen-address- Address to listen on for web interface and telemetry (default::9827)--web.telemetry-path- Path under which to expose metrics (default:/metrics)--xicli.path- Path to the xicli binary (default:xicli)
Following the node_exporter pattern:
Enabling collectors:
--collector.<name>- Enable a specific collector
Disabling collectors:
--no-collector.<name>- Disable a specific collector (useful for default collectors)
Disable all defaults:
--collector.disable-defaults- Disable all default collectors, then use--collector.<name>to enable only specific ones
Available Collectors:
raid- RAID collector (default: enabled)raid-extended- RAID extended metrics collector (default: disabled)drive-faulty- Drive faulty count collector (default: enabled)license- License collector (default: enabled)mail- Mail collector (default: disabled)pool- Pool collector (default: disabled)settings- Settings collector (default: disabled)
# Start the exporter with default collectors (raid, drive-faulty, license)
./xiraid-exporter
# Enable an additional collector (extended RAID metrics)
./xiraid-exporter --collector.raid-extended
# Disable a default collector
./xiraid-exporter --no-collector.license
# Enable only specific collectors (disable all defaults, then enable only what you want)
./xiraid-exporter --collector.disable-defaults --collector.raid --collector.raid-extended
# Complex example: all settings collectors but no license
./xiraid-exporter --no-collector.license --collector.mail --collector.pool --collector.settings
# Start on a custom port with extended RAID metrics
./xiraid-exporter --web.listen-address=":9999" --collector.raid-extended
# Use a custom path for xicli
./xiraid-exporter --xicli.path="/usr/local/bin/xicli"Add the following to your Prometheus configuration:
scrape_configs:
- job_name: 'xiraid'
static_configs:
- targets: ['localhost:9827']go build -o xiraid-exporter .golangci-lint run --timeout=3m0sgo test ./...This project uses GitHub Actions for CI/CD:
- Build workflow runs on push/PR to main branch
- Release workflow runs on version tags (v*..)
See LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.