What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Is there a solution to POST/JSON Body Data in any XML/REST Sensor?

Votes:

0

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

custom request rest

Created on Mar 16, 2018 12:10:26 PM



2 Replies

Votes:

0

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.

Created on Mar 16, 2018 5:19:51 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

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

Created on Mar 19, 2018 8:24:54 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.