Community Forum

Resolved
0 votes
Ben, thanks for this app!

This is just a quick try-out because I have no dedicated hardware for a ClearOS box at het moment. I installed this app on my VM and i had to configure the apcupsd.conf file. My ups is not supported via the webgui at the moment. I made the following changes:


## apcupsd.conf v1.1 ##
#
# for apcupsd release 3.14.12 (29 March 2014) - redhat
#
# "apcupsd" POSIX config file

#
# ========= General configuration parameters ============
#

# UPSNAME xxx
# Use this to give your UPS a name in log files and such. This
# is particulary useful if you have multiple UPSes. This does not
# set the EEPROM. It should be 8 characters or less.
UPSNAME smartups

# UPSCABLE
# Defines the type of cable connecting the UPS to your computer.
#
# Possible generic choices for are:
# simple, smart, ether, usb
#
# Or a specific cable model number may be used:
# 940-0119A, 940-0127A, 940-0128A, 940-0020B,
# 940-0020C, 940-0023A, 940-0024B, 940-0024C,
# 940-1524C, 940-0024G, 940-0095A, 940-0095B,
# 940-0095C, 940-0625A, M-04-02-2000
#
UPSCABLE ether

# To get apcupsd to work, in addition to defining the cable
# above, you must also define a UPSTYPE, which corresponds to
# the type of UPS you have (see the Description for more details).
# You must also specify a DEVICE, sometimes referred to as a port.
# For USB UPSes, please leave the DEVICE directive blank. For
# other UPS types, you must specify an appropriate port or address.
#
# UPSTYPE DEVICE Description
# apcsmart /dev/tty** Newer serial character device, appropriate for
# SmartUPS models using a serial cable (not USB).
#
# usb Most new UPSes are USB. A blank DEVICE
# setting enables autodetection, which is
# the best choice for most installations.
#
# net hostname:port Network link to a master apcupsd through apcupsd's
# Network Information Server. This is used if the
# UPS powering your computer is connected to a
# different computer for monitoring.
#
# snmp hostname:port:vendor:community
# SNMP network link to an SNMP-enabled UPS device.
# Hostname is the ip address or hostname of the UPS
# on the network. Vendor can be can be "APC" or
# "APC_NOTRAP". "APC_NOTRAP" will disable SNMP trap
# catching; you usually want "APC". Port is usually
# 161. Community is usually "private".
#
# netsnmp hostname:port:vendor:community
# OBSOLETE
# Same as SNMP above but requires use of the
# net-snmp library. Unless you have a specific need
# for this old driver, you should use 'snmp' instead.
#
# dumb /dev/tty** Old serial character device for use with
# simple-signaling UPSes.
#
# pcnet ipaddr:username:passphrase:port
# PowerChute Network Shutdown protocol which can be
# used as an alternative to SNMP with the AP9617
# family of smart slot cards. ipaddr is the IP
# address of the UPS management card. username and
# passphrase are the credentials for which the card
# has been configured. port is the port number on
# which to listen for messages from the UPS, normally
# 3052. If this parameter is empty or missing, the
# default of 3052 will be used.
#
#
# modbus /dev/tty** Serial device for use with newest SmartUPS models
# supporting the MODBUS protocol.
#
UPSTYPE snmp
DEVICE 192.168.2.189:161:apc:private


https://dl.dropboxusercontent.com/u/4327743/apcupsd.jpg
Saturday, April 16 2016, 05:25 AM
Share this post:
Responses (6)
  • Accepted Answer

    Friday, June 16 2017, 03:27 PM - #Permalink
    Resolved
    0 votes
    Indeed the service is not set to start at boot time, to do so in CentOS you are required to enable the service:

    systemctl enable apcupsd.service


    Note: Great app thks, a few years ago I modified the shutdown scripts to do a proper shutdown of a VMWare ESXI environment and all seems to continue to work with this app.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, May 05 2017, 01:53 PM - #Permalink
    Resolved
    0 votes
    It looks like the app is 7.x only. The apcupsd package is available from many sources. Just google "apcupsd rpm el6" any you'll find it on rpmfind, pbone, pkgs.org and so on.
    The reply is currently minimized Show
  • Accepted Answer

    grubs
    grubs
    Offline
    Friday, May 05 2017, 11:17 AM - #Permalink
    Resolved
    0 votes
    I could not find/see this app for ClearOS 6.8 (32bit) and I was a little surprised when apcpusd was not in the yum repository. Im sure it used to be.

    yum --enablerepo=clearos-epel,clearos-core install apcupsd
    ...
    No package apcupsd available.
    No package app-apcupsd available.
    No package app-apcups available.

    Cant find in the market place,,, Perhaps this app is for v7 only?


    I ended up downloading the redhat rpm from

    https://jaist.dl.sourceforge.net/project/apcupsd/rpms%20-%20Stable/3.14.10/apcupsd-3.14.10-1.el5.i386.rpm

    and installing.

    wget https://jaist.dl.sourceforge.net/project/apcupsd/rpms%20-%20Stable/3.14.10/apcupsd-3.14.10-1.el5.i386.rpm
    rpm -ivh apcupsd-3.14.10-1.el5.i386.rpm


    I did not need to install any additional packages to get serial cable signalling working
    The reply is currently minimized Show
  • Accepted Answer

    MCB
    MCB
    Offline
    Thursday, June 23 2016, 07:17 PM - #Permalink
    Resolved
    0 votes
    To resolve the autostart issue, I had to add the following to /etc/rc.d/rc.local

    systemctl restart apcupsd

    Be sure to make rc.local executable.
    The reply is currently minimized Show
  • Accepted Answer

    fikse
    fikse
    Offline
    Thursday, June 23 2016, 12:43 PM - #Permalink
    Resolved
    0 votes
    Great app! A small glitch is that it is not set to autostart, and if it is set to be one of the modules in the dashboard (https://servername:81/app/dashboard) the webview will hang, until the service is started.
    The reply is currently minimized Show
  • Accepted Answer

    MCB
    MCB
    Offline
    Wednesday, May 25 2016, 05:13 AM - #Permalink
    Resolved
    0 votes
    I noticed that the apcupsd daemon cannot access port 3551 on startup from a reboot. This in turn will not allow access to the web config login page. I had to login via ssh and restart the apcupsd daemon. It then allowed me access to the web config login. I am going to try making the systemd entry for apcupsd wait for complete network startup before starting to see if it corrects the issue.
    The reply is currently minimized Show
Your Reply