<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: JVM Monitoring with SNMP</title>
	<atom:link href="http://brettdargan.com/blog/2005/04/01/jvm-monitoring-with-snmp/feed/" rel="self" type="application/rss+xml" />
	<link>http://brettdargan.com/blog/2005/04/01/jvm-monitoring-with-snmp/</link>
	<description>&#955; Thoughts and rants</description>
	<lastBuildDate>Mon, 28 Nov 2011 14:13:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: G</title>
		<link>http://brettdargan.com/blog/2005/04/01/jvm-monitoring-with-snmp/comment-page-1/#comment-694</link>
		<dc:creator>G</dc:creator>
		<pubDate>Thu, 24 Jun 2010 19:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://brettdargan.com/blog/?p=42#comment-694</guid>
		<description>when I do a snmpwalk I get the following result:

C:\usr\bin&gt;snmpwalk -c public -v2c localhost:163 1.3.6.1.4.1.42.2.145.3.163.1.1.3.6 
JVM-MANAGEMENT-MIB::jvmThreadCpuTimeMonitoring = No Such Object available on this agent at this OID

Anyone know why???


My Platform is Windows 2003 and have done the following to get Java apps monitored with Cacti.
 
- I have placed &quot;JVM-MANAGEMENT-MIB.txt&quot; in the mibs directory C:\usr\share\snmp\mibs
- changed the SNMP port TO run on port 163 instead of 161 under C:\WINDOWS\system32\drivers\etc\services 
- Installed Net-SNMP and have it running as a service
- copied C:\Java\jdk-1.6-32\jre\lib\management\snmp.acl.template to copied C:\Java\jdk-1.6-32\jre\lib\management\snmp.acl
	- set the following options in snmp.acl 

		acl ={
			
{
		
	communities = public

			access = read-only
                	managers = localhost
		     
	}
                
     } 

- Set the following parameters via wrapper.conf file for my java application:
	
	wrapper.java.additional.1=-Dcom.sun.management.snmp.interface=0.0.0.0
	wrapper.java.additional.2=-Dcom.sun.management.snmp.port=163
	wrapper.java.additional.3=-Dcom.sun.management.snmp.acl=true
	wrapper.java.additional.4=-Dcom.sun.management.snmp.acl.file=C:\Java\jdk-1.6-32\jre\lib\management\snmp.acl
	
- set the following in my snmpd.conf file:
        proxy -v 2c -c public localhost:163 .1.3.6.1.4.1.42


This is a compilation of steps that I have researched and implemented. 

What am I missing here? Any input would be greatly appreciated!</description>
		<content:encoded><![CDATA[<p>when I do a snmpwalk I get the following result:</p>
<p>C:\usr\bin&gt;snmpwalk -c public -v2c localhost:163 1.3.6.1.4.1.42.2.145.3.163.1.1.3.6<br />
JVM-MANAGEMENT-MIB::jvmThreadCpuTimeMonitoring = No Such Object available on this agent at this OID</p>
<p>Anyone know why???</p>
<p>My Platform is Windows 2003 and have done the following to get Java apps monitored with Cacti.</p>
<p>- I have placed &#8220;JVM-MANAGEMENT-MIB.txt&#8221; in the mibs directory C:\usr\share\snmp\mibs<br />
- changed the SNMP port TO run on port 163 instead of 161 under C:\WINDOWS\system32\drivers\etc\services<br />
- Installed Net-SNMP and have it running as a service<br />
- copied C:\Java\jdk-1.6-32\jre\lib\management\snmp.acl.template to copied C:\Java\jdk-1.6-32\jre\lib\management\snmp.acl<br />
	- set the following options in snmp.acl </p>
<p>		acl ={</p>
<p>{</p>
<p>	communities = public</p>
<p>			access = read-only<br />
                	managers = localhost</p>
<p>	}</p>
<p>     } </p>
<p>- Set the following parameters via wrapper.conf file for my java application:</p>
<p>	wrapper.java.additional.1=-Dcom.sun.management.snmp.interface=0.0.0.0<br />
	wrapper.java.additional.2=-Dcom.sun.management.snmp.port=163<br />
	wrapper.java.additional.3=-Dcom.sun.management.snmp.acl=true<br />
	wrapper.java.additional.4=-Dcom.sun.management.snmp.acl.file=C:\Java\jdk-1.6-32\jre\lib\management\snmp.acl</p>
<p>- set the following in my snmpd.conf file:<br />
        proxy -v 2c -c public localhost:163 .1.3.6.1.4.1.42</p>
<p>This is a compilation of steps that I have researched and implemented. </p>
<p>What am I missing here? Any input would be greatly appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://brettdargan.com/blog/2005/04/01/jvm-monitoring-with-snmp/comment-page-1/#comment-655</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 19 Jul 2009 06:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://brettdargan.com/blog/?p=42#comment-655</guid>
		<description>We have ditched snmp monitoring altogether, it wasn&#039;t worth the hassle for our situation. Which was monitoring only, polling every 2-5mins.

Besides jvm stats, we had custom application stats that we wanted monitored. These stats were originally available for query by snmp. 
The snmp manager tools are too much trouble to import a custom mib. Custom Mibs are too much trouble to manage, change etc. (devs need to know too much about it).

The snmp managers mostly just shielded rrdtool anyway and forced you to use their crappy UI to edit rrdtool properties. So we bypassed them altogether.
Now we have also removed snmp, so all stats are available over http. (Not quite RESTful, but a decent start).

When we finally got rid of snmp, it made the adding new metrics really easy, many more devs have been adding them now. Before it was just too costly in time/effort for ppl new to it to work it all out to add new ones.</description>
		<content:encoded><![CDATA[<p>We have ditched snmp monitoring altogether, it wasn&#8217;t worth the hassle for our situation. Which was monitoring only, polling every 2-5mins.</p>
<p>Besides jvm stats, we had custom application stats that we wanted monitored. These stats were originally available for query by snmp.<br />
The snmp manager tools are too much trouble to import a custom mib. Custom Mibs are too much trouble to manage, change etc. (devs need to know too much about it).</p>
<p>The snmp managers mostly just shielded rrdtool anyway and forced you to use their crappy UI to edit rrdtool properties. So we bypassed them altogether.<br />
Now we have also removed snmp, so all stats are available over http. (Not quite RESTful, but a decent start).</p>
<p>When we finally got rid of snmp, it made the adding new metrics really easy, many more devs have been adding them now. Before it was just too costly in time/effort for ppl new to it to work it all out to add new ones.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DDden</title>
		<link>http://brettdargan.com/blog/2005/04/01/jvm-monitoring-with-snmp/comment-page-1/#comment-650</link>
		<dc:creator>DDden</dc:creator>
		<pubDate>Thu, 16 Jul 2009 20:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://brettdargan.com/blog/?p=42#comment-650</guid>
		<description>Judging by the below link you cannot poll a MBean using SNMP.

http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html</description>
		<content:encoded><![CDATA[<p>Judging by the below link you cannot poll a MBean using SNMP.</p>
<p><a href="http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html" rel="nofollow">http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Master Wong</title>
		<link>http://brettdargan.com/blog/2005/04/01/jvm-monitoring-with-snmp/comment-page-1/#comment-631</link>
		<dc:creator>Master Wong</dc:creator>
		<pubDate>Mon, 22 Jun 2009 16:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://brettdargan.com/blog/?p=42#comment-631</guid>
		<description>In addition to monitoring JVM, I wonder if I can monitor web server&#039;s (say WebLogic\Tomcat) MBeans via SNMP. Anyone done this? I imagine I would need a tool to generate MBean-MIB, but how do I hook NET-SNMP, MBean-MIB and the MBean together?</description>
		<content:encoded><![CDATA[<p>In addition to monitoring JVM, I wonder if I can monitor web server&#8217;s (say WebLogic\Tomcat) MBeans via SNMP. Anyone done this? I imagine I would need a tool to generate MBean-MIB, but how do I hook NET-SNMP, MBean-MIB and the MBean together?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Master Wong</title>
		<link>http://brettdargan.com/blog/2005/04/01/jvm-monitoring-with-snmp/comment-page-1/#comment-630</link>
		<dc:creator>Master Wong</dc:creator>
		<pubDate>Mon, 22 Jun 2009 15:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://brettdargan.com/blog/?p=42#comment-630</guid>
		<description>Just want to add that I also found this article helpful:
Open NMS - JVM Monitoring using SNMP
http://www.opennms.org/index.php/JVM_Monitoring_using_SNMP

In my snmpd.conf, I added this line:
&quot;proxy -v 2c -c public 127.0.0.1:1666 .1.3.6.1.4.1.42&quot;. So if I simply do &quot;snmpwalk -v 2c -c public 127.0.0.1 .1&quot;, it will include my Tomcat&#039;s JVM info.

Not it leaves me wondering if I can include multiple JVMs into  NET-SNMP... I can specify different port value (&quot;-Dcom.sun.management.snmp.port=xxxx&quot;) for each JVM but I am thinking the JVM-MANAGEMENT-MIB&#039;s OIDs will collide. May be I can tweak the (top) OID inside JVM-MANAGEMENT-MIB so each JVM has it&#039;s own MIB with different OIDs. Just a theory.

I also want to add that I tried to write (more like hack) the same SNMP JVM proxy using SNMP4J (snmp4j.org), I had some success but using the NET-SNMP with JVM-MANAGEMENT-MIB is definitely cleaner and require less future maintenance.</description>
		<content:encoded><![CDATA[<p>Just want to add that I also found this article helpful:<br />
Open NMS &#8211; JVM Monitoring using SNMP<br />
<a href="http://www.opennms.org/index.php/JVM_Monitoring_using_SNMP" rel="nofollow">http://www.opennms.org/index.php/JVM_Monitoring_using_SNMP</a></p>
<p>In my snmpd.conf, I added this line:<br />
&#8220;proxy -v 2c -c public 127.0.0.1:1666 .1.3.6.1.4.1.42&#8243;. So if I simply do &#8220;snmpwalk -v 2c -c public 127.0.0.1 .1&#8243;, it will include my Tomcat&#8217;s JVM info.</p>
<p>Not it leaves me wondering if I can include multiple JVMs into  NET-SNMP&#8230; I can specify different port value (&#8220;-Dcom.sun.management.snmp.port=xxxx&#8221;) for each JVM but I am thinking the JVM-MANAGEMENT-MIB&#8217;s OIDs will collide. May be I can tweak the (top) OID inside JVM-MANAGEMENT-MIB so each JVM has it&#8217;s own MIB with different OIDs. Just a theory.</p>
<p>I also want to add that I tried to write (more like hack) the same SNMP JVM proxy using SNMP4J (snmp4j.org), I had some success but using the NET-SNMP with JVM-MANAGEMENT-MIB is definitely cleaner and require less future maintenance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Master Wong</title>
		<link>http://brettdargan.com/blog/2005/04/01/jvm-monitoring-with-snmp/comment-page-1/#comment-629</link>
		<dc:creator>Master Wong</dc:creator>
		<pubDate>Mon, 22 Jun 2009 15:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://brettdargan.com/blog/?p=42#comment-629</guid>
		<description>Thanks!!! Precise and well written. This is excellent. I tried this for Windows NET-SNMP 5.4.2.1 with a Tomcat 5.5.27 JVM and it works! I have been looking for this for a month!

I just want to point out one thing, in your snmptranslate above, 
&quot;snmptranslate -M .:/usr/share/snmp/mibs -m JVM-MANAGEMENT-MIB -IR-Tp jvmMgtMIB&quot;
there should be a space between &quot;-IR-Tp&quot;, so it should be 
&quot;snmptranslate -M .:/usr/share/snmp/mibs -m JVM-MANAGEMENT-MIB -IR -Tp jvmMgtMIB&quot;

This is working out beautifully. Thanks again.</description>
		<content:encoded><![CDATA[<p>Thanks!!! Precise and well written. This is excellent. I tried this for Windows NET-SNMP 5.4.2.1 with a Tomcat 5.5.27 JVM and it works! I have been looking for this for a month!</p>
<p>I just want to point out one thing, in your snmptranslate above,<br />
&#8220;snmptranslate -M .:/usr/share/snmp/mibs -m JVM-MANAGEMENT-MIB -IR-Tp jvmMgtMIB&#8221;<br />
there should be a space between &#8220;-IR-Tp&#8221;, so it should be<br />
&#8220;snmptranslate -M .:/usr/share/snmp/mibs -m JVM-MANAGEMENT-MIB -IR -Tp jvmMgtMIB&#8221;</p>
<p>This is working out beautifully. Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor</title>
		<link>http://brettdargan.com/blog/2005/04/01/jvm-monitoring-with-snmp/comment-page-1/#comment-74</link>
		<dc:creator>Igor</dc:creator>
		<pubDate>Thu, 17 Apr 2008 13:22:34 +0000</pubDate>
		<guid isPermaLink="false">http://brettdargan.com/blog/?p=42#comment-74</guid>
		<description>Hi,

Have you integrated the JVM monitoring to JFFNMS yet??</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Have you integrated the JVM monitoring to JFFNMS yet??</p>
]]></content:encoded>
	</item>
</channel>
</rss>

