...
자세한 사용법은 Telegraf 공식 가이드: SNMP를 참조합니다.
IF-MIB 정보: https://mibs.observium.org/mib/IF-MIB/
전체 MIB 데이터베이스: https://mibs.observium.org/
Code Block | ||
---|---|---|
| ||
[[agentinputs.snmp]] agents = [ "10.10.250.2:161" ] interval = "1m" timeout = round_interval"15s" retries = true3 metric_batch_size version = 10002 community = metric_buffer_limit"S2F_Center_RO" max_repetitions = 100003 name = collection_jitter = "0s" flush_interval"snmp_nx" [[inputs.snmp.field]] oid = "10sRFC1213-MIB::sysUpTime.0" flush_jittername = "0suptime" # oid에 precision없는 =장비도 ""있으니, 확인 필요 debug = false [[inputs.snmp.field]] quietname = false"cpu_utilization" logfileoid = "/var/log/telegraf/telegraf.log" hostname.1.3.6.1.4.1.9.9.109.1.1.1.1.5.1" [[inputs.snmp.field]] name = "networkmem_router01utilization" omit_hostname = falseoid = ".1.3.6.1.4.1.9.9.48.1.1.1.5.16" [[outputsinputs.snmp.influxdbfield]] urlsname = "cpu_5sec" oid = ["http://influxdb:8086"] databaseSNMPv2-SMI::enterprises.9.9.109.1.1.1.1.6.19" [[inputs.snmp.field]] name = "telegrafcpu_1min" usernameoid = "SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.7.19" password [[inputs.snmp.field]] name = "mem_used" retention_policyoid = "SNMPv2-SMI::enterprises.9.9.48.1.1.1.5.1" [[inputs.snmp.field]] write_consistencyname = "anymem_free" timeoutoid = "10sSNMPv2-SMI::enterprises.9.9.48.1.1.1.6.1" [[inputs.systemsnmp.table]] oid = "IF-MIB::ifTable" [[inputs.snmp]]name = "snmp_nx" agentsinherit_tags = [ "211.xxx.xxx.254:161""source" ] [[inputs.snmp.table.field]] ## Timeout# for32bit eachcounter SNMP query. timeoutoid = "3s"IF-MIB::ifIndex" ##name Number= of"ifIndex" retries to attempt within timeout.is_tag = true retries = 3 ## SNMP version, values can be 1, 2, or 3 version = 2 ## SNMP community string. community = "xperttop0!" ## The GETBULK max-repetitions parameter max_repetitions = 3 ## measurement name[[inputs.snmp.table.field]] oid = "IF-MIB::ifDescr" name = "ifDescr" is_tag = true [[inputs.snmp.table.field]] oid = "IF-MIB::ifName" name = "ifName" is_tag = true [[inputs.snmp.table.field]] oid = "IF-MIB::ifAlias" name = "snmp"ifAlias" is_tag = true [[inputs.snmp.fieldtable]] # 64bit counter oid = "IF-MIB::ifXTable" name = "cpusnmp_utilizationnx" oidinherit_tags = ".1.3.6.1.4.1.9.9.109.1.1.1.1.5.1" [ "source" ] [[inputs.snmp.table.field]] nameoid = "mem_utilizationIF-MIB::ifIndex" oid name = ".1.3.6.1.4.1.9.9.48.1.1.1.5.16ifIndex" # 아래 snmp-ifTable과 snmp-ifXTable 중 하나 사용. is_tag = true [[inputs.snmp.table.field]] oid = "IF-MIB::ifDescr" name = "ifDescr"snmp-ifTable" is_tag = true [[inputs.snmp.table.field]] oid = "IF-MIB::ifTable"ifName" name = "ifName" index_asis_tag = true [[inputs.snmp.table.field]] name oid = "snmp-ifXTableIF-MIB::ifAlias" oid name ="IF-MIB::ifXTable" "ifAlias" index_asis_tag = true |