Hello Paessler Team, i want to integrate an Dell Powerstore into PRTG. The Powerstore is only monitorable via REST API.
I have a test tool ( Postman) and with this URL :
https://{{ip}}/api/rest/volume?select=id,size,logical_used
im getting alle the info i need.
[{"id":"0511dd20-069a-4ba7-8b7d-e917d6163de2","size":806380109824,"logical_used":764978954240}, {"id":"0691104d-8c00-4ecc-9ab0-6a46b8448004","size":214748364800,"logical_used":152692428800}, {"id":"2e394071-163b-40d5-a143-38f6223780b3","size":21474836480,"logical_used":0}, {"id":"2e922cbe-cfc3-4084-81d8-a6f4c6e09e24","size":85899345920,"logical_used":297553920},
but unfortunately .. i´m not able to get it into my prtg. i try to use the new custom Rest Sensor What should i put into String : /api/rest/volume?select=id,size,logical_used ?? What should i put into the channel config ?
I´m getting everytime the error : The received JSON data could not be parsed. Failed to parse json string: Source error
Article Comments
As a reminder the
REST Customer v2
https://www.paessler.com/manuals/prtg/rest_custom_sensor
is marked already als EOL/Legacy and will then stop to work and you need to create new Sensors instead ! ( No centralized Basic Authentication seems to be working then )
The new Sensor should probably the
HTTP XML/REST Value Sensor
https://www.paessler.com/manuals/prtg/http_xmlrest_value_sensor
The Help on the URL is very Basic: to bad that it is not in Detail as the Syntax is probably something what PRTG expects and dont give examples how they expect it.
URL ( Hover over ) -> "Enter the URL that Returns the .xml File" ( Actually not to much help , leaves room to gues imho )
I think the Question @eblok2001 with the Details he gave already , would be a fine stark .
Request from Postman -> Powerstore
https://10.50.50.50/api/rest/volume?select=id,size,logical_used
Answer from Powerstore :
{"id":"0511dd20-069a-4ba7-8b7d-e917d6163de2","size":806380109824,"logical_used":764978954240},
{"id":"0691104d-8c00-4ecc-9ab0-6a46b8448004","size":214748364800,"logical_used":152692428800},
{"id":"2e394071-163b-40d5-a143-38f6223780b3","size":21474836480,"logical_used":0},
{"id":"2e922cbe-cfc3-4084-81d8-a6f4c6e09e24","size":85899345920,"logical_used":297553920},
Shouldnt be a Problem for the Support to Answer the Question on the Old / Legacy Sensor
How should the Received Syntax be changed to give a valid PRTG Sensor ? PRTG Variables / Syntax ?
With the Info give in the answer , im puzzeled what it is adressing ? Somehow we need to match the ID to a Datafield PRTG will use to fill the Data to.
Logical USED gives back 4 Fields with different Data for each ID
$(0).locical_used
Feb, 2023 - Permalink
There is a Tutorial from Souzana for the Legacy / EOL Sensor
PRTG Tutorial: The Rest Custom Sensor V2 (Beta) https://www.youtube.com/watch?v=3neuM9a9fPY&t=17s
Feb, 2023 - Permalink
Hi mviel,
You are right that we plan to deprecate the REST Custom sensor. However the REST Custom v2 won't be deprecated soon and is not EOL. This is the sensor which is mentioned in the tutorial video.
Kind regards
Felix Wiesneth - Team Tech Support
Feb, 2023 - Permalink
Hi there,
Did you already try out to use a REST Custom v2 sensor? With this you might accomplish your request easier. With this type of sensor you can add the JSON path directly into the channel settings within PRTG. The JSON path for e.g. logical used would be following:
For finding the right JSON path you can use tools like jsonpathfinder.com.
Kind regards
Felix Wiesneth - Team Tech Support
Jan, 2023 - Permalink