Looking for a little support for my SNMP collection on my Buffalo NAS. All I’m trying to do is pull the SMART Drive status from the 4 drives in my NAS. Using snmptable, I can sell all the fileds:
#################################
[roott@system01 ~]$ snmptable -v 2c -c Public terastation BUFFALO-NAS-MIB::nasDiskTable
SNMP table: BUFFALO-NAS-MIB::nasDiskTable
nasDiskStatus nasDiskCapacity nasDiskUsed **nasDiskSMARTStatus** nasDiskSMARTReallocatedSectorCtValue nasDiskSMARTReallocatedSectorCtWorst nasDiskSMARTReallocatedSectorCtThresh nasDiskSMARTReallocatedSectorCtRAW nasDiskSMARTCurrentPendingSectorValue nasDiskSMARTCurrentPendingSectorWorst nasDiskSMARTCurrentPendingSectorThresh nasDiskSMARTCurrentPendingSectorRAW nasDiskSMARTOfflineUncorrectableValue nasDiskSMARTOfflineUncorrectableWorst nasDiskSMARTOfflineUncorrectableThresh nasDiskSMARTOfflineUncorrectableRAW nasSSDSMARTRemainingLifeValue nasSSDSMARTRemainingLifeWorst nasSSDSMARTRemainingLifeThresh nasSSDSMARTBadBlockCountValue nasSSDSMARTBadBlockCountWorst nasSSDSMARTBadBlockCountThresh nasDiskCapacityGiB nasDiskCapacityLow nasDiskCapacityHigh nasDiskUsedGiB nasDiskUsedLow nasDiskUsedHigh
#################################
I’ve created my telegraf file looking only at the ‘nasDiskSMARTStatus’ in the BUFFALO-NAS-MIB and that works, but the issue is that separating out each drive to their own fields. It just keeps saving them under the same ‘NAS_Disk’ field so I only see one in Grafana.
#################################
terastation.conf
[[inputs.snmp.table]]
name = “NAS_drives”
inherit_tags = [ “hostname” ]
[[inputs.snmp.table.field]]
name = “Drive_1”
oid = “BUFFALO-NAS-MIB::nasDiskSMARTStatus”
#################################
[root@system01 ~]# telegraf --config /etc/telegraf/telegraf.d/terrastation.conf --test
2021-02-14T18:50:35Z I! Starting Telegraf 1.17.2
snmp,agent_host=terastation, host=system01,hostname=terastation Uptime=7263589i,Used_Percentage=63i 1613328636000000000
NAS_drives,agent_host=terastation,host=system01,hostname=terastation Drive=2i 1613328636000000000
NAS_drives,agent_host=terastation,host=system01,hostname=terastation Drive=2i 1613328636000000000
NAS_drives,agent_host=terastation,host=system01,hostname=terastation Drive=1i 1613328636000000000
NAS_drives,agent_host=terastation,host=system01,hostname=terastation Drive=1i 1613328636000000000
#################################
I’ve tried changing the OID’s to something like oid = “BUFFALO-NAS-MIB::nasDiskSMARTStatus.1” for each drive but that didn’t work. Can someone tell me how to alias each drive to its only entry in telegraf?
I hope this makes sense. Thanks for the help!