Monitoring Sun Java System Identity Manager through JMX

  • View
    4.080

  • Download
    7

Embed Size (px)

DESCRIPTION

 

Transcript

  • 1. JMX Identity Manager http://blogs.sun.com/okazaki
  • 2. Copyright 2007 Sun Microsystems K.K. 2 Identity Manager 7.0 JMX
  • 3. Copyright 2007 Sun Microsystems K.K. 3 > JVM AppServer
  • 4. Copyright 2007 Sun Microsystems K.K. 4 JMX ? Identity Manager JMX TIPS
  • 5. Copyright 2007 Sun Microsystems K.K. 5 JMX ? JVM API > JSR 3: Java Management Extensions (JMX) > JSR 160: JMX Remote API JMX > > >
  • 6. Copyright 2007 Sun Microsystems K.K. 6 JMX > SNMP ( )
  • 7. Copyright 2007 Sun Microsystems K.K. 7 JMX
  • 8. Copyright 2007 Sun Microsystems K.K. 8 JMX Java VM > JVM Web > > MBean( )
  • 9. Copyright 2007 Sun Microsystems K.K. 9 JMX CPU
  • 10. Copyright 2007 Sun Microsystems K.K. 10 JMX JMX ( ) > > > > > > Web GlassFish v2
  • 11. Copyright 2007 Sun Microsystems K.K. 11 JMX Remote > MBean > TLS/SSL /
  • 12. Copyright 2007 Sun Microsystems K.K. 12 SNMP JMX SNMP JMX > http://java.sun.com/javase/ja/6/docs/ja/technotes/guides/ management/snmp.html SNMP > OS JIT GC
  • 13. Copyright 2007 Sun Microsystems K.K. 13 JMX JConsole > JDK 5 MC4J (http://mc4j.org) > Sun Java System Management Framework > Java ES 5 > http://proctor.dev.java.net Google > HP Openview, AdventNet ManagemeEngine Applications Manager, ...
  • 14. Copyright 2007 Sun Microsystems K.K. 14 JConsole JDK JConsole ( ) JConsole( ) JDK
  • 15. Copyright 2007 Sun Microsystems K.K. 15 Identity Manager JMX Identity Manager 7.0 ActiveSync
  • 16. Copyright 2007 Sun Microsystems K.K. 16 ActiveServers KnownServers NewlyFailedServers Alive PollingInterval IDM IDM IDM ? () ObjectName=IDM:type=Cluster
  • 17. Copyright 2007 Sun Microsystems K.K. 17 ( ) ObjectName=IDM:type=Cluster
  • 18. Copyright 2007 Sun Microsystems K.K. 18 CreateDate Creator Deleted ? HeartbeatHeartbeatDate StateStateString ObjectName=IDM:type=Cluster,service=Server,name=< > ObjectName=IDM:type=Server Name StatusStatusDisplay
  • 19. Copyright 2007 Sun Microsystems K.K. 19 ( ) JMX ObjectName=IDM:type=Cluster,service=Server,name=< > ObjectName=IDM:type=Server
  • 20. Copyright 2007 Sun Microsystems K.K. 20 CreateDate Creator Deleted LastModificationDate MostRecentActivity ? MostRecentActivityDate MostRecentActivityDateMS ObjectName=IDM:type=Cluster,service=Resource,resType=< >, name=< > JMX
  • 21. Copyright 2007 Sun Microsystems K.K. 21 ( ) ObjectName=IDM:type=Cluster,service=Resource,resType=< >,name=< >
  • 22. Copyright 2007 Sun Microsystems K.K. 22
  • 23. Copyright 2007 Sun Microsystems K.K. 23 ActiveSync ProgressString ErrorStatusString LastPollAttempt NextPollAttempt LastModNum LastModDate LastKnownServer LastStartTime State, StateString ActiveSync ActiveSync ActiveSync ActiveSync ObjectName=IDM:type=Cluster,service=Synchronization,component=ActiveSync resType=< >,name=< >
  • 24. Copyright 2007 Sun Microsystems K.K. 24 ActiveSync ObjectName=IDM:type=Cluster,service=Synchronization,component=ActiveSync resType=< >,name=< > ActiveSync ActiveSync
  • 25. Copyright 2007 Sun Microsystems K.K. 25 SPE Sync ProgressString ErrorStatusString LastPollAttempt NextPollAttempt LastModNum LastModDate LastKnownServer LastStartTime State, StateString SPE Sync SPE Sync SPE Sync SPE Sync ObjectName=IDM:type=Cluster,service=Synchronization,component=SPE Sync resType=< >,name=< >
  • 26. Copyright 2007 Sun Microsystems K.K. 26 Identity Manager > Sun Java System Application Server > AppServer JConsole
  • 27. Copyright 2007 Sun Microsystems K.K. 27 Identity Manager (1) (1) (2) (3)JMX
  • 28. Copyright 2007 Sun Microsystems K.K. 28 Identity Manager (2) (1) JMX (2) (3)
  • 29. Copyright 2007 Sun Microsystems K.K. 29 Application Server JConsole Security Admin Service
  • 30. Copyright 2007 Sun Microsystems K.K. 30 JConsole (1) JDK 5 JConsole JDK 6 JConsole
  • 31. Copyright 2007 Sun Microsystems K.K. 31 JConsole (2) JMX URL service:jmx:rmi:///jndi/rmi://< >: /management/rmi-jmx-connector Sun Java System App Server admin-realm SJSAS ( admin)
  • 32. Copyright 2007 Sun Microsystems K.K. 32 idm1 idmdb idm2 resource1 resource2 Solaris JConsole
  • 33. Copyright 2007 Sun Microsystems K.K. 33 JMX JMX Java VM JMX > JRuby, JavaScript, Groovy, Pnuts, ... etc >
  • 34. Copyright 2007 Sun Microsystems K.K. 34 JRuby #!/usr/bin/env jruby include Java include_class 'javax.management.ObjectName' include_class 'javax.management.remote.JMXConnectorFactory' include_class 'javax.management.remote.JMXServiceURL' jmxurl = 'service:jmx:rmi:///jndi/rmi://idm1:8686/jmxrmi' username, password = 'admin', 'adminadmin' svcurl = JMXServiceURL.new(jmxurl) cred = java.lang.String[2].new cred[0], cred[1] = username, password env = {'jmx.remote.credentials' => cred} conn = JMXConnectorFactory.connect(svcurl, env).getMBeanServerConnection names = conn.query_names(ObjectName.new( 'IDM:type=Cluster,service=Synchronization,component=ActiveSync,*'), nil) names.each do |name| cname = name.get_canonical_name if /name="(.+?)",resType="(.+?)"/ =~ cname puts "Resource Type: #{$2}, Name: #{$1}, + Status: #{conn.get_attribute(name, 'StateString')}" end end Resource Type: FlatFileActiveSync, Name: My FlatFile, Status: down Resource Type: LDAP, Name: SPE End-User Directory, Status: down ActiveSync
  • 35. Copyright 2007 Sun Microsystems K.K. 35 JRuby JMX > http://blogs.sun.com/nishigaya/entry/custom_jmx_client_ using_jruby > http://blogs.sun.com/nishigaya/entry/custom_jmx_client_ using_jruby1
  • 36. Takayuki Okazaki takayuki.okazaki@sun.com http://blogs.sun.com/okazaki JMX Identity Manager