Erik Hedgren
2014-Aug-30 10:40 UTC
[Nut-upsdev] snmp-ups and constants in snmp_info_t snmp2nut tables
Hi all, Trying to add support for my unit, which is a 3-phase UPS. I can't find any oids that holds that data so I can determine that, so I think I need to add it statically. I've tried the following, (nut-2.7.2) ... { "input.phases", 0, 1.0, NULL, "3", SU_FLAG_SETINT, NULL, &input_phases }, ... That ends up as (snmp-ups -a foo -DDDD) ... 0.177686 getting data: input.phases ((null)) 0.177690 su_ups_get: input.phases (null) ... How do I add a constant value to {input|output|bypass}_phases ? //Erik
Charles Lepple
2014-Sep-02 13:03 UTC
[Nut-upsdev] snmp-ups and constants in snmp_info_t snmp2nut tables
On Aug 30, 2014, at 6:40 AM, Erik Hedgren <ehedgren at gmail.com> wrote:> Hi all, > > Trying to add support for my unit, which is a 3-phase UPS. > I can't find any oids that holds that data so I can determine that, so I > think I need to add it statically. > > I've tried the following, (nut-2.7.2) > ... > { "input.phases", 0, 1.0, NULL, "3", SU_FLAG_SETINT, NULL, &input_phases }, > ...You might need SU_FLAG_ABSENT for variables that don't have OIDs. Not sure if that just sets the dstate "input.phases" variable, or if it would affect input_phases as well. -- Charles Lepple clepple at gmail