[Nut-upsuser] Monitoring slaves via dummy-ups

Dan Langille dan at langille.org
Fri Sep 4 22:57:57 BST 2020


On Fri, Sep 4, 2020, at 5:19 PM, Roger Price wrote:
> On Fri, 4 Sep 2020, Dan Langille wrote:
> 
> > I wondered how folks monitored slaves.
> 
> A NUT solution is to use a "heartbeat" generated in each slave and monitored in 
> say the master or elsewhere.

I did find this earlier today: https://alioth-lists.debian.net/pipermail/nut-upsuser/2017-April/010590.html

Is that what you mean? I found no reference to heartbeat on the website.

> > The goal: confirm the slaves have contact with the master.
> 
> On your Github site:  Goal: allow host to shutdown when needed.
> 
> These are not the same goals

Yes, please go by what I have in the email. That repo also says "THIS is not a working configuration. I'm still testing. This won't actually shutdown the host."

> In NUT, for the shutdown process, this involves upsmon in the master system 
> setting state FSD in each slave's upsd.

Understood.

> It's internal to NUT.  What other contact do you want to check?

I want to know that the NUT instance on the slave is operational.

> > In my case, I am using Nagios and the check_ups plugin. It seems to work fine 
> > but being new to nut, I'm seeking confirmation that this is a sane approach.
> 
> On your Github site: Each host is monitored via the Nagios check_ups plugin.
> 
> Do you want to use NUT to manage system shutdowns on power failure?, or is 
> Nagios sufficient for you?

Yes, eventually, I'll add SHUTDOWN directives to upsmon.conf on the slaves.

> > Running on each host is:
> 
> > [dan at slocum:~] $ ps auwwx | grep ups
> > root      46270    0.0  0.0   11332    2868  -  Ss   19:49        0:00.00 
> > /usr/local/sbin/upsmon localhost
> > uucp      46271    0.0  0.0   11596    2896  -  S    19:49        0:00.00 
> > /usr/local/sbin/upsmon localhost
> > uucp      56305    0.0  0.0   11668    2952  -  Ss   20:07        1:05.11 
> > /usr/local/libexec/nut/dummy-ups -a repeater
> > uucp      75564    0.0  0.0   11668    2952  -  Ss   20:14        1:02.33 
> > /usr/local/libexec/nut/dummy-ups -a ups02
> > uucp      75566    0.0  0.0  110004    2936  -  Ss   20:14        0:02.01 
> > /usr/local/sbin/upsd
> 
> Running NUT as uucp is surprising.  Do you have a user "nut"?

That is the practice on FreeBSD, decided 14 years ago it seems. I would prefer
a dedicated nut user. I notice I can change this at compile time:

https://svnweb.freebsd.org/ports/head/sysutils/nut/Makefile?annotate=533996#l19

> I suggest you set up a working NUT configuration, and then ask the question "Do 
> I need Nagios for UPS management?"

That will come tomorrow.

Nagios is not intended for UPS management.  Only for monitoring the services.

Thank you.  Very helpful

-- 
  Dan Langille
  dan at langille.org



More information about the Nut-upsuser mailing list