Hello guys,
please help me create a .template file for PRTG Rest custom sensor. I want to monitor my UPS connected via USB to remote server. UPS (connected via USB) is managed by PowerPanel web app that offers interface to access JSON response containing the status info.
In my case the address of REST is http://192.168.0.60:3052/agent/ppbe.js/init_status.js and the response is:
var ppbeJsObj={"status":{"communicationAvaiable":true,"onlyPhaseArch":false,"utility":{"state":"Normal","stateWarning":false,"voltage":"238.0","frequency":null,"voltages":null,"currents":null,"frequencies":null,"powerFactors":null},"bypass":{"state":"Normal","stateWarning":false,"voltage":null,"current":null,"frequency":null,"voltages":null,"currents":null,"frequencies":null,"powerFactors":null},"output":{"state":"Normal","stateWarning":false,"voltage":"238.0","frequency":null,"load":15,"watt":64,"va":null,"current":null,"outputLoadWarning":false,"outlet1":null,"outlet2":null,"activePower":null,"apparentPower":null,"reactivePower":null,"voltages":null,"currents":null,"frequencies":null,"powerFactors":null,"loads":null,"activePowers":null,"apparentPowers":null,"reactivePowers":null,"emergencyOff":null,"batteryExhausted":null},"battery":{"state":"Normal, Fully Charged","stateWarning":false,"voltage":"134.0","capacity":100,"runtimeFormat":1,"modularUpsRuntimeZero":false,"runtimeFormatWarning":false,"runtimeHour":0,"runtimeMinute":38,"chargetimeFormat":null,"chargetimeHour":null,"chargetimeMinute":null,"temperatureCelsius":null,"highVoltage":null,"lowVoltage":null,"highCurrent":null,"lowCurrent":null},"upsSystem":{"state":"Normal","stateWarning":false,"temperatureCelsius":null,"temperatureFahrenheit":null,"maintenanceBreak":null,"systemFaultDueBypass":null,"systemFaultDueBypassFan":null,"originalHardwareFaultCode":""},"modules":null,"deviceId":0}};
In fact, looking at the response, it is not a JSON data. The response begins with the object definition "var ppbeJsObj =". Can this REST custom sensor handle? Is there some documentation of .template file syntax?
Add comment