I’d like a second opinion(s) on whether this behaviour is normal - and my understanding is wrong - or perhaps it’s a bug?
I’m using Telegraf v1.2.1 (git: release-1.2 3b6ffb344e5c03c1595d862282a6823ecb438cff)
on a Raspberry Pi 3 (armhf architecture).
I’m using the following config for the CPU input plugin, because I’m not really interested in raw/jiffies values - only percentages:
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
When I run telegraf -test
, I don’t see any output at all from the plugin:
...
* Plugin: inputs.cpu, Collection 1
* Plugin: inputs.disk, Collection 1
> disk,path=/,device=root,fstype=ext4,host=myhost inodes_free=423075i,inodes_used=52701i,total=7722041344i,free=4946735104i,used=2431152128i,used_percent=32.95187431783181,inodes_total=475776i 1490785312000000000
...
… yet there is definitely stuff going into my influxdb from the plugin when I run it properly with the exact same config:
> show field keys from cpu
name: cpu
fieldKey fieldType
-------- ---------
usage_guest float
usage_guest_nice float
usage_idle float
usage_iowait float
usage_irq float
usage_nice float
usage_softirq float
usage_steal float
usage_system float
usage_user float
> select usage_idle from cpu where host = 'myhost' order by time desc limit 10
name: cpu
time usage_idle
---- ----------
1490786450000000000 99.89989989990681
1490786450000000000 98.97346019028585
1490786450000000000 99.70000000000255
1490786450000000000 98.70129870129765
1490786450000000000 97.58551307846399
1490786440000000000 97.59759759759973
1490786440000000000 99.49849548646664
1490786440000000000 99.89999999999782
1490786440000000000 98.89889889889315
1490786440000000000 98.97371714643343
I don’t understand why I don’t see anything during telegraf -test
, if the plugin is seemingly reporting percentage usage data just fine.
FWIW, if I set collect_cpu_time = true
, I do see output during telegraf -test
- but it’s all the jiffy/times stuff that I’m not interested in. The usage_
fields that I’m interested in are still not shown in this case (yet are still sent to influxdb when I run the service proper).
If anyone has any clues on why the test doesn’t show the actual fields sent, I’d be very grateful!