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

check_pdh and type=double not working #272

Closed
codespartan128 opened this issue Mar 23, 2016 · 5 comments
Closed

check_pdh and type=double not working #272

codespartan128 opened this issue Mar 23, 2016 · 5 comments
Assignees
Labels
Milestone

Comments

@codespartan128
Copy link

Just tried to check some Windows counters that return float values. To ensure check_pdh could handle the value I set the flag type=double. Here an extract of the check I setup.

alias_checklogicaldisk_averagelatency_disk1=check_pdh "counter=\LogicalDisk(*)\Avg. Disk sec/Transfer" type=double

Running this manually ( nscp test )

alias_checklogicaldisk_averagelatency_disk1
L        cli OK: OK: \LogicalDisk(*)\Avg. Disk sec/Transfer = 0
L        cli  Performance data: '\LogicalDisk(*)\Avg. Disk sec/Transfer_value'=0;0;0

Running the following Powershell whilst running CrystalDiskMark

( Get-Counter -Counter "\LogicalDisk(*)\Avg. Disk sec/Transfer" ).CounterSamples | select instancename, cookedvalue

which returns

c:   0.00180013181927105
f:    0.049985006338838

So the original check_pdh check should have returned some decimals in the performance data and it didn't.

By the way I am using NSClient++ 0.4.4.15 but I have also tried this on version 0.5.0.32.

@mickem mickem closed this as completed in 650462a Mar 29, 2016
@codespartan128
Copy link
Author

Thanks Mickem!

@mickem
Copy link
Owner

mickem commented Mar 30, 2016

Nightly build is out: https://github.com/mickem/nscp/releases/tag/0.5.0.33

@codespartan128
Copy link
Author

Just tested the 0.5.0.34 nightly build. Nearly there :)

The nagios message now contains a double. However, the performance data is still issuing rounded ints as can be seen at the end of the last line:

alias_checklogicaldisk_averagelatency_disk1 0.01 0.02
L        cli OK: \LogicalDisk(C:)\Avg. Disk sec/Transfer = 0.000120369
L        cli  Performance data: '\LogicalDisk(C:)\Avg. Disk sec/Transfer_value'=0;0;0

@mickem mickem reopened this Apr 1, 2016
@mickem
Copy link
Owner

mickem commented Apr 1, 2016

Will fix this in next build...

@codespartan128
Copy link
Author

Awesome thank you

Sent from Outlookhttps://aka.ms/f818qx

On Fri, Apr 1, 2016 at 3:08 AM -0700, "Michael Medin" <notifications@github.commailto:notifications@github.com> wrote:

Will fix this in next build...

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/272#issuecomment-204337665

@mickem mickem added the bug label Apr 1, 2016
@mickem mickem added this to the 0.5.0 milestone Apr 1, 2016
@mickem mickem self-assigned this Apr 1, 2016
@mickem mickem closed this as completed in baf98fc Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants