Иши Кылса
2014-Feb-12 08:57 UTC
[Nut-upsuser] Tripplite UPS (SU10KRT3/1X) through snmp-ups (nut 2.6.5)
Thanks, now I started getting messages from the list. As you advised, I renamed the mib file NETCARD.mib to Tripplite and ran command ./gen-snmp-subdriver.sh -H 10.200.254.39 -c public -n Tripplite Here is what it says: snmp_build: unknown failuresnmpget: Error building ASN.1 representation (Can't build OID for variable) COUNT = 0 / 0 Creating tripplite-mib.h Creating tripplite-mib.c Done. The output files are attached, but I think it is not succeeding to create the subdriver, as tripplite-mib.c contains very few code and doesn't seem to have necessary code. I tried the "mode 1", since the "mode 2" wasn't really working for me: when I run command snmpwalk -On -c public 10.200.254.39 .1.3.6.1.4.1.935 It says: snmpwalk: Timeout (msgGlobalData header type A2: s/b 30) But snmpget of a certain parameter works fine and we are currently able to monitor it through Zabbix's snmp: snmpget -v 1 -c public 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.4.1.1 Output shows the correct value of status: XPPC-MIB::upsBaseOutputStatus.0 = INTEGER: onLine(2) If it is possible for you, could you please run it from your pc in "mode 2" that doesn't require direct access to device (mib file is attached)? Thanks in advance, Ishi On Mon, Feb 10, 2014 at 8:56 PM, Charles Lepple <clepple at gmail.com> wrote:> On Feb 10, 2014, at 1:16 AM, ??? ????? wrote: > > Thanks for you reply. Concerning the subscribtion list, I have earlier > filled in the fields and sent request to subscribe to this list, but still > haven't got an answer. > > > I added you manually, but check your spam folder just in case it ended up > there. > > Yes, I do have a MIB file that was on CD that came with the UPS, attached > it to this message. > > Thanks for the link, started following it and at the step concerning > runninh script scripts/subdriver/gen-snmp-subdriver.sh downloaded > the archive nut-2.6.2.tar.gz but there is no > script gen-snmp-subdriver.sh in it, only file path-to-subdriver.sh in > directory scripts/subdriver/. Then through google found the > script gen-snmp-subdriver.sh and put in directory scripts/subdriver/ and > ran it: > > > Hmm, we'll have to add that to the distribution. > > Not sure what Google found, but this is generally where the latest version > is kept: > > > https://github.com/networkupstools/nut/blob/master/scripts/subdriver/gen-snmp-subdriver.sh > > For now, I am putting fixes on this branch: > > > https://github.com/networkupstools/nut/blob/snmp_subdriver/scripts/subdriver/gen-snmp-subdriver.sh > > Can you try the version from the second link? (use the "Raw" button to > download the script itself) > > ./gen-snmp-subdriver.sh -H 10.200.254.39 -c public -n NETCARD.mib > > > I would recommend using "-n TrippLite" or similar, since the rest of the > MIB names are company names rather than product names. Also, the name needs > to be a valid C identifier (alphanumeric). > > snmp_build: unknown failuresnmpget: Error building ASN.1 representation > (Can't build OID for variable) > COUNT = 0 / 0 > Creating netcard.mib-mib.h > Creating netcard.mib-mib.c > Done. > > Do not forget to: > * bump DRIVER_VERSION in snmp-ups.c (add "0.01") > * copy "netcard.mib-mib.h" and "netcard.mib-mib.c" to "../../drivers" > * add #include "netcard.mib-mib.h" to snmp-ups.c > * add &netcard.mib to snmp-ups.c:mib2nut[] list, > * add netcard.mib-mib.c to snmp_ups_SOURCES in drivers/Makefile.am > * add netcard.mib-mib.h to dist_noinst_HEADERS in drivers/Makefile.am > * copy netcard.mib-mib.c and netcard.mib-mib.h to ../drivers/ > * "autoreconf && configure && make" from the top level directory > > Does it mean it is ok? > > > -- > Charles Lepple > clepple at gmail > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140212/dc6eb428/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: Tripplite Type: application/octet-stream Size: 8369 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140212/dc6eb428/attachment-0001.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: tripplite-mib.c Type: text/x-csrc Size: 2587 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140212/dc6eb428/attachment-0001.c> -------------- next part -------------- A non-text attachment was scrubbed... Name: tripplite-mib.h Type: text/x-chdr Size: 1032 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140212/dc6eb428/attachment-0001.h>
Charles Lepple
2014-Feb-12 14:10 UTC
[Nut-upsuser] Tripplite UPS (SU10KRT3/1X) through snmp-ups (nut 2.6.5)
On Feb 12, 2014, at 3:57 AM, ??? ????? wrote:> Thanks, now I started getting messages from the list. > > As you advised, I renamed the mib file NETCARD.mib to Tripplite and ran commandNo need to rename the MIB file. The "-n" name is what ./gen-snmp-subdriver.sh uses for its C output files. What is important is that snmpget/snmpwalk can find the MIB (and your snmpget results confirm this). I apologize for changing my mind once again, but since there does not seem to be anything specific to Tripp Lite in that MIB file (since they appear to have contracted out to Phoenixtec Power Co.), how about using "-n XPPC" to match the output of snmpget?> ./gen-snmp-subdriver.sh -H 10.200.254.39 -c public -n Tripplite > > Here is what it says: > > snmp_build: unknown failuresnmpget: Error building ASN.1 representation (Can't build OID for variable) > COUNT = 0 / 0 > Creating tripplite-mib.h > Creating tripplite-mib.c > Done. > > The output files are attached, but I think it is not succeeding to create the subdriver, as tripplite-mib.c contains very few code and doesn't seem to have necessary code. > > I tried the "mode 1", since the "mode 2" wasn't really working for me: when I run command > > snmpwalk -On -c public 10.200.254.39 .1.3.6.1.4.1.935 > > It says: > snmpwalk: Timeout (msgGlobalData header type A2: s/b 30)Can you try adding "-v 1" to the snmpwalk command? If that works, we can add it to gen-snmp-subdriver.sh.> But snmpget of a certain parameter works fine and we are currently able to monitor it through Zabbix's snmp: > snmpget -v 1 -c public 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.4.1.1 > > Output shows the correct value of status: > XPPC-MIB::upsBaseOutputStatus.0 = INTEGER: onLine(2) > > If it is possible for you, could you please run it from your pc in "mode 2" that doesn't require direct access to device (mib file is attached)?The important part of "mode 2" is to have the output of snmpwalk. It is possible to query each OID, and manually build the *-mib.c files, but if we can get snmpwalk to work, that would be easier. If not, the important OIDs are: upsBaseBatteryStatus 1.3.6.1.4.1.935.1.1.1.2.1.1 upsBaseOutputStatus 1.3.6.1.4.1.935.1.1.1.4.1.1 Other useful diagnostic OIDs are: upsSmartBatteryVoltage 1.3.6.1.4.1.935.1.1.1.2.2.2 upsSmartBatteryRunTimeRemaining 1.3.6.1.4.1.935.1.1.1.2.2.4 upsSmartInputLineVoltage 1.3.6.1.4.1.935.1.1.1.3.2.1 upsSmartOutputLoad 1.3.6.1.4.1.935.1.1.1.4.2.3 (Ideally we would include everything the UPS offers, but this should be enough for basic monitoring and shutdown.) Reference: http://www.oidview.com/mibs/935/XPPC-MIB.html -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140212/61cbe6e1/attachment.html>
Charles Lepple
2014-Feb-13 12:28 UTC
[Nut-upsuser] Tripplite UPS (SU10KRT3/1X) through snmp-ups (nut 2.6.5)
[Please keep the list CC'd. Thanks!] On Feb 13, 2014, at 4:55 AM, ??? ????? wrote:> Can you try adding "-v 1" to the snmpwalk command? If that works, we can add it to gen-snmp-subdriver.sh. > > Yes, I tried it before, ran command "snmpwalk -v 1 -On -c public 10.200.254.39 .1.3.6.1.4.1.935" > > Output: > .1.3.6.1.4.1.935 = NULL > Error: OID not increasing: .1.3.6.1.4.1.935 > >= .1.3.6.1.4.1.935 > > To solve this error in some forums it is advised to use "-Cc": > snmpwalk -Cc -v 1 -On -c public 10.200.254.39 .1.3.6.1.4.1.935 > But it outputs infinitely the following: > .1.3.6.1.4.1.935 = NULL > .1.3.6.1.4.1.935 = NULLDoes it have the same behavior if you start from .1.3.6.1.4.1.935.1 or .1.3.6.1.4.1.935.1.1? If not, no worries - see below.> ..... > > The important part of "mode 2" is to have the output of snmpwalk. It is possible to query each OID, and manually build the *-mib.c files, but if we can get snmpwalk to work, that would be easier. > > If not, the important OIDs are: > > upsBaseBatteryStatus 1.3.6.1.4.1.935.1.1.1.2.1.1 > upsBaseOutputStatus 1.3.6.1.4.1.935.1.1.1.4.1.1 > > Other useful diagnostic OIDs are: > > upsSmartBatteryVoltage 1.3.6.1.4.1.935.1.1.1.2.2.2 > upsSmartBatteryRunTimeRemaining 1.3.6.1.4.1.935.1.1.1.2.2.4 > upsSmartInputLineVoltage 1.3.6.1.4.1.935.1.1.1.3.2.1 > upsSmartOutputLoad 1.3.6.1.4.1.935.1.1.1.4.2.3 > > (Ideally we would include everything the UPS offers, but this should be enough for basic monitoring and shutdown.) > > These parameters are more than enough, even upsBaseBatteryStatus, upsBaseOutputStatus, upsSmartOutputLoad - is all we need. And maybe traps, to know when UPS goes on battery, online etc. > As I wrote earlier, snmpget commands are working fine "snmpget -v 1 -c public 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.4.1.1" returning correct results: > > XPPC-MIB::upsBaseOutputStatus.0 = INTEGER: onLine(2) > >I would like to take this opportunity to make sure that gen-snmp-subdriver is working, so can you please run the following commands: snmpget -v 1 -c public -On 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.1.1.1 1.3.6.1.4.1.935.1.1.1.4.1.1 1.3.6.1.4.1.935.1.1.1.2.2.2 1.3.6.1.4.1.935.1.1.1.2.2.4 1.3.6.1.4.1.935.1.1.1.3.2.1 1.3.6.1.4.1.935.1.1.1.4.2.3 snmpget -v 1 -c public -Os 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.1.1.1 1.3.6.1.4.1.935.1.1.1.4.1.1 1.3.6.1.4.1.935.1.1.1.2.2.2 1.3.6.1.4.1.935.1.1.1.2.2.4 1.3.6.1.4.1.935.1.1.1.3.2.1 1.3.6.1.4.1.935.1.1.1.4.2.3 The output of snmpwalk is very close to the output of snmpget with multiple OIDs, so hopefully this works. -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140213/4e8270a9/attachment.html>
Иши Кылса
2014-Feb-14 03:49 UTC
[Nut-upsuser] Tripplite UPS (SU10KRT3/1X) through snmp-ups (nut 2.6.5)
> Does it have the same behavior if you start from .1.3.6.1.4.1.935*.1* or . > 1.3.6.1.4.1.935.1.1? If not, no worries - see below. > > Yes, says "Timeout: No Response from 10.200.254.39", Ok.> ..... > > >> The important part of "mode 2" is to have the output of snmpwalk. It is >> possible to query each OID, and manually build the *-mib.c files, but if we >> can get snmpwalk to work, that would be easier. >> >> If not, the important OIDs are: >> >> upsBaseBatteryStatus1.3.6.1.4.1.935.1.1.1.2.1.1 >> upsBaseOutputStatus1.3.6.1.4.1.935.1.1.1.4.1.1 >> >> Other useful diagnostic OIDs are: >> >> upsSmartBatteryVoltage1.3.6.1.4.1.935.1.1.1.2.2.2 >> upsSmartBatteryRunTimeRemaining 1.3.6.1.4.1.935.1.1.1.2.2.4 >> upsSmartInputLineVoltage1.3.6.1.4.1.935.1.1.1.3.2.1 >> upsSmartOutputLoad1.3.6.1.4.1.935.1.1.1.4.2.3 >> >> (Ideally we would include everything the UPS offers, but this should be >> enough for basic monitoring and shutdown.) >> >> These parameters are more than enough, even upsBaseBatteryStatus, > upsBaseOutputStatus, upsSmartOutputLoad - is all we need. And maybe traps, > to know when UPS goes on battery, online etc. > As I wrote earlier, snmpget commands are working fine "snmpget -v 1 -c > public 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.4.1.1" returning correct > results: > > XPPC-MIB::upsBaseOutputStatus.0 = INTEGER: onLine(2) > > > > I would like to take this opportunity to make sure that gen-snmp-subdriver > is working, so can you please run the following commands: > > snmpget -v 1 -c public -On 10.200.254.39 > .1.3.6.1.4.1.935.1.1.1.1.1.1 1.3.6.1.4.1.935.1.1.1.4.1.1 1.3.6.1.4.1.935.1.1.1.2.2.2 1.3.6.1.4.1.935.1.1.1.2.2.4 1.3.6.1.4.1.935.1.1.1.3.2.1 1.3.6.1.4.1.935.1.1.1.4.2.3 > > snmpget -v 1 -c public -Os 10.200.254.39 > .1.3.6.1.4.1.935.1.1.1.1.1.1 1.3.6.1.4.1.935.1.1.1.4.1.1 1.3.6.1.4.1.935.1.1.1.2.2.2 1.3.6.1.4.1.935.1.1.1.2.2.4 1.3.6.1.4.1.935.1.1.1.3.2.1 1.3.6.1.4.1.935.1.1.1.4.2.3 > > The output of snmpwalk is very close to the output of snmpget with > multiple OIDs, so hopefully this works. > >Yes, this works fine: snmpget -v 1 -c public -On 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.1.1.1 .1.3.6.1.4.1.935.1.1.1.2.1.1 .1.3.6.1.4.1.935.1.1.1.2.2.1 .1.3.6.1.4.1.935.1.1.1.2.2.3 .1.3.6.1.4.1.935.1.1.1.1.1.1.0 = STRING: "Intelligent" .1.3.6.1.4.1.935.1.1.1.2.1.1.0 = INTEGER: batteryNormal(2) .1.3.6.1.4.1.935.1.1.1.2.2.1.0 = INTEGER: 100 .1.3.6.1.4.1.935.1.1.1.2.2.3.0 = INTEGER: 270 snmpget -v 1 -c public -On 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.3.2.1 .1.3.6.1.4.1.935.1.1.1.4.1.1 .1.3.6.1.4.1.935.1.1.1.4.2.1 .1.3.6.1.4.1.935.1.1.1.4.2.2 .1.3.6.1.4.1.935.1.1.1.4.2.3 .1.3.6.1.4.1.935.1.1.1.3.2.1.0 = INTEGER: 2006 .1.3.6.1.4.1.935.1.1.1.4.1.1.0 = INTEGER: onLine(2) .1.3.6.1.4.1.935.1.1.1.4.2.1.0 = INTEGER: 2309 .1.3.6.1.4.1.935.1.1.1.4.2.2.0 = INTEGER: 500 .1.3.6.1.4.1.935.1.1.1.4.2.3.0 = INTEGER: 7 snmpget -v 1 -c public -Os 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.1.1.1 .1.3.6.1.4.1.935.1.1.1.2.1.1 .1.3.6.1.4.1.935.1.1.1.2.2.1 .1.3.6.1.4.1.935.1.1.1.2.2.3 upsBaseIdentModel.0 = STRING: "Intelligent" upsBaseBatteryStatus.0 = INTEGER: batteryNormal(2) upsSmartBatteryCapacity.0 = INTEGER: 100 upsSmartBatteryTemperature.0 = INTEGER: 260 snmpget -v 1 -c public -Os 10.200.254.39 .1.3.6.1.4.1.935.1.1.1.3.2.1 .1.3.6.1.4.1.935.1.1.1.4.1.1 .1.3.6.1.4.1.935.1.1.1.4.2.1 .1.3.6.1.4.1.935.1.1.1.4.2.2 .1.3.6.1.4.1.935.1.1.1.4.2.3 upsSmartInputLineVoltage.0 = INTEGER: 1998 upsBaseOutputStatus.0 = INTEGER: onLine(2) upsSmartOutputVoltage.0 = INTEGER: 2309 upsSmartOutputFrequency.0 = INTEGER: 500 upsSmartOutputLoad.0 = INTEGER: 7 Slightly changed the list, took from running snmptranslate for all parameters: snmptranslate -IR -On upsBaseIdentModel upsBaseBatteryStatus upsSmartBatteryCapacity upsSmartBatteryTemperature upsSmartInputLineVoltage upsBaseOutputStatus upsSmartOutputVoltage upsSmartOutputFrequency upsSmartOutputLoad upsSmartControlUpsOff upsSmartControlSimulatePowerFail upsSmartControlFlashAndBeep .1.3.6.1.4.1.935.1.1.1.1.1.1 .1.3.6.1.4.1.935.1.1.1.2.1.1 .1.3.6.1.4.1.935.1.1.1.2.2.1 .1.3.6.1.4.1.935.1.1.1.2.2.3 .1.3.6.1.4.1.935.1.1.1.3.2.1 .1.3.6.1.4.1.935.1.1.1.4.1.1 .1.3.6.1.4.1.935.1.1.1.4.2.1 .1.3.6.1.4.1.935.1.1.1.4.2.2 .1.3.6.1.4.1.935.1.1.1.4.2.3 .1.3.6.1.4.1.935.1.1.1.6.2.1 .1.3.6.1.4.1.935.1.1.1.6.2.4 .1.3.6.1.4.1.935.1.1.1.6.2.5 (Last 3 OIDs didn't return values with snmpget, all others returned correct values as listed above.) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140214/eb0d9bb4/attachment.html>