-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
get-sensorhistory 'Don't know how to convert double value '20,10975' (20,1098).' #218
Comments
Hi @solipsist01, Please be advised I have successfully managed to reproduce this issue, and have pushed a commit that should hopefully resolve this. As long as the build successfully completes, you should be able to download and run PrtgAPI by manually downloading and importing it into your script for now until I release PrtgAPI 0.9.15 which should hopefully be within the next week or two Regards, |
Hi @solipsist01, Please be advised PrtgAPI 0.9.15 has now been released which includes a fix for this issue To update PrtgAPI, please run Regards, |
Hi @lordmilko Sorry that i didn't respond earlier, i have missed your comment 4 days ago. If i can do anything to help, or test, please let me know.
XML output of url:
|
Hi @solipsist01, It appears that by default .NET doesn't round numbers up or down the way you would normally expect, so while my original solution here was valid, scenarios like this were still able to slip through the cracks! I have pushed another patch for this; can you please try it using the manual installation instructions after the build finishes (which will be in about 40 minutes) Regards, |
@lordmilko Would it perhaps be better to change culture in powershell? which one would be the easiest for prtgapi to understand ? or is the problem the locale of the prtg instance ? I don't mind testing this until it works. But, i don't want to be bothersome as well. Thank you for your time.
|
Thanks @solipsist01, The basic issue is that the culture of the OS running PrtgAPI may be different from the culture of the OS that the PRTG server is running on, so I can't really make any assumptions - I just have to make it work! I've pushed another Appveyor build (still called 0.9.16-preview.1); are you able to advise how that one goes when it builds? |
hI @lordmilko It works much better now, i had one error and it was the following one. I will let it run this weekend. I guess it could help if i compile a list of all the double value exceptions i encounter ? Thank you for your help help so far !
|
Thanks @solipsist01, I don't think I need the XML, just the error message provides the information I need to replicate each error get-sensorhistory : Don't know how to convert double value '112,12165' (112,1216). A list of any errors you encounter would be useful. I've tried stress testing this against my own personal PRTG servers in the past, but unfortunately I don't have things setup the same as others who are able to generate these failures. I've pushed a new build to Appveyor, however even if you kick your thing off using the previous build I will test any failures you got to make sure they're all fixed in the latest build. |
Hi @lordmilko Thank you :) These were the errors i had during the weekend:
|
Thanks @solipsist01, Are you able to confirm whether you used the version I pushed before or after you posted your last message at the end of last week? |
before :) If you like, i can run it again with the latest build. no problem :) |
Thanks @solipsist01, Based on the errors you displayed, all of those appear to be errors that would be fixed in the latest version. If you can test with the new build that would also be very helpful! Also, unrelated, since I see you're doing a bunch of stuff relating to downtime reports, potentially this new feature I pushed over the weekend may be useful to you ;) |
Thanks @lordmilko It's running right now with the latest build :) |
The report could generate without any errors :) Thank you for all the help ! |
Hi @solipsist01, Please be advised PrtgAPI 0.9.16 has now been released. To update PrtgAPI, please run Update-Module PrtgAPI and reopen PowerShell Regards, |
i've tested this from several clients:
Since reporting in PRTG is mediocre at best, i'm writing some stuff to generate some reports.
Consider the following code:
$sensors = get-sensor -probe 'some-probe' -tags vmwaredatastoreexternsensor
$month = $sensors | get-sensorhistory -EndDate (Get-Date).AddDays(-31) -average 86400 -downtime -Verbose
All goes well, but at some sensors it seems the procedure crashes.
When i manually paste the URL https://someprtghost.com/api/historicdata.xml?id=32630&edate=2021-05-03-10-47-43&sdate=2021-04-02-10-47-13&avg=86402&sortby=-datetime&count=500&username=someusername&passhash=somepasshash into my browser, it generates the following XML
The text was updated successfully, but these errors were encountered: