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

Windows: win_perf_counters won't load on Server Core installations due to missing Windows API libraries #1763

Closed
someone1 opened this issue Sep 13, 2016 · 1 comment · Fixed by #2180
Assignees
Labels
bug unexpected problem or unintended behavior help wanted Request for community participation, code, contribution panic issue that results in panics from Telegraf platform/windows
Milestone

Comments

@someone1
Copy link

Bug report

Relevant telegraf.conf:

Standard one shipped with Windows client download

System info:

Telegraf: v1.0.0
Operating System: "Microsoft Hyper-V Server 2012 R2" & "Microsoft Windows Server 2012 R2 Standard"

Steps to reproduce:

  1. Try to execute any options on telegraf on a Server Core installation

Expected behavior:

To execute normally

Actual behavior:

Panic:

panic: The specified module could not be found.

goroutine 1 [running]:
panic(0x12fcb00, 0xc0820fc990)
        /usr/local/go/src/runtime/panic.go:481 +0x3f4
github.com/lxn/win.MustLoadLibrary(0x14b9480, 0xc, 0xc)
        /home/ubuntu/telegraf-build/src/github.com/lxn/win/win.go:48 +0x79
github.com/lxn/win.init.9()
        /home/ubuntu/telegraf-build/src/github.com/lxn/win/opengl32.go:117 +0x37

github.com/lxn/win.init()
        /home/ubuntu/telegraf-build/src/github.com/lxn/win/winspool.go:100 +0x78

github.com/influxdata/telegraf/plugins/inputs/win_perf_counters.init()
        /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/i
nputs/win_perf_counters/win_perf_counters.go:332 +0x62
github.com/influxdata/telegraf/plugins/inputs/all.init()
        /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/i
nputs/all/all.go:79 +0x18b
main.init()
        /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/cmd/teleg
raf/telegraf.go:323 +0x85

Additional info:

I dug around and it looks like the line /home/ubuntu/telegraf-build/src/github.com/lxn/win/opengl32.go:117 is trying to load a "opengl32.dll" which I'm guessing is a windows drawing component that doesn't ship with server core installations. Maybe a new interface for querying the performance counters can be used that doesn't put any dependencies on features not required for querying?

@sparrc sparrc added bug unexpected problem or unintended behavior help wanted Request for community participation, code, contribution platform/windows labels Sep 13, 2016
@sparrc sparrc added the panic issue that results in panics from Telegraf label Sep 15, 2016
@jwilder jwilder added this to the Future Milestone milestone Sep 15, 2016
@JeffAshton
Copy link
Contributor

Opened pull request #2017 to address this

sparrc pushed a commit that referenced this issue Dec 20, 2016
@sparrc sparrc modified the milestones: 1.2.0, Future Milestone Dec 20, 2016
njwhite pushed a commit to njwhite/telegraf that referenced this issue Jan 31, 2017
maxunt pushed a commit that referenced this issue Jun 26, 2018
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 help wanted Request for community participation, code, contribution panic issue that results in panics from Telegraf platform/windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants