Professional Documents
Culture Documents
Lab 5 - Monitoring A UPS With NUT On Ubuntu Linux 230815
Lab 5 - Monitoring A UPS With NUT On Ubuntu Linux 230815
TESTING OF UPS
LAB 5 MONITORING A UPS WITH NUT ON UBUNTU LINUX
Estimated time to complete this lab: 30 minutes
ORI: http://mikebeach.org/2013/04/24/installing-ups-monitoring-for-a-usb-upson-ubuntu-server/
https://www.howtoforge.com/monitoring-ups-power-status-with-nut-onopensuse10.3
Network UPS Tools (NUT) is a collection of programs which provide a common
interface for monitoring and administering UPS hardware.
The primary goal of the Network UPS Tools (NUT) project is to provide reliable
monitoring of UPS hardware and ensure safe shutdowns of the systems which are
connected.
This is a developing project to monitor a large assortment of UPS hardware. Many
models have ports on the back to allow other devices to check the status. If it
gives basic information about the power and battery status, it can probably be
supported without too much difficulty.
In this lab you will monitor the UPS with NUT using dummy-ups driver. dummyups is a Driver for multi-purpose UPS emulation. There are 2 mode for dummyups: Dummy Mode & Repeater Mode. For this lab we will use Dummy Mode.
Note that, in Dummy mode, dummy-ups looks like a standard device driver to
upsd(8) and allows one to change any value for testing purposes. It is both
interactive, controllable through the upsrw(1) and upscmd(1) commands (or
equivalent graphical tool), and batchable through script files. It can be configured,
launched and used as any other real driver. This mode is mostly useful for
development and testing purposes.
After completing this lab, you will be able to install NUT on Ubuntu Server and
perform UPS monitoring using NUT.
Topology
Dummy UPS
Ubuntu Server
5-1
Lab Objectives
After completing this lab, students you will be able to:
Monitor UPS status with NUT on Ubuntu Server
Lab Procedures
A. Monitoring UPS Status with NUT on Ubuntu Server
Follow these steps to install NUT on Ubuntu Server.
1. Install the NUT software using the following command:
$ sudo apt-get install nut
5-2
This rejects all connections not originating from the local machine.
If you need to monitor from multiple machines, see the man page
for upsd.conf.
6. Next, create /etc/nut/upsd.users:
$ sudo nano /etc/nut/upsd.users
You should add multiple users if you are monitoring from multiple
machines. See the man page for upsd.users for more information.
Now we need to configure upsmon.
8. Create /etc/nut/upsmon.conf as follows:
$ sudo nano /etc/nut/upsmon.conf
10. Since these files contain sensitive data, we should fix the
permissions:
$ sudo chown root:nut /etc/nut/*
$ sudo chmod 640 /etc/nut/*
11. Finally, edit /etc/default/nut so that upsd and upsmon will start at
system boot:
$ sudo nano /etc/default/nut
13. Run the following command which should print out some
statistics:
$ upsc dummy
battery.alarm.threshold: 0
battery.charge: 100.0
5-3
battery.charge.restart: 00
battery.date: 08/21/15
battery.packs: 000
battery.runtime: 3060
battery.runtime.low: 120
battery.voltage: 28.01
battery.voltage.nominal: 024
driver.name: dummy-ups
driver.parameter.cable: 940-0095B
driver.parameter.pollinterval: 2
driver.parameter.port: evolution500.dev
driver.version: 2.2.2
driver.version.internal: 1.99.8
input.frequency: 60.25
input.quality: FF
input.sensitivity: L
input.transfer.high: 132
input.transfer.low: 103
input.transfer.reason: S
input.voltage: 122.2
input.voltage.maximum: 122.8
input.voltage.minimum: 122.2
output.voltage: 122.2
output.voltage.nominal: 115
ups.delay.shutdown: 020
ups.delay.start: 000
ups.firmware: 60.8.D
ups.id: dummy-ups
ups.load: 037.9
ups.mfr: dummy-ups
ups.mfr.date: 08/21/15
ups.model: dummy-ups
ups.serial: xxxxxxxxxxxxx
ups.status: OL
ups.temperature: 036.4
ups.test.interval: 1209600
ups.test.result: NO
5-4
Dari hasil output di atas, dapat dilihat bahwa UPS yang sedang
Anda monitor memiliki nilai battery.alarm.threshold = 0
yang artinya alarm akan dihasilkan sesegera mungkin.
Beberapa parameter penting yang Anda harus monitor di antaranya
adalah:
battery.voltage:
vendors
output.voltage:
vendors
ups.status: pastikan
ups.temperature:
statusnya OL (Online)
5-5