Hello,
I woul like to create a REST custom sensor to monitor a JSON return value.
The return value looks like this:
"imageUrl":"http://my/path/isec_ydufow7v.png", "legendUrl":null, "errorCode":0, "errorMessage":null, "thumbUrl":"http://my/path/thumbnail_bore.png"
I would like to us a JSON template which looks at "errorCode" and "errorMessage". If errorCode is not 0 than an error occured. I tried:
"prtg": { "error": ($.errorCode == 0) ? "0" : "1", "text": $.errorMessage }
But I get the following PRTG error:
Parsing error: { "prtg": { "error": ($.errorCode == 0) ? "0" : "1", "text": $.errorMessage } }:6:1 - 6:2 no channels defined. |
I know that I didn't create a channel but I don't really have channels in my JSON return value. What is the best way to handle this? I thought that text and error can be used outsid a result section?
Thank you for your help, Carolin
Add comment