nightingale1/etc/agent.yml

78 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

logger:
dir: logs/agent
level: INFO
keepHours: 24
enable:
mon: true
job: true
report: true
metrics: true
udp:
enable: true
listen: :788
metrics:
maxProcs: 1
reportIntervalMs: 10
reportTimeoutMs: 2000
reportPacketSize: 100
sendToInfoFile: false
job:
metadir: ./meta
interval: 2
report:
# 调用ams的接口上报数据需要ams的token
token: ams-builtin-token
# 上报周期,单位是秒
interval: 10
# physical物理机virtual虚拟机container容器switch交换机
cate: physical
# 使用哪个字段作为唯一KEY即作为where条件更新对应记录一般使用sn或ip
uniqkey: ip
# 如果是虚拟机应该是获取uuid
# curl -s http://169.254.169.254/a/meta-data/instance-id
sn: dmidecode -s system-serial-number | tail -n 1
fields:
cpu: cat /proc/cpuinfo | grep processor | wc -l
mem: cat /proc/meminfo | grep MemTotal | awk '{printf "%dGi", $2/1024/1024}'
disk: df -m | grep '/dev/' | grep -v '/var/lib' | grep -v tmpfs | awk '{sum += $2};END{printf "%dGi", sum/1024}'
sys:
# timeout in ms
# interval in second
timeout: 5000
interval: 30
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