[Nut-upsuser] Data Stale issue

Gareth Davies gareth94 at hotmail.co.uk
Tue May 7 14:03:55 BST 2019

Thank you for that, very much appreciate your help. I’ll have another go when I’m over at Nan’s house! Do you know what else I could try to solve the issue of no e-mails being sent? I know my e-mail settings were correct as it all worked previously. This is all rather odd! Hopefully I can get the e-mails being sent and ensure NUT starts automatically after a reboot. I feel like I’m getting closer!

Charles, when you say I’ll need to enable upsmon-monitor... could you tell me the script to go about that? Sorry for my lack of knowledge in all this!

On 7 May 2019, at 3:27 am, Charles Lepple <clepple at gmail.com<mailto:clepple at gmail.com>> wrote:

On May 6, 2019, at 2:57 PM, Stuart D. Gathman wrote:

On Mon, 6 May 2019, Gareth Davies wrote:

Just to say, I stopped the driver and started it again and the errors went
away! However, I turned off power to the UPS but I wasn’t receiving any
e-mails :( also when I rebooted the RPi the driver/service didn’t start back
up automatically...
I wonder if you have any thoughts on the above?

Those are issues with understanding your distro.  For the latter, if you are using systemd, and your systemd service is called
nut-server.service (as it is in Fedora), you would enable it at boot
with "systemctl enable nut-server".  Systemd automatically starts
prerequistites first, so on Fedora at least, starting nut-server first
starts nut-driver.  You probably also need to start nut-monitor, as
that is the usual place you would configure sending notifications.

Sorry, I don't have details on Debian.

Stuart, thanks for jumping in. The systemd services are named the same in Debian.

Gareth, you should get something like the following:

$ systemctl|grep nut-
  nut-driver.service      loaded active running   Network UPS Tools - power device driver controller
● nut-monitor.service     loaded failed failed    Network UPS Tools - power device monitor and shutdown controller
  nut-server.service      loaded active running   Network UPS Tools - power devices information server

In your case, you will want nut-monitor to be running as well - it starts upsmon. (This was taken from a partially-configured system.)

Debian 9 (stretch) is what we are looking for when referring to the distro. Armed with that information, we can look up the latest NUT version for that distro at packages.debian.org/nut-server<http://packages.debian.org/nut-server>, but it's always good to verify that your own system is up-to-date:

$ dpkg -l "nut-*"
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                      Version           Architecture      Description
un  nut-cgi                   <none>            <none>            (no description available)
ii  nut-client                2.7.4-5           amd64             network UPS tools - clients
un  nut-ipmi                  <none>            <none>            (no description available)
un  nut-monitor               <none>            <none>            (no description available)
ii  nut-server                2.7.4-5           amd64             network UPS tools - core system
un  nut-snmp                  <none>            <none>            (no description available)
un  nut-xml                   <none>            <none>            (no description available)

Not sure if you saw Roger's message (he sent it directly to the list, and it doesn't look like you are subscribed): https://alioth-lists.debian.net/pipermail/nut-upsuser/2019-May/011373.html His guide covers a lot of the setup process, including a script to email about power status changes. Personally, once the services start at boot, I would be satisfied with just notifying on COMMBAD and NOCOMM events (between the two, that should cover USB-related errors), but in the end it's up to you to trade off between complexity of the initial setup, and reliability in the long term.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20190507/90fa5e47/attachment-0001.html>

More information about the Nut-upsuser mailing list