nixpkgs/modules/services/monitoring
Bjørn Forsman 44f1a8d8c7 Add apcupsd service
apcupsd is a daemon for controlling APC UPSes. It is very simple to
configure. If you have an USB based UPS, the default settings should be
useable without further adjustments:

  services.apcupsd.enable = true;

This will give you autodetection of USB UPSes, network access limited to
localhost (for security) and the shutdown sequence will be started when
the system when the battery level is below 50 percent, or when the UPS
has calculated that it has 5 minutes or less of remaining power-on time.

You can provide your own configuration file contents with this option:

  services.apcupsd.configText = "contents of apcupsd.conf";

Bug/annoyance 1: When apcupsd calls "wall" (on powerfail etc. events),
it prints an error message because stdout is not connected to a tty (it
is connected to the journal):

  wall: cannot get tty name: Inappropriate ioctl for device

The message still gets through though, to ctrl-alt-f[1-6] terminals.

Bug/annoyance 2: apcupsd tries to call "mail" (on powerfail etc.
events), and that fails because I'm not passing in any mail program at
the moment (because that would require more configuration options). A
solution to this would be to simply let the user fully configure the
apcupsd event handling logic in nix.
2013-07-17 21:23:09 +02:00
..
nagios Merge remote-tracking branch 'origin/master' into systemd 2012-09-28 11:35:27 -04:00
apcupsd.nix Add apcupsd service 2013-07-17 21:23:09 +02:00
dd-agent.nix dd-agent: cleanup, add dogstatsd systemd service 2013-06-29 19:33:44 +02:00
monit.nix strip trailing whitespace; no functional change 2011-09-14 18:20:50 +00:00
smartd.nix Don't set $TZ 2013-04-22 18:56:19 +02:00
systemhealth.nix Global replace /var/run/current-system -> /run/current-system 2012-07-16 11:34:21 -04:00
ups.nix fixed a upstart issue where upsd was never started 2012-03-31 11:39:30 +00:00
zabbix-agent.nix Rename ‘boot.systemd’ to ‘systemd’ 2013-01-16 12:33:18 +01:00
zabbix-server.nix zabbix-server: Swap order of database population. 2013-06-13 03:34:29 +02:00