Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

자세한 사용법은 Telegraf 공식 가이드: SNMP를 참조합니다.
IF-MIB 정보: https://mibs.observium.org/mib/IF-MIB/
전체 MIB 데이터베이스: https://mibs.observium.org/

Code Block
languagepybash
[[agent]
 inputs.snmp]]
agents = [ "10.10.250.2:161" ]
interval = "1m"
timeout = "15s"
retries = 3
round_intervalversion = true2
community = metric_batch_size"S2F_Center_RO"
max_repetitions = 10003
name = metric_buffer_limit = 10000
  collection_jitter"snmp_nx"

  [[inputs.snmp.field]]
  oid = "0sRFC1213-MIB::sysUpTime.0"
  flush_intervalname = "10suptime"

  # oid에  flush_jitter없는 장비도 있으니, 확인 필요
  [[inputs.snmp.field]]
  name = "0scpu_utilization"
  precisionoid = ".1.3.6.1.4.1.9.9.109.1.1.1.1.5.1"
  [[inputs.snmp.field]]
  debugname = false"mem_utilization"
  quiet = falseoid = ".1.3.6.1.4.1.9.9.48.1.1.1.5.16"
  
logfile = "/var/log/telegraf/telegraf.log" [[inputs.snmp.field]]
  hostnamename = "networkcpu_router015sec"
  omit_hostname = falseoid = "SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.6.19"

  [[outputsinputs.snmp.influxdbfield]]
  name = "cpu_1min"
  urlsoid = ["http://influxdb:8086"]
  databaseSNMPv2-SMI::enterprises.9.9.109.1.1.1.1.7.19"

  [[inputs.snmp.field]]
  name = "telegrafmem_used"
  usernameoid = "SNMPv2-SMI::enterprises.9.9.48.1.1.1.5.1"

  [[inputs.snmp.field]]
  passwordname = "mem_free"
  retention_policyoid = "SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.1"

  [[inputs.snmp.table]]
  write_consistencyoid = "anyIF-MIB::ifTable"
  timeoutname = "10s"

[[inputs.system]]snmp_nx"
  inherit_tags = [ "source" ]

    [[inputs.snmp.table.field]]
    # 32bit counter
   agents oid = [ "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 "IF-MIB::ifIndex"
    name = "ifIndex"
    is_tag = true

    [[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 = "ifAlias"
    is_tag = true

  [[inputs.snmp.table]]
  # 64bit counter
  oid = "IF-MIB::ifXTable"
  name = "snmp_nx"
# oid에 없는 장비도 있으니, 확인 필요
  inherit_tags = [ "source" ]

    [[inputs.snmp.table.field]]
  name  oid = "cpu_utilization"IF-MIB::ifIndex"
   oid name = ".1.3.6.1.4.1.9.9.109.1.1.1.1.5.1"
ifIndex"
    is_tag = true

    [[inputs.snmp.table.field]]
    nameoid = "mem_utilization"IF-MIB::ifDescr"
    oidname = ".1.3.6.1.4.1.9.9.48.1.1.1.5.16"

# 아래 snmp-ifTable과 snmp-ifXTable 중 하나 사용.ifDescr"
    is_tag = true

    [[inputs.snmp.table.field]]
    oid = "IF-MIB::ifTableifName"
    name = "snmp_nxifName"
   inherit is_tagstag = ["source"] true

    [[inputs.snmp.table.field]]
    oid = "IF-MIB::ifDescrifAlias"
    name = "ifDescrifAlias"
    is_tag = true