?
Solved

MIB and SNMP

Posted on 2005-03-21
6
Medium Priority
?
624 Views
Last Modified: 2008-02-01
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
Comment
Question by:jhughes4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 15

Expert Comment

by:aozarov
ID: 13598474
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
 

Author Comment

by:jhughes4
ID: 13601846
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
 
LVL 15

Expert Comment

by:aozarov
ID: 13602019
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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:jhughes4
ID: 13603554
Thanks again.  There is mention of sample code, but I haven't been able to find it.  Is it located somewhere else?
0
 
LVL 15

Accepted Solution

by:
aozarov earned 1200 total points
ID: 13603872
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
 
LVL 1

Expert Comment

by:ruifilipevale
ID: 13612399
Hi!
Just to be known that there's a good SNMP API at http://snmp.westhawk.co.uk/

HIH

RGV
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question