Hello together,
i am currently searching for a solution to monitor a REST API from PRTG while the REST POST/PUT API requires me to add XML or JSON as Body Data allready in the PRTG request. Currently i only see custom Headers but no custom Body configurations possible in the REST Sensors.
Request-Example:
PUT https://example.domain.com/api/v1/authorizations Authorization: Basic QWxhZGRpbjpPcGVuU2VzYQll X-Controller-Serial-Number: 21328307015870 *4 Content-Type: application/json Accept: application/json { “id”: “067e6162-3b6f-4ae2-a171-2470b63dff00”, “timeStamp”: “2017-04-20T09:40:23Z”, “authType”: “”, *7 “locationId”: “”, *6 “identificationList”: [ {“id”:“EA897F001”,“mediaType”:“UHF”,“encoding”:“HEX”}, ] }
The REST result will be depending on the body data (here the "id").
Any idea how to solve with PRTG. Maybe someone has allready a self writtten Custom Sensor i.e.
Regards Christian
Article Comments
Thank you,
my fault that i was not up-to-date with my PRTG installation concerning this feature of a BETA sensor. :-)
After PRTG Update also POST data works as you describe.
regards
Christian
Mar, 2018 - Permalink
Hi there,
You can do this by using the Rest Custom Sensor within PRTG. There you can set the request type and postdata when you choose "Post".
https://www.paessler.com/manuals/prtg/rest_custom_sensor
Best regards.
Mar, 2018 - Permalink