首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Telegraf不使用sysstat选项,比如‘-d’或‘-n ALL`’?

Telegraf不使用sysstat选项,比如‘-d’或‘-n ALL`’?
EN

Server Fault用户
提问于 2019-03-15 07:59:42
回答 1查看 390关注 0票数 0

我正在尝试在特格拉夫 (基于Debian的发行版)上设置Proxmox,以便向InfluxDB发送度量标准。但是,它似乎在抱怨sysstat语法。

我正在使用Telegraf中的sysstat插件

在配置文件中,我有一个类似于

代码语言:javascript
复制
#   ## sysstat version.
#   [inputs.sysstat.options]
#     -C = "cpu"
#     -B = "paging"
#     -b = "io"
#     -d = "disk"             # requires DISK activity
     "-n ALL" = "network"
#     "-P ALL" = "per_cpu"
#     -q = "queue"
#     -R = "mem"
     -r = "mem_util"
#     -S = "swap_util"
#     -u = "cpu_util"
#     -v = "inode"
#     -W = "swap"
#     -w = "task"
#   #  -H = "hugepages"        # only available for newer linux distributions
#   #  "-I ALL" = "interrupts" # requires INT activity

然而,它似乎错误地选择了以下这些选项:

代码语言:javascript
复制
root@syd1:/var/run/ceph# telegraf --test
2019-03-15T07:56:35Z I! Starting Telegraf 1.10.0
2019-03-15T07:56:35Z I! Using config file: /etc/telegraf/telegraf.conf
2019-03-15T07:56:35Z E! [telegraf] Error running agent: Error parsing /etc/telegraf/telegraf.conf, line 3845: field corresponding to `-n ALL' is not defined in `*sysstat.Sysstat'

然而,如果我运行sysstat -h,我会发现:

代码语言:javascript
复制
root@syd1:/var/run/ceph# sar -h
Usage: sar [ options ] [ <interval> [ <count> ] ]
Main options and reports:
        -B      Paging statistics
        -b      I/O and transfer rate statistics
        -d      Block devices statistics
        -F [ MOUNT ]
                Filesystems statistics
        -H      Hugepages utilization statistics
        -I { <int> | SUM | ALL | XALL }
                Interrupts statistics
        -m { <keyword> [,...] | ALL }
                Power management statistics
                Keywords are:
                CPU     CPU instantaneous clock frequency
                FAN     Fans speed
                FREQ    CPU average clock frequency
                IN      Voltage inputs
                TEMP    Devices temperature
                USB     USB devices plugged into the system
        -n { <keyword> [,...] | ALL }
                Network statistics
                Keywords are:
                DEV     Network interfaces
                EDEV    Network interfaces (errors)
                NFS     NFS client
                NFSD    NFS server
                SOCK    Sockets (v4)
                IP      IP traffic      (v4)
                EIP     IP traffic      (v4) (errors)
                ICMP    ICMP traffic    (v4)
                EICMP   ICMP traffic    (v4) (errors)
                TCP     TCP traffic     (v4)
                ETCP    TCP traffic     (v4) (errors)
                UDP     UDP traffic     (v4)
                SOCK6   Sockets (v6)
                IP6     IP traffic      (v6)
                EIP6    IP traffic      (v6) (errors)
                ICMP6   ICMP traffic    (v6)
                EICMP6  ICMP traffic    (v6) (errors)
                UDP6    UDP traffic     (v6)
                FC      Fibre channel HBAs
        -q      Queue length and load average statistics
        -R      Memory statistics
        -r [ ALL ]
                Memory utilization statistics
        -S      Swap space utilization statistics
        -u [ ALL ]
                CPU utilization statistics
        -v      Kernel tables statistics
        -W      Swapping statistics
        -w      Task creation and system switching statistics
        -y      TTY devices statistics

因此,像-d-n ALL这样的东西是可用的。

知道怎么回事吗?

EN

回答 1

Server Fault用户

发布于 2019-03-15 18:47:25

哇,这实际上是我的配置文件中的语法错误。具体来说,我需要取消对这一行的评论:

inputs.sysstat.options

它就在

代码语言:javascript
复制
#     -C = "cpu"
#     -B = "paging"
#     -b = "io"
     -d = "disk"             # requires DISK activity
     "-n ALL" = "network"
#     "-P ALL" = "per_cpu"
#     -q = "queue"
#     -R = "mem"
     -r = "mem_util"
#     -S = "swap_util"
#     -u = "cpu_util"
#     -v = "inode"
#     -W = "swap"
#     -w = "task"
#   #  -H = "hugepages"        # only available for newer linux distributions
#   #  "-I ALL" = "interrupts" # requires INT activity

没有它,它就不能正确地解析上面的行。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/958400

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档