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

feat(inputs.win_perf_counters): Add remote computers support #6590

Conversation

vlastahajek
Copy link
Contributor

@vlastahajek vlastahajek commented Oct 29, 2019

Resolves #1899

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:

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

@glinton glinton added area/windows Related to windows plugins (win_eventlog, win_perf_counters, win_services) feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin labels Oct 30, 2019
plugins/inputs/win_perf_counters/README.md Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/README.md Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/README.md Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/README.md Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/win_perf_counters.go Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/win_perf_counters.go Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/win_perf_counters.go Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/win_perf_counters.go Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/README.md Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/README.md Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/README.md Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/win_perf_counters.go Outdated Show resolved Hide resolved
plugins/inputs/win_perf_counters/README.md Outdated Show resolved Hide resolved
@DmitryMaletin
Copy link

Is there any ETA that PR will be merged?

@powersj
Copy link
Contributor

powersj commented Feb 16, 2022

@vlastahajek are you interested in continuing this? Looks like a rebase on master to resolve some conflicts, and then a few outstanding points are what is left.

@powersj powersj added the waiting for response waiting for response from contributor label Feb 16, 2022
@vlastahajek
Copy link
Contributor Author

@powersj, OK. I will look at this later this week or at the beginning of the next week.

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Feb 16, 2022
@vlastahajek vlastahajek force-pushed the vh-wpc-remote-computers-support branch 3 times, most recently from 442598d to 4f6b5bf Compare March 3, 2022 12:40
@vlastahajek vlastahajek force-pushed the vh-wpc-remote-computers-support branch from 4f6b5bf to 850677d Compare March 3, 2022 13:16
@vlastahajek
Copy link
Contributor Author

It's ready.

@sspaink sspaink changed the title Windows Performance Counters: Add remote computers support feat(inputs.win_perf_counters): Add remote computers support Mar 4, 2022
@sspaink sspaink added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Mar 4, 2022
@telegraf-tiger
Copy link
Contributor

Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

⚠️ This pull request increases the Telegraf binary size by 2.56 % for linux amd64 (new size: 142.4 MB, nightly size 138.9 MB)

📦 Click here to get additional PR build artifacts

Artifact URLs

DEB RPM TAR GZ ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_i386.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz
static_linux_amd64.tar.gz

@sspaink
Copy link
Contributor

sspaink commented May 12, 2022

I moved these changes to a local branch and created a new pull request: #11090. 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.

Thank you @vlastahajek for all your work on this and quick responses, I will be closing this pull request so you aren't responsible anymore for helping us re-base it while we wait.

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) feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

win_perf_counters and remote Windows host
6 participants