users@glassfish.java.net

Re: snmp monitoring / instructions to proceed

From: <glassfish_at_javadesktop.org>
Date: Thu, 06 Aug 2009 02:26:53 PDT

The way to monitor different domains through glassfish SNMP is available at the following URL:
 * http://blogs.sun.com/orivat/entry/how_to_monitor_diffrent_domains

and also copied below.
Regards,

Olivier




How to monitor different domains with Glassfish V2 SNMP 1.0

It is possible with Glassfish V2.1 to monitor different domains. In this blog, we will explain how to proceed.

Relationships between domain/DAS/ SNMP

The DAS (Domain administrative server) is the central piece of administration. A DAS is corresponding to a specific domain associated to a given administrative port.


 DAS with server instance, cluster instances within same domain

Glassfish V2.1 allows to create server and cluster instances instances within the same domain. Glassfish SNMP V2.1 allows to monitor SNMP at:

    * DAS level
    * standalone instance level
    * cluster instance level

It is even possible possible to deploy the snmp war file on the DAS, and on cluster instances at the same time by using different SNMP port. This is described in the SNMP documentation at:

    * http://docs.sun.com/app/docs/doc/820-7189/ghzpz?a=view

Configuring Glassfish SNMP to monitor different domains

In this section, is shown how to monitor different domains through Glassfish SNMP. Let's assume that we create 3 different domains: domain1, domain2, domain3. Those 3 domains need to have 3 different administrative ports (4849, 4850, 4851)

asadmin create-domain --port 4849 domain1 --user admin
asadmin create-domain --port 4850 domain2 --user admin
asadmin create-domain --port 4851 domain3 --user admin

The user needs to assign a specfic SNMP port for each domain:

asadmin set --port 4849 --user admin server.property.snmp-adapter-port=10163
asadmin set --port 4849 --user admin server.property.snmp-adapter-port=10164
asadmin set --port 4849 --user admin server.property.snmp-adapter-port=10165

The user should restart each domain for each snmp-adapter port value to be taken account

asadmin stop-domain domain1
asadmin start-domain domain1
asadmin stop-domain domain2
asadmin start-domain domain2
asadmin stop-domain domain3
asadmin start-domain domain3

The user can now deploy the Glassfish snmp war file within each domain

asadmin deploy --port 4849 __assnmp.war
asadmin deploy --port 4850 __assnmp.war
asadmin deploy --port 4851 __assnmp.war




Viewing snmp data within the different domains

snmpwalk -c public -v 1 <hostname>:10163 J2EE-MIB::j2eeDomTable
J2EE-MIB::j2eeDomMoName.1 = STRING: "domain1"
J2EE-MIB::j2eeDomEnterprise.1 = OID: J2EE-MIB::sun
J2EE-MIB::j2eeDomMoStateManaged.1 = INTEGER: false(2)
J2EE-MIB::j2eeDomMoStatProv.1 = INTEGER: false(2)
J2EE-MIB::j2eeDomMoEventProv.1 = INTEGER: false(2)
J2EE-MIB::j2eeDomSMState.1 = INTEGER: running(4)
J2EE-MIB::j2eeDomSMStartTime.1 = STRING: "Thu Aug 06 10:13:56 MEST 2009"

 snmpwalk -c public -v 1 <hostname>:10164 J2EE-MIB::j2eeDomTable
J2EE-MIB::j2eeDomMoName.1 = STRING: "domain2"
J2EE-MIB::j2eeDomEnterprise.1 = OID: J2EE-MIB::sun
J2EE-MIB::j2eeDomMoStateManaged.1 = INTEGER: false(2)
J2EE-MIB::j2eeDomMoStatProv.1 = INTEGER: false(2)
J2EE-MIB::j2eeDomMoEventProv.1 = INTEGER: false(2)
J2EE-MIB::j2eeDomSMState.1 = INTEGER: running(4)
J2EE-MIB::j2eeDomSMStartTime.1 = STRING: "Thu Aug 06 10:11:43 MEST 2009"

snmpwalk -c public -v 1 hostname:10165 J2EE-MIB::j2eeDomTable
J2EE-MIB::j2eeDomMoName.1 = STRING: "domain3"
J2EE-MIB::j2eeDomEnterprise.1 = OID: J2EE-MIB::sun
J2EE-MIB::j2eeDomMoStateManaged.1 = INTEGER: false(2)
J2EE-MIB::j2eeDomMoStatProv.1 = INTEGER: false(2)
J2EE-MIB::j2eeDomMoEventProv.1 = INTEGER: false(2)
J2EE-MIB::j2eeDomSMState.1 = INTEGER: running(4)
J2EE-MIB::j2eeDomSMStartTime.1 = STRING: "Thu Aug 06 10:14:37 MEST 2009"
  

TroubleShooting Glassfish Snmp

If you are not able to see the SNMP values, you check the glassfish server.log log file, and see within the log file to check that the SNMP value is correct for this specific domain:

    * SNMP Adapter Port: <value port> ( or example 10164 in case of domain2)
[Message sent by forum member 'orivat1' (orivat1)]

http://forums.java.net/jive/thread.jspa?messageID=359169