apcupsd - Network Monitoring (CGI) Program

maxprox

Renowned Member
Aug 23, 2011
420
53
93
Germany - Nordhessen
fair-comp.de
apcupsd - Network Monitoring (CGI) Program [SOLVED]

Hello,

For a new APC Smart-UPS 2200, I have install apcupsd and apcupsd-cgi

The configuration for the APC Smart-UPS 2200 with usb is like the
dokumentation: http://www.apcupsd.com/manual/manual.html
Every local tests work properly*
But I can not see the webpage remote for monitoring the ups (like the proxmox managing page).
I dry "http://proxmox-local-ip/cgi-bin/multimon.cgi"
the answer is always "The requested URL /cgi-bin/multimon.cgi was not found on this server."
the same with: "http://proxmox-local-ip/multimon.cgi" , "http://proxmox-local-ip/cgi/multimon.cgi"
and the address changes immediately to "https://..."

can someone help me?

regards,
maxprox

*1
/usr/lib/cgi-bin/apcupsd/multimon.cgi
=> I see the html text

*2
apcaccess status
and apctest
=> works
 
Last edited:
If you install third party software its probably a good idea to consult their documentation. do they have a howto for installation on Debian Lenny? Proxmox VE already uses the Apache web server and therefore we did not configure it for the use of apc tools ...
 
Hello Tom,

Thank you for your response.
apcupsd and the monitoring CGI programm is a noncommercial open-source project and it has a very good documentation:
apcupsd it is also in the debian repositories ... (I probably did not understand what you mean?).
It uses also the Apache Web server. And this is not the first time I Install it, but the first time I can not use the CGI tool.
I'm surprised: I thought it would be many who use this combination ...

thank you
maxprox
 
Would you mind to post the solution?

Hello Dietmar,

The basic configuration with a USB cable is easy and as described in the documentation
(look at the links in post 1 and 4)
The local path of the Programms / Scripst are:
Code:
proxmox:/etc/apache2# ls -alh /usr/lib/cgi-bin/apcupsd
total 108K
drwxr-xr-x 2 www-data www-data 4.0K Sep 28 16:03 .
drwxr-xr-x 3 root     root     4.0K Sep 28 16:03 ..
-rwxr-xr-x 1 www-data www-data  25K Feb  9  2009 multimon.cgi
-rwxr-xr-x 1 www-data www-data  20K Feb  9  2009 upsfstats.cgi
-rwxr-xr-x 1 www-data www-data  24K Feb  9  2009 upsimage.cgi
-rwxr-xr-x 1 www-data www-data  28K Feb  9  2009 upsstats.cgi



then you must enter at the end of the apache conf following
Code:
proxmox:/etc/apache2# vim apache2.conf

Code:
[INDENT]ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory “/usr/lib/cgi-bin”>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>


[/INDENT]

Now, and after a restart of apache2:
with this address you can see the status of the ups in nice colors:
Code:
https://proxmox-ip/cgi-bin/apcupsd/multimon.cgi

(I have tried a symlink in
Code:
/usr/share/pve-manager/root
but it dos not work)

maxprox
 
Last edited:
...or you can enable the "default" with

cp /etc/apache2/sites-available/default /etc/apache2/sites-enabled/
/etc/init.d/apache2 restart
-> http://proxmox-ip/cgi-bin/apcupsd/multimon.cgi

with ssl:

cp /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/
/etc/init.d/apache2 restart
-> https://proxmox-ip/cgi-bin/apcupsd/multimon.cgi

or by Symlinks

Edit: 12.10.: Although it works with ssl, but when you shall make as I've described with ssl, a warn message comes during boot process :(, i would take the it without ssl
 
Last edited:
Hello,

yes, it works

Code:
rox01:/etc/apache2/sites-enabled# ln -s ../sites-available/default
rox01:/etc/apache2/sites-enabled# ln -s ../sites-available/default-ssl 
rox01:/etc/apache2/sites-enabled# ll
insgesamt 8,0K
drwxr-xr-x 2 root root 4,0K 14. Okt 19:44 .
drwxr-xr-x 7 root root 4,0K 29. Apr 22:27 ..
lrwxrwxrwx 1 root root   26 14. Okt 19:44 default -> ../sites-available/default
lrwxrwxrwx 1 root root   30 14. Okt 19:44 default-ssl -> ../sites-available/default-ssl
lrwxrwxrwx 1 root root   27  9. Okt 2011  pve.conf -> ../sites-available/pve.conf
lrwxrwxrwx 1 root root   36  9. Okt 2011  pve-redirect.conf -> ../sites-available/pve-redirect.conf
rox01:/etc/apache2/sites-enabled#

It's good to know
 
apache2 is not used for the proxmox ve web interface. but it is still available (if you install it).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!