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

JSON template for UPS (CyberPower PowerPanel app) REST

Votes:

0

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?

json prtg rest

Created on Mar 6, 2020 8:22:56 AM



3 Replies

Votes:

0

Hi Adampelikan,

Did you already take a look at this article. This article describes how to monitor UPS systems via PRTG.

Created on Mar 6, 2020 10:03:30 AM by  Moritz Heller [Paessler Support]



Votes:

0

Hi Moritz,

thanks for reply.

My UPS itself is not a network device. It is connected to computer via USB and on the computer there is a windows-based daemon running. Through this dameon the UPS can be accessed via network, but this daemon does not provide any SNMP. Therefore I think I can't use referenced article. The daemon only provides a web application and the endpoint returining the JSON object describing current state.

So I guess I really need to use the JSON custom sensor.

A.

Created on Mar 6, 2020 2:31:40 PM



Votes:

0

Hi adampelikan,

Thank you for the clarification. In this case I recommend the REST Custom Sensor.

As a side note, please refer to the following article which explains why we can't really offer any customization help for PRTG: https://kb.paessler.com/en/topic/78334-what-is-your-position-towards-customizing-the-prtg-web-interface

Created on Mar 6, 2020 3:00:57 PM by  Moritz Heller [Paessler Support]




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.