Hello,
I am trying to send data (from .xml file) from application using POST method to prtg. I have correct token, port 5050 is open for me, I do have respond from prtg probe but this one: { "status": "Ok", "Matching Sensors": "0" }
I am executing this http request: http://127.0.0.1/token
Obviously I can't contact that specific sensor (even though token is right and I am sure about it).
Do you have any idea how can I resolve it?
PRTG version 18.4.45.1898+
Thank you for any help!
Article Comments
Hello Erhard,
That address supposed to be example, i know that i need to use port and also external IP.
Thank you
Oct, 2018 - Permalink
Hello Erhard. That supposed to be an example. I know how to use that syntax.
Also thing is, when I try HTTP PUSH Count what should probably work the same, and I put request to the web browser, i do have response from server { "status": "Ok", "Matching Sensors": "1" }.
Sadly this thing is not happening when I am trying to requesting HTTP PUSH DATA ADVANCED sensor...
Nov, 2018 - Permalink
Hello Lukas,
Please send us additional details by email (support@paessler.com) from the sensor, screenshots from the sensor's Overview, Settings and Log tabs would be great as a starting point.
Kind regards,
Erhard
Nov, 2018 - Permalink
I'm not sure if this thread is still active. I had the same problem with my Version 19.2.50.2842 and switching from "POST" to GET worked.
Excerpt from my PowerShell $prtgresult contains a valid XML als string. $prtgurl is something like "http://prtg.uclabor.de:5050/token" The following works
$Answer=Invoke-RestMethod ` -method "GET" ` -URI ("$($prtgurl)?content=$([System.Web.HttpUtility]::UrlEncode($prtgresult))") ` -ContentType "application/xml"
And this does not work
$Answer=Invoke-RestMethod ` -method "POST" ` -URI ($prtgurl) ` -ContentType "application/xml" ` -Body ([System.Web.HttpUtility]::UrlEncode($prtgresult))
I get a status=OK and "Matching Sensor = 1" as Return but PRTG does not loko the data into de debug file.
Jul, 2019 - Permalink
Hello Frank,
Please send us additional details by email to support@paessler.com:
- Screenshot from sensor's settings
- Screenshot from sensor's "Log" tab
- The Powershell script you're using
- All files that might be generated from sensor's "Write request to disk..." option.
Kind regards,
Erhard
Jul, 2019 - Permalink
Hello Lukas,
You also need to enter the port in the url, please "How to use" here.
Also, unless the event that sends the data to PRTG is not running on the same server, you need to use the PRTG server's external IP, currently the webhook addresses the machine itself where the webhook is being exeuted (localhost, 127.0.0.1)
Kind regards,
Erhard
Oct, 2018 - Permalink