Hi all,
i'm trying to create new sensor to Monitoring an IPSec Tunnel on a Palo Alto Firewall. Unfortunately, when i run sensor receive the following error: --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Response not well-formed: "(Exception calling "SecureStringToBSTR" with "1" argument(s): "Value cannot be null. Parameter name: s" At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\Script_VPN_PA.ps1:3 char:1 + $Bstr = $Marshal::SecureStringToBSTR($SecurePassword) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ArgumentNullException Cannot find an overload for "PtrToStringAuto" and the argument count: "1". At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\Script_VPN_PA.ps1:4 char:1 + $Password = $Marshal::PtrToStringAuto($Bstr) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodException + FullyQualifiedErrorId : MethodCountCouldNotFindBest Cannot convert argument "s", with value: "", for "ZeroFreeBSTR" to type "System.IntPtr": "Cannot convert null to type "System.IntPtr"." At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\Script_VPN_PA.ps1:5 char:1 + $Marshal::ZeroFreeBSTR($Bstr) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodException + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument invoke-restmethod : <response status = 'error' code = '403'><result><msg>Invalid credentials.</msg></result></response> At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\Script_VPN_PA.ps1:46 char:26 + [xml]$CheckFW1StateXML = invoke-restmethod @CheckFW1State + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:Htt pWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe ll.Commands.InvokeRestMethodCommand invoke-restmethod : <response status = 'error' code = '403'><result><msg>Invalid credentials.</msg></result></response> At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\Script_VPN_PA.ps1:52 char:26 + [xml]$CheckFW2StateXML = invoke-restmethod @CheckFW2State + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:Htt pWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe ll.Commands.InvokeRestMethodCommand <prtg> <result> <channel>FW_HA</channel> <value>1</value> <showChart>1</showChart> <showTable>1</showTable> <LimitMaxError>0</LimitMaxError> <LimitMode>1</LimitMode> </result> <result> <channel>Produzione-H3G</channel> <value>0</value> <showChart>1</showChart> <showTable>1</showTable> <LimitMaxError>0</LimitMaxError> <LimitMode>1</LimitMode> </result> </prtg> )" (code: PE132)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Any idea to fix this ???
Thanks a lot
Roberto
Add comment