Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 625
  • Last Modified:

MIB and SNMP

Sorry for the beginner question, but is there a way within Java that I can run an application on one server & query another server using a combination of MIB and SNMP to retrieve information like memory, number of CPUs, etc?

thanks
0
jhughes4
Asked:
jhughes4
  • 3
  • 2
1 Solution
 
aozarovCommented:
Yes, but the server you are trying to manage will need to use JMX with an SNMP connector (see JDMK)  http://www.onjava.com/pub/a/onjava/2005/02/16/jdmk.html
or it should use a Java base Snmp stack (like joesnmp) http://sourceforge.net/projects/joesnmp
to implement an Snmp Agent functionality.
0
 
jhughes4Author Commented:
Thanks.  I was asked to review options in collecting information about a server whether it's Unix or Windows & I was told that I could use the manufacturers MIB with SNMP to retrieve this information, since every box uses SNMP.  Is this the best use of SNMP and MIB, or would I be better off using some other method?

Thanks again.
0
 
aozarovCommented:
For that purpose joesnmp can be very helpful. You basically act here as an NMS and not an agent.
So you need to write a collector that can interact with the SNMP agents on each one of your machines.
Download joesnmp from http://sourceforge.net/project/showfiles.php?group_id=95831
and then look at org.opennms.protocols.snmp.SnmpSession that can be used for collecting MIB objects.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
jhughes4Author Commented:
Thanks again.  There is mention of sample code, but I haven't been able to find it.  Is it located somewhere else?
0
 
aozarovCommented:
This is a link to the older version of the same library: http://smokeping.planetmirror.com/pub/opennms/releases/joeSNMP/latest/
inside joesnmp-0.2.6.jar you can find examples at \src\jsnmp\org\opennms\test (look at snmpwalk.java) which is compatible with the newer version of the library (0.3.3).
0
 
ruifilipevaleCommented:
Hi!
Just to be known that there's a good SNMP API at http://snmp.westhawk.co.uk/

HIH

RGV
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now