...
자세한 사용법은 Telegraf 공식 가이드: SNMP를 참조합니다.
IF-MIB 정보: https://mibs.observium.org/mib/IF-MIB/
전체 MIB 데이터베이스: https://mibs.observium.org/
Code Block | ||
---|---|---|
| ||
[agent] interval = "1m" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 10000 collection_jitter = "0s" flush_interval = "10s" flush_jitter = "0s" precision = "" debug = false quiet = false logfile = "/var/log/telegraf/telegraf.log" hostname = "network_router01" omit_hostname = false [[outputs.influxdb]] urls = ["http://influxdb:8086"] database = "telegraf" username = "" password = "" retention_policy = "" write_consistency = "any" timeout = "10s" [[inputs.system]] [[inputs.snmp]] agents = [ "211.xxx.xxx.254:161"] ## Timeout for each SNMP query. timeout = "3s" ## Number of retries to attempt within timeout. 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 name = "snmp" [[inputs.snmp.field]] name = "cpu_utilization" oid = ".1.3.6.1.4.1.9.9.109.1.1.1.1.5.1" [[inputs.snmp.field]] name = "mem_utilization" oid = ".1.3.6.1.4.1.9.9.48.1.1.1.5.16" # 아래 snmp-ifTable과 snmp-ifXTable 중 하나 사용. [[inputs.snmp.table]] name = "snmp-ifTable" oid ="IF-MIB::ifTable" index_as_tag = true [[inputs.snmp.table]] name = "snmp-ifXTable" oid ="IF-MIB::ifXTable" index_as_tag = true |
...