Download presentation
Presentation is loading. Please wait.
Published byRebecca Sutherland Modified over 10 years ago
1
The Professional Open Source Company Agent & PDK JBossNetwork Enterprise Manager
2
2 The Professional Open Source Company Agenda Overview of the Agent Architecture Server Agent communications Plugin Development Kit MX4J Example
3
3 The Professional Open Source Company The JBN EM Server Controls all agents Provides the user interface for interactive monitoring Tracks and stores historical information including metrics data and control history Provides security and access control to agent features Agent overview
4
4 The Professional Open Source Company Agent overview JBN EM Agent Acts on behalf of the server Organizes auto-inventory scans Collects metrics information according to the server configured schedule Accumulated metrics information is streamed to the server on a regular basis
5
5 The Professional Open Source Company Server agent communication JBN EM Server Platform A JBN EM Agent JBoss A JBoss B Apache Platform B JBN EM Agent JBoss A JBoss B Apache Platform C JBN EM Agent JBoss Tomcat Apache plugins Control Metrics
6
6 The Professional Open Source Company Plugin overview A JBN EM Plugin is a self-contained jar or xml file representing a platform, server or service that can be monitored They include metadata about the inventory hierarch of these resource types in the form of an xml descriptor This metadata is loaded by both the server and the agent Plugin hooks are available for Measurement (metrics) Control Auto Inventory Response Time
7
7 The Professional Open Source Company Plugin descriptor The plugin descriptor is named hq- plugin.xml when deployed in a plugin jar <server name="Example Server version="1.0" description="Example MX4J 3.0 Based Server"> …
8
8 The Professional Open Source Company Plugin services Metrics are defined against platforms, servers and services …. <option name="service.name" description="Service Name" default=""/> …
9
9 The Professional Open Source Company Plugin metrics Metrics are point in time recordings of numeric information from a resource Metrics are defined against resources in the descriptor The server can manage metrics templates that define the default collection interval The server can define custom collection intervals for a specific sevice
10
10 The Professional Open Source Company Plugin metrics …. <metric name="Availability" alias="Availability" template="${EchoService},name=%service.name%:${alias}" category="AVAILABILITY" defaultOn="true" indicator="true" units="percentage" collectionType="dynamic"/> <metric name="Uptime" alias="Uptime" template="${EchoService},name=%service.name%:${alias}" category="AVAILABILITY" defaultOn="true" indicator="false" units="ms" collectionType="static"/>
11
11 The Professional Open Source Company Plugin metrics implementation public class MX4JMeasurementPlugin extends MeasurementPlugin { public MetricValue getValue(Metric metric) throws PluginException, MetricNotFoundException, MetricUnreachableException { String jmxUrl = metric.getProperties().getProperty(PROP_JMXURL); String objectName = metric.getObjectName(); String attribute = metric.getAttributeName(); JMXServiceURL url = new JMXServiceURL(jmxUrl); JMXConnector connector = JMXConnectorFactory.connect(url); MBeanServerConnection conn = connector.getMBeanServerConnection(); ObjectName objName = new ObjectName(objectName); return conn.getAttribute(objName, attribute); double val = Double.valueOf(obj.toString()).doubleValue(); return new MetricValue(val); } …
12
12 The Professional Open Source Company Example metrics defaults
13
13 The Professional Open Source Company Plugin controls Below is an example of resource control provided by a plugin This plugin implements three control actions, start, stop and reload via These actions can be scheduled and are historically tracked
14
14 The Professional Open Source Company Plugin controls implementation public void doAction(String action) throws PluginException { String jmxUrl = this.config.getValue(MX4JUtil.PROP_JMXURL); String name = this.config.getValue(MX4JDetector.PROP_SERVICE_NAME); String object = "hyperic:type=EchoServer,name=" + name; // Default to error setResult(RESULT_FAILURE); if (action.equals("start")) { setState(STATE_STARTING); MX4JUtil.invoke(jmxUrl, object, action); setResult(RESULT_SUCCESS); setState(STATE_STARTED); } else if (action.equals("stop")) { setState(STATE_STOPPING); MX4JUtil.invoke(jmxUrl, object, action); setResult(RESULT_SUCCESS); setState(STATE_STOPPED); }
15
15 The Professional Open Source Company Plugin autoinventory The autoinventory plugin can search for known services using means appropriate to the service HTTP server management could attempt connection to an admin URL on port 80 for example Autoinventory plugins can also configure file system properties to integrate with the search architecture Implements List discoverServices(ConfigResponse serverConfig)
16
16 The Professional Open Source Company Review Weve covered The Server/Agent architecture of JBN EM The Server management and display of metrics collection, control operation and autoinventory The Agent plugin architecture including The execution of plugin implementations The definition of resource metadata The implementation of metrics gathering
17
17 The Professional Open Source Company Thanks for your time! Q & A
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.