All rights reserved. */ /* ========================================================================== */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* ========================================================================== */ ]]> Apcupsd Services: Apcupsd (General) Monitoring 0.3.1 /usr/local/pkg/apcupsd.inc Apcupsd has been created/modified. Apcupsd has been deleted. /usr/local/etc/rc.d/apcupsd.sh restart https://packages.pfsense.org/packages/config/apcupsd/apcupsd.inc /usr/local/pkg/ 0755 https://packages.pfsense.org/packages/config/apcupsd/apcupsd_status.php /usr/local/www/ 0755 https://packages.pfsense.org/packages/config/apcupsd/apcupsd.conf.php /usr/local/pkg/ 0755 https://packages.pfsense.org/packages/config/apcupsd/apcupsd_mail.php /usr/local/pkg/ 0755 Apcupsd Setup Apcupsd specific settings
Services
/pkg_edit.php?xml=apcupsd.xml&id=0
apcupsd apcupsd.sh apcupsd Apcupsd a daemon for controlling APC UPSes General /pkg_edit.php?xml=apcupsd.xml&id=0 Status apcupsd_status.php General configuration parameters listtopic Enable apcupsdenabled Enable APC UPS Daemon service checkbox UPS Name upsname Use this to give your UPS a name in log files and such input 60 true UPS Cable upscable
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, M-04-02-2000 ]]>
input 60 true
UPS Type / Device upstype
UPSTYPE DEVICE Description

apcsmart /dev/tty** Newer serial character device, appropriate for SmartUPS models using a serial cable (not USB).

usb BLANK 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".

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.

]]>
input 60 true
Device device input 60 Poll Time polltime Interval (in seconds) at which apcupsd polls the UPS for status. Default is 60 input 10 60 Kill on Power Fail killonpowerfail Hibernate UPS on powerfail checkbox Lock File lockfile Path for device lock file. Default is /var/tmp input 60 Configuration parameters used during power failures listtopic OnBattery Delay onbatterydelay Time in seconds from when a power failure is detected until we react to it with an onbattery event. Default is 6 input 10 6 Battery Level batterylevel If during a power failure, the remaining battery percentage (as reported by the UPS) is below or equal to BATTERYLEVEL, apcupsd will initiate a system shutdown. Default is 5 input 10 5 Minutes minutes If during a power failure, the remaining runtime in minutes (as calculated internally by the UPS) is below or equal to MINUTES, apcupsd, will initiate a system shutdown. Default is 3 input 10 3 Timeout timeout If during a power failure, the UPS has run on batteries for TIMEOUT many seconds or longer, apcupsd will initiate a system shutdown. A value of 0 (default) disables this timer input 10 0 Annoy annoy Time in seconds between annoying users to signoff prior to system shutdown. 0 disables. Default is 300 input 10 300 Annoy Delay annoydelay Initial delay after power failure before warning users to get off the system. Default is 60 input 10 60 Kill Delay killdelay If KILLDELAY is non-zero, apcupsd will continue running after a shutdown has been requested, and after the specified time in seconds attempt to kill the power. This is for use on systems where apcupsd cannot regain control after a shutdown. 0 disables (default) input 10 0 Configuration statements for Network Information Server listtopic Net Server netserver If netstatus is on, a network information server process will be started for serving the STATUS and EVENT data over the network (used by CGI programs) select on NIS Ip nisip IP address on which NIS server will listen for incoming connections. Default value is 0.0.0.0 which means any incoming request will be serviced. Alternatively, you can configure this setting to any specific IP address of your server and NIS will listen for connections only on that interface. Use the loopback address (127.0.0.1) to accept connections only from the local machine input 10 0.0.0.0 NIS Port nisport Port to use for sending STATUS and EVENTS data over the network. It is not used unless NETSERVER is on. If you change this port, you will need to change the corresponding value in the cgi directory and rebuild the cgi programs. Default is 3551 as registered with the IANA input 10 3551 Configuration statements used if sharing listtopic UPS Class upsclass Normally standalone unless you share an UPS using an APC ShareUPS card select standalone UPS Mode upsmode Normally disable unless you share an UPS using an APC ShareUPS card select disable
php_install_apcupsd(); validate_input_apcupsd($_POST, $input_errors); sync_package_apcupsd(); php_deinstall_apcupsd();