telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

[Feature Request] diskio input for Darwin

Open brettinternet opened this issue 9 years ago • 11 comments

Feature Request

Proposal:

Support for diskio input on Darwin

For community discussion, go here: https://community.influxdata.com/t/mac-diskio-input-error-not-implemented-yet/371

Current behavior:

Leaving the default telegraf.conf configuration options on macOS installed with homebrew throws the following error in the log:

E! ERROR in input [inputs.diskio]: error getting disk io info: not implemented yet

Desired behavior:

DiskIO input with Telegraf

Use case:

System stats on a platform as prolific as macOS is essential. This includes an input as critical to Telegraf's purpose as disk IO stats.

Thanks to the InfluxData team, I appreciate all of your excellent support.

brettinternet avatar Mar 27 '17 20:03 brettinternet

We get this from gopsutil, which does not provide the data for darwin.

nhaugo avatar Mar 30 '17 20:03 nhaugo

@nhaugo What are you still missing? I added IO counters for Darwin recently (hoping that telegraf would eventually pick this up)

See https://github.com/shirou/gopsutil/pull/336 for reference.

rburchell avatar Apr 08 '17 14:04 rburchell

We don't compile with cgo.

danielnelson avatar Apr 10 '17 23:04 danielnelson

Ah, that's unfortunate. I don't think there's any alternative to get it unfortunately (I did a fair amount of research before settling on that).

rburchell avatar Apr 11 '17 08:04 rburchell

What I said above is wrong, we don't build for Darwin, so the cgo stuff is up to you. I'm going to update the version of gopsutil for #2649, can you test again after that gets merged?

danielnelson avatar Apr 11 '17 18:04 danielnelson

Ah, certainly. I guess @brettinternet might be keen to as well ;-). I remember that I installed from Homebrew originally now, I had just sort of forgotten that and thought it was some kind of "official" package.

rburchell avatar Apr 11 '17 19:04 rburchell

Seems to work fine, at least from my (admittedly limited) testing setup :)

Disk metrics on Darwin

rburchell avatar Apr 11 '17 20:04 rburchell

For the record, I checked into this a bit more and the Homebrew package is official, and built with cgo. Here is the build script. Sorry for the misinformation.

So then it would seem we will have support for this in 1.3.0 and I'm going to close this issue.

danielnelson avatar Apr 11 '17 22:04 danielnelson

No problems, @danielnelson. Thanks for pulling in the update, I'm thrilled to have this working, and looking forward to 1.3.0 :-)

rburchell avatar Apr 11 '17 23:04 rburchell

@danielnelson Though this came in through an addition to third party code, is it worth adding it to CHANGELOG? I don't know how many there are like me using telegraf on Mac, but it seems reasonably noteworthy.

rburchell avatar Apr 19 '17 14:04 rburchell

Yeah, probably a good idea, I have added this issue to the changelog.

danielnelson avatar Apr 19 '17 20:04 danielnelson