Skip to content

Instantly share code, notes, and snippets.

@Kaweechelchen
Last active January 20, 2022 17:24
Show Gist options
  • Save Kaweechelchen/df5549b0aa557afe7256b96ed7dacff7 to your computer and use it in GitHub Desktop.
Save Kaweechelchen/df5549b0aa557afe7256b96ed7dacff7 to your computer and use it in GitHub Desktop.
##
## SNMP Input Plugin
##
## QNAP TS-431X
##
[[inputs.snmp]]
# List of agents to poll
agents = [ "10.1.1.31" ]
# Polling interval
interval = "60s"
# Timeout for each SNMP query.
timeout = "10s"
# Number of retries to attempt within timeout.
retries = 3
# SNMP version, UAP only supports v1
version = 1
# SNMP community string.
community = "public"
# The GETBULK max-repetitions parameter
max_repetitions = 10
# Measurement name
name = "snmp.QNAP"
##
## System Details & Metrics
##
# CPU
[[inputs.snmp.field]]
name = "name"
oid = "NAS-MIB::enclosureName.1"
[[inputs.snmp.table]]
name = "snmp.QNAP.cpuTable"
oid = "NAS-MIB::cpuTable"
[[inputs.snmp.table.field]]
name = "cpuIndex"
oid = "NAS-MIB::cpuIndex"
[[inputs.snmp.table.field]]
name = "cpuID"
oid = "NAS-MIB::cpuID"
[[inputs.snmp.table.field]]
name = "cpuUsage"
oid = "NAS-MIB::cpuUsage"
# Memory
[[inputs.snmp.field]]
name = "systemTotalMem"
oid = "NAS-MIB::systemTotalMem.0"
[[inputs.snmp.field]]
name = "systemFreeMem"
oid = "NAS-MIB::systemFreeMem.0"
# Uptime
[[inputs.snmp.field]]
name = "systemUptime"
oid = "NAS-MIB::systemUptimeEX.0"
# Temperature
[[inputs.snmp.field]]
name = "systemTemperature"
oid = "NAS-MIB::enclosureSystemTemp.1"
# Fan
[[inputs.snmp.table]]
name = "snmp.QNAP.systemFanTableEx"
oid = "NAS-MIB::systemFanTableEx"
[[inputs.snmp.table.field]]
name = "sysFanIndexEX"
oid = "NAS-MIB::sysFanIndexEX"
[[inputs.snmp.table.field]]
name = "sysFanDescrEX"
oid = "NAS-MIB::sysFanDescrEX"
[[inputs.snmp.table.field]]
name = "sysFanSpeedEX"
oid = "NAS-MIB::sysFanSpeedEX"
##
## Interface Details & Metrics
##
# Interfaces
[[inputs.snmp.table]]
name = "snmp.QNAP.systemIfTableEx"
oid = "NAS-MIB::systemIfTableEx"
[[inputs.snmp.table.field]]
name = "ifIndexEX"
oid = "NAS-MIB::ifIndexEX"
[[inputs.snmp.table.field]]
name = "ifDescrEX"
oid = "NAS-MIB::ifDescrEX"
[[inputs.snmp.table.field]]
name = "ifPacketsReceivedEX"
oid = "NAS-MIB::ifPacketsReceivedEX"
[[inputs.snmp.table.field]]
name = "ifPacketsSentEX"
oid = "NAS-MIB::ifPacketsSentEX"
[[inputs.snmp.table.field]]
name = "ifErrorPacketsEX"
oid = "NAS-MIB::ifErrorPacketsEX"
##
## Disk Details & Metrics
##
# Disk
[[inputs.snmp.table]]
name = "snmp.QNAP.systemHdTableEX"
oid = "NAS-MIB::systemHdTableEX"
[[inputs.snmp.table.field]]
name = "hdIndexEX"
oid = "NAS-MIB::hdIndexEX"
[[inputs.snmp.table.field]]
name = "hdDescrEX"
oid = "NAS-MIB::hdDescrEX"
[[inputs.snmp.table.field]]
name = "hdTemperatureEX"
oid = "NAS-MIB::hdTemperatureEX"
[[inputs.snmp.table.field]]
name = "hdStatusEX"
oid = "NAS-MIB::hdStatusEX"
[[inputs.snmp.table.field]]
name = "hdModelEX"
oid = "NAS-MIB::hdModelEX"
[[inputs.snmp.table.field]]
name = "hdSmartInfoEX"
oid = "NAS-MIB::hdSmartInfoEX"
##
## Volume Details & Metrics
##
# Volumes
[[inputs.snmp.table]]
name = "snmp.QNAP.systemVolumeTable"
oid = "NAS-MIB::systemVolumeTable"
[[inputs.snmp.table.field]]
name = "sysVolumeIndex"
oid = "NAS-MIB::sysVolumeIndex"
[[inputs.snmp.table.field]]
name = "sysVolumeDescr"
oid = "NAS-MIB::sysVolumeDescr"
[[inputs.snmp.table.field]]
name = "sysVolumeFS"
oid = "NAS-MIB::sysVolumeFS"
[[inputs.snmp.table.field]]
name = "sysVolumeTotalSize"
oid = "NAS-MIB::sysVolumeTotalSize"
[[inputs.snmp.table.field]]
name = "sysVolumeFreeSize"
oid = "NAS-MIB::sysVolumeFreeSize"
[[inputs.snmp.table.field]]
name = "sysVolumeStatus"
oid = "NAS-MIB::sysVolumeStatus"
##
## Volume Details & Metrics
##
# Volumes
# [[inputs.snmp.table]]
# name = "snmp.QNAP.volumeTable"
# oid = "NAS-MIB::volumeTable"
# [[inputs.snmp.table.field]]
# name = ""
# oid = "NAS-MIB::volumeIndex"
# [[inputs.snmp.table.field]]
# name = ""
# oid = "NAS-MIB::volumeID"
# [[inputs.snmp.table.field]]
# name = ""
# oid = "NAS-MIB::volumeCapacity"
# [[inputs.snmp.table.field]]
# name = ""
# oid = "NAS-MIB::volumeFreeSize"
# [[inputs.snmp.table.field]]
# name = ""
# oid = "NAS-MIB::volumeStatus"
# [[inputs.snmp.table.field]]
# name = ""
# oid = "NAS-MIB::volumeName"
##
## Disk Performance Details & Metrics
##
# Disk Performance
[[inputs.snmp.table]]
name = "snmp.QNAP.diskPerformanceTable"
oid = "NAS-MIB::diskPerformanceTable"
[[inputs.snmp.table.field]]
name = "diskPerformanceIndex"
oid = "NAS-MIB::diskPerformanceIndex"
[[inputs.snmp.table.field]]
name = "blvID"
oid = "NAS-MIB::blvID"
[[inputs.snmp.table.field]]
name = "iops"
oid = "NAS-MIB::iops"
[[inputs.snmp.table.field]]
name = "latency"
oid = "NAS-MIB::latency"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment