Monitoring Identity Manager by JMX
Upcoming SlideShare
Loading in...5
×
 

Monitoring Identity Manager by JMX

on

  • 5,366 views

 

Statistics

Views

Total Views
5,366
Views on SlideShare
5,221
Embed Views
145

Actions

Likes
1
Downloads
179
Comments
0

13 Embeds 145

http://blogs.sun.com 95
http://tanweerahmad.blogspot.com 28
http://www.slideshare.net 6
http://tanweerahmad.blogspot.in 4
http://64.233.179.104 3
http://tanweerahmad.blogspot.nl 2
http://66.102.9.104 1
http://tanweerahmad.blogspot.kr 1
http://209.85.175.104 1
http://tanweerahmad.blogspot.sg 1
http://tanweerahmad.blogspot.se 1
http://tanweerahmad.blogspot.de 1
http://www.techgig.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Monitoring Identity Manager by JMX Monitoring Identity Manager by JMX Presentation Transcript

  • Monitoring Identity Manager by JMX Takayuki Okazaki Solutions Architect, Software Practice http://blogs.sun.com/okazaki
  • GOAL Understanding JMX monitoring feature which introduced from Identity Manager 7.0 Copyright © 2007 Sun Microsystems K.K. 2
  • NOTICE • This is NOT officially verified document of Identity Manager. All information in this document are based upon personal research. Copyright © 2007 Sun Microsystems K.K. 3
  • Agenda About JMX • Identity Manager and JMX • Configuration instruction • Demo • TIPS • Copyright © 2007 Sun Microsystems K.K. 4
  • About JMX • Standard API for monitoring and managing JVM, services, and applications. > JSR 3: Java Management Extensions (JMX) • Monitoring and Managing from remote client > JSR 160: JMX Remote API • Target use case of JMX > Referring and modifying application configuration > Gathering statistics about the application > Notify error or status change Copyright © 2007 Sun Microsystems K.K. 5
  • Benefit of JMX Lightweight • Secure • Scalable monitoring & management architecture • Easy to engage existing management solutions (like • SNMP, WBEM) Copyright © 2007 Sun Microsystems K.K. 6
  • Scope of JMX Specifications Copyright © 2007 Sun Microsystems K.K. 7
  • What can monitor by JMX? • Java VM > OS and environment, JVM options, Memory and Garbage collection, Threads • Web Container > Performance statistics, Cache, status of a connections, Connection pool, Thread pool • Application > All exposed MBeans(Managed bean) Copyright © 2007 Sun Microsystems K.K. 8
  • Example Memory Thread CPU Class Copyright © 2007 Sun Microsystems K.K. 9
  • More use case • Notify events to JMX clients > Errors and warnings > Status change • Invoking operations > Garbage collection > Test connection > State change • Advanced use case > Self tuning and self management (like GlassFish v2) Copyright © 2007 Sun Microsystems K.K. 10
  • JMX Remote and Security • Authentication > UserId/Password authentication by MBean server • Protecting connection > TLS and SSL Authentication through userid/pwd Copyright © 2007 Sun Microsystems K.K. 11
  • SNMP and JMX • Several MBeans are monitored through SNMP > http://java.sun.com/javase/6/docs/technotes/guides/man agement/snmp.html • JVM related info can be monitored by SNMP > OS and environment, classpath and JMV options, JIT, classloader, threads, GC, memory, memory pool and logging Copyright © 2007 Sun Microsystems K.K. 12
  • JMX tools • JConsole > Bundled with JDK 5 or later • MC4J (http://mc4j.org) > Open source monitoring tool • Sun Java System Management Framework > Bundled with Java ES 5 > Opensourced: http://proctor.dev.java.net • More.. > HP Openview, AdventNet ManagemeEngine Applications Manager, ... Copyright © 2007 Sun Microsystems K.K. 13
  • JConsole • Graphical management tool • You can develop additional plugin for JConsole Copyright © 2007 Sun Microsystems K.K. 14
  • Identity Manager and JMX • Support starts from Identity Manager 7.0 • Status of cluster/server, Scheduler, information about Resources, status of ActiveSync Copyright © 2007 Sun Microsystems K.K. 15
  • Cluster ObjectName=IDM:type=Cluster Attribute name Description ActiveServers List of active IDM servers KnownServers List of known IDM servers NewlyFailedServers Most recent list of failed IDM servers Alive Is polling thread alive? PollingInterval Polling interval (in milli-seconds) Copyright © 2007 Sun Microsystems K.K. 16
  • Example: Cluster ObjectName=IDM:type=Cluster Copyright © 2007 Sun Microsystems K.K. 17
  • Servers ObjectName=IDM:type=Cluster,service=Server,name=”<Server name>” Attribute name Description CreateDate Date of server created Creator Name of user who create this server Deleted Is this object deleted? Heartbeat HeartbeatDate Most recent heart beat time State StateString Status of this server ObjectName=IDM:type=Server Attribute name Description Name Name of the server Status StatusDisplay Status of this server Copyright © 2007 Sun Microsystems K.K. 18
  • Example: Servers ObjectName=IDM:type=Cluster,service=Server,name=”<Server name>” ObjectName=IDM:type=Server All servers are listed Same server to JMX server Copyright © 2007 Sun Microsystems K.K. 19
  • Resources ObjectName=IDM:type=Cluster,service=Resource,resType=”<Resource type>”, name=”<Resource name>” Attribute name Description CreateDate Date of resource creation Creator Creator user name Deleted Is this object deleted? LastModificationDate Last modified date MostRecentActivity Most recent activity MostRecentActivityDate Most recent activity date MostRecentActivityDateMS Test connection to each resource feature availble. Copyright © 2007 Sun Microsystems K.K. 20
  • Example: Resources ObjectName=IDM:type=Cluster,service=Resource,resType=”<Resource type>”,name=”<Resource name>” All resource type/resources are listed Copyright © 2007 Sun Microsystems K.K. 21
  • Connection test (IDM->Resource) Invoke test connection Success case Failure case Copyright © 2007 Sun Microsystems K.K. 22
  • ActiveSync ObjectName=IDM:type=Cluster,service=Synchronization,component=ActiveSync resType=”<Resource type>”,name=”<resource name>” Attribute name Description ProgressString Progress string ErrorStatusString Error string LastPollAttempt Last ActiveSync date NextPollAttempt Next ActiveSync date LastModNum Last modification number LastModDate Last modification date LastKnownServer Last server name which starts this ActiveSync LastStartTime Last start time State, StateString Status of this active sync Copyright © 2007 Sun Microsystems K.K. 23
  • Example: ActiveSync ObjectName=IDM:type=Cluster,service=Synchronization,component=ActiveSync resType=”<Resource type>”,name=”<Resource name>” All ActiveSyncs which is: - currently running - failure or scheduled Copyright © 2007 Sun Microsystems K.K. 24
  • SPE Sync ObjectName=IDM:type=Cluster,service=Synchronization,component=SPE Sync resType=”<Resource type>”,name=”<Resource Name>” Attribute name Description ProgressString Progress string ErrorStatusString Error string LastPollAttempt Last SPE Sync date NextPollAttempt Next SPE Sync date LastModNum Last modification number LastModDate Last modification date LastKnownServer Last server name which starts this SPE Sync LastStartTime Last start time State, StateString Status of this SPE sync Copyright © 2007 Sun Microsystems K.K. 25
  • Scheduler 1 of 2 ObjectName=IDM:type=Scheduler Attributes Description Cycles ? ErrorCount ? ExpiredCount ? FinishedCycleCounter ? FinishedCycleTIme ? LaunchedCount ? ReadyCount ? ReadyCycleCounter ? ReadyCycleTime ? Copyright © 2007 Sun Microsystems K.K. 26
  • Scheduler 2 of 2 ObjectName=IDM:type=Scheduler Attribute name Description MostRecentHeartbeat Most recent heart beat time ScheduledCycleCounter ? ScheduledCycleTime ? Status StatusDisplay Status of scheduler Copyright © 2007 Sun Microsystems K.K. 27
  • Example: Scheduler ObjectName=IDM:type=Scheduler Copyright © 2007 Sun Microsystems K.K. 28
  • Event notification Heart beat events are notified if you subscribe to Scheduler event Copyright © 2007 Sun Microsystems K.K. 29
  • Configuration • Identity Manager • Application Server • JConsole Copyright © 2007 Sun Microsystems K.K. 30
  • Identity Manager 1 of 2 (1) Settings (2) Servers (3) Click your server Copyright © 2007 Sun Microsystems K.K. 31
  • Identity Manager 2 of 2 (1) JMX (2) Turn off default setting (3)Turn on JMX Copyright © 2007 Sun Microsystems K.K. 32
  • Application Server Memorize Port number Authentication realm Turn off if you want to use JConsole Admin Service Copyright © 2007 Sun Microsystems K.K. 33
  • JConsole 1 of 2 JConsole bundled with JDK 6 JConsole bundled with JDK 5 Remote process Copyright © 2007 Sun Microsystems K.K. 34
  • JConsole 2 of 2 JMX URL service:jmx:rmi:///jndi/rmi://<hostname>:<port> /management/rmi-jmx-connector User name and password Default setting of Sun Java System App Server is “admin-realm”, which is same user of app server administrator (default user name: “admin”) Copyright © 2007 Sun Microsystems K.K. 35
  • Demo environment JConsole idm1 idm2 resource1 resource2 Solaris Container idmdb Copyright © 2007 Sun Microsystems K.K. 36
  • Monitoring from command line • Most customers already have corporate standard monitoring tool, but it may not supports JMX • Most monitoring tools have a capability to invoking monitoring command • Using scripting languages which running on Java > JRuby, JavaScript, Groovy, Pnuts, (JavaFX!)... etc > Easy to customize Copyright © 2007 Sun Microsystems K.K. 37
  • Example: JRuby Gathering ActiveSync Status #!/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=quot;(.+?)quot;,resType=quot;(.+?)quot;/ =~ cname puts quot;Resource Type: #{$2}, Name: #{$1}, ” + “Status: #{conn.get_attribute(name, 'StateString')}quot; end end Resource Type: FlatFileActiveSync, Name: My FlatFile, Status: down Resource Type: LDAP, Name: SPE End-User Directory, Status: down Copyright © 2007 Sun Microsystems K.K. 38
  • Information • Custom JMX clinet using JRuby (Japanese) > http://blogs.sun.com/nishigaya/entry/custom_jmx_client_ using_jruby > http://blogs.sun.com/nishigaya/entry/custom_jmx_client_ using_jruby1 Copyright © 2007 Sun Microsystems K.K. 39
  • JMX Identity Manager Takayuki Okazaki takayuki.okazaki@sun.com http://blogs.sun.com/okazaki