[Plug-In] NUT - Network UPS Tools


Recommended Posts

 

Hi Brian,

 

I have the same ups and was having the same issue of the ups not shutting down with the apcupsd plugin. It's good to hear that this plugin works properly.

 

Another user on here and I also discovered (the hard way) that this ups did something else that was pretty bad. If the battery was run down a bit and it is charging when the power is back and the server is on, the moment the battery is full and it switches from charging to pass through, it cuts the power momentarily, causing the server to shut off uncleanly.

 

Did you ever test that? The other user claimed it only happened when he tried the option "shut down the ups" with the other plugin but I'm not sure. It happened to me after a power outage, where I found the server off several hours after the power was restored and I was perplexed. Later, I tested it with the following:

1) I unplugged the ups, let the server shutdown cleanly.

2) Run the ups battery down to 80% (with a lamp hooked up).

3) Restored power to the ups.

4) Started the server (array off)

5) Watched the server shut off when the battery got full.

 

I don't have too many outages (maybe once a year). So what I had been doing is, wait until the ups is fully charged before starting the server but it is very annoying.

 

Hello @aptalca, thanks for reaching out.

 

I did not test what you describe above using apcupsd but would be very curious to hear the results of the same test using NUT. My plate is pretty full for a while with other projects, but if I get an opportunity to do a proper test as you've laid out above with NUT, I'll be sure to post back with my results. Likewise, if you make the switch, let me know how it goes! That's a pretty awful scenario you've described, I'm curious to find out what happens with NUT.

 

 

Thanks

-Brian

 

I just installed nut and thanks to your settings, my ups was recognized right away. I will do some testing with it over the next few days.

 

By the way, I see that trurl was asking about master/slave config early on, but did anyone get that to work with this plugin? I have two servers on the same ups. I tried to select netserver on the master and on the slave, I put in the ip address of the master in the "port" section but it doesn't seem to find it. I'm not sure if I'm on the right track, lol.

 

Thanks

Link to comment
  • 5 months later...

Hi guys, I've just installed NUT and I think it recognises my UPS well enough. My question is around the Powerdown plugin - the front page of the thread "highly recommends" installing it but then I see that Powerdown is deprecated for unRAID 6.2.

 

Does this mean that NUT will be able to cleanly shut down my unRAID 6.2.2 without any issues if I don't have Powerdown? I.e., will NUT ensure that my plugins like Mylar, SABNZBd and so on are cleanly shut down before taking down the server?

Link to comment

Hi guys, I've just installed NUT and I think it recognises my UPS well enough. My question is around the Powerdown plugin - the front page of the thread "highly recommends" installing it but then I see that Powerdown is deprecated for unRAID 6.2.

 

Does this mean that NUT will be able to cleanly shut down my unRAID 6.2.2 without any issues if I don't have Powerdown? I.e., will NUT ensure that my plugins like Mylar, SABNZBd and so on are cleanly shut down before taking down the server?

 

Problem is, there have been a lot of changes in unRAID, and I don't believe this plugin is being updated.  You'll have to tell us if it still works, but I suspect it needs a little tweaking.

Link to comment

Hi guys, I've just installed NUT and I think it recognises my UPS well enough. My question is around the Powerdown plugin - the front page of the thread "highly recommends" installing it but then I see that Powerdown is deprecated for unRAID 6.2.

 

Does this mean that NUT will be able to cleanly shut down my unRAID 6.2.2 without any issues if I don't have Powerdown? I.e., will NUT ensure that my plugins like Mylar, SABNZBd and so on are cleanly shut down before taking down the server?

 

Problem is, there have been a lot of changes in unRAID, and I don't believe this plugin is being updated.  You'll have to tell us if it still works, but I suspect it needs a little tweaking.

 

I can confirm the service starts correctly, recognises my UPS, reports stats like load, battery, etc. It also detects and alerts when the UPS switches to battery mode and back again. What I haven't tested yet is the shutdown of the unRAID server - was hoping to understand a bit more about this first. I suppose I'll just have to test it and see - what do you others think?

Link to comment

This other thinks you should try pulling the plug on the ups to see if it works. Naturally only do that after you save all important files and adjust the settings for nearly instant shutdown after a minute or such so you're not waiting a long time.  :P

 

Will do so and report back...

Link to comment

This is a great plugin.  Thanks.  Anyone know if it can monitor multiple UPS'?  I have another UPS that powers my router/switches etc and I want to monitor power usage through unraid.  Its working well for this UPS but I am not sure if I can just attach the USB and monitor 2?

 

RAINMAN - does it shut your machine down cleanly on unRAID 6.2.2?

Link to comment

This is a great plugin.  Thanks.  Anyone know if it can monitor multiple UPS'?  I have another UPS that powers my router/switches etc and I want to monitor power usage through unraid.  Its working well for this UPS but I am not sure if I can just attach the USB and monitor 2?

 

I'm not sure, but you will need to modify the config files manually and will not get the info for both in the plugin, as its only made for one.

Link to comment
  • 2 months later...

Hi,

Since I get no answer in the KVM section I post again here.

As I tried some time ago, my UPS (Riello) is not recognized by APCups.

I did fix it using:

-NUT plugin: http://lime-technology.com/forum/index.php?topic=41424.0

-Powerdown script: https://lime-technology.com/forum/index.php?topic=31735.0

Since the last is deprecated, and I don´t want to buy a new UPS, can anyone that is still using the NUT plugin confirm that it is still functional?

If not, how can I proceed to run a script using new tools available like [Plugin] CA User Scripts?

Hope someone can help.

Rgds

Link to comment

The only reason the the Powerdown plugin is deprecated is due to the fact that the standard version supplied with unRAID is now thought to be good enough that the author thinks it is no longer worth the effort of maintains the plugin version.

Hi, so can I install the NUT plugin and will it work with the supplied version of Unraid?

Rgds.

Link to comment

The only reason the the Powerdown plugin is deprecated is due to the fact that the standard version supplied with unRAID is now thought to be good enough that the author thinks it is no longer worth the effort of maintains the plugin version.

Hi, so can I install the NUT plugin and will it work with the supplied version of Unraid?

Rgds.

 

That should work. I don't see any info in the first post that powerdown plugin is a requirement. But I only looked at it quickly.

Link to comment
  • 1 month later...

Hi,

 

I want to report back I succesfully connected to Unraid 6.3.2 my UPS (SALICRU SPS.1000.ADV > out: pure sinewave) using macester´s NUT Plugin (downloaded from Community Applications).

 

Funny thing is I calculated way too much power for my rig. My ups now is 1000va but I thought I would need 1500va. I was told a loss of total rated power of 20% should be expected. So, from 1000va(=700w) would be only left for full continuous load 800va(=560w). At the moment I can run my Unraid (14 disks) with 2 dockers running plus 1 gaming vm running with oc´d GPU.

 

I tried this (startpoint: array not started, docker and vmmgr stopped; NUT: "power down UPS"; ups running in normal mode):

  1. I set the "Battery Level" at 95% and pulled the plug out of the wall. After 1-2 minutes the array was cleanly "power-down" and the ups was shutdown.
  2. Now I started the array + docker + vmmgr (gaming vm running), changed "Battery Level" to 50% and pulled the plug out of the wall. Parameter "battery.charge" dipped slow (which is normal). I recorded more than 9 minutes running only on battery before I quit the test.
  3. Now with the same situation as in 2., I let my gaming vm run Steam´s VR Demo and before it could finish it this happened:
    1. w10 (gaming vm) was forced to shutdown (no sudden black screen)
    2. the array was "power-down" and the ups was shutdown

So I think NUT plugin is working great. Still will keep an eye on how it works for a longer period of time, but first test worked. Great feature is my vm is closed in a clean way.(actually the windows OS).

 

I also saved money since I had my old SALICRU SPS.1000.ADV somewhere lying with no batteries. A similar one (Cyberpower 1500va) costs me aprox. 400.-euros. I ended buying only the batteries from Salicru for 48.-euros.

 

 

Link to comment

I have some doubts:

-downloaded NUT´s driver is "driver.version:2.7.3"  > I visited NUT´s webpage and I think 2.7.4 is published. Can anyone confirm this and let me know hot to update it?

-when array is started I see this message (at Tower login window):ups%20message1_redux_zpsccooimfr.png

Anything I should be aware that I am missing?

 

Edited by luca2
missing text after iimg
Link to comment
  • 1 month later...
  • 1 month later...

I updated the plugin. Uninstall the original and install this one.

 

https://raw.githubusercontent.com/dmacias72/NUT-unRAID/master/plugin/nut.plg
 

 

I have not fully tested everything. I did test pulling the plug and it notified and shut down the server. So if someone wants to help out and test. I Stop the array first and any other write functions/scripts before testing. I would monitor from an ipmi or physical console then try different shut down scenarios.

 

change log

###2017.05.26

- add master/slave options
- fix runtime display format

###2017.05.24

- add dropdown options for battery and timers

- add killpower flag condition to shutdown script

###2017.05.22

- fix shutdown scripts

- move default nut conf files

###2017.05.20

- fix manual config settings

###2017.05.19

- fix reload button

- add start conditions to rc script

###2017.05.17

- add manual mode, reload and config editor to settings page

- reformat settings page, hide unused vars

- add vars, rewrite, combine and move scripts

- add snmp settings from Ambrotos fork - untested

- add UPS summary, UPS details page and dashboard page

- add dynamix plugin api

- remove depreciated code

- restructure and repackage plugin

- rename nut plugin package to difer from nut package

 

 

 

 

Edited by dmacias
change log
  • Like 1
  • Upvote 3
Link to comment
 
Cool. I'll test later.
 
Does it work in slave mode? Or if not, can this be the server to another NUT slave?

I just setup a backup supermicro server. So I haven't tested that yet. I didn't add anything with respect to master/slave from the previous plugin. But the way I set up the plugin it symlinks /etc/ups to your flash drive /config/plugins/nut/ups. So any conf changes are persistent. I included a manual mode that excludes settings page variables so you can manually edit the conf. I added a config editor on the settings page.
  • Upvote 1
Link to comment
3 hours ago, dmacias said:


Well if you get it to work let me know how too and I'll try to include it.

 

So, to get the plugin as NUT master is pretty easy, as it's all included in the config, just need to change UPS Mode to:

 

UPS Mode: Netserver

 

It's missing the slave option, for me it's OK as unRAID can be the master and the slave (not unRAID) can connect to it.

 

These are the settings needed on the slave side:

 

Mode:Slave

IP: master IP

Port: 3493

Monitor user: slaveuser

Monitor password: slavepass

 

These are the default user/pass on the master side for the slave, they can be changed on /etc/ups/upsd.users

 

 

  • Upvote 1
Link to comment

Hi again!

The "NUT Details" section looks far better now and I think it includes more usefull info too. I did some testing and everything works fine.

Only noticed I set the "Battery Level" to "20" but the system shutdown when it was showing "35%" (at the "UPS Status" top section) ... really a minor issue for me.

The shutdown process managed to do a clean shutdown of my running vw (w10) + Tower clean shutdown.

Thx again for updating this plugin for us:D

Rgds

Link to comment
6 minutes ago, luca2 said:

The "NUT Details" section looks far better now and I think it includes more usefull info too.

 

Agree, looks very nice, just a request if possible, could the runtime display round to the closest minute, or display 1 or 2 decimals max?

nut.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.