Re: [Nut-upsuser] Tripplite UPS (SU10KRT3/1X) through snmp-ups (nut 2.6.5)

2014-02-18 Thread Иши Кылса
>
>
> > ups.status: OL
>
> Actually, during your next maintenance window, is it possible to verify
> that the driver sees the "OB" and "LB" status values?
>
> We also might want to add R/W variables, and the instant command to enable
> shutdown.
>
>
Ok, probably on weekends there will be a maintenance windows when I will be
able to test OB and LB statuses, will write about it.
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Add general UPS SNMP agent as a nut client

2014-02-18 Thread Luiz Angelo Daros de Luca
Hello,

I'm still alive :-) I use my nut-agent daily. Alf, I also use OpenNMS.
That's the reason I wrote the snmp agent.

I would not start with a MIB from a specific vendor as NUT might already
have to deal with more complex equipment. Check
http://www.networkupstools.org/docs/developer-guide.chunked/apas01.html to
compare them. However, I would also check some vendors MIB for inspiration.

The first job for a snmp-agent is to finish the MIB file. In my agent, I
mapped upsc structure the best I could trying to keep the current structure
and avoiding to rethink it. There is some difference between how
information is represented in SNMP and the upsc output. SNMP uses tables
and subtables while upsc uses free structs. Do not expect to keep the
"input.transfer.reason" structure in SNMP or you'll get disappointed as it
get worse for things like input.bypass.L1-L2.voltage.

The MIB I wrote is not ready but it is a nice start. I still uses the
enterprise number from my current company. NUT should have its own (it's
free http://www.iana.org/assignments/enterprise-numbers/enterprise-numbers).
I guess anyone with a @networkupstools.org email could request it. I also
did not synchronized with the current MIB fields. There might be new ones
that I did not considered. My MIB does not have write fields (for set and
command) or traps. These would be also very interesting and required if you
target for a completely upsc replacement.

There is some tools that help to generate C code from the MIB file
(smidump?). I guess with a good MIB, the C part would be fast. I would just
need to hook the snmp calls to internal NUT functions. It could attach to
the machine snmp (as a AgentX), run a dedicated snmp server or both options.

An MIB is like an API and it should not break with new revisions. New
versions generally only add new stuff. I think this is the critical part.
As I said, I kept the MIB fields as close as I could to upsc in order to
help NUT dev/users recognize the snmp fields from what they see in upsc.
However, this might not generate an optimal MIB. Some tables could be split
into subtables or even refactored completely. For example, ambientTable
could not use fixed fields for temperature and humidity. It could use a
sensor table (indexed by UPS index and sensor index) that have a name field
for "temperature" and "humidity". As you already worked with opennms, you
already know that with greater flexibility in a snmp table will result in a
more complex setup for NMS tools. Sometimes, it is better to have fixed
fields, with empty values, that you can directly refer to it than a field
that depends on two values to identify what it is. Maybe the best solution
would be to offer both.

I can help with this job, specially with the MIB part but I my dedication
currently would be limited.
For a quick working solution, I suggest:

1) a NUT enterprise number and update my MIB to use it
2) check for new properties and update the MIB
3) generate C from the MIB
4) hook it to nut library

More flexible tables, traps, and write fields could be added futher.

Regards,


---
 Luiz Angelo Daros de Luca, Me.
luizl...@gmail.com


2014-02-18 19:02 GMT-03:00 Arnaud Quette :

> hem, in the hurry of sending, I've forgotten a link...
>
> 2014-02-18 22:45 GMT+01:00 Arnaud Quette :
>
>
>>
>> 2014-02-16 8:31 GMT+01:00 :
>>
> (...)
>>
>>
>> That made me realize that it's still not referenced on the NUT Related
>> Projects page.
>> (yup Charles, yet another unshared thing...)
>> This last point is now fixed:
>>
>
>
> https://github.com/networkupstools/nut-website/commit/6d503c1c7e9f235263927ee2186ae336eb3178a3
>
> Arno
>
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Add general UPS SNMP agent as a nut client

2014-02-18 Thread Arnaud Quette
hem, in the hurry of sending, I've forgotten a link...

2014-02-18 22:45 GMT+01:00 Arnaud Quette :

>
>
> 2014-02-16 8:31 GMT+01:00 :
>
(...)
>
> That made me realize that it's still not referenced on the NUT Related
> Projects page.
> (yup Charles, yet another unshared thing...)
> This last point is now fixed:
>

https://github.com/networkupstools/nut-website/commit/6d503c1c7e9f235263927ee2186ae336eb3178a3

Arno
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Add general UPS SNMP agent as a nut client

2014-02-18 Thread Arnaud Quette
2014-02-16 8:31 GMT+01:00 :

> Hi
>

Hi Alf,


> One idea I've had for some time, but unfortunately not had time to
> implement, is to add a general SNMP agent, which will work with all UPSes
> supported by nut.
> The idea is to have the SNMP agent use the "nut API" to fetch values from
> the UPS.
> So the SNMP agent will be similar to the "upsc" utility.
>
> Whenever the SNMP agent is queried for information, it will use the nut
> API to get hold of the data.
> We will just need to take for example the Eaton MIB file, and map each
> SNMP OID to the corresponding value as exposed by "upsc".
>
> The background for wanting this, is that I am using a Eaton ConnectUPS-BD
> WEB/SNMP card, and exposing the data as SNMP, and using OpenNms, I "out of
> the box" get nice graphing of voltage levels and power usage.
> I really like that functionality and graphing.
> The setup is working fine by me, but by implementing such a SNMP agent,
> every user of nut could get the same functionality, and would not be
> requiring special hardware for doing so.
> OpenNms can easliy generate graphs etc based on the SNMP MIB file that is
> part of nut for Eaton UPSes. I think Cacti and other such tools should also
> be easy to set up.
>
> I've written a bit about my setup here :
>
> http://www.kanonbra.com/index.php/projects/snmpnms/27-monitoring-eaton-9130-ups-in-opennms
>
> The question is really if other people would also like to have SNMP
> "monitoring" support for their UPSes ?
> Adding support for SNMP traps might be harder, but I noticed some email
> one the mailing list today that there is already ideas for adding SNMP
> traps generally.
>

Reviving a bit the archives (clouds of dust floating around...)
Here is my first and now 10 years old attempt:
http://old.networkupstools.org/server-projects/
Native C and Net SNMP libs...

And more recently: https://github.com/luizluca/nut-snmpagent
Ruby this time, from Luiz Angelo Daros de Luca.

That made me realize that it's still not referenced on the NUT Related
Projects page.
(yup Charles, yet another unshared thing...)
This last point is now fixed:

and the website updated, with a news entry.

All my apologies to the author, Luiz!
If you're still open and motivated in working with me on this topic, I've
finally gone through this 2 years time-warp... and hopefully back.

cheers,
Arnaud
-- 
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

[Nut-upsuser] User defined variables in upsstats.html

2014-02-18 Thread Tom Parker
Hello

Is there any way to set and consume user defined variables in upsstats.html

I would like to set lower thresholds for temperature than are set in the
UPSes for my web page but I cannot figure out how to pass a value that
is not a variable into IFBETWEEN.

Is there a way to say:

@IFBETWEEN 15 25 ambient.temperature@

@ELSE@

@ENDIF@

Thank you

Tom

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser