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

Improve win_perf_counters on non English systems #2261

Merged
merged 1 commit into from
Jan 24, 2017

Conversation

PierreF
Copy link
Contributor

@PierreF PierreF commented Jan 12, 2017

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)

Another fix for #1730. This PR allows default configuration (with English names, like "Processor") to work on non-English Windows.

It re-add PreVistaSupport (as it use PdhAddEnglishCounter which existing only since Vista). It removes the validation using PdhValidatePath that only support localized names.

A validation is added by calling PdhCollectQueryData during configuration. This give fewer information than PdhValidatePath, it only say if the query exist or not. We no longer know if it was the object, instance or counter that does not exists.

@sparrc sparrc added this to the 1.3.0 milestone Jan 12, 2017
@PierreF PierreF mentioned this pull request Jan 18, 2017
2 tasks
@sparrc
Copy link
Contributor

sparrc commented Jan 24, 2017

thanks again @PierreF

@sparrc sparrc merged commit a505123 into influxdata:master Jan 24, 2017
njwhite pushed a commit to njwhite/telegraf that referenced this pull request Jan 31, 2017
mlindes pushed a commit to Comcast/telegraf that referenced this pull request Feb 6, 2017
@PierreF PierreF deleted the fix-1730 branch August 4, 2018 13:23
gab-satchi pushed a commit to gab-satchi/kubernetes that referenced this pull request Oct 28, 2019
The `ValidatePath` syscall only operates in a localized language mode,
however `AddEnglishCounter` always works with English-localized counter
names. This means that on non-English systems, the counter will work but
will fail validation.

The only solution is to not validate the counter. There is no
corresponding `ValidateEnglishPath` syscall. `CollectQueryData` will
still error if the counter is invalid.

Reference: influxdata/telegraf#2261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants