linux收集机器配置,机器数据采集工具:telegraf的介绍安装

[[outputs.influxdb]]

urls = ["http://localhost:8086"]

#influxdb中的数据库名,不存在则自动创建

database = "telegraf"

#写influxDB超时时间

timeout = "5s"

# 收集cpu的配置

[[inputs.cpu]]

## Whether to report per-cpu stats or not

percpu = true

## Whether to report total system cpu stats or not

totalcpu = true

## If true, collect raw CPU time metrics.

collect_cpu_time = false

## If true, compute and report the sum of all non-idle CPU states.

report_active = false

# 收集disk的信息

[[inputs.disk]]

## By default stats will be gathered for all mount points.

## Set mount_points will restrict the stats to only the specified mount points.

mount_points = ["/data"]

## Ignore mount points by filesystem type.

ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]

# 收集硬盘的io

[[inputs.diskio]]

## By default, telegraf will gather stats for all devices including

## disk partitions.

## Setting devices will restrict the stats to the specified devices.

devices = ["sda", "sdb", "vd*"]

## Uncomment the following line if you need disk serial numbers.

# skip_serial_number = false

#

## On systems which support it, device metadata can be added in the form of

## tags.

## Currently only Linux is supported via udev properties. You can view

## available properties for a device by running:

## 'udevadm info -q property -n /dev/sda'

## Note: Most, but not all, udev properties can be accessed this way. Properties

## that are currently inaccessible include DEVTYPE, DEVNAME, and DEVPATH.

# device_tags = ["ID_FS_TYPE", "ID_FS_USAGE"]

#

## Using the same metadata source as device_tags, you can also customize the

## name of the device via templates.

## The 'name_templates' parameter is a list of templates to try and apply to

## the device. The template may contain variables in the form of '$PROPERTY' or

## '${PROPERTY}'. The first template which does not contain any variables not

## present for the device is used as the device name tag.

## The typical use case is for LVM volumes, to get the VG/LV name instead of

## the near-meaningless DM-0 name.

# name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"]

# 收集内存信息

[[inputs.mem]]

interval = "10m"

# 收集进程状态

[[inputs.processes]]

interval = "10m"

fielddrop = ["wait","idle","unknown"]

# 收集swap分区信息

[[inputs.swap]]

interval = "1h"

fieldpass = ["used_percent"]

# 收集系统运行信息

[[inputs.system]]

## Uncomment to remove deprecated metrics.

interval = "2m"

fielddrop = ["uptime_format"]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值