collectd:磁盘,接口,irq和swap_io插件捕获的测量单位是多少?

时间:2018-02-05 16:01:25

标签: collectd

diskinterfaceirqswap_io个收集插件捕获的测量单位是多少?

我将在一台机器上运行的collectd 5与在另一台机器上运行的collectd 4进行比较,并尝试对它们进行配置,以便它们捕获相同的指标。

disk报告collectd 5(KiB?)上的小数浮点数,4(字节)上的整数。

interface是collectd 5(KiB?)上的小数浮点数,4(字节)上的整数。

irq显然是收集5的百分比,4上累积的jiffies(?)。

swap_io是浮点数(偶尔会收集' nan')收集5,整数为4。

此外,根据collectd wiki,cpu插件可以在ValuesPercentage为false并且ReportByCpuReportByState都为真(默认值)时捕获jiffies。 collectd 4 cpu插件不提供jiffies中的这些选项和措施。我将版本5实例的collectd.conf设置为我刚才提到的设置(甚至明确设置默认设置)和...它固执地继续报告百分比而不是jiffies!

更新:仔细查看了collectd 5的代码后,很明显 the collectd wiki正在撒谎:当ValuesPercentage为false时并且ReportByCpuReportByState都是正确的,cpu插件报告变化率而不是累积jiffies(如在collectd 4中)。

进一步更新:我误解了swap_io的collectd 4行为。结果显示swap指标以字节为单位而swap_io位于页面中(并且您无法对其进行配置),因此正确的collectd 5设置为ReportBytes = false而不是{{1 }}。这是一个较小的差异。

版本4的

collectd.conf

ReportBytes = true
对于版本5

collectd.conf

# We're running collectd 4.10.9
# FQDNLookup since 4.3, became true by default with 5.0
FQDNLookup false
##
## Interval (in seconds) at which to query values.
## Starting with 5.4.3, this may be overridden on a per-plugin basis.
Interval 60
##
## Client part
##
## Logging (only one allowed)
##
# syslog since 4.0
LoadPlugin syslog
<Plugin syslog>
  LogLevel info
</Plugin>
##
## Inputs
##
# cpu since 1.3
LoadPlugin cpu

# df since 3.6
LoadPlugin df
<Plugin df>
  FSType tmpfs
  IgnoreSelected true
# ReportByDevice since 4.8
  ReportByDevice true
# ReportInodes false
# ReportReserved false by default; the option became true and was removed with version 5
  ReportReserved true
# ValuesAbsolute, ValuesPercentage starting with collectd 5.4
</Plugin>

# disk since 1.5
LoadPlugin disk

# interface since 1.0
LoadPlugin interface

# irq since 4.0
LoadPlugin irq

# load since 1.0 (not sure about ReportRelative)
LoadPlugin load
<Plugin load>
  ReportRelative true
</Plugin>

# memory since 1.0
# No options for 4.10
LoadPlugin memory

# nfs since 3.3
LoadPlugin nfs

# processes since 3.2
LoadPlugin processes
<Plugin processes>
# ProcessMatch since 4.5
  ProcessMatch "all" "(.*)"
</Plugin>

# protocols since 4.7
LoadPlugin protocols

# swap since 2.1
# No options for 4.10
LoadPlugin swap
<Plugin swap>
# 4.10 reports swap I/O in pages (and cannot be configured otherwise)
# 4.10 reports swap cached/free/used in bytes
</Plugin>

# tcpconns since 4.2
LoadPlugin tcpconns

# thermal since 4.5
LoadPlugin thermal

# uptime since 4.7
LoadPlugin uptime
##
## Server part
##
## Output (only one allowed)
##
# csv since 4.0
LoadPlugin csv
<Plugin csv>
  DataDir "/var/collectd/csv"
# StoreRates since 4.3
  StoreRates false
</Plugin>

# write_graphite since 5.1
# write_http since 4.8

2 个答案:

答案 0 :(得分:0)

磁盘报告累积操作(ops)和累积字节(Io)。

接口一方面报告累积数据包和错误计数,另一方面报告累积字节数。

swap_io报告累积操作。

请问您的确切完整配置是否已发布,以便我们对您的collectd5 CPU配置进行故障排除?

答案 1 :(得分:0)

嗯,原来这是一个简单而愚蠢的错误。一方使用的csv插件默认为StoreRates false,而另一方使用的graphite插件默认为true,这就是为什么一些(但不是全部)指标是整数(累积计数)而其他指标是浮点数(增长率)的原因。