networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
2.1k stars 352 forks source link

HP SNMP MIB improvements #120

Open petroniusniger opened 10 years ago

petroniusniger commented 10 years ago

Issue opened at Arnaud Quette's suggestion.

Purpose is to bring HP SNMP driver in line with the latest HP MIB (ver. 1.76) based on the provided stub driver and SNMP walk information (see issue #118).

aquette commented 10 years ago

@petroniusniger : I'll need you to do the first part of the job (cleanup and new OIDs identification), using the following:

Let's call the new generated file new-mib.c. For each "unmapped" line in new-mib.c file

Once all entries have been processed

aquette commented 10 years ago

@petroniusniger : ping...

petroniusniger commented 10 years ago

Hello Arnaud,

pong...

Yes, I haven't forgotten. I started working on this issue some months ago (did the first 2 steps you suggested), then the situation became rather hairy here, ... All of this to say that I hope I will be able to further work on this issue in the coming months.

HTH

Ph. A.

On 03/09/14 21:50, Arnaud Quette wrote:

@petroniusniger https://github.com/petroniusniger : ping...

— Reply to this email directly or view it on GitHub https://github.com/networkupstools/nut/issues/120#issuecomment-54355315.

Philippe Andersson Unix System Administrator IBA Particle Therapy | Tel: +32-10-475.983 Fax: +32-10-487.707 eMail: pan@iba-group.com http://www.iba-worldwide.com

albal commented 10 years ago

Hello.

I have a HP R1500 with management card and I was finding the flip/flop of Online/Offline messages annoying. Without making any patches and using nut: 2.7.1-1ubuntu1 I was able to make a few changes to upsmon.conf and ups.conf to get acceptable behaviour given that the HP R1500 (and others) reports both OL and OB at the same time.

Change to ups.conf

Edit ups.conf to manually set an override for battery charge low and battery runtime low and set the ignorelb flag (probably moot as this unit doesn't set it) and example of my configuration is below:

[HPUPS]
        driver = snmp-ups
        port = 172.20.50.1
        desc = "HP R1500 G3 UPS"
        community = private
        snmp_version = v1
        ignorelb
        override.battery.charge.low = 15
        override.battery.runtime.low = 180

Change to upsmon.conf

Then edit upsmon.conf to stop any logging of ONLINE and ONBATT states - snippet below

NOTIFYFLAG ONLINE       IGNORE
NOTIFYFLAG ONBATT       IGNORE
NOTIFYFLAG LOWBATT      SYSLOG+WALL+EXEC
NOTIFYFLAG FSD          SYSLOG+WALL+EXEC
NOTIFYFLAG COMMOK       SYSLOG+WALL+EXEC
NOTIFYFLAG COMMBAD      SYSLOG+WALL+EXEC
NOTIFYFLAG SHUTDOWN     SYSLOG+WALL+EXEC
NOTIFYFLAG REPLBATT     SYSLOG+WALL+EXEC
NOTIFYFLAG NOCOMM       SYSLOG+WALL+EXEC
NOTIFYFLAG NOPARENT     SYSLOG+WALL+EXEC

You can also refer to http://www.networkupstools.org/docs/man/ups.conf.html to find out more about the ups.conf configuration file.

Please let me know if I have placed erroneous information. I think as the HP UPS reports battery capacity in time and percentage it gives the end user a greater degree of flexibility than just the low battery indicator. Hopefully this would be of use to someone else too.

Thanks, Al