gitmachtl / various

Various Scripts, Tools and Stuff for everybody :-)
MIT License
12 stars 4 forks source link

add qnap support #2

Closed a-kraschitzer closed 1 year ago

a-kraschitzer commented 1 year ago

My QNAP nas (TS-653D) was not supported with the given code.

As far as I could find online, it needs the name of the ups to be "qnapups". With some logging I also found out that it needs the "ups.test.result" variable, so I introduced it.

In the end I got it to work with my small adaptions. image

Thank you @gitmachtl for the great starting point.

gitmachtl commented 1 year ago

hey, thx for the addition. let me review it. glad that this also works for qnap :-)

gitmachtl commented 1 year ago

while looking at your logs, is the qnap using any other username or so for the login?

a-kraschitzer commented 1 year ago

Here are the logs produced by the current version: during startup of NAS

LOGOUT
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
LIST VAR qnapups
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
LOGOUT
LIST VAR qnapups
LIST VAR qnapups
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
LIST VAR qnapups
LOGOUT

while running

GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT
GET VAR qnapups ups.status
LOGOUT
GET VAR qnapups ups.test.result
LOGOUT

It is the raw commands, and yes, very peculiar that there is never a LOGIN or USERNAME. Anyways, it works like that :)

gitmachtl commented 1 year ago

Thx, ok thats sad. Would have been cool if the qnap had identified itself via a "qnap" username or so. I will check the Synology side. Because than it would be possible to dynamically change the ups name

gitmachtl commented 1 year ago

hey @a-kraschitzer i have tried something. could you please test the script located in the autodetect-nas branch

https://github.com/gitmachtl/various/blob/autodetect-nas/upsnutwrapper/upsnutwrapper.sh

it should detect the requested qnapups automatically and use this in the responses. i also cleaned up the code a bit.

so if this works, different NAS (f.e. synology + qnap) can be connected to the wrapper at the same time.

gitmachtl commented 1 year ago

i also added support so that the nut-client (NAS) can request every VAR that is available directly too via the GET VAR upsname var command

a-kraschitzer commented 1 year ago

Looks good, I tried the latest version from the "autodetect-nas" branch.

Sun 11 Dec 13:46:05 GMT 2022    192.168.5.10    LOGOUT
Sun 11 Dec 13:46:05 GMT 2022    192.168.5.10    >>> Logout, exiting script
Sun 11 Dec 13:46:20 GMT 2022    192.168.5.10    GET VAR qnapups ups.status
Sun 11 Dec 13:46:20 GMT 2022    192.168.5.10    >>> Requested VAR=ups.status for UPSNAME=qnapups
Sun 11 Dec 13:46:20 GMT 2022    192.168.5.10    >>> returned data for UPS_ups_status=OL
Sun 11 Dec 13:46:20 GMT 2022    192.168.5.10    LOGOUT
Sun 11 Dec 13:46:20 GMT 2022    192.168.5.10    >>> Logout, exiting script
Sun 11 Dec 13:46:20 GMT 2022    192.168.5.10    LIST VAR qnapups
Sun 11 Dec 13:46:20 GMT 2022    192.168.5.10    GET VAR qnapups ups.test.result
Sun 11 Dec 13:46:20 GMT 2022    192.168.5.10    >>> Requested all VARs for UPSNAME=qnapups
Sun 11 Dec 13:46:20 GMT 2022    192.168.5.10    >>> Requested VAR=ups.test.result for UPSNAME=qnapups
Sun 11 Dec 13:46:21 GMT 2022    192.168.5.10    >>> returned data for UPS_ups_test_result=OK - Battery GOOD
Sun 11 Dec 13:46:21 GMT 2022    192.168.5.10    LOGOUT
Sun 11 Dec 13:46:21 GMT 2022    192.168.5.10    >>> Logout, exiting script
Sun 11 Dec 13:46:24 GMT 2022    192.168.5.10    >>> returned all VARs
Sun 11 Dec 13:46:24 GMT 2022    192.168.5.10    LOGOUT
Sun 11 Dec 13:46:24 GMT 2022    192.168.5.10    >>> Logout, exiting script

You can see we get a LIST VAR quanups at 13:46:20 and that command takes 4 seconds to complete. In the meantime we get a GET VAR... and a LOGOUT which get printed in the meantime. That makes the log a little bit harder to read. Could we add a thread id in the log message? If thread_id is too hard for bash scripting, I think a 4 or 5 digit random would also do the trick. Or last 6 digits of the unix timestamp...

gitmachtl commented 1 year ago

@a-kraschitzer thats a great idea, please test the latest version in "autodetect-nas" branch

a-kraschitzer commented 1 year ago

Looks good!

Sun 11 Dec 16:49:41 GMT 2022    REM_IP=192.168.5.10     PID=1517        LIST VAR qnapups
Sun 11 Dec 16:49:41 GMT 2022    REM_IP=192.168.5.10     PID=1517        >>> Requested all VARs for UPSNAME=qnapups
Sun 11 Dec 16:49:42 GMT 2022    REM_IP=192.168.5.10     PID=1583        GET VAR qnapups ups.test.result
Sun 11 Dec 16:49:42 GMT 2022    REM_IP=192.168.5.10     PID=1583        >>> Requested VAR=ups.test.result for UPSNAME=qnapups
Sun 11 Dec 16:49:42 GMT 2022    REM_IP=192.168.5.10     PID=1583        >>> returned data for UPS_ups_test_result=OK - Battery GOOD
Sun 11 Dec 16:49:42 GMT 2022    REM_IP=192.168.5.10     PID=1583        LOGOUT
Sun 11 Dec 16:49:42 GMT 2022    REM_IP=192.168.5.10     PID=1583        >>> Logout, exiting script
Sun 11 Dec 16:49:44 GMT 2022    REM_IP=192.168.5.10     PID=1736        GET VAR qnapups ups.test.result
Sun 11 Dec 16:49:44 GMT 2022    REM_IP=192.168.5.10     PID=1736        >>> Requested VAR=ups.test.result for UPSNAME=qnapups
Sun 11 Dec 16:49:44 GMT 2022    REM_IP=192.168.5.10     PID=1736        >>> returned data for UPS_ups_test_result=OK - Battery GOOD
Sun 11 Dec 16:49:45 GMT 2022    REM_IP=192.168.5.10     PID=1736        LOGOUT
Sun 11 Dec 16:49:45 GMT 2022    REM_IP=192.168.5.10     PID=1736        >>> Logout, exiting script
Sun 11 Dec 16:49:45 GMT 2022    REM_IP=192.168.5.10     PID=1517        >>> returned all VARs
Sun 11 Dec 16:49:45 GMT 2022    REM_IP=192.168.5.10     PID=1517        LOGOUT
Sun 11 Dec 16:49:45 GMT 2022    REM_IP=192.168.5.10     PID=1517        >>> Logout, exiting script
Sun 11 Dec 16:49:47 GMT 2022    REM_IP=192.168.5.10     PID=1772        GET VAR qnapups ups.test.result
Sun 11 Dec 16:49:47 GMT 2022    REM_IP=192.168.5.10     PID=1772        >>> Requested VAR=ups.test.result for UPSNAME=qnapups
Sun 11 Dec 16:49:47 GMT 2022    REM_IP=192.168.5.10     PID=1772        >>> returned data for UPS_ups_test_result=OK - Battery GOOD
Sun 11 Dec 16:49:47 GMT 2022    REM_IP=192.168.5.10     PID=1772        LOGOUT
Sun 11 Dec 16:49:47 GMT 2022    REM_IP=192.168.5.10     PID=1772        >>> Logout, exiting script
Sun 11 Dec 16:49:47 GMT 2022    REM_IP=192.168.5.10     PID=1780        LIST VAR qnapups
Sun 11 Dec 16:49:47 GMT 2022    REM_IP=192.168.5.10     PID=1780        >>> Requested all VARs for UPSNAME=qnapups
Sun 11 Dec 16:49:49 GMT 2022    REM_IP=192.168.5.10     PID=1911        GET VAR qnapups ups.test.result
Sun 11 Dec 16:49:49 GMT 2022    REM_IP=192.168.5.10     PID=1911        >>> Requested VAR=ups.test.result for UPSNAME=qnapups
Sun 11 Dec 16:49:49 GMT 2022    REM_IP=192.168.5.10     PID=1911        >>> returned data for UPS_ups_test_result=OK - Battery GOOD
Sun 11 Dec 16:49:49 GMT 2022    REM_IP=192.168.5.10     PID=1911        LOGOUT
Sun 11 Dec 16:49:49 GMT 2022    REM_IP=192.168.5.10     PID=1911        >>> Logout, exiting script
Sun 11 Dec 16:49:50 GMT 2022    REM_IP=192.168.5.10     PID=1780        >>> returned all VARs
Sun 11 Dec 16:49:51 GMT 2022    REM_IP=192.168.5.10     PID=1780        LOGOUT
Sun 11 Dec 16:49:51 GMT 2022    REM_IP=192.168.5.10     PID=1780        >>> Logout, exiting script
Sun 11 Dec 16:49:53 GMT 2022    REM_IP=192.168.5.10     PID=2027        LIST VAR qnapups
Sun 11 Dec 16:49:53 GMT 2022    REM_IP=192.168.5.10     PID=2027        >>> Requested all VARs for UPSNAME=qnapups
Sun 11 Dec 16:49:56 GMT 2022    REM_IP=192.168.5.10     PID=2027        >>> returned all VARs
Sun 11 Dec 16:49:56 GMT 2022    REM_IP=192.168.5.10     PID=2027        LOGOUT
Sun 11 Dec 16:49:56 GMT 2022    REM_IP=192.168.5.10     PID=2027        >>> Logout, exiting script
Sun 11 Dec 16:49:59 GMT 2022    REM_IP=192.168.5.10     PID=2264        LIST VAR qnapups
Sun 11 Dec 16:49:59 GMT 2022    REM_IP=192.168.5.10     PID=2264        >>> Requested all VARs for UPSNAME=qnapups
Sun 11 Dec 16:50:02 GMT 2022    REM_IP=192.168.5.10     PID=2264        >>> returned all VARs
Sun 11 Dec 16:50:02 GMT 2022    REM_IP=192.168.5.10     PID=2264        LOGOUT
Sun 11 Dec 16:50:02 GMT 2022    REM_IP=192.168.5.10     PID=2264        >>> Logout, exiting script
Sun 11 Dec 16:50:04 GMT 2022    REM_IP=192.168.5.10     PID=2501        GET VAR qnapups ups.status
Sun 11 Dec 16:50:04 GMT 2022    REM_IP=192.168.5.10     PID=2501        >>> Requested VAR=ups.status for UPSNAME=qnapups
Sun 11 Dec 16:50:04 GMT 2022    REM_IP=192.168.5.10     PID=2501        >>> returned data for UPS_ups_status=OL
Sun 11 Dec 16:50:04 GMT 2022    REM_IP=192.168.5.10     PID=2501        LOGOUT
Sun 11 Dec 16:50:04 GMT 2022    REM_IP=192.168.5.10     PID=2501        >>> Logout, exiting script
Sun 11 Dec 16:50:04 GMT 2022    REM_IP=192.168.5.10     PID=2513        GET VAR qnapups ups.test.result
Sun 11 Dec 16:50:05 GMT 2022    REM_IP=192.168.5.10     PID=2513        >>> Requested VAR=ups.test.result for UPSNAME=qnapups
Sun 11 Dec 16:50:05 GMT 2022    REM_IP=192.168.5.10     PID=2513        >>> returned data for UPS_ups_test_result=OK - Battery GOOD
Sun 11 Dec 16:50:05 GMT 2022    REM_IP=192.168.5.10     PID=2513        LOGOUT
Sun 11 Dec 16:50:05 GMT 2022    REM_IP=192.168.5.10     PID=2513        >>> Logout, exiting script

Also very interesting to see now that every GET command has a corresponding LOGOUT but many commands are being sent in parallel. What do the logs look like for synology?

gitmachtl commented 1 year ago

This is the startup of a Synology NAS. It requests a couple of VARs directly. It there are some VARs that can't be requested directly (with the old version of the script), the NAS polls the full list instead. After that it keeps the connections and only polls the status every few seconds.

Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    STARTTLS
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> TLS requested, but not supported
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    USERNAME monuser
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> USERNAME monuser OK
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    PASSWORD secret
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> PASSWORD secret OK
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    LOGIN ups
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> LOGIN ups OK
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    GET VAR ups ups.status
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> returned data for UPS_ups_status=OL
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9235    STARTTLS
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9235    >>> TLS requested, but not supported
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9235    GET VAR ups device.mfr
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9235    >>> Requested VAR=device.mfr for UPSNAME=ups
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9235    >>> returned data for UPS_device_mfr=UPS NUT Apcupsd Wrapper
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9235    LOGOUT
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9235    >>> Logout, exiting script
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9419    STARTTLS
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9419    >>> TLS requested, but not supported
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9419    GET VAR ups device.model
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9419    >>> Requested VAR=device.model for UPSNAME=ups
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9419    >>> returned data for UPS_device_model=Smart-UPS C 1500 (900 W)
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9419    LOGOUT
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9419    >>> Logout, exiting script
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9603    STARTTLS
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9603    >>> TLS requested, but not supported
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9603    GET VAR ups battery.charge
Son Dez 11 18:52:35 CET 2022    REM_IP=192.168.50.18    PID=9603    >>> Requested VAR=battery.charge for UPSNAME=ups
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9603    >>> returned data for UPS_battery_charge=100.0
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9603    LOGOUT
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9603    >>> Logout, exiting script
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9787    STARTTLS
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9787    >>> TLS requested, but not supported
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9787    GET VAR ups battery.runtime
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9787    >>> Requested VAR=battery.runtime for UPSNAME=ups
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9787    >>> returned data for UPS_battery_runtime=4020
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9787    LOGOUT
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9787    >>> Logout, exiting script
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9971    STARTTLS
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9971    >>> TLS requested, but not supported
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9971    GET VAR ups battery.voltage
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9971    >>> Requested VAR=battery.voltage for UPSNAME=ups
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9971    >>> returned data for UPS_battery_voltage=27.3
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9971    LOGOUT
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=9971    >>> Logout, exiting script
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10155   STARTTLS
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10155   >>> TLS requested, but not supported
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10155   GET VAR ups input.voltage
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10155   >>> Requested VAR=input.voltage for UPSNAME=ups
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10155   >>> returned data for UPS_input_voltage=0
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10155   LOGOUT
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10155   >>> Logout, exiting script
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10339   STARTTLS
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10339   >>> TLS requested, but not supported
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10339   GET VAR ups output.voltage
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10339   >>> Requested VAR=output.voltage for UPSNAME=ups
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10339   >>> returned data for UPS_output_voltage=0
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10339   LOGOUT
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10339   >>> Logout, exiting script
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10530   STARTTLS
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10530   >>> TLS requested, but not supported
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10530   GET VAR ups ups.load
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10530   >>> Requested VAR=ups.load for UPSNAME=ups
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10530   >>> returned data for UPS_ups_load=0
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10530   LOGOUT
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10530   >>> Logout, exiting script
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10717   STARTTLS
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10717   >>> TLS requested, but not supported
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10717   GET VAR ups ups.status
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10717   >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10717   >>> returned data for UPS_ups_status=OL
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10717   LOGOUT
Son Dez 11 18:52:36 CET 2022    REM_IP=192.168.50.18    PID=10717   >>> Logout, exiting script
Son Dez 11 18:52:40 CET 2022    REM_IP=192.168.50.18    PID=9217    GET VAR ups ups.status
Son Dez 11 18:52:40 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:52:40 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> returned data for UPS_ups_status=OL
Son Dez 11 18:52:45 CET 2022    REM_IP=192.168.50.18    PID=9217    GET VAR ups ups.status
Son Dez 11 18:52:45 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:52:45 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> returned data for UPS_ups_status=OL
Son Dez 11 18:52:50 CET 2022    REM_IP=192.168.50.18    PID=9217    GET VAR ups ups.status
Son Dez 11 18:52:50 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:52:50 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> returned data for UPS_ups_status=OL
Son Dez 11 18:52:55 CET 2022    REM_IP=192.168.50.18    PID=9217    GET VAR ups ups.status
Son Dez 11 18:52:55 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:52:55 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> returned data for UPS_ups_status=OL
Son Dez 11 18:53:00 CET 2022    REM_IP=192.168.50.18    PID=9217    GET VAR ups ups.status
Son Dez 11 18:53:00 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:53:00 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> returned data for UPS_ups_status=OL
Son Dez 11 18:53:05 CET 2022    REM_IP=192.168.50.18    PID=9217    GET VAR ups ups.status
Son Dez 11 18:53:05 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:53:05 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> returned data for UPS_ups_status=OL
Son Dez 11 18:53:10 CET 2022    REM_IP=192.168.50.18    PID=9217    GET VAR ups ups.status
Son Dez 11 18:53:10 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:53:10 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> returned data for UPS_ups_status=OL
Son Dez 11 18:53:15 CET 2022    REM_IP=192.168.50.18    PID=9217    GET VAR ups ups.status
Son Dez 11 18:53:15 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> Requested VAR=ups.status for UPSNAME=ups
Son Dez 11 18:53:15 CET 2022    REM_IP=192.168.50.18    PID=9217    >>> returned data for UPS_ups_status=OL
gitmachtl commented 1 year ago

ok, thank you very much for your input. it lead to a way better script now :-) will push the automated branch to the main one...