-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
[Feature Request] Specific Error Message for GetDynamicSensorParameters #140
Comments
…ors/resolving sensor targets/parameters when an error message is not included in the AddSensorProgress response (#140)
Hi @JustinGrote, I have released a pre-release build of PrtgAPI 0.9.13 that includes this enhancement. Can you please follow the manual installation instructions and advise whether this works as expected? For future enhancements please use the fancy Feature request/Idea template when creating an issue. Unrelated, you may be interested to know that a previous commit for PrtgAPI 0.9.13 introduced a new Regards, |
@lordmilko thanks for the fast turnaround! Apologies on the Feature Request, I did a "new issue from line" in the code and it didn't present me with a template, maybe a Github limitation or something else that needs to be resolved. I will be able to test later today when I get back to this item. Thanks. |
@lordmilko works as expected! This is very helpful as I can now test if VMware credentials are correct without needing them saved outside of PRTG, since Paessler in their infinite wisdom didn't make them available to custom scripts while still letting windows and linux creds. Here's some examples of messages I can now trap: 🏠(get-prtgclient).GetDynamicSensorParameters(11975,'esxserverhealthsensorextern')
MethodInvocationException: Exception calling "GetDynamicSensorParameters" with "2" argument(s): "An exception occurred while trying to resolve sensor targets: Please enter
the VMware user and password in the device."
🏠(get-prtgclient).GetDynamicSensorParameters(12003,'esxserverhealthsensorextern')
MethodInvocationException: Exception calling "GetDynamicSensorParameters" with "2" argument(s): "An exception occurred while trying to resolve sensor targets: Cannot compl
ete login due to an incorrect user name or password."
🏠(get-prtgclient).GetDynamicSensorParameters(11975,'esxserverhealthsensorextern')
MethodInvocationException: Exception calling "GetDynamicSensorParameters" with "2" argument(s): "An exception occurred while trying to resolve sensor targets: Unable to co
nnect to the remote server." |
PrtgAPI/src/PrtgAPI/Request/ResponseParser.cs
Lines 551 to 577 in b68087d
Add logic to parse out the div class "errormessage" and report it in the error so I can take action. In this example, I'll know the username/password for the sensor for VMware isn't correct and report that back appropriately or attempt a different credential.
The text was updated successfully, but these errors were encountered: