Open jorensanbar opened 8 months ago
Hi,
We use https://www.ipinfo.io/json to get the public IP. It seems there is a API call limit that you have reached for your IP.
How many agents are using this script ?
Regards, Gilles DUBOIS.
Hello!
Only 1 agent, since it is the first configuration we made of OCS.
But we already detected what the error is.
If the WWW is included in the URI, then the IP output is made from Google servers, so this is the IP Limit Reached.
For the local ISP exit to be used, the URI does not have to contain the WWW:
With just that small change, there is no more crash and 429 error.
ERROR *** EXECUTABLE PLUGIN => Executable plugin <C:\Program Files\OCS Inventory Agent\plugins\lastpublic.ps1> output is not a valid XML document.
AGENT => Running OCS Inventory Agent Version 2.10.1.0 AGENT => Using OCS Inventory FrameWork Version 2.10.1.0
XML Document:
Invoke-RestMethod : { "status": 429, "error": { "title": "Rate limit exceeded", "message": "You've hit the daily limit for the unauthenticated API. Create an API access token by signing up to get 50k req/month." }}En C:\Program Files\OCS Inventory Agent\plugins\lastpublic.ps1: 5 Car cter: 11+ $myjson = Invoke-RestMethod -Uri https://www.ipinfo.io/json+
~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc eption + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand