APC UPS control system manual Implementation Details

Models: UPS control system

1 233
Download 233 pages 42.59 Kb
Page 120
Image 120

For more details on STATUS logging, see the Status (see apcupsd Status Logging) section of the Technical Reference.

Logging

Events logging consists of logging events as they happen. For example,

successful startup, power fail, battery failure, system shutdown, ...

See the manual section on customizing event handling (see Customizing Event Handling) for more details.

Implementation Details

In order to ensure that the data logged to syslog() can be directed to different files, I have assigned syslog() levels to each of our four types of data as follows:

1.1. DEBUG logging has level LOG DEBUG

2.2. DATA logging has level LOG INFO

3.3. STATUS logging has level LOG NOTICE

4.4. EVENTS logging has levels LOG WARNING, LOG ERR, LOG CRIT, and LOG ALERT

It should be noted that more work needs to be done on the precise definitions of each of the levels for EVENTS logging. Currently, it is roughly broken down as follows:

LOG WARNING general information such as startup, etc.

LOG ERR an error condition detected, e.g. communications problem with the UPS.

LOG CRIT a serious problem has occurred such as power failure, running

on UPS batteries, ...

LOG ALERT a condition that needs immediate attention such as pending

system shutdown, ...

The default Facility for syslog() logging is DAEMON, although this can be changed with the FACILITY directive in apcupsd.conf. In the following example, we should the facility as local0.

119

Page 120
Image 120
APC UPS control system manual Implementation Details