agentd.yml 1.6 KB
Newer Older
7
3.0.0  
710leo 已提交
1
logger:
Q
qinyening 已提交
2
  dir: logs/agentd
7
3.0.0  
710leo 已提交
3 4 5 6
  level: INFO
  keepHours: 24

enable:
U
Ulric Qin 已提交
7 8 9
  mon: true
  job: true
  report: true
10 11 12
  metrics: true

udp:
U
UlricQin 已提交
13
  enable: false
14 15 16 17 18 19 20 21
  listen: :788

metrics:
  maxProcs: 1
  reportIntervalMs: 10 
  reportTimeoutMs: 2000
  reportPacketSize: 100
  sendToInfoFile: false 
7
3.0.0  
710leo 已提交
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

job:
  metadir: ./meta
  interval: 2

report:
  # 调用ams的接口上报数据,需要ams的token
  token: ams-builtin-token

  # 上报周期,单位是秒
  interval: 10

  # physical:物理机,virtual:虚拟机,container:容器,switch:交换机
  cate: physical

U
Ulric Qin 已提交
37 38
  # 使用哪个字段作为唯一KEY,即作为where条件更新对应记录,一般使用sn或ip
  uniqkey: ip
7
3.0.0  
710leo 已提交
39 40

  # 如果是虚拟机,应该是获取uuid
U
Ulric Qin 已提交
41
  # curl -s http://169.254.169.254/a/meta-data/instance-id
7
3.0.0  
710leo 已提交
42 43 44 45
  sn: dmidecode -s system-serial-number | tail -n 1

  fields:
    cpu: cat /proc/cpuinfo | grep processor | wc -l
46 47
    mem: cat /proc/meminfo | grep MemTotal | awk '{printf "%.1fGi", $2/1024/1024}'
    disk: df -m | grep '/dev/' | grep -v '/var/lib' | grep -v tmpfs | awk '{sum += $2};END{printf "%.1fGi", sum/1024}'
7
3.0.0  
710leo 已提交
48 49 50 51

sys:
  # timeout in ms
  # interval in second
U
Ulric Qin 已提交
52 53
  timeout: 5000
  interval: 30
7
3.0.0  
710leo 已提交
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
  ifacePrefix:
    - eth
    - em
    - ens

  # ignore disk mount point
  mountIgnore:
    prefix:
      - /var/lib
      - /run
    # collect anyway
    exclude: []

  ignoreMetrics:
    - cpu.core.idle
    - cpu.core.util
    - cpu.core.sys
    - cpu.core.user
    - cpu.core.nice
    - cpu.core.guest
    - cpu.core.irq
    - cpu.core.softirq
    - cpu.core.iowait
    - cpu.core.steal
Q
qinyening 已提交
78

7
710leo 已提交
79
  #ntpServers:
U
UlricQin 已提交
80
  #  - ntp1.aliyun.com