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

Support for explicit credentials for monitoring remote systems via win_perf_counters plugin #15378

Open
shockogit opened this issue May 18, 2024 · 2 comments
Assignees
Labels
feature request Requests for new plugin and for new features to existing plugins waiting for response waiting for response from contributor

Comments

@shockogit
Copy link

Use Case

The win_perf_counters plugin does not currently allow us to specify credentials for remote monitoring of Windows Performance counters .

Expected behavior

We can specify a username/password for monitoring windows performance counters remotely using the win_perf_counters plugin.

Actual behavior

The plugin only uses the credentials context in which the agent is running.

Additional info

This means we have to run the agent as a user that has credentials to access the target system. In many environment running a process on windows as another user generates security alerts or is prohibited. Allowing credentials to be specified in the .conf file makes the plugin more portable.

@shockogit shockogit added the feature request Requests for new plugin and for new features to existing plugins label May 18, 2024
@powersj
Copy link
Contributor

powersj commented May 20, 2024

Hi,

I could be wrong, but I thought there were reasons also why we didn't allow explicit credentials when added in #12556. Let me sync with Sven on Wednesday and we can get back to you.

@srebhan srebhan self-assigned this May 22, 2024
@srebhan
Copy link
Contributor

srebhan commented May 24, 2024

@shockogit after digging deep into the Windows API, I'm almost certain that the Windows API does not provide the possibility to specify credentials. The API only talks about specifying the remote machine in the counter path. However that path documentation does not show a possibility to specify credentials. Long story short, I don't think this is supported by the Windows API and thus cannot be done in Telegraf!

Additionally, Microsoft itself recommends to use the WMI Counter class when monitoring remote counters:

Use WMI Performance Counter Classes when you want to collect performance data from a local or remote system using WMI.

So I'm inclined to close this issue as "not planned" until someone can show a way to achieve this with the Windows API...

@srebhan srebhan added the waiting for response waiting for response from contributor label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins waiting for response waiting for response from contributor
Projects
None yet
Development

No branches or pull requests

3 participants