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

Added support for Orvaldi UPS #10021

Merged
merged 7 commits into from Mar 27, 2019

Conversation

Projects
None yet
3 participants
@PipoCanaja
Copy link
Contributor

commented Mar 24, 2019

Fixes: #8780

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 10021
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

@PipoCanaja

This comment has been minimized.

Copy link
Contributor Author

commented Mar 24, 2019

Hello @jozefrebjak
Seems that you have a PR to test for these UPS support added to LibreNMS :)

./scripts/github-apply 10021 

Let me know if it is OK for merging.
Bye

@jozefrebjak

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

Do you have some Orvaldi UPS ? .. because we have a orvaldi ups with different snmp modul, what i added to issues, because lower model was bad, so i am getting that modul as linux with oid .1.3.6.1.4.1.8072.3.2.10, so i changed discovery to

discovery:
    - sysDescr:
        - 'Linux SNMP-System'

and it works great

here is the new snmprec

https://p.libren.ms/view/269641b4

@jozefrebjak

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

we can also change os polling to

<?php
$orvaldi_data = snmp_get_multi_oid($device, ['upsIdSerialNumber.0', 'upsIdFWVersion.0', 'upsIdModelName.0'], '-OUQs', 'companyMIB');
$version      = $orvaldi_data['upsIdFWVersion.0'];
$serial       = $orvaldi_data['upsIdSerialNumber.0'];
$hardware     = $orvaldi_data['upsIdModelName.0'];

and add for example do yaml discovery state of the ups, if is online (or we can add it to feautere in os polling) and count of the batteries

mib: companyMIB
modules:
     sensors:
         state:
             data:
                -
                     oid: upsIdUPSType
                     num_oid: '.1.3.6.1.4.1.21111.1.1.1.7.{{ $index }}'
                     descr: UPS Type
                     state_name: upsIdUPSType
                     states:
                         - { descr: 'standby', graph: 1, value: 0, generic: 0 }
                         - { descr: 'line-interactive', graph: 1, value: 1, generic: 1 }
                         - { descr: 'on-line', graph: 1, value: 2, generic: 0 }
     count:
              data:
                -
                     oid: upsBatNumberInSeries
                     num_oid: '.1.3.6.1.4.1.21111.1.1.3.14.{{ $index }}'
                     descr: Number of Battery in Series
                     group: Battery
                     index: 'series-{{ $index }}'

                -
                     oid: upsBatNumberInParallel
                     num_oid: '.1.3.6.1.4.1.21111.1.1.3.15.{{ $index }}'
                     descr: Number of Battery in Parallel
                     group: Battery
                     index: 'parallel-{{ $index }}'

and maybe is possible to disable procesor info ? because its on 100%

there is also updated snmprec

https://p.libren.ms/view/09eddf38

@PipoCanaja PipoCanaja force-pushed the PipoCanaja:orvaldi branch from 9a47f24 to 5087686 Mar 25, 2019

@PipoCanaja

This comment has been minimized.

Copy link
Contributor Author

commented Mar 25, 2019

Hi @jozefrebjak
Thanx for your feedback, I implemented them and tested using the snmprec.

  • No need to put the linux OID, the current criteria works correctly. Try to remove cache/os_defs.cache before doing a discovery.
  • I have no idea how to disable the processor discovery.

You can test the current state of the PR and let me know how it goes.

@jozefrebjak

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

@PipoCanaja its fine, but will be good to add yaml discovery of sensors for state and count of the batteries, what i mentioned sooner

@PipoCanaja

This comment has been minimized.

Copy link
Contributor Author

commented Mar 26, 2019

@jozefrebjak
It is already there. You have to delete os_cache and force a discovery after applying the patch again.
I'll check the tests with Travis.

@PipoCanaja

This comment has been minimized.

Copy link
Contributor Author

commented Mar 26, 2019

My bad, I did not git add the file ... Tests are now OK, if you confirm this is ok for you as well, it will be merged.
Bye

@PipoCanaja PipoCanaja added this to the 1.51 milestone Mar 26, 2019

@jozefrebjak

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

@PipoCanaja its ok. Its can be merged. Thank you :)

@PipoCanaja

This comment has been minimized.

Copy link
Contributor Author

commented Mar 26, 2019

All right, Thx !

@PipoCanaja PipoCanaja modified the milestones: 1.51, 1.50 Mar 26, 2019

@murrant murrant merged commit 7fd7ba5 into librenms:master Mar 27, 2019

6 checks passed

Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codeclimate All good!
Details
license/cla Contributor License Agreement is signed.
Details

@PipoCanaja PipoCanaja deleted the PipoCanaja:orvaldi branch Apr 29, 2019

funzoneq added a commit to funzoneq/librenms that referenced this pull request Apr 30, 2019

Added support for Orvaldi UPS (librenms#10021)
* ovaldi UPS support

* ovaldi UPS tests

* serial + model + version inc tests

* update of the code using details from requester

* update of the code using details from requester

* update of the tests

* forgot discovery yaml ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.