telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

feat(inputs.win_perf_counters): Add remote computers support

Open sspaink opened this issue 2 years ago • 10 comments

Replacing: https://github.com/influxdata/telegraf/pull/6590 Resolves https://github.com/influxdata/telegraf/issues/1899

At the moment we are waiting for customer/community participation to help ensure this change meets their needs (configuration makes sense, etc.). Therefore we will need to be able to re-base it and get new build artifacts on request, moving this pull request to be under a local branch seems like the best approach.

original description:

Added support for reading performance counters from remote computers. User, under who is Telegraf running, must be already authenticated to the remote computer(s).

The support is added via additional optional global parameter Sources. This parameter can be also set for performance object to configure per host-specific performance counter:

[[inputs.win_perf_counters]]
  PreVistaSupport=false
  UseWildcardsExpansion=false
  UsePerfCounterTime=true
  CountersRefreshInterval="0"
  PrintValid=true
  # Names or ip addresses of remote computers to gather counters from, including local computer.
  # Telegraf's user must be already authenticated to the remote computers.
  # It can be overridden at the object level
  Sources=["localhost", "192.168.10.12"]

[[inputs.win_perf_counters.object]]
   # Overrides the Sources global parameter for current performance object.
    Sources = ["192.168.1.68"]
    # Processor usage, alternative to native, reports on a per core.
    ObjectName = "Processor"
    Instances = ["*"]
    Counters = [
      "% Processor Time",
    ]
    Measurement = "win_cpu"

It allows to define the same configuration for multiple computers and also different configurations per computer.

Computer name is then added as the source tag. Telegraf host compuper has the source set to the computer name.

Readme has been also enhanced with plugins's schema description.

Required for all PRs:

  • [X] Signed CLA.
  • [X] Associated README.md updated.
  • [X] Has appropriate unit tests.

sspaink avatar May 12 '22 18:05 sspaink

@cruscio I think you and Allscripts have been interested in this feature for some time now (https://github.com/influxdata/telegraf/issues/8238). Would you be able to test the build artifacts of this PR posted by telegraf-tiger? Once this PR passes code review we would like to merge it but only if it meets users' needs, including yours. Thanks!

reimda avatar May 25 '22 16:05 reimda

Closing due to lack of interest, if you are interested in this feature please leave a comment.

sspaink avatar Jun 21 '22 15:06 sspaink

Please, reopen this PR. We are very interested in this. Thank you!

deweter avatar Aug 09 '22 14:08 deweter

@deweter I can re-open this and get it ready for review, would you be able to help test this feature and provide feedback on the config to help make sure it is ready?

sspaink avatar Aug 09 '22 14:08 sspaink

Yes, we would. At this moment, we are using telegraf in env with 500+ servers. Now it has to be deployed locally just because perfmon counters cannot be gathered remotely.

deweter avatar Aug 09 '22 15:08 deweter

@deweter Whenever you have time, could you try the artifacts posted by the tiger bot and see if these new feature works for you? And let me know if the documentation is enough: https://github.com/influxdata/telegraf/blob/vh-wpc-remote-computers-support/plugins/inputs/win_perf_counters/README.md

Thank you!

sspaink avatar Aug 10 '22 00:08 sspaink

@deweter Have you had time to test out this feature? The artifacts will expire in the next 8 days.

sspaink avatar Aug 31 '22 14:08 sspaink

I am sorry for the delay. Please, bare with me, I am going to have a look at it within next two weeks.

deweter avatar Sep 07 '22 07:09 deweter

No worries, I've re-based so now the artifacts posted will last another month.

sspaink avatar Sep 07 '22 14:09 sspaink

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Page. Thank you!

telegraf-tiger[bot] avatar Oct 12 '22 18:10 telegraf-tiger[bot]

Hello, can this PR be reopened? I am interested in this feature. I can provide support needed to get this merged. Thank you!

hpainter2002 avatar Nov 04 '22 16:11 hpainter2002

@sspaink are you still willing to work on this pr?

MyaLongmire avatar Nov 07 '22 10:11 MyaLongmire

@hpainter2002 thank you, your help would be appreciated, can you try out one of the artifacts the Tiger bot posted to see if this feature works for you? If you could also provide feedback on the documentation in this PR that would be great.

sspaink avatar Nov 07 '22 16:11 sspaink

@sspaink Yes, I can try out the artifact. I will let you know if the feature is sufficient.

hpainter2002 avatar Nov 07 '22 18:11 hpainter2002

@sspaink I have tested windows_amd64.zip. Seems to work for us. I have also added a few suggestions on the documentation (Let me know if you would prefer me to start a review). Feel free to update as you see fit. Thank you!

hpainter2002 avatar Nov 10 '22 22:11 hpainter2002

Thanks so much for the pull request! :handshake: :black_nib: Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

telegraf-tiger[bot] avatar Nov 22 '22 10:11 telegraf-tiger[bot]

Superseeded by #12556.

srebhan avatar Jan 26 '23 14:01 srebhan