Snmp Error when using java snmp
Moderators: Developers, Moderators
Snmp Error when using java snmp
Hello,
I am attempting to monitor a Java jvm with cacti.
I have the following as start options on the jvm.
com.sun.management.snmp.interface=0.0.0.0
com.sun.management.snmp.port=1161
com.sun.management.snmp.trap=1162
com.sun.management.snmp.acl=false
In cacti I am using snmp port 1161, in the upper left hand corner I get msg "snmp error" and no data is of course graphed.
Any ideas?
Thanks,
I am attempting to monitor a Java jvm with cacti.
I have the following as start options on the jvm.
com.sun.management.snmp.interface=0.0.0.0
com.sun.management.snmp.port=1161
com.sun.management.snmp.trap=1162
com.sun.management.snmp.acl=false
In cacti I am using snmp port 1161, in the upper left hand corner I get msg "snmp error" and no data is of course graphed.
Any ideas?
Thanks,
Can you SNMPwalk the jvm?
Have you properly configured you jvm? Permissions, SNMP agent?
Have you properly configured you jvm? Permissions, SNMP agent?
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
snmp error
Seems that I am getting some data. I don't know how good it is but I still get "snmp error". I have followed the directions which are in the post but I still get the error.
Which JVM version?
What is the result from the snmpwalk?
What is the result from the snmpwalk?
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
snmp error
I am running jdk1.6. I don't know how to do snmpwalk. can you please advise?
Thanks,
Thanks,
From Linux:
snmpwalk -v [version] -c [cstring] [ip/hostname] (system)
From Windows: http://www.elifulkerson.com/articles/ne ... ficial.php
snmpwalk -v [version] -c [cstring] [ip/hostname] (system)
From Windows: http://www.elifulkerson.com/articles/ne ... ficial.php
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
snmp error
snmpwalk output below:
snmpwalk -v 1 -c public localhost
SNMPv2-MIB::sysDescr.0 = STRING: Linux aberry.linux.com 2.6.18-194.3.1.el5xen #1 SMP Sun May 2 05:02:13 EDT 2010 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (3110847) 8:38:28.47
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: aberry.linux.com
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (27) 0:00:00.27
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (27) 0:00:00.27
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (27) 0:00:00.27
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (27) 0:00:00.27
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (3117682) 8:39:36.82
End of MIB
[root@aberry ~]#
snmpwalk -v 1 -c public localhost
SNMPv2-MIB::sysDescr.0 = STRING: Linux aberry.linux.com 2.6.18-194.3.1.el5xen #1 SMP Sun May 2 05:02:13 EDT 2010 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (3110847) 8:38:28.47
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: aberry.linux.com
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (27) 0:00:00.27
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (25) 0:00:00.25
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (27) 0:00:00.27
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (27) 0:00:00.27
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (27) 0:00:00.27
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (3117682) 8:39:36.82
End of MIB
[root@aberry ~]#
snmp error
This is were I am now. I seems to be returning data. I changed the version from v1 to v2 and it seems to work. But I still get snmp error so I think think this maybe some cacti bug.
The other question what if I have multiple jvms can I have multiple ports such as 1161, 1162, 1163, etc...
Thanks,
The other question what if I have multiple jvms can I have multiple ports such as 1161, 1162, 1163, etc...
Thanks,
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
When using snmpwalk, you have to use the syntax hostname:port to get the snmp information. The best way to do this is to create a new host for every vm.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 28
- Joined: Fri May 08, 2009 11:34 am
No Such Object available on this agent at this OID
when I do a snmpwalk I get the following result:
C:\usr\bin>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 "JVM-MANAGEMENT-MIB.txt" 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!
C:\usr\bin>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 "JVM-MANAGEMENT-MIB.txt" 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!
Who is online
Users browsing this forum: No registered users and 1 guest