Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

procstat data missing fields mentioned in documentation #1584

Closed
rj33 opened this issue Aug 5, 2016 · 7 comments · Fixed by #1585
Closed

procstat data missing fields mentioned in documentation #1584

rj33 opened this issue Aug 5, 2016 · 7 comments · Fixed by #1585
Labels
bug unexpected problem or unintended behavior

Comments

@rj33
Copy link

rj33 commented Aug 5, 2016

Bug report

The procstat plugin documentation mentions the following stats that don't appear to be arriving:
procstat_[prefix_]read_count value=396
procstat_[prefix_]write_count value=1
procstat_[prefix_]read_bytes value=1019904
procstat_[prefix_]write_bytes value=1

procstat_[prefix_]num_fds value=4

Relevant telegraf.conf:

[[inputs.procstat]]
exe = "foo"

System info:

telegraf_1.0.0-beta3

Ubuntu 14.04.1

Steps to reproduce:

  1. Set any inputs.procstat plugin in telegraf.conf
  2. Restart telegraf
  3. Check incoming data

Expected behavior:

Stats included for things num_fds

Actual behavior:

Additional info:

num_fds and the io stats are not included, looking at the measurement in innodb I see these fields only:
cpu_time_guest cpu_time_guest_nice cpu_time_idle cpu_time_iowait cpu_time_irq cpu_time_nice cpu_time_soft_irq cpu_time_steal cpu_time_stolen cpu_time_system cpu_time_user cpu_usage exe host involuntary_context_switches memory_rss memory_swap memory_vms num_threads pid process_name voluntary_context_switches

@sparrc sparrc added the bug unexpected problem or unintended behavior label Aug 5, 2016
sparrc added a commit that referenced this issue Aug 5, 2016
aurrelhebert pushed a commit to aurrelhebert/telegraf that referenced this issue Aug 9, 2016
@andrii-rymar
Copy link

I'm able to reproduce this with Telegraf 1.2.0-1 and 1.2.1-1 on CentOS 6.5 x64

@cchanning
Copy link

cchanning commented Jul 21, 2017

Hi, this may need to be reopened. I've just tested this again on version 1.3.4 running on Ubuntu 16.04 as root. I'm getting the following fields after running (telegraf -test -config telegraf.conf):

procstat,exe=dd,process_name=dd,host=8196018c6b73 cpu_time_steal=0,cpu_time_stolen=0,memory_rss=1075146752i,num_threads=1i,involuntary_context_switches=18i,cpu_time_iowait=0,cpu_time_irq=0,pid=3395i,cpu_time_guest=0,memory_vms=1078280192i,cpu_usage=3.9598084197168877,num_fds=3i,voluntary_context_switches=131i,cpu_time_user=0,cpu_time_system=1.9,memory_swap=0i,cpu_time_idle=0,cpu_time_nice=0,cpu_time_soft_irq=0,cpu_time_guest_nice=0 1500637292000000000

The target process running is dd (dd if=/dev/zero of=/root/testfile bs=1G count=8 oflag=direct). The telegraf config is the default with the procstat plugin uncommented and the exe parameter set as 'dd'.

As you can see, all of the disk I/O metrics are missing.

@danielnelson
Copy link
Contributor

When these stats are missing it generally means that Telegraf does not have permission to read the necessary files in /proc/${pid}/. The easiest way to get this to work is to run Telegraf as root, but I don't recommend it.

@cchanning
Copy link

Hi Daniel, thanks for responding. As I mentioned in my earlier comment though, telegraf was running as root when I ran the test.

@danielnelson
Copy link
Contributor

The io stats are read from /proc/${pid}/io, can you cat that file?

@cchanning
Copy link

cchanning commented Jul 24, 2017

Hey, I've done some further investigation on this issue and it appears to be related to docker on Mac rather than to Telegraf. Sorry for the noise =)

@danielnelson
Copy link
Contributor

No problem, I'd love to hear the details if you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants