angela-d / prtg-ups-monitor Goto Github PK
View Code? Open in Web Editor NEWNetwork monitoring via PRTG for non-networked UPS battery backups.
License: GNU General Public License v3.0
Network monitoring via PRTG for non-networked UPS battery backups.
License: GNU General Public License v3.0
Hi, thanks for your work here. I'm pretty sure my side of the setup is correct, as with the correct packages installed I've got this pi reporting the UPS details through the NUT upsstats web page & the user running the script gets the correct output when running 'upsc myups', however when attempting to run your script on the pi I get the error below:
prtg@raspberrypi:/var/prtg/scriptsxml $ ./battery_sensor.py
<prtg>
Traceback (most recent call last):
File "/var/prtg/scriptsxml/./battery_sensor.py", line 235, in <module>
obtain_status()
File "/var/prtg/scriptsxml/./battery_sensor.py", line 67, in obtain_status
print("<text>" + banner_model + banner_serial + "</text>")
UnboundLocalError: local variable 'banner_model' referenced before assignment
Are you still working on this? Do you know if there's been any breaking changes to NUT?
Thanks
Hi!
Thanks for your work, i stumble on an issue when i tried to make it work:
When i add the sensor SSH Advance to run the python script: battery_sensor.py
I get the following error in PRTG:
XML: Structural error in xml file, 1 open items. -- JSON: The returned JSON does not match the expected structure (Invalid JSON.). (code: PE231)
When activating the results handling for the sensor i found that i have some data in log file but i found the following error:
From: \PRTG Network Monitor\Logs (Sensors)\Result of Sensor 2384 (SSHv2).txt
INFO][2020-03-11 01:34:35] [STDERR] Traceback (most recent call last):
File "/var/prtg/scriptsxml/battery_sensor.py", line 231, in
obtain_status()
File "/var/prtg/scriptsxml/battery_sensor.py", line 61, in obtain_status
print("Input voltage fluctuation " + banner_model + banner_serial + "")
UnboundLocalError: local variable 'banner_serial' referenced before assignment
I tried to understand the error but i have no knowledge with Python so this is pretty challenging.
Any idea?
My setup:
Raspberry Pi3B
Raspbian 10
UPS MDL: TrippLite Smart500RM1U
UPS Driver: tripplite_usb
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.