Jump to content
macester

[Plug-In] NUT - Network UPS Tools

112 posts in this topic Last Reply

Recommended Posts

Thanks for the feedback. I can't take all the credit since it's a port of the apcupsd plugin.
@luca2 when researching nut it said something about battery % and 'time left on battery' may vary depending on hardware and battery age. So that could be the reason for the difference. I run on a straight time on battery (5-10 mins).

I will format the runtime left. Maybe h:m:s cause I don't know what .91666666667 minutes means.

Share this post


Link to post
Thank you [mention=11874]dmacias[/mention] for taking this on! I have installed your version without issue; unfortunately, my UPS / SNMP card is still not recognized.
 
Are you familiar with NUT? I know you can extend the drivers with sub-drivers (http://networkupstools.org/docs/developer-guide.chunked/ar01s04.html#snmp-subdrivers), but I cannot wrap my head around it.

Do you have the SNMP plugin installed? I didn't include the net-snmp package with this version. Did you try nut-scanner from the command line? What model ups and card? Is it in their list of currently implemented subdrivers from the link?

Share this post


Link to post
 

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?

I changed the runtime display to hours:minutes:seconds. I added master/slave options. I am able to connect to my main server from my backup and the slave shows the summary and details from the master. I did not test slave shutdown yet.

 

 

Share this post


Link to post

updated & seems to be working as master/slave on my 2 servers. On the first run I was getting the following error on the Master, but after restarting NUT it seems to be fine now

 

May 26 08:34:38 Tower upsmon[9404]: UPS [ups@]: connect failed: No such host

 

Edited by clowrym
I wish I had 23 servers.... Should have read 2

Share this post


Link to post

I figured out a few more things for master/slave. Mostly slave driver and port. I'll update soon.

Share this post


Link to post
On 5/25/2017 at 10:36 AM, dmacias said:


Do you have the SNMP plugin installed? I didn't include the net-snmp package with this version. Did you try nut-scanner from the command line? What model ups and card? Is it in their list of currently implemented subdrivers from the link?

 

I just installed the plugin as-is and set SNMP-UPS as the driver (from the dropdown). I'm running a Liebert-GXT2U UPS with one of their early "Liberty" SNMP cards - I can walk it via "snmpwalk". The card is not part of the subdrivers in the link, but my understanding is someone (who understands the process) can generate a new driver based on the data from a walk / mib file.

Share this post


Link to post
 
I just installed the plugin as-is and set SNMP-UPS as the driver (from the dropdown). I'm running a Liebert-GXT2U UPS with one of their early "Liberty" SNMP cards - I can walk it via "snmpwalk". The card is not part of the subdrivers in the link, but my understanding is someone (who understands the process) can generate a new driver based on the data from a walk / mib file.

Ok I'll see if I can figure it out. I'll look through the link again and see if I need more info.

Share this post


Link to post
2 minutes ago, dmacias said:


Ok I'll see if I can figure it out. I'll look through the link again and see if I need more info.

 

Thank you! I appreciate it very much. I'll provide any info you need.

Share this post


Link to post

How close is this to being a viable replacement for the apcupsd built in to unraid? Will it talk to all the APC and Cyberpower models? If so, maybe we can get @limetech to switch? It would be nice to have more universal UPS support built in to unraid.

Share this post


Link to post
How close is this to being a viable replacement for the apcupsd built in to unraid? Will it talk to all the APC and Cyberpower models? If so, maybe we can get [mention=1]limetech[/mention] to switch? It would be nice to have more universal UPS support built in to unraid.

https://r.tapatalk.com/shareLink?url=https%3A%2F%2Fforums%2Elime-technology%2Ecom%2Findex%2Ephp%3F%2Ftopic%2F55576-NUT-UPS-support&share_tid=55576&share_fid=18593&share_type=t
Hi, you can post your request here in hope Limetech includes It!

Enviado desde mi NX505J mediante Tapatalk

Share this post


Link to post
On 26/05/2017 at 4:53 PM, dmacias said:

I figured out a few more things for master/slave. Mostly slave driver and port. I'll update soon.

 

Thanks, slave mode seems to be working great.

 

Share this post


Link to post

I have an APC SUA2200RM2U that I'm thinking about stuffing some new batteries in. It has been dormant almost 5 years. I also have a Tripplite Minuteman Rack UPS 2000VA, and an ungodly heavy 4u or 5u APC that is packed behind some stuff that I'm not digging out for the model number, lol. Anyway, the 2200 is already in the bottom of the rack. Will this plugin gracefully shutdown unRaid with that model? What about the others?

Share this post


Link to post
I have an APC SUA2200RM2U that I'm thinking about stuffing some new batteries in. It has been dormant almost 5 years. I also have a Tripplite Minuteman Rack UPS 2000VA, and an ungodly heavy 4u or 5u APC that is packed behind some stuff that I'm not digging out for the model number, lol. Anyway, the 2200 is already in the bottom of the rack. Will this plugin gracefully shutdown unRaid with that model? What about the others?

The APC SUA2200RM2U should work from what I've read. You could just try it. Just stop the array first. You could power the server through a different ups and just hook up the serial or usb of the APC. Not sure on the others. Check the NUT website.

Share this post


Link to post
On 5/24/2017 at 4:36 PM, johnnie.black said:

 

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

 

How do you get the details to show?  I do not see that on my unraid server.  I would love to be able to monitor the UPS load.

Edited by BradJ
grammer

Share this post


Link to post
2 minutes ago, BradJ said:

 

How do you get the details to show?  I do not see that on my unraid server.  I would love to be able to monitor the UPS load.

 

I didn't do anything, I guess it will depend on the UPS, I'm using an APC Pro 900.

Share this post


Link to post
 
How do you get the details to show?  I do not see that on my unraid server.  I would love to be able to monitor the UPS load.

Does the status say running? That table only shows up if nut monitor is running.

Share this post


Link to post
4 hours ago, dmacias said:


Does the status say running? That table only shows up if nut monitor is running.

 

Yes, Nut is running as I can see the UPS statistics chart below the options.  Did the chart replace the details section posted above? The chart shows the load as 10. But that doesn't make sense, unless a 10 means 100. 

 

I turned off the built-in Unraid APC UPS service as I have a CyberPower CP1000PFCLCD. The built in APC service did see my UPS, but it reported the battery at 120%.  So it mostly works, but is not fully compatible.

 

 

Share this post


Link to post
 
Yes, Nut is running as I can see the UPS statistics chart below the options.  Did the chart replace the details section posted above? The chart shows the load as 10. But that doesn't make sense, unless a 10 means 100. 
 
I turned off the built-in Unraid APC UPS service as I have a CyberPower CP1000PFCLCD. The built in APC service did see my UPS, but it reported the battery at 120%.  So it mostly works, but is not fully compatible.
 
 

I really should just create a new thread. But are you running the plugin from the OP or mine from here https://forums.lime-technology.com/index.php?/topic/40690-[Plug-In]-NUT---Network-UPS-Tools#entry563891

The load showing 10% should be ok. That means your only running at 10% of your capacity. You don't want it at 100. I have both the CP1350PFCLCD and the CP850PFCLCD. They both seem to work fine. Maybe post a screen of your nut settings and nut details.

Share this post


Link to post
2 hours ago, dmacias said:


I really should just create a new thread. But are you running the plugin from the OP or mine from here https://forums.lime-technology.com/index.php?/topic/40690-[Plug-In]-NUT---Network-UPS-Tools#entry563891

The load showing 10% should be ok. That means your only running at 10% of your capacity. You don't want it at 100. I have both the CP1350PFCLCD and the CP850PFCLCD. They both seem to work fine. Maybe post a screen of your nut settings and nut details.

 

I am running the one from the OP by macester.  I didn't realize there was another by you.  I will read thru the thread more closely to get my bearings straight.

 

UPDATE:  I now installed your plugin.  Now I see what I was looking for.  Thank you for updating the original plugin!

Edited by BradJ

Share this post


Link to post

I try setting unRAID to connect a QNAP NAS which serv as a UPS network server.

 

Install @dmaciasNUT plugin, but don't why no data will got and just show running, from the log "upsmon" should be fine.

 

Jul 19 05:46:59 X370 ool www[11617]: /usr/local/emhttp/plugins/nut/scripts/stop
Jul 19 05:47:01 X370 upsmon[12919]: Signal 15: exiting
Jul 19 05:47:01 X370 upsmon[12918]: upsmon parent: read
Jul 19 05:47:07 X370 ool www[11617]: /usr/local/emhttp/plugins/nut/scripts/start
Jul 19 05:47:09 X370 upsmon[13716]: Startup successful
Jul 19 05:54:12 X370 ool www[14909]: /usr/local/emhttp/plugins/nut/scripts/stop
Jul 19 05:54:14 X370 upsmon[13717]: Signal 15: exiting
Jul 19 05:54:14 X370 upsmon[13716]: upsmon parent: read
Jul 19 05:54:20 X370 ool www[14909]: /usr/local/emhttp/plugins/nut/scripts/start
Jul 19 05:54:22 X370 upsmon[16214]: Startup successful
Jul 19 05:55:30 X370 ool www[14890]: /usr/local/emhttp/plugins/nut/scripts/stop
Jul 19 05:55:32 X370 upsmon[16215]: Signal 15: exiting
Jul 19 05:55:32 X370 upsmon[16214]: upsmon parent: read
Jul 19 05:55:37 X370 ool www[14890]: /usr/local/emhttp/plugins/nut/scripts/start
Jul 19 05:55:39 X370 upsmon[16748]: Startup successful

 

If try "upsc", it can show all data, does anyone know how to make it work, thanks.

 

root@X370:~# upsc qnapups@192.168.9.125
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: not set
battery.mfr.date: 2010/01/23
battery.runtime: 2760
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 13.6
battery.voltage.nominal: 12.0
device.mfr: APC
device.model: Back-UPS ES 550G
device.serial: 3B1004X54354
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS1
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: APC HID 0.96
driver.version.internal: 0.41
input.sensitivity: low
input.transfer.high: 256
input.transfer.low: 196
input.voltage: 224.0
input.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 870.O1 .I
ups.firmware.aux: O1
ups.load: 16
ups.mfr: APC
ups.mfr.date: 2010/01/23
ups.model: Back-UPS ES 550G
ups.productid: 0002
ups.serial: 3B1004X54354
ups.status: OL
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d
 

Edited by Benson

Share this post


Link to post
I try setting unRAID to connect a QNAP NAS which serv as a UPS network server.  

Install [mention=11874]dmacias[/mention]NUT plugin, but don't why no data will got and just show running, from the log "upsmon" should be fine.

 

What settings are you using? Did you set Slave mode and enter ip? I just noticed you may have to select Slave the click apply. Then the ip field will be unlocked. Also you would need password to match on your QNAP or you could edit the monitor config with the webgui editor.

 

 

 

Share this post


Link to post

I already set Slave mode and IP.

 

Today I continue troubleshoot by turn on debug info, I found "UPSMON" actually was running, but just get "status" datafill, could you post your debug result for ref. Thanks

 

/usr/sbin/upsmon -u root -DDDDD

 

The debug info.

 

OL means online

 

   0.000000     UPS: qnapups@192.168.9.125 (slave) (power value 1)
   0.000030     Using power down flag file /etc/ups/flag/no_killpower
   0.000053     debug level is '5'
   0.004052     Trying to connect to UPS [qnapups@192.168.9.125]
   0.004488     Can not connect to 192.168.9.125 in SSL, continue uncrypted
   0.004873     Logged into UPS qnapups@192.168.9.125
   0.004883     pollups: qnapups@192.168.9.125
   0.004892     get_var: qnapups@192.168.9.125 / status
   0.005019     parse_status: [OL]
   0.005032     parsing: [OL]
   0.005037     ups_on_line: qnapups@192.168.9.125 (first time)
   0.005046     Current power value: 1
   0.005054     Minimum power value: 1
   5.005138     pollups: qnapups@192.168.9.125
   5.005160     get_var: qnapups@192.168.9.125 / status
   5.005419     parse_status: [OL]
   5.005427     parsing: [OL]
   5.005433     ups_on_line: qnapups@192.168.9.125 (no change)
   5.005438     Current power value: 1
   5.005443     Minimum power value: 1
  10.005514     pollups: qnapups@192.168.9.125
  10.005535     get_var: qnapups@192.168.9.125 / status
  10.005766     parse_status: [OL]
  10.005775     parsing: [OL]
  10.005783     ups_on_line: qnapups@192.168.9.125 (no change)
  10.005789     Current power value: 1
  10.005794     Minimum power value: 1
  15.005863     pollups: qnapups@192.168.9.125
  15.005886     get_var: qnapups@192.168.9.125 / status
  15.006128     parse_status: [OL]
  15.006138     parsing: [OL]
  15.006145     ups_on_line: qnapups@192.168.9.125 (no change)
  15.006153     Current power value: 1
  15.006158     Minimum power value: 1
  20.006233     pollups: qnapups@192.168.9.125
  20.006257     get_var: qnapups@192.168.9.125 / status
  20.006490     parse_status: [OL]
  20.006500     parsing: [OL]
  20.006508     ups_on_line: qnapups@192.168.9.125 (no change)
  20.006517     Current power value: 1
  20.006523     Minimum power value: 1
  25.006595     pollups: qnapups@192.168.9.125
  25.006617     get_var: qnapups@192.168.9.125 / status
  25.006850     parse_status: [OL]
  25.006859     parsing: [OL]
  25.006866     ups_on_line: qnapups@192.168.9.125 (no change)
 

Edited by Benson

Share this post


Link to post
I already set Slave mode and IP.
 
Today I continue troubleshoot by turn on debug info, I found "UPSMON" actually was running, but just get "status" datafill, could you post your debug result for ref. Thanks
 
/usr/sbin/upsmon -u root -DDDDD
 
The debug info.
 
OL means online
 
   0.000000     UPS: qnapups@192.168.9.125 (slave) (power value 1)
   0.000030     Using power down flag file /etc/ups/flag/no_killpower
   0.000053     debug level is '5'
   0.004052     Trying to connect to UPS [qnapups@192.168.9.125]
   0.004488     Can not connect to 192.168.9.125 in SSL, continue uncrypted
   0.004873     Logged into UPS qnapups@192.168.9.125
   0.004883     pollups: qnapups@192.168.9.125
   0.004892     get_var: qnapups@192.168.9.125 / status
   0.005019     parse_status: [OL]
   0.005032     parsing: [OL]
   0.005037     ups_on_line: qnapups@192.168.9.125 (first time)
   0.005046     Current power value: 1
   0.005054     Minimum power value: 1
   5.005138     pollups: qnapups@192.168.9.125
   5.005160     get_var: qnapups@192.168.9.125 / status
   5.005419     parse_status: [OL]
   5.005427     parsing: [OL]
   5.005433     ups_on_line: qnapups@192.168.9.125 (no change)
   5.005438     Current power value: 1
   5.005443     Minimum power value: 1
  10.005514     pollups: qnapups@192.168.9.125
  10.005535     get_var: qnapups@192.168.9.125 / status
  10.005766     parse_status: [OL]
  10.005775     parsing: [OL]
  10.005783     ups_on_line: qnapups@192.168.9.125 (no change)
  10.005789     Current power value: 1
  10.005794     Minimum power value: 1
  15.005863     pollups: qnapups@192.168.9.125
  15.005886     get_var: qnapups@192.168.9.125 / status
  15.006128     parse_status: [OL]
  15.006138     parsing: [OL]
  15.006145     ups_on_line: qnapups@192.168.9.125 (no change)
  15.006153     Current power value: 1
  15.006158     Minimum power value: 1
  20.006233     pollups: qnapups@192.168.9.125
  20.006257     get_var: qnapups@192.168.9.125 / status
  20.006490     parse_status: [OL]
  20.006500     parsing: [OL]
  20.006508     ups_on_line: qnapups@192.168.9.125 (no change)
  20.006517     Current power value: 1
  20.006523     Minimum power value: 1
  25.006595     pollups: qnapups@192.168.9.125
  25.006617     get_var: qnapups@192.168.9.125 / status
  25.006850     parse_status: [OL]
  25.006859     parsing: [OL]
  25.006866     ups_on_line: qnapups@192.168.9.125 (no change)
 

I set my backup server to be a slave to my main server. It probably has something to do with the url tag.
root@Tower:~# /usr/sbin/upsmon -u root -DDDDDNetwork UPS Tools upsmon 2.7.4kill: No such process  0.000000     UPS: ups@192.168.69.1 (slave) (power value 1)  0.000052     Using power down flag file /etc/ups/flag/no_killpower  0.000091     debug level is '5'  0.005696     Trying to connect to UPS [ups@192.168.69.1]  0.007133     Can not connect to 192.168.69.1 in SSL, continue uncrypted  0.008960     Logged into UPS ups@192.168.69.1  0.009135     pollups: ups@192.168.69.1  0.009239     get_var: ups@192.168.69.1 / status  0.009887     parse_status: [OL]  0.010032     parsing: [OL]  0.010119     ups_on_line: ups@192.168.69.1 (first time)  0.010213     Current power value: 1  0.010299     Minimum power value: 1

Share this post


Link to post

Thanks a lot. Seems there are no different in the log.

I just think why no other datafill show, no idea how to solve :-\

I have another APC UPS, may be try later.

Edited by Benson

Share this post


Link to post

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.