-
Notifications
You must be signed in to change notification settings - Fork 127
/
zabbix_smartctl.conf
18 lines (18 loc) · 1.32 KB
/
zabbix_smartctl.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#############ZBX-SMARTCTL V1.5
### DEPRECATED. USE for 2.x-3.2 templates
UserParameter=uHDD[*],sudo smartctl -A $1 | awk '$$0 ~ /$2/ { print $$10 }'
UserParameter=uHDD.value[*],sudo smartctl -A $1 | awk '$$0 ~ /$2/ { print $$4 }'
UserParameter=uHDD.raw_value[*],sudo smartctl -A $1 | awk '$$0 ~ /$2/ { print $$10 }'
UserParameter=uHDD.model.[*],sudo smartctl -i $1 | awk -F ': +' '$$0 ~ /Device Model/ { print $$2 }'
UserParameter=uHDD.sn.[*],sudo smartctl -i $1 | awk -F ': +' '$$0 ~ /Serial Number/ { print $$2 }'
UserParameter=uHDD.health.[*],sudo smartctl -H $1 | awk -F ': +' '$$0 ~ /test/ { print $$2 }'
UserParameter=uHDD.errorlog.[*],sudo smartctl -l error $1 |grep -i "ATA Error Count"| cut -f2 -d: |tr -d " " || true
### DEPRECATED. The following were used in the first version of the template for 3.4
UserParameter=uHDD.A[*],sudo smartctl -A $1
UserParameter=uHDD.i[*],sudo smartctl -i $1
UserParameter=uHDD.health[*],sudo smartctl -H $1 || true
### With the latest 3.4 template you only need these:
UserParameter=uHDD.get[*],sudo smartctl -i -H -A -l error -l background $1 || true
UserParameter=uSSD.get[*],sudo smartctl -i -H -A -l error -l background $1 || true
UserParameter=uHDD.discovery[*],sudo /etc/zabbix/scripts/smartctl-disks-discovery.pl $1
UserParameter=uSSD.discovery[*],sudo /etc/zabbix/scripts/smartctl-disks-discovery.pl $1