phpsysinfo / phpsysinfo

phpSysInfo: a customizable PHP script that displays information about your system nicely
http://phpsysinfo.github.io/phpsysinfo
GNU General Public License v2.0
1.38k stars 234 forks source link

Wish for UPS #252

Closed schabau closed 5 years ago

schabau commented 5 years ago

Hello, can you install the option ACCESS="data" for UPS and then specify a txt file as the data source created by apcupsd with "apcaccess status"? My reason: My webserver is a VM and apcupsd is of course on the Host of the VM. On the Host, I could create an apcupsd.txt, and, for example, send via ftp to the VM. So I already do it with IPMI and LMSensors. For UPS, this is "not yet" because ACCESS="data" is missing. many Greetings apcupsd.txt

namiltd commented 5 years ago

For now set: LOG="+data/fromlog.txt"

create fromlog.txt file: echo ---Mon, 13 May 2019 12:00:00 +0000 GMT--- Executing: apcaccess status >fromlog.txt apcaccess status >>fromlog.txt

copy file fromlog.txt to folder "data"

schabau commented 5 years ago

Hello, I tried it, but nothing is displayed. many Greetings fromlog.txt phpsysinfo

namiltd commented 5 years ago

UPS_APCUPSD_LIST=false

schabau commented 5 years ago

Hello, now it works, thank you. :-) many Greetings

schabau commented 5 years ago

Hello, if someone needs it, as a cronjob I first made this together.

echo ---$(date +"%a, %d %b %Y %X %z %Z")--- Executing: apcaccess status >fromlog.txt | apcaccess status >>fromlog.txt

many Greetings

namiltd commented 3 years ago

Try now version from Github tree. If you set: UPS_APCUPSD_LIST="data" the application will read data from the file "data/upsapcupsd.tmp"

schabau commented 3 years ago

Try now version from Github tree. If you set: UPS_APCUPSD_LIST="data" the application will read data from the file "data/upsapcupsd.tmp"

Hi,

this works here with apcupsd without any problems. Thank you for your work.

Many greetings schabau

namiltd commented 3 years ago

Now the parameter name has been changed to match the rest of the application to UPS_APCUPSD_ACCESS. Try UPS_APCUPSD_ACCESS = "data" Rename upsapcupsd.tmp to upsapcupsd0.tmp

schabau commented 3 years ago

Hello,

I have a problem there. With this version no data is output by apcupsd. The config looks like this:

UPS_PROGRAM="Apcupsd" UPS_APCUPSD_LIST=false UPS_APCUPSD_ACCESS="data" UPS_APCUPSD_CGI_ENABLE=false

UPS_APCUPSD_LIST = "127.0.0.1:3551" I also tried it.

This upsapcupsd0.tmp is in the / data directory: upsapcupsd0.tmp.txt I also tried an upsapcupsd.tmp and an upsapcupsd.txt.

This is what phpSysinfo shows: phpSysinfo_Screenshot 2021-03-30 123153

Best regards schabau

namiltd commented 3 years ago

Fixed: https://github.com/phpsysinfo/phpsysinfo/commit/73aba6fd6e6b14580b249563fdf8ab6c89048a40 Change second UPS_APCUPSD_ACCESS to UPS_NUT_ACCESS