Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for UPS #595

Closed
erazortt opened this issue Feb 11, 2015 · 8 comments
Closed

add support for UPS #595

erazortt opened this issue Feb 11, 2015 · 8 comments
Assignees

Comments

@erazortt
Copy link

This is quite an important topic for serious NAS. I do not know much about it, but other projects use the Network UPS Tools, which should very easily be integrable.

@schakrava
Copy link
Member

Thanks for filing the issue. If you can experiment with Network UPS Tools and provide some insight, it could speed up development. Thanks!

@schakrava schakrava added this to the Yosemite milestone Feb 11, 2015
@schakrava schakrava self-assigned this Feb 11, 2015
@erazortt
Copy link
Author

Ok I will try to install it on some linux setup during the weekend and see how it works.

@erazortt
Copy link
Author

Ok so things are really easy. I just followd this guide:
http://luzem.dyndns.org/2015/01/25/install-ups-in-centos-7/comment-page-1/

I want to add that is seems that most of the current UPS support HID and thus usbhid-ups is the most important driver.

@erazortt
Copy link
Author

There is also the EPEL package nut-cgi, which adds some GSI scripts for monitoring. I would guess these are not the top priority though.

@phillxnet
Copy link
Member

I have set myself the task of integrating/adding nut into Rockstor as a getting started exercise, but I struggle for time. I am quite familiar with NUT and linux though. I am however unfamiliar with many of Rockstor's technologies / languages. So fingers crossed. I hope not to duplicating anyone's efforts but I have only just found this issue and just now getting setup / started. Please comment with any pointers.

@erazortt yes usbhid-ups is a good first bet and I intended to offer it as a first suggestion but the nut package comes with them all anyway and they are each only tiny.

For my own itch / requirement I first have to implement netclient mode to a nut server (even easier to setup) so hoping that should help ease me in.

@phillxnet
Copy link
Member

I am currently working on this issue and have the following proposal:-
Start out with an entry form akin to what we currently have in snmp only larger, this is not particularly friendly but will serve as a starting point to get the other mechanisms in place. Nut in is't various capacities involves tying 5 to 6 config files together and can work in 4 different modes so it would be nice to have a reactive input form such as we see now in tasks where only appropriate info is presented to the user upon an overarching selection (the mode). But I think it's worth doing a basic (dumb) interface to start with and build that up in co-operation with community requests / suggestions. I hope to extend the config form to have a scan button (using nut-scanner) to enable auto fill of what info we can get from that method. This will simplify the form entry yet still allow for customization and cancel of auto details that may have overwritten previous form contents.
I think at a later date the addition of a nut ups info section akin to what we have re s.m.a.r.t data would be nice however a simply python binding retrieval of model / load will suffice initially. This could also be used to add an additional fancy widget to the dashboard on pus load / battery charge. Global exceptions should be raised to alert users of OB (On Battery) status, these could be displayed as warnings above all pages using the existing warning system. Also email notifications on the same and on the return of Line Power if this is before shutdown occurs.

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
Placeholder for another dropdown on monitor mode
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
Placeholder for another dropdown on monitor mode
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 8, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 9, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 9, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 9, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 9, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 9, 2015
Was trying for a shortcut but broke a few other things.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 20, 2015
Might be nice to have user feedback of no detection or ups model
and load.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 20, 2015
Had to add a hack to cope with multi word options as parser
only dealt with single word option entries as that was the format
for the majority of options.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 20, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 21, 2015
Pre-configured nut AT options to match our upssched-cmd.
Also contains config for pipe and lock files.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 21, 2015
Contains pre-configured filters to act on events as
defined in upsched.conf via custom AT commands.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 21, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 21, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 21, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 23, 2015
schakrava added a commit to phillxnet/rockstor-core that referenced this issue Sep 24, 2015
schakrava added a commit to phillxnet/rockstor-core that referenced this issue Sep 24, 2015
schakrava added a commit to phillxnet/rockstor-core that referenced this issue Sep 24, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 25, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 25, 2015
 To simplify config entry I origianlly disabled entries but
 better to hide them. Thanks @suman for guidance on this one.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 25, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 25, 2015
Initially only check if nut-monitor is working as that should always
be on / up when the service is up. However we might want to revisit
this as may not be enough.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 26, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 26, 2015
 Tried puttin epel-release repo installer package before nut and nut-xml
 but this didn't work so leaving epel in rpm-deps and then add a section
 to be executed after rpm-deps (with its epel-release) that can now
 install nut and nut-xml from the epel that should now be registered as
 a repo.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 26, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 27, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 27, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 27, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 27, 2015
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 27, 2015
Also throw exception if config is empty at this point.
Improve comments.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 27, 2015
…ockstor#595

When the nut service is switched on without a prior config we have
a json type error in base_service.py. With this catch we present a
user friendly check config suggestion and do the same when other
config errors are encountered that stop the service from starting.
The underlying error is still logged.
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 27, 2015
schakrava added a commit to phillxnet/rockstor-core that referenced this issue Sep 28, 2015
@phillxnet
Copy link
Member

@erazortt Thanks for opening this issue, as of release 3.8-8 we now have at least a beta implementation of a nut configuration component in place. In time it is planned to improve on this feature and improve especially on the ups status info but going forward I think it's best that individual issues for nut be raised for problems as they are defined. I you are not comfortable with closing this issue or finding it closed then please comment and or reopen.
@schakrava I think we can close this now as fixed by pull request #892 .

@schakrava
Copy link
Member

Very happy to close this issue! There will be improvements no doubt, but thanks for contributing this feature @phillxnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants