我正在尝试在特格拉夫 (基于Debian的发行版)上设置Proxmox,以便向InfluxDB发送度量标准。但是,它似乎在抱怨sysstat语法。
我正在使用Telegraf中的sysstat插件。
在配置文件中,我有一个类似于
# ## 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然而,它似乎错误地选择了以下这些选项:
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,我会发现:
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这样的东西是可用的。
知道怎么回事吗?
发布于 2019-03-15 18:47:25
哇,这实际上是我的配置文件中的语法错误。具体来说,我需要取消对这一行的评论:
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没有它,它就不能正确地解析上面的行。
https://serverfault.com/questions/958400
复制相似问题