Good day.
I receive response from API server like this:
{
"output": null,
"errorList": [ {
"text": "There is no person with provided PIN",
"type": 7
}],
"errorPayload": null,
"isSuccess": false
}
Tell me, please, how can I create configuration template file for this vale so that sensor switch to green color?
Article Comments
From manual, I can't find how to output the text value which I got from API endpoint. I can't write the syntax this procedure correctly. Let me understand how I must declare variable for the text type, how assign value to this variable?
Thanks.
Sep, 2018 - Permalink
Hello Afon,
Please check the formatting of the text. It should be outside of the result as stated in our Custom Sensors documentation.
{ "prtg": { "text": "Found State-Value: " + $.name.state, "result": [ { "channel": "State", "value": lookup($.name.state, "active"), "limitmode": 1, "LimitMinError": 0, "LimitErrorMsg": "The value for 'state' is not 'active'!" } ] } }
Best regards,
Sebastian
Sep, 2018 - Permalink
Hello Afon,
Thank you very much for your contact.
Do you already monitor this output with a Rest Custom sensor?
Just to check, did you already review the corresponding manual article in regards to the REST Custom Sensor? Please also see this section, that refers to details about the return value format.
Best regards,
Sebastian
Sep, 2018 - Permalink