LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in SNMP Communication


Prashant S wrote:

UPS NAME:--> Smart-UPS RT 2000 RM XL


i need all events

and bad msg.

here is the attachment of that particular MIB. extension change MIB to xls.pls after downloading this file change it into MIB.

Can i get all traps including generic Trap.
Can u send me updated trap vi.

also can u tell me that how can i import the MIB file .

there is any Particular vi for this operation.

 

 

 

 

 


I have already stated that the Trap VI in the library is capable of receiving and decoding any SNMPv1 trap. What you do with the specific information it provides is up to you. You will need to understand the product's MIB to understand the specifics of the traps. However, the VI will decode it as per the SNMP specifications.

 

I have worked with MIBs from APC and they are generally very good MIBs and are well documented. Do a Google search for MIB compilers. One of these tools should help you to read and understand the MIB itself. I have not and as Rolf indicated will not write a significant piece of code (the MIB compiler) for free. The library has everything you need to interact with the UPS. In fact, I have written VIs that interact with other APC products. You do need to take some time to understand SNMP itself and how MIBs are defined. As the name implies (Simple Network Management Protocol) it is not that difficult to understand.

 

I am including a snapshot of two VIs that are used to control an APC7900 PDU. As you can see the code is very straightforward. These VIs are used to to query the device for the current state of an outlet and the other is used to turn the outlet off. These OIDs correspond to the APC MIB and are the following:

 

iso.org.dod.internet.private.enterprises.apc.products.hardware.rPDU.rPDUOutletStatus.rPDUOutletStatusTable.rPDUOutletStatusEntry.rPDUOutletStatusOutletSate

iso.org.dod.internet.private.enterprises.apc.products.hardware.rPDU.rPDUOutletControl.rPDUOutletControlTable.rPDUOutletControlEntry.rPDUOutletControlOutletCommand

 

The area of the MIB that will most likely be what you need to look at is 1.3.6.1.4.1.318.1.1.1 which is the

iso.org.dod.internet.private.enterprises.apc.products.hardware.ups branch of the MIB.

 

APC SNMP Example.PNG

 

Message Edited by Mark Yedinak on 04-19-2010 08:49 AM


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 11 of 19
(3,951 Views)

I have been using this same library to comunicate with some other APC product but only using the set features to control the device.  We are trying to include the get features now to retrive status information from the same device.  I know that my OID is valid and what sort of response to expect from the node using a basic MIB browser but when I try doing this through the Get snmp Item(s) VI the snmp packet string response is all giberish and I get a noSuchName error string.  Any ideas what might be causing this?  I will try to include the VI when I get back to my desk 

0 Kudos
Message 12 of 19
(3,657 Views)

If you are getting a noSuchName error then your OID is not correct. What MIB browser are you using? Have you verified you are using the correct read community name? What APC product are you using and what specifically are you trying to get? BTW, these libraries needed the numeric representation of the OID. They do not use a compiled MIB and therefore cannot use the human readable form of the OID. (The ones with names for the various parts of the OID.)

 

Would you be able to attached a snapshot of what you are getting from the MIB browser and let me know the specific OID you want to get?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 13 of 19
(3,653 Views)

Thanks for the quick response.

 

I am using ManageEngines free MIB browser.  I hadn't tought much about the read community name.  I left it the same as what we had in on the set.  It is a string constant of "private".  We are using AP7998 rack PDU and trying to get the electrical current on each bank.  The OID is .1.3.6.1.4.1.318.1.1.12.2.3.1.1.2 whichk returns the proper labels and values in the MIB browser.  I will get scene shots in a bit when I get back in the lab.

0 Kudos
Message 14 of 19
(3,650 Views)

More likely than not you are using the wrong community string. By default it is "public" on APC devices.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 15 of 19
(3,648 Views)

Ok, I tried changing to "public' but got similar results.  I included a few screen shots this time

 

PDU object diagram.jpg

Get snmp Items frt pnl.jpg

SNMP Get Response frt pnl.jpg

0 Kudos
Message 16 of 19
(3,646 Views)

Here is a screen shot from my MIB Browser showing the expected results.

 

MIB browser.jpg

0 Kudos
Message 17 of 19
(3,644 Views)

Looks like the OID is returning a table in your browser. Maybe you need to specify the instance to get?

 

A google search for the OID string (.1.3.6.1.4.1.318.1.1.12.2.3.1.1.2)  found this 

 

http://community.zenoss.org/message/57401

 

 

0 Kudos
Message 18 of 19
(3,641 Views)

There we go.  That was the missing peice of the puzzle.  It seems to all work as expected now.

 

Thanks for the help.

0 Kudos
Message 19 of 19
(3,635 Views)