I'm attempting to interface into the PRTG server from a in-house application using the Mini-Probe API. I've successfully sent a "/probe/announce" request and my probe and sensors are appearing in the web interface.
I've also successfully sent a "/probe/tasks" request and received a reply, but when I attempt to upload the data to "/probe/data" I'm receiving the following response:
Data Exception: Access violation at address 00000000011691CA in module 'PRTG Server.exe'. Read of address 0000000000000000 |
Here is the task list I'm receiving from the server:
[{"sensorid":"2021","kind":"testsensor1","host":"127.0.0.1"},{"sensorid":"2022","kind":"testsensor2","host":"127.0.0.1"}]
And here is the POST data that is causing the error message:
gid=test_gid&key=56cb16a77a84190eda113d7d7dbcc095c73b2f73&protocol=1&data=[{"sensorid":"2021","channel":[{"name":"data","mode":"integer","value":12}]}]
I've tried what I could to trim the information sent in the "/probe/data" request to see what kind of errors I can see. If I send an empty "channel" array I get an expected error ("Data Exception: Field "name" is required in "TlkJSONobject"") but as soon as I put a "name" field into the channel array I start getting the "Access violation" error.
I seem to be sending the mandatory data of "name" and "value" but I'm wondering if there's another required field I may be missing in the "channel" data that is causing the error?
Any help would be greatly appreciated.
Add comment