Monitoring LVM Thin Volume Pool using Zabbix
From Notes_Wiki
Home > Debian > Proxmox virtual environment > Monitoring LVM Thin Volume Pool using Zabbix
We can Monitor LVM Thin Volume Pool using Zabbix custom script
Create a new script in zabbix folder
# nano /etc/zabbix/script.sh
Script
#!/bin/bash
# Get LVM thin pool usage
disk_usage=$(sudo lvdisplay -v /dev/ssdvg/ssdlv | grep "Allocated pool data" | awk '{print $4}' | tr -d '%')
# Output the numeric value
echo "$disk_usage"
# Check if usage exceeds threshold (e.g., 80%)
if (( $(echo "$disk_usage > 80" | bc -l) )); then
    exit 1
fi
exit 0

