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
Merged

Added support for Orvaldi UPS #10021

merged 7 commits into from Mar 27, 2019

Conversation

PipoCanaja
Copy link
Contributor

@PipoCanaja PipoCanaja 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 PipoCanaja added Device 🖥️ New or added device support Needs Testing Waiting for others to verify that the code functions properly. labels Mar 24, 2019
@PipoCanaja PipoCanaja self-assigned this Mar 24, 2019
@PipoCanaja
Copy link
Contributor Author

PipoCanaja 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
Copy link
Contributor

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
Copy link
Contributor

jozefrebjak 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
Copy link
Contributor Author

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
Copy link
Contributor

jozefrebjak 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
Copy link
Contributor Author

@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
Copy link
Contributor Author

PipoCanaja 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
Copy link
Contributor

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

@PipoCanaja PipoCanaja removed the Needs Testing Waiting for others to verify that the code functions properly. label Mar 26, 2019
@PipoCanaja
Copy link
Contributor Author

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
@PipoCanaja PipoCanaja deleted the orvaldi branch April 29, 2019 23:46
@lock lock bot locked as resolved and limited conversation to collaborators Jun 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Device 🖥️ New or added device support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please Add Support for ORVALDI UPS
3 participants