Onduleur probleme config

Mon problème

Bonjour,

j’essai d’ajouter mon onduleur qui est branché sur mon NAS.

Mais impossible de configurer Network UPS Tools

quand j’essai de mettre les infos, cela ne trouve rien.

Auriez vous une iddee?

Ma configuration


[center]## System Information

version core-2024.2.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 6.1.74-haos
arch x86_64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4705
Installed Version 1.34.0
Stage running
Available Repositories 1395
Downloaded Repositories 53
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 11.5
update_channel stable
supervisor_version supervisor-2024.01.1
agent_version 1.6.0
docker_version 24.0.7
disk_total 30.8 GB
disk_used 9.4 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Duck DNS (1.15.0), File editor (5.8.0), Mosquitto broker (6.4.0), Advanced SSH & Web Terminal (17.1.0), Samba Backup (5.2.0), ESPHome (2023.12.9), Zigbee2MQTT (1.35.3-1), MyElectricalData (0.11.0), Network UPS Tools (0.13.0)
Dashboards
dashboards 2
resources 35
views 23
mode storage
Recorder
oldest_recorder_run 10 février 2024 à 08:27
current_recorder_run 20 février 2024 à 14:04
estimated_db_size 144.12 MiB
database_engine sqlite
database_version 3.44.2
Sonoff
version 3.6.0 (8dd8af9)
cloud_online 0 / 1
local_online 0 / 0
[/center] Comment récupérer ma configuration : Dans votre HA, Menu latéral `Paramètres` > `Système` > `Corrections` puis les trois petits points en haut a droite > `Informations Système` puis une fois en bas `Copier` ___

Salut @fcbghost

Je ne pense pas pouvoir t’aider sur le coup.

Mais si tu veux que quelqu’un le fasse, tu devrais préciser la marque du nas (pas certain que syno et qnap aient la même approche).

Et aussi donner les détails sur la conf que tu as essayé d’appliquer côté HA :wink:

1 « J'aime »

Salut,

Et par la même occasion, les infos de l’onduleur, les config associées, les messages d’erreur

1 « J'aime »

j’ai un nuc qui tourne avec proxmox, HA installé en vm. le pve tourne avec debian 12, mon onduleur est un riello qui n’est pas un totalement compatible. j’ai installé le package nut dans la debian.
configuré: nut.conf:

cat nut.conf

MODE=netserver
ups.conf:
maxretry = 3
pollinterval = 1
[UPS01]
driver = riello_usb
port = auto
upsd.conf:
LISTEN 0.0.0.0 3493
upsd.users:
[YYYYYY]
password = xxxxxxxxxxx
admin master
upsmon.conf
RUN_AS_USER root
MONITOR UPS01@localhost 1 admin PASSWORD master
upssched.conf :laissé dans l’état.
pour cela j’ai suivi un tuto je crois que c’est sur le wiki d’ubuntu, mais ça marche sur debian.
il faut démarrer le daemon avec la commande systemctl.
ensuite la commande upsc UPS01@localhost; retourne :
Init SSL without certificate database
battery.capacity: 5
battery.voltage: 13.8
battery.voltage.nominal: 12
device.mfr: RPS S.p.a.
device.model: USV5
device.serial:
device.type: ups
driver.name: riello_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.version: 2.8.0
driver.version.internal: 0.07
input.bypass.frequency: 409.50
input.bypass.voltage: 4095
input.frequency: 50.00
input.voltage: 241
output.frequency: 50.00
output.frequency.nominal: 50.0
output.L1.current: 0
output.L1.power: 0
output.L1.realpower: 0
output.L2.current: 0
output.L2.power: 0
output.L2.realpower: 0
output.L3.current: 0
output.L3.power: 0
output.L3.realpower: 0
output.power.percent: 14
output.voltage: 236
output.voltage.nominal: 230
ups.delay.reboot: 5
ups.delay.shutdown: 5
ups.firmware: SWM036-01-03
ups.load: 14
ups.mfr: RPS S.p.a.
ups.model: USV5
ups.power.nominal: 600
ups.productid: 5500
ups.realpower.nominal: 360
ups.serial:
ups.status: OL
ups.vendorid: 04b4
installation de l’intégration nut dans ha configuration ipde ma pve:3493
mon onduleur est en USB

alors j’ai un onduleur Eaton ellipse 850
branché sur le syno

j’ai installé network ups tools

mais j’ai ca dans le journal et je bloque

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.13.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.5  (amd64 / qemux86-64)
 Home Assistant Core: 2024.2.2
 Home Assistant Supervisor: 2024.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[14:05:34] INFO: Configuring timezone (Europe/Paris)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nut.sh
[14:05:34] INFO: Setting mode to netserver...
[14:05:34] INFO: Generating /etc/nut/upsd.users...
[14:05:34] INFO: Configuring user: ghost
[14:05:35] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[14:05:35] INFO: Configuring Device named myups...
[14:05:35] INFO: Starting the UPS drivers...
libusb1: Could not open any HID devices: insufficient permissions on everything
No matching HID UPS found
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
Driver failed to start (exit status=1)
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/nut.sh exited 1
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Salut,
j’ai pas remonter mon onduleur et j’ai plus les paramètres sur mon syno, mais il faut configurer dans périphérique diskstation autorisé l’ip de ton home assistant.

ta un tuto Configuration serveur NUT/UPS/Synology USB

edit:
c’est pas un tuto oups!

j’ai regardé mais je ne sais pas, j’ai quand meme remis mes infos dedans.

@fcbghost Tu ne poses pas la même question dans 2 endroits différents.
Sinon on ne s’y retrouve plus, aussi bien pour répondre que pour chercher la solution.
Je te laisse supprimer l’autre post.

insufficient permissions… (droits insuffisants pour accèder au port usb)à mon avis regarder /etc/nut/upsd.users et le modifier pour y mettre admin master comme dans ma conf publiée au-dessus sudo nano /etc/nut/upsd.users.

c’est fait, desolé pour ca

la je suis pas tres fort en linux et proxmox.

je regarder mon nas, et j’ai autorisé le pare feu pour le serveur ups.

dans panneau de config / sécurité / pare feu et modifier les règles.
Autorise pour l’ip de HA, fais pas le bourrin comme moi :rofl:

1 « J'aime »

Salut,

Ça c’est « peut-être » à faire quand le serveur nut est sur debian, mais dans le cas de @fcbghost c’est son syno qui « porte » le serveur.

Donc pour moi c’est à zapper :wink:

oui, peut être, mais si tu regardes les logs on trouve les fichiers /etc/nut/…tous les fichiers de conf, donc je ne sais pas comment on fait pour éditer ces fichiers dans un nas, mais sous linux on a vi, nano ou des éditeurs graphiques le tout c’est d’être loggé en root pour pouvoir les modifier, peut être avoir les droits admin pour un nass, mais là je n’y connaît rien…

C’est les logs de l’add-on pas du syno …

@fcbghost si tu laisses le serveur nut sur le syno, il faut configurer l’add-on en mode « netserver ».

Une conf dans ce style-là, juste modifier l’ip du syno pour un premier test et laisser à l’identique de la capture le reste :

Après avec cette conf, si le syno envoie l’ordre d’extinction, la VM haos va s’éteindre mais je suis pas certain que le proxmox s’éteigne aussi.

À voir avec ceux qui ont le même genre de config.

Et si tu veux récupérer les metrics de l’onduleur, il te faut l’intégration nut en plus.

Après je peux brancher londuleur en usb directement sur le mini pc ???

Ce serait peut être plus simple ?

Bonsoir ,
J’ai fait un tuto pour partager un onduleur branché sur un Synology avec un autre appareil non syno, comme un nas asustor.

Je sais que j’ai aussi paramètre mon hôte proxmox pour qu’il tienne compte du serveur nut du Syno.
J’ai fait un script pour modifier ce qu’il faut dans proxmox.
Voilà le script :
L’adresse IP 192.168.2.201 est celle du Synology qui fait office de serveur UPS


#!/usr/bin/env bash

# ╔══════════════════════════════════════════════════════════════════════════╗
# ║ Script pour configurer Proxmox VE en tant que client UPS sur le Syno     ║
# ╚══════════════════════════════════════════════════════════════════════════╝

# ! À lancer en root !
# chmod 764 *.sh

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
script_folder="$(pwd)"
backup_folder="${script_folder}/0-0-backup_files--$(date +%Y-%m-%d--%Hh%Mm%Ss)"
mkdir -p "${backup_folder}"
# ~~~~~~~~~~~ Dossier de backup ~~~~~~~~~~~ #

printf "\n-- Script pour configurer Proxmox VE en tant que client UPS sur le Syno --"
printf "\n-- 1. Mise à jour des dépôts et des paquets existants\n"
read -p "      Press enter to continue"
sudo apt update && sudo apt upgrade

printf "\n-- 2. Installation des dépendances : nut (contient nut-server et nut-client)\n"
read -p "      Press enter to continue"
sudo apt install -y nut


# Normalement aucun fichier upsmon.conf ne doit exister
printf "\n-- 3. Sauvegarde du fichier à modifier s'il existe\n"
read -p "      Press enter to continue"
upsmon_file="/etc/nut/upsmon.conf"
nut_file="/etc/nut/nut.conf"
if [ -f "${upsmon_file}" ]; then
    cp --parents -v "${upsmon_file}" "${backup_folder}"
else
    printf "\n      Le fichier %s à modifier n'existe pas.\n" "${upsmon_file}"
fi
if [ -f "${upsmon_file}" ]; then
    cp --parents -v "${nut_file}" "${backup_folder}"
else
    printf "\n      Le fichier %s à modifier n'existe pas.\n" "${nut_file}"
fi

printf "\n-- 4. Arrêt du client nut"
read -p "      Press enter to continue"
upsmon stop

printf "\n-- 5. Copie du fichier pré-configuré 'upsmon.conf' et modification du fichier 'nut.conf'\n"
read -p "      Press enter to continue"
cp -vf "${script_folder}/upsmon.conf" "${upsmon_file}"

# Changer :
#    MODE=none
# par :
#   MODE=netclient
sudo sed -i "s/MODE=none/MODE=netclient/" "${nut_file}"

printf "\n-- 6. Redémarrage du client nut"
read -p "      Press enter to continue"
upsmon start

printf "\n-- 7. Vérification des informations récupérées sur l'UPS du Syno :"
read -p "      Press enter to continue"
upsc ups@192.168.2.201

printf "\n-- Script terminé --"

Et le fichier upsmon.conf :


# Network UPS Tools: example upsmon configuration
#
# This file contains passwords, so keep it secure.

# --------------------------------------------------------------------------
# RUN_AS_USER <userid>
#
# By default, upsmon splits into two processes.  One stays as root and
# waits to run the SHUTDOWNCMD.  The other one switches to another userid
# and does everything else.
#
# The default unprivileged user is set at compile-time with the option
#   'configure --with-user=...'
#
# You can override it with '-u <user>' when starting upsmon, or just
# define it here for convenience.
#
# Note: if you plan to use the reload feature, this file (upsmon.conf)
# must be readable by this user!  Since it contains passwords, DO NOT
# make it world-readable.  Also, do not make it writable by the upsmon
# user, since it creates an opportunity for an attack by changing the
# SHUTDOWNCMD to something malicious.
#
# For best results, you should create a new normal user like "nutmon",
# and make it a member of a "nut" group or similar.  Then specify it
# here and grant read access to the upsmon.conf for that group.
#
# This user should not have write access to upsmon.conf.
#
# RUN_AS_USER nut

RUN_AS_USER root

# --------------------------------------------------------------------------
# MONITOR <system> <powervalue> <username> <password> ("primary"|"secondary")
#
# List systems you want to monitor.  Not all of these may supply power
# to the system running upsmon, but if you want to watch it, it has to
# be in this section.
#
# You must have at least one of these declared.
#
# <system> is a UPS identifier in the form <upsname>@<hostname>[:<port>]
# like ups@localhost, su700@mybox, etc.
#
# Examples:
#
#  - "su700@mybox" means a UPS called "su700" on a system called "mybox"
#
#  - "fenton@bigbox:5678" is a UPS called "fenton" on a system called
#    "bigbox" which runs upsd on port "5678".
#
# The UPS names like "su700" and "fenton" are set in your ups.conf
# in [brackets] which identify a section for a particular driver.
#
# If the ups.conf on host "doghouse" has a section called "snoopy", the
# identifier for it would be "snoopy@doghouse".
#
# <powervalue> is an integer - the number of power supplies that this UPS
# feeds on this system.  Most personal computers only have one power supply,
# so this value is normally set to 1, while most modern servers have at least
# two.  You need a pretty big or special box to have any other value here.
#
# You can also set this to 0 for a system that doesn't take any power
# from the MONITORed supply, which you still want to monitor (e.g. for an
# administrative workstation fed from a different circuit than the datacenter
# servers it monitors). Use <powervalue> if 0 when you want to hear about
# changes for a given UPS without shutting down when it goes critical.
#
# <username> and <password> must match an entry in that system's
# upsd.users.  If your username is "upsmon" and your password is
# "blah", the upsd.users would look like this:
#
#	[upsmon]
#		password  = blah
#		upsmon primary 	# (or secondary)
#
# "primary" means this system will shutdown last, allowing the secondary
# systems time to shutdown first.
#
# "secondary" means this system shuts down immediately when power goes
# critical and less than MINSUPPLIES power sources have reliable input feeds.
#
# The general assumption is that the "primary" system is the one with direct
# connection to an UPS (such as serial or USB cable), so the primary system
# runs the NUT driver and 'upsd' server locally and can manage the device,
# and it would often tell the UPS to completely power itself off as a step
# in power-race avoidance (see POWERDOWNFLAG for details).
#
# Also, since the primary system stays up the longest, it suffers higher risks
# of ungraceful shutdown if the estimation of remaining runtime (or of the
# time it takes to shut down this system) was guessed wrong. By consequence,
# the "secondary" systems typically monitor the power environment state
# through the 'upsd' processes running on the remote (often "primary") systems
# and do not directly interact with an UPS (no local NUT drivers are running
# on the secondary systems). As such, secondaries typically shut down as
# soon as there is a sufficiently long power outage, or a low-battery alert
# from the UPS, or a loss of connection to the primary while the power was
# last known to be missing.
#
# This assumption and configuration can also make sense for networked UPSes,
# where a rack full of servers might overload the communications capacity
# of the networked management card on the UPS - in this case you might either
# reduce the 'snmp-ups' or 'netxml-ups' driver polling rate, or dedicate a
# "primary" server and set up the rest as "secondary" systems.
#
# In case of such large setups as mentioned above, beware also that shutdown
# times of the rack done all at once can substantially differ from smaller
# scale experiments with single-server shutdowns, since systems can compete
# for shared storage and other limited resources as they go down (and also
# not everyone may safely shut down simultaneously - e.g. a NAS or DB server
# would better go down after all its clients). You would be well served by
# higher-end UPSes with manageable thresholds to declare a critical state.
#
# Examples:
#
# MONITOR myups@bigserver 1 upswired blah primary
# MONITOR su700@server.example.com 1 upsmon secretpass secondary
# MONITOR myups@localhost 1 upsmon pass primary	# (or secondary)

# MONITOR ups@192.168.2.201 1 monuser secret slave
MONITOR ups@192.168.2.201 1 monuser secret secondary


# --------------------------------------------------------------------------
# MINSUPPLIES <num>
#
# Give the number of power supplies that must be receiving power to keep
# this system running.  Most systems have one power supply, so you would
# put "1" in this field.
#
# Large/expensive server type systems usually have more, and can run with
# a few missing.  Some of these can run with 2 out of 4, for example,
# so you'd set that to 2.  The idea is to keep the box running as long
# as possible, right?
#
# Obviously you have to put the redundant supplies on different UPS circuits
# for this to make sense!  See big-servers.txt in the docs subdirectory
# for more information and ideas on how to use this feature.

MINSUPPLIES 1

# --------------------------------------------------------------------------
# SHUTDOWNCMD "<command>"
#
# upsmon runs this command when the system needs to be brought down.
#
# This should work just about everywhere ... if it doesn't, well, change it,
# perhaps to a more complicated custom script.
#
# Note that while you experiment with the initial setup and want to test how
# your configuration reacts to power state changes and ultimately when power
# is reported to go critical, but do not want your system to actually turn
# off, consider setting the SHUTDOWNCMD temporarily to do something benign -
# such as posting a message with 'logger' or 'wall' or 'mailx'. Do be careful
# to plug the UPS back into the wall in a timely fashion.

SHUTDOWNCMD "/sbin/shutdown -h +0"

# --------------------------------------------------------------------------
# NOTIFYCMD <command>
#
# upsmon calls this to send messages when things happen
#
# This command is called with the full text of the message (from NOTIFYMSG)
# as one argument.
#
# The environment string NOTIFYTYPE will contain the type string of
# whatever caused this event to happen.
#
# The environment string UPSNAME will contain the name of the system/device
# that generated the change.
#
# Note that this is only called for NOTIFY events that have EXEC set with
# NOTIFYFLAG.  See NOTIFYFLAG below for more details.
#
# Making this some sort of shell script might not be a bad idea.
# Alternately you can use the upssched program as your NOTIFYCMD for some
# more complex setups (e.g. to ease handling of notification storms).
# For more information and ideas, see docs/scheduling.txt
#
# Example:
# NOTIFYCMD /bin/notifyme

NOTIFYCMD /usr/sbin/upssched

# --------------------------------------------------------------------------
# POLLFREQ <n>
#
# Polling frequency for normal activities, measured in seconds.
#
# Adjust this to keep upsmon from flooding your network, but don't make
# it too high or it may miss certain short-lived power events.

POLLFREQ 5

# --------------------------------------------------------------------------
# POLLFREQALERT <n>
#
# Polling frequency in seconds while UPS on battery.
#
# You can make this number lower than POLLFREQ, which will make updates
# faster when any UPS is running on battery.  This is a good way to tune
# network load if you have a lot of these things running.
#
# The default is 5 seconds for both this and POLLFREQ.

POLLFREQALERT 5

# --------------------------------------------------------------------------
# HOSTSYNC - How long upsmon will wait before giving up on another upsmon
#
# The primary upsmon process uses this number when waiting for secondary
# systems to disconnect once it has set the forced shutdown (FSD) flag.
# If they don't disconnect after this many seconds, it goes on without them.
#
# Similarly, upsmon secondary processes wait up to this interval for the
# primary upsmon to set FSD when an UPS they are monitoring goes critical -
# that is, on battery and low battery.  If the primary doesn't do its job,
# the secondaries will shut down anyway to avoid damage to the file systems.
#
# This "wait for FSD" is done to avoid races where the status changes
# to critical and back between polls by the primary.

HOSTSYNC 15

# --------------------------------------------------------------------------
# DEADTIME - Interval to wait before declaring a stale ups "dead"
#
# upsmon requires a UPS to provide status information every few seconds
# (see POLLFREQ and POLLFREQALERT) to keep things updated.  If the status
# fetch fails, the UPS is marked stale.  If it stays stale for more than
# DEADTIME seconds, the UPS is marked dead.
#
# A dead UPS that was last known to be on battery is assumed to have gone
# to a low battery condition.  This may force a shutdown if it is providing
# a critical amount of power to your system.
#
# Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT.
# Otherwise you'll have "dead" UPSes simply because upsmon isn't polling
# them quickly enough.  Rule of thumb: take the larger of the two
# POLLFREQ values, and multiply by 3.

DEADTIME 15

# --------------------------------------------------------------------------
# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the primary system
#
# upsmon will create a file with this name in primary mode when it's time
# to shut down the load.  You should check for this file's existence in
# your shutdown scripts and run 'upsdrvctl shutdown' if it exists, to tell
# the UPS(es) to power off.
#
# See the config-notes.txt file in the docs subdirectory for more information.
# Refer to the section:
# [[UPS_shutdown]] "Configuring automatic shutdowns for low battery events"
# or refer to the online version.

POWERDOWNFLAG /etc/killpower

# --------------------------------------------------------------------------
# NOTIFYMSG - change messages sent by upsmon when certain events occur
#
# You can change the default messages to something else if you like.
#
# NOTIFYMSG <notify type> "message"
#
# NOTIFYMSG ONLINE	"UPS %s on line power"
# NOTIFYMSG ONBATT	"UPS %s on battery"
# NOTIFYMSG LOWBATT	"UPS %s battery is low"
# NOTIFYMSG FSD		"UPS %s: forced shutdown in progress"
# NOTIFYMSG COMMOK	"Communications with UPS %s established"
# NOTIFYMSG COMMBAD	"Communications with UPS %s lost"
# NOTIFYMSG SHUTDOWN	"Auto logout and shutdown proceeding"
# NOTIFYMSG REPLBATT	"UPS %s battery needs to be replaced"
# NOTIFYMSG NOCOMM	"UPS %s is unavailable"
# NOTIFYMSG NOPARENT	"upsmon parent process died - shutdown impossible"
#
# Note that %s is replaced with the identifier of the UPS in question.
#
# Possible values for <notify type>:
#
# ONLINE   : UPS is back online
# ONBATT   : UPS is on battery
# LOWBATT  : UPS has a low battery (if also on battery, it's "critical")
# FSD      : UPS is being shutdown by the primary (FSD = "Forced Shutdown")
# COMMOK   : Communications established with the UPS
# COMMBAD  : Communications lost to the UPS
# SHUTDOWN : The system is being shutdown
# REPLBATT : The UPS battery is bad and needs to be replaced
# NOCOMM   : A UPS is unavailable (can't be contacted for monitoring)
# NOPARENT : The process that shuts down the system has died (shutdown impossible)

# --------------------------------------------------------------------------
# NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur
#
# By default, upsmon sends walls (global messages to all logged in users)
# and writes to the syslog when things happen.  You can change this.
#
# NOTIFYFLAG <notify type> <flag>[+<flag>][+<flag>] ...
#
# NOTIFYFLAG ONLINE	SYSLOG+WALL
# NOTIFYFLAG ONBATT	SYSLOG+WALL
# NOTIFYFLAG LOWBATT	SYSLOG+WALL
# NOTIFYFLAG FSD	SYSLOG+WALL
# NOTIFYFLAG COMMOK	SYSLOG+WALL
# NOTIFYFLAG COMMBAD	SYSLOG+WALL
# NOTIFYFLAG SHUTDOWN	SYSLOG+WALL
# NOTIFYFLAG REPLBATT	SYSLOG+WALL
# NOTIFYFLAG NOCOMM	SYSLOG+WALL
# NOTIFYFLAG NOPARENT	SYSLOG+WALL
#
# Possible values for the flags:
#
# SYSLOG - Write the message in the syslog
# WALL   - Write the message to all users on the system
# EXEC   - Execute NOTIFYCMD (see above) with the message
# IGNORE - Don't do anything
#
# If you use IGNORE, don't use any other flags on the same line.

NOTIFYFLAG ONLINE EXEC
NOTIFYFLAG ONBATT EXEC
NOTIFYFLAG LOWBATT EXEC
NOTIFYFLAG NOCOMM EXEC
NOTIFYFLAG COMMBAD IGNORE 
NOTIFYFLAG COMMOK IGNORE
NOTIFYFLAG SHUTDOWN IGNORE
NOTIFYFLAG FSD EXEC
NOTIFYFLAG NOPARENT SYSLOG

# --------------------------------------------------------------------------
# RBWARNTIME - replace battery warning time in seconds
#
# upsmon will normally warn you about a battery that needs to be replaced
# every 43200 seconds, which is 12 hours.  It does this by triggering a
# NOTIFY_REPLBATT which is then handled by the usual notify structure
# you've defined above.
#
# If this number is not to your liking, override it here.

RBWARNTIME 43200

# --------------------------------------------------------------------------
# NOCOMMWARNTIME - no communications warning time in seconds
#
# upsmon will let you know through the usual notify system if it can't
# talk to any of the UPS entries that are defined in this file.  It will
# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you
# change the interval with this directive.

NOCOMMWARNTIME 300

# --------------------------------------------------------------------------
# FINALDELAY - last sleep interval before shutting down the system
#
# On a primary, upsmon will wait this long after sending the NOTIFY_SHUTDOWN
# before executing your SHUTDOWNCMD.  If you need to do something in between
# those events, increase this number.  Remember, at this point your UPS is
# almost depleted, so don't make this too high.  If needed, on high-end UPS
# devices you can usually configure when the low-battery state is announced
# based on estimated remaining run-time or on charge level of the batteries.
#
# Alternatively, you can set this very low so you don't wait around when
# it's time to shut down.  Some UPSes don't give much warning for low
# battery and will require a value of 0 here for a safe shutdown.
#
# Note: If FINALDELAY on the secondary is greater than HOSTSYNC on the
# primary, the primary will give up waiting for that secondary system
# to disconnect.

FINALDELAY 5

# --------------------------------------------------------------------------
# CERTPATH - path to certificates (database directory or directory with CA's)
#
# When compiled with SSL support, you can enter the certificate path here.
#
# With NSS:
# Certificates are stored in a dedicated database (split into 3 files).
# Specify the path of the database directory.
#
# CERTPATH /etc/nut/cert/upsmon
#
# With OpenSSL:
# Directory containing CA certificates in PEM format, used to verify
# the server certificate presented by the upsd server. The files each
# contain one CA certificate. The files are looked up by the CA subject
# name hash value, which must hence be available.
#
# CERTPATH /usr/ssl/certs
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.

# --------------------------------------------------------------------------
# CERTIDENT - self certificate name and database password
# CERTIDENT <certificate name> <database password>
#
# When compiled with SSL support with NSS, you can specify the certificate
# name to retrieve from database to authenticate itself and the password
# required to access certificate related private key.
#
# CERTIDENT "my nut monitor" "MyPasSw0rD"
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.

# --------------------------------------------------------------------------
# CERTHOST - security properties for an host
# CERTHOST <hostname> <certificate name> <certverify> <forcessl>
#
# When compiled with SSL support with NSS, you can specify security directive
# for each server you can contact.
# Each entry maps server name with the expected certificate name and flags
# indicating if the server certificate is verified and if the connection
# must be secure.
#
# CERTHOST localhost "My nut server" 1 1
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.

# --------------------------------------------------------------------------
# CERTVERIFY - make upsmon verify all connections with certificates
# CERTVERIFY 1
#
# When compiled with SSL support, make upsmon verify all connections with
# certificates.
# Without this, there is no guarantee that the upsd is the right host.
# Enabling this greatly reduces the risk of man in the middle attacks.
# This effectively forces the use of SSL, so don't use this unless
# all of your upsd hosts are ready for SSL and have their certificates
# in order.
# When compiled with NSS support of SSL, can be overridden for host
# specified with a CERTHOST directive.


# --------------------------------------------------------------------------
# FORCESSL - force upsmon to use SSL
# FORCESSL 1
#
# When compiled with SSL, specify that a secured connection must be used
# to communicate with upsd.
# If you don't use 'CERTVERIFY 1', then this will at least make sure
# that nobody can sniff your sessions without a large effort.  Setting
# this will make upsmon drop connections if the remote upsd doesn't
# support SSL, so don't use it unless all of them have it running.
# When compiled with NSS support of SSL, can be overridden for host
# specified with a CERTHOST directive.

# --------------------------------------------------------------------------
# DEBUG_MIN - specify minimal debugging level for upsmon daemon
# e.g. DEBUG_MIN 6
#
# Optionally specify a minimum debug level for `upsmon` daemon, e.g. for
# troubleshooting a deployment, without impacting foreground or background
# running mode directly, and without need to edit init-scripts or service
# unit definitions. Note that command-line option `-D` can only increase
# this verbosity level.
#
# NOTE: if the running daemon receives a `reload` command, presence of the
# `DEBUG_MIN NUMBER` value in the configuration file can be used to tune
# debugging verbosity in the running service daemon (it is recommended to
# comment it away or set the minimum to explicit zero when done, to avoid
# huge journals and I/O system abuse). Keep in mind that for this run-time
# tuning, the `DEBUG_MIN` value *present* in *reloaded* configuration files
# is applied instantly and overrides any previously set value, from file
# or CLI options, regardless of older logging level being higher or lower
# than the newly found number; a missing (or commented away) value however
# does not change the previously active logging verbosity.