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

Unable to Collect Metrics on Windows 8.1 #4119

Closed
meinenec opened this issue May 8, 2018 · 7 comments
Closed

Unable to Collect Metrics on Windows 8.1 #4119

meinenec opened this issue May 8, 2018 · 7 comments
Labels
area/windows Related to windows plugins (win_eventlog, win_perf_counters, win_services) bug unexpected problem or unintended behavior

Comments

@meinenec
Copy link

meinenec commented May 8, 2018

Relevant telegraf.conf:

Using the sample telegraf.conf that ships with 1.6.1 i386 Windows

[agent]
  interval = "30s"
  round_interval = true
  metric_buffer_limit = 1000
  flush_buffer_when_full = true
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"

  debug = true
  quiet = false
  logfile = "/Program Files/Telegraf/telegraf.log"
  hostname = ""


[[inputs.win_perf_counters]]
  [[inputs.win_perf_counters.object]]
    # Processor usage, alternative to native, reports on a per core.
    ObjectName = "Processor"
    Instances = ["*"]
    Counters = [
      "% Idle Time",
      "% Interrupt Time",
      "% Privileged Time",
      "% User Time",
      "% Processor Time",
      "% DPC Time",
    ]
    Measurement = "win_cpu"
    # Set to true to include _Total instance when querying for all (*).
    IncludeTotal=true

System info:

[Include Telegraf version, operating system name, and other relevant details]
1.6.1
Windows 8.1 Pro (64 bit)

Steps to reproduce:

  1. Run Telegraf as a service according to the Telegraf docs
  2. Run C:\"Program Files"\Telegraf\telegraf.exe --config C:\"Program Files"\Telegraf\telegraf.conf --test

Expected behavior:

I expect Telegraf to list the metrics that would be gathered.

Actual behavior:

I receive Plugin: inputs.win_perf_counters, Collection 1

Additional info:

Seeing buffer fullness: 0 / 1000 metrics In the logs.

Not sure if I missed a step in the config but I believe I followed the steps correctly.

@danielnelson
Copy link
Contributor

Can you try these steps to repair performance counters: #3608 (comment)

@danielnelson danielnelson added bug unexpected problem or unintended behavior area/windows Related to windows plugins (win_eventlog, win_perf_counters, win_services) labels May 8, 2018
@meinenec
Copy link
Author

meinenec commented May 8, 2018

That seems to have made things get further, thank you! I'm getting this on --test now and at a glance I'm not too sure where to look next.

* Plugin: inputs.win_perf_counters, Collection 1
> win_cpu,host=Diablo,instance=_Total,objectname=Processor Percent_Idle_Time=0 1525742629000000000
unexpected fault address 0x89482daa
fatal error: fault
[signal 0xc0000005 code=0x0 addr=0x89482daa pc=0x46f7cf]

goroutine 14 [running]:
runtime.throw(0x1239831, 0x5)
        /usr/local/go/src/runtime/panic.go:605 +0x7c fp=0x138abcf8 sp=0x138abcec pc=0x429e8c
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_windows.go:164 +0x12e fp=0x138abd0c sp=0x138abcf8 pc=0x43cf9e
syscall.UTF16ToString(0x89482daa, 0x20000000, 0x20000000, 0xe, 0x1b0ec40)
        /usr/local/go/src/syscall/syscall_windows.go:49 +0x2f fp=0x138abd28 sp=0x138abd0c pc=0x46f7cf
github.com/influxdata/telegraf/plugins/inputs/win_perf_counters.UTF16PtrToString(0x89482daa, 0x13665600, 0x7)
        /go/src/github.com/influxdata/telegraf/plugins/inputs/win_perf_counters/pdh.go:421 +0x35 fp=0x138abd40 sp=0x138a
bd28 pc=0xe29075
github.com/influxdata/telegraf/plugins/inputs/win_perf_counters.(*Win_PerfCounters).Gather(0x13555bc0, 0x1a2fce0, 0x136f
c100, 0x1, 0x1)
        /go/src/github.com/influxdata/telegraf/plugins/inputs/win_perf_counters/win_perf_counters.go:211 +0x18b fp=0x138
abdb4 sp=0x138abd40 pc=0xe29dfb
github.com/influxdata/telegraf/agent.(*Agent).Test(0x134653d8, 0x0, 0x0)
        /go/src/github.com/influxdata/telegraf/agent/agent.go:211 +0x3c6 fp=0x138abe68 sp=0x138abdb4 pc=0x75a9a6
main.reloadLoop(0x13582000, 0x1b2777c, 0x0, 0x0, 0x1b2777c, 0x0, 0x0, 0x1b2777c, 0x0, 0x0, ...)
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:177 +0x9f9 fp=0x138abf9c sp=0x138abe68 pc=0xf56d
b9
main.(*program).run(0x134bd2f0)
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:254 +0xdc fp=0x138abfe8 sp=0x138abf9c pc=0xf574d
c
runtime.goexit()
        /usr/local/go/src/runtime/asm_386.s:1635 +0x1 fp=0x138abfec sp=0x138abfe8 pc=0x452d01
created by main.(*program).Start
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:249 +0x33

goroutine 1 [chan receive]:
github.com/kardianos/service.(*windowsService).Run(0x13555260, 0x134bd2f0, 0x134a3e60)
        /go/src/github.com/kardianos/service/service_windows.go:273 +0x11d
main.main()
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:396 +0x95d

goroutine 15 [select]:
github.com/influxdata/telegraf/agent.(*Agent).Test.func1(0x1346c980, 0x1346c940)
        /go/src/github.com/influxdata/telegraf/agent/agent.go:184 +0x9c
created by github.com/influxdata/telegraf/agent.(*Agent).Test
        /go/src/github.com/influxdata/telegraf/agent/agent.go:182 +0xc6

goroutine 6 [syscall]:
os/signal.signal_recv(0x0)
        /usr/local/go/src/runtime/sigqueue.go:131 +0x12f
os/signal.loop()
        /usr/local/go/src/os/signal/signal_unix.go:22 +0x1a
created by os/signal.init.0
        /usr/local/go/src/os/signal/signal_unix.go:28 +0x37

@danielnelson
Copy link
Contributor

I notice now that you are using 32-bit Windows, and unfortunately win_perf_counters is only working with 64-bit Windows. Here is the issue: #2468

The good news is that there is some work in progress to fix this bug: #4076

I'm going to merge this issue with #2468, this ticket will be updated once the issue is fixed.

@meinenec
Copy link
Author

meinenec commented May 8, 2018

@danielnelson As mentioned above I am using 64 bit windows

@danielnelson
Copy link
Contributor

Are you using the 32-bit package? If so you can switch to the amd64 package:

@meinenec
Copy link
Author

meinenec commented May 8, 2018

Ahhh I was using the 32-bit package. That was bad on me. Thank you so much and sorry for the bother! First time using on windows so I'm glad things are working :)

@danielnelson
Copy link
Contributor

No problem, sorry about the rough edges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/windows Related to windows plugins (win_eventlog, win_perf_counters, win_services) bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants