Feature Guide
Feature Guide
Network 2.1
Feature Guide
The JBoss ON product consists of subsystems devoted to
different aspects of systems management and operations.
JBoss ON Team
Feature Guide
Copyright © 2009 Red Hat, Inc.. This material may only be distributed subject to the terms and
conditions set forth in the Open Publication License, V1.0 or later (the latest version of the OPL is
presently available at http://www.opencontent.org/openpub/).
Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat, Inc. in the United
States and other countries.
All other trademarks referenced herein are the property of their respective owners.
The JBoss ON product consists of subsystems devoted to different aspects of systems management
and operations.
Preface vii
1. Document Conventions .................................................................................................. vii
1.1. Typographic Conventions .................................................................................... vii
1.2. Pull-quote Conventions ....................................................................................... viii
1.3. Notes and Warnings ............................................................................................ ix
2. We need feedback .......................................................................................................... x
1. Overview 1
1.1. Inventory ...................................................................................................................... 1
1.2. Configuration ................................................................................................................ 1
1.3. Monitoring .................................................................................................................... 2
1.4. Alerts ........................................................................................................................... 3
1.5. Operations ................................................................................................................... 3
1.6. Content (Packages) ...................................................................................................... 3
1.7. Groups ........................................................................................................................ 3
1.8. Security Model ............................................................................................................. 4
1.9. Administration .............................................................................................................. 4
1.10. Events ....................................................................................................................... 4
2. Inventory 5
2.1. Overview ..................................................................................................................... 5
2.2. Concepts ..................................................................................................................... 5
2.2.1. Resource Types ................................................................................................ 5
2.2.2. Resources ......................................................................................................... 6
2.2.3. Inventory states ................................................................................................. 6
2.3. Controlling Inventory ..................................................................................................... 7
2.3.1. Autodiscovery Portlet ......................................................................................... 7
2.3.2. Manual discovery .............................................................................................. 8
2.4. User Interface (Inventory Tab) ...................................................................................... 8
2.4.1. General section ................................................................................................. 8
2.4.2. Child resources ................................................................................................. 9
2.4.3. Group membership .......................................................................................... 11
2.4.4. Agent information ............................................................................................ 11
2.5. Creating New Resources ............................................................................................ 11
2.5.1. Overview ......................................................................................................... 11
2.5.2. Child Resource types ....................................................................................... 13
3. Configuration 17
3.1. Concepts ................................................................................................................... 17
3.1.1. Supported Resources ...................................................................................... 17
3.1.2. How Does Configuration Work? ........................................................................ 17
3.1.3. Property types ................................................................................................. 17
3.1.4. Revisions and History ...................................................................................... 18
3.1.5. Access Rights ................................................................................................. 18
3.2. The Configure Tab ..................................................................................................... 18
3.2.1. Current (Edit) View .......................................................................................... 18
3.2.2. History View .................................................................................................... 19
4. Monitoring 21
4.1. Concepts ................................................................................................................... 21
4.1.1. What Can Be Monitored ................................................................................... 21
4.1.2. Metrics versus Traits versus Response Time ..................................................... 21
4.1.3. Collection Schedules ........................................................................................ 22
iii
Feature Guide
5. Alerts 35
5.1. Overview .................................................................................................................... 35
5.2. Concepts and Terminology ......................................................................................... 35
5.2.1. Action Filter ..................................................................................................... 35
5.2.2. Alert ................................................................................................................ 35
5.2.3. Alert Definition ................................................................................................. 35
5.2.4. Alert Condition ................................................................................................. 35
5.2.5. Alert Dampening .............................................................................................. 36
5.2.6. Alert Notification .............................................................................................. 37
5.2.7. Condition Expression ....................................................................................... 38
5.2.8. Condition Log .................................................................................................. 38
5.2.9. Condition Set .................................................................................................. 38
5.2.10. Enable and Disable ........................................................................................ 38
5.2.11. Recovery ....................................................................................................... 39
5.3. Integrations ................................................................................................................ 39
5.3.1. Availability ....................................................................................................... 39
5.3.2. Measurement .................................................................................................. 40
5.3.3. Operations ...................................................................................................... 41
5.3.4. Traits .............................................................................................................. 42
5.3.5. Events ............................................................................................................. 42
5.4. Templates .................................................................................................................. 42
5.5. SNMP Traps .............................................................................................................. 42
5.5.1. How to set up sending of Traps ....................................................................... 43
5.5.2. The RHQ alert mib .......................................................................................... 43
5.5.3. Receiving of Traps and forwarding as Events .................................................... 44
6. Operations 45
6.1. Overview .................................................................................................................... 45
6.2. Concepts ................................................................................................................... 45
6.2.1. Supported Operations ...................................................................................... 45
6.2.2. Arguments ....................................................................................................... 45
6.2.3. Results ............................................................................................................ 45
6.2.4. Scheduling ...................................................................................................... 45
6.2.5. Operation State Management ........................................................................... 46
6.2.6. History ............................................................................................................ 47
6.3. Resource User Interface ............................................................................................. 47
iv
6.3.1. New ................................................................................................................ 47
6.3.2. Scheduled ....................................................................................................... 48
6.3.3. History ............................................................................................................ 49
6.4. Resource Group User Interface ................................................................................... 49
6.4.1. New ................................................................................................................ 49
6.4.2. Scheduled ....................................................................................................... 50
6.4.3. History ............................................................................................................ 52
6.5. Script Execution ......................................................................................................... 53
6.5.1. Connection Properties ...................................................................................... 53
6.5.2. Executing Scripts ............................................................................................. 53
6.5.3. Results ............................................................................................................ 54
6.5.4. Tips and Tricks ................................................................................................ 54
7. Content (Packages) 55
7.1. Overview .................................................................................................................... 55
7.2. Concepts and Terminology ......................................................................................... 55
7.2.1. Package .......................................................................................................... 55
7.2.2. Package Type ................................................................................................. 55
7.2.3. Package Version ............................................................................................. 56
7.2.4. Package Bits ................................................................................................... 56
7.2.5. Installed Package ............................................................................................ 56
7.2.6. Content Source ............................................................................................... 56
7.2.7. Channel .......................................................................................................... 56
7.3. Package Discovery ..................................................................................................... 57
7.4. User Functions ........................................................................................................... 57
7.5. Applying JBoss Patches ............................................................................................. 57
7.5.1. Enabling the default JBoss Patch Content Source .............................................. 58
7.5.2. Subscribing Resources to the default JBoss Patch Channel ................................ 59
7.5.3. Applying a Patch ............................................................................................. 60
8. Groups 63
8.1. Overview .................................................................................................................... 63
8.2. Concepts and Terminology ......................................................................................... 63
8.2.1. Mixed Group ................................................................................................... 63
8.2.2. Compatible Group ............................................................................................ 64
8.3. Defining Groups ......................................................................................................... 64
8.3.1. Group Inventory ............................................................................................... 65
8.3.2. Implicit vs. Explicit Revisited ............................................................................. 66
8.3.3. Defining Groups via Group Definitions .............................................................. 66
8.4. Removing_Groups ...................................................................................................... 66
8.5. Groups and Availability ............................................................................................... 66
8.6. Groups and Connection Properties .............................................................................. 67
8.7. Group Connection Properties ...................................................................................... 67
8.7.1. Step 1 Viewing Group Connection Properties .................................................... 67
8.7.2. Step 2 Editing Group Connection Properties .................................................... 67
8.7.3. Step 3 Asynchronous Update Begins ................................................................ 68
8.7.4. Step 4 View History of Updates ........................................................................ 69
8.7.5. Step 5 View Update Details ............................................................................. 69
8.7.6. Step 6 View Group Update Results .................................................................. 70
8.8. Group Definitions and Dynamic Groups ....................................................................... 70
8.8.1. Introduction ..................................................................................................... 70
8.8.2. Subsystem Integrations .................................................................................... 71
v
Feature Guide
vi
Preface
1. Document Conventions
This manual uses several conventions to highlight certain words and phrases and draw attention to
specific pieces of information.
1
In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. The
Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not,
alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes
the Liberation Fonts set by default.
Mono-spaced Bold
Used to highlight system input, including shell commands, file names and paths. Also used to highlight
key caps and key-combinations. For example:
The above includes a file name, a shell command and a key cap, all presented in Mono-spaced Bold
and all distinguishable thanks to context.
Key-combinations can be distinguished from key caps by the hyphen connecting each part of a key-
combination. For example:
The first sentence highlights the particular key cap to press. The second highlights two sets of three
key caps, each set pressed simultaneously.
If source code is discussed, class names, methods, functions, variable names and returned values
mentioned within a paragraph will be presented as above, in Mono-spaced Bold. For example:
File-related classes include filesystem for file systems, file for files, and dir for
directories. Each class has its own associated set of permissions.
Proportional Bold
This denotes words or phrases encountered on a system, including application names; dialogue
box text; labelled buttons; check-box and radio button labels; menu titles and sub-menu titles. For
example:
1
https://fedorahosted.org/liberation-fonts/
vii
Preface
Choose System > Preferences > Mouse from the main menu bar to launch Mouse
Preferences. In the Buttons tab, click the Left-handed mouse check box and click
Close to switch the primary mouse button from the left to the right (making the mouse
suitable for use in the left hand).
To insert a special character into a gedit file, choose Applications > Accessories
> Character Map from the main menu bar. Next, choose Search > Find… from the
Character Map menu bar, type the name of the character in the Search field and
click Next. The character you sought will be highlighted in the Character Table.
Double-click this highlighted character to place it in the Text to copy field and then
click the Copy button. Now switch back to your document and choose Edit > Paste
from the gedit menu bar.
The above text includes application names; system-wide menu names and items; application-specific
menu names; and buttons and text found within a GUI interface, all presented in Proportional Bold and
all distinguishable by context.
Note the > shorthand used to indicate traversal through a menu and its sub-menus. This is to avoid
the difficult-to-follow 'Select Mouse from the Preferences sub-menu in the System menu of the main
menu bar' approach.
Whether Mono-spaced Bold or Proportional Bold, the addition of Italics indicates replaceable or
variable text. Italics denotes text you do not input literally or displayed text that changes depending on
circumstance. For example:
To see the version of a currently installed package, use the rpm -q package
command. It will return a result as follows: package-version-release.
Note the words in bold italics above — username, domain.name, file-system, package, version and
release. Each word is a placeholder, either for text you enter when issuing a command or for text
displayed by the system.
Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and
important term. For example:
When the Apache HTTP Server accepts requests, it dispatches child processes
or threads to handle them. This group of child processes or threads is known as
a server-pool. Under Apache HTTP Server 2.0, the responsibility for creating and
maintaining these server-pools has been abstracted to a group of modules called
Multi-Processing Modules (MPMs). Unlike other modules, only one module from the
MPM group can be loaded by the Apache HTTP Server.
viii
Notes and Warnings
Source-code listings are also set in Mono-spaced Roman but are presented and highlighted as
follows:
package org.jboss.book.jca.ex1;
import javax.naming.InitialContext;
System.out.println("Created Echo");
Note
A note is a tip or shortcut or alternative approach to the task at hand. Ignoring a note
should have no negative consequences, but you might miss out on a trick that makes your
life easier.
Important
Important boxes detail things that are easily missed: configuration changes that only
apply to the current session, or services that need restarting before an update will apply.
Ignoring Important boxes won't cause data loss but may cause irritation and frustration.
ix
Preface
Warning
A Warning should not be ignored. Ignoring warnings will most likely cause data loss.
2. We need feedback
To see all outstanding issues regarding this guide, please visit: https://jira.jboss.org/jira/browse/JOPR
If you find a typographical error in the Features Guide, or if you have thought of a way to make this
manual better, we would love to hear from you! Please submit a report in JIRA: https://jira.jboss.org/
jira/browse/JOPR against the component Documentation.
If you do have a suggestion for improving the documentation, try and be as specific as possible
when describing it. If you have found an error, please include the section number and some of the
surrounding text so we can find it easily.
x
Chapter 1.
Overview
The JBoss ON product consists of subsystems devoted to different aspects of systems management
and operations.
1.1. Inventory
Inventory is responsible for finding and tracking the platforms, servers and services that will be
managed using JBoss ON. This system provides auto-discovery for easier deployment and thorough
models of deployed systems and applications. It provides the central administrator the ability to
configure which features will be used on which targeted services.
1.2. Configuration
Configuration supports reading, updating, and tracking changes to the settings for servers and
processes. These configuration changes can be tracked historical and even detect changes made
outside the system while providing an audited history and the ability to roll back to previous versions
for supported services.
1
Chapter 1. Overview
1.3. Monitoring
Monitoring manages the collection of statistics and state for managed products and the setup of
collection intervals and details. This system also provides running baselines to show metrics that go
out of their normal ranges.
2
Alerts
1.4. Alerts
Alerts integrates with other subsystems to provide notifications of user defined conditions. This can
be utilized to notify administrators of performance problems or failed operations. Complex conditions
allow for detailed alert situations to be modelled while dampening allows for the right semantics before
starting of events.
1.5. Operations
Operations offer the ability to execution actions against resources in the inventory. These operations
depend on the resource, but can include actions such as stop, start and restart as well as clearing
caches or gathering detailed operation information.
1.7. Groups
Groups deliver an important ability to aggregate detailed service models into components users can
understand. They also provide the underlying mechanism for application of access control semantics
with the security model.
3
Chapter 1. Overview
1.9. Administration
1.10. Events
Events are a type of measurement data, that unlike Metrics (see Chapter 11, Events) are not collected
at fixed intervals, but that occur at random points in time.
JBossON is able to pick up those events, filter them by severity, display them in the user interface and
have alerts sent based on defined event conditions.
4
Chapter 2.
Inventory
2.1. Overview
The "inventory" is the term for the central repository that houses items JBoss ON manages and
monitors (see Chapter 4, Monitoring). Before an item can take advantage of the feature set that JBoss
ON provide, it must first be imported into the inventory.
2.2. Concepts
Although a picture is worth a thousand words, below is a full text description for those that want to
know precisely what this one illustrates:
5
Chapter 2. Inventory
• A service can be a child of a server or a platform (e.g. JMS Queue on JBoss AS)
• A server can be a child of another server (e.g. Tomcat embedded in JBoss AS)
It's worth mentioning that a resource can only have one parent. Thus, the resource hierarchy we're
dealing with in JBoss ON actually takes the form of a directed, acyclic graph (DAG). The graph's root
is its platform, and the servers and services beneath it help to form a shallow, yet relatively wide tree.
2.2.2. Resources
Each resource is a concrete instance of one of the plugin-defined resource types. Thus, each resource
will have exactly one resource type. Resources are the actual instances of the platforms, servers, and
services that are installed on the boxes where the JBoss ON Agents reside.
2.2.3.1. NEW
• most resources will be automatically discovered by JBoss ON
• the auto-discovery portlet on the dashboard will show discovered resources that have not yet been
either ignored or imported (a.k.a committed)
2.2.3.2. IGNORED
• this state is used to "hide" one or more auto-discovered resources; instead of being imported into
inventory, these resources can instead be "ignored"
• this feature is useful if the discovery process found servers that you're not interested in managing /
monitoring at this time
• resources in this state will not show up in inventory nor in the auto-discovery portlet
• to see resources that have previously been ignored (as well as to unignore them), click the "View
All..." button of the auto-discovery portlet
6
Controlling Inventory
Warning
It is currently not possible to ignore a resource until the platform has at least one
committed resource beneath it (thus implicitly commits the platform itself). It doesn't make
sense to ignore the platform, because then what was the point of installing an agent
on that box in the first place? If you ignore the platform, then you are ignoring all of the
children servers and services beneath it, so you might as well just not install the agent on
that box at all. Thus, for each new agent in the system, just make sure you commit at least
one resource; then you can ignore any and all other resources under that platform.
2.2.3.3. COMMITTED
• resources that have been imported successfully are marked as committed
• note: importing a resource will implicitly import (a.k.a commit) all of it's children resources
recursively
• when using the resource browser, only committed resources will be shown
The discovered resources will be shown in the autodiscovery portlet on the Dashboard:
From here you can press the import button to commit the resource and take it into inventory. For each
platform or server committed, it will trigger another type of scan which will search recursively for all
nested servers and services.
The time it takes to find all of the nested resources beneath a parent resource may vary; it largely
depends on the number of resources there are to be discovered. Each server or service scanned in
this way will be automatically committed beneath its respective parent resource.
7
Chapter 2. Inventory
Here you can unignore resources or import any resources that are in new state.
To add a new resource, use the resource browser to find what should be its logical parent resource.
Remember, since the resource browser only shows committed resources, you must first import the
parent in order to manually add a child resource to the inventory.
Click over to the inventory tab of this parent resource. The drop-down menu item labelled "Manually
add..." is the first step towards bringing a resource into inventory manually; select the type of resource
you want to add.
The next page will display all properties that the plugin requires (each resource type in the system has
a different set of required properties) in order to uniquely identify and successfully connect to this new
resource.
After submitting the form, the resource will start in the committed state, and thus be available for
viewing in the resource browser.
Warning
It is illegal to manually discover a resource unless the plugin can successfully connect to
the resource. With the properties that you were prompted to specify, the resource should
have a green availability icon next to it (meaning that it's UP).
Now the resource is ready to be monitored and managed like any other auto discovered resource.
8
Child resources
Clicking the edit button lets you change the resource's name, description and location field.
The drop down menu will contain all resource types that can be manually added for this parent.
Selecting a type and clicking "OK" will lead to a template selection page:
9
Chapter 2. Inventory
Here you can select a template that fills in some default values. After this you will be forwarded to a
page where you can fill in the remaining values.
Please refer to Section 3.1.3, “Property types” to learn more about possible property types.
As with manually adding a child resource, you will be forwarded to pages that are specific to the
respective resource type.
A more in-depth discussion can be found in Section 2.5, “Creating New Resources”.
Checking the box will enable the "Delete selected" button. When you press it, you will be presented
with a warning where you can cancel the action or proceed the operation.
• the resource will be removed from inventory (along with any metric history, operational history, etc)
10
Group membership
• all of its child resource will also be removed from inventory (along with all history too)
• the resource and its children will be removed from any resource groups they are in
• the agent will delete the physical entity on the managed box
In the example it is a compatible group named "Macs" with 1 member. The group availability is up (i.e.
all members are up).
Clicking on the 'I' icon or on the group name will open a new page where you can view the group
members and more group-specific items. See Chapter 8, Groups for more information.
The section lists the IP address of the agent along with the port the agent is listening on for commands
from the server.
2.5.1. Overview
The "Create New" feature is used to create and deploy new child resources including EAR files, WAR
files, datasources, connection properties, JMS queues and JMS Topics. The process for creating each
of these resources is similar for all resource types. This is outlined below:
2.5.1.1. Create
1. Use the Browse Resources link to navigate to the parent resource
11
Chapter 2. Inventory
3. Scroll to the bottom of the Child Resources table (midway down the page) to the Create New drop
down menu item. Select the resource type you'd like to create and click OK.
4. Enter the information for the resource to be deployed and click CREATE
5. Results
• A message indicating whether the request to deploy this resource was successfully sent to the
agent or not will be displayed at the top of the page.
• The success or failure of the actual deployment attempt will be listed in the "History of Create
Child Resource Requests" table at the bottom of the Child Resources table.
2.5.1.2. Delete
1. Use the Browse Resources link to navigate to the parent resource
3. Check the box next to each WAR or EAR application that you'd like to undeploy in the Child
Resources table
Warning
Undeploying a resource with the DELETE button will actually remove the resource
from the disk.
5. Results:
• A message indicating whether the request to delete this resource was successfully sent to the
agent or not will be displayed at the top of the page.
• The success or failure of the actual undeploy attempt will be listed in the "History of Delete Child
Resource Requests" table at the bottom of the Child Resources table.
12
Child Resource types
1. Follow the instructions detailed in Section 2.5.1.1, “Create”, browsing to the JBossAS Server
resource you'd like to deploy the archive to.
2. Select the Create New drop down menu item for either a "- Web Application (WAR)" or "-
Enterprise Application (EAR)" and click OK
13
Chapter 2. Inventory
4. Follow the instructions detailed in Section 2.5.1.1, “Create” to determine the result of the resource
creation
2.5.2.2. Datasource
Datasources are a child resource of a JBossAS Server resource. As with other child resources, they
are deployed via the "Create New" feature on the Inventory tab.
1. Follow the instructions detailed in the Section 2.5.1.1, “Create” section of this document, browsing
to the JBossAS Server resource you'd like to deploy the archive to.
2. Then select the Create New drop down box for "- Datasource" and click OK
Template Description
Default template An empty template, use this for Postgres,
MySQL or other datasources
Oracle Local TX An Oracle-specific template used for a
datsource with local transactions
Oracle XA An Oracle-specific template used for a
datasource with XA transactions
14
Child Resource types
5. Follow the instructions detailed in the Section 2.5.1.1, “Create”> section of this document to
determine the result of the resource creation
1. Follow the instructions detailed in the Section 2.5.1.1, “Create” section of this document, browsing
to the JBossAS Server resource you'd like to deploy the archive to.
2. Select the Create New drop down box for "- Connection Factory" and click OK
4. Follow the instructions detailed in the Section 2.5.1.1, “Create” section of this document to
determine the result of the resource creation
1. Follow the instructions detailed in the Section 2.5.1.1, “Create” section of this document, browsing
to the JBossMQ Service resource you'd like to deploy the archive to.
15
Chapter 2. Inventory
2. Then select the Create New drop down box for "- JMQ JMS Topic" or "- JMQ JMS Queue" and
click OK
4. Follow the instructions detailed in the Section 2.5.1.1, “Create” section of this document to
determine the result of the resource creation
16
Chapter 3.
Configuration
3.1. Concepts
Resources (or, more appropriately said, resource types Section 2.2.1, “Resource Types”) that support
configuration will either show a "Configure" tab when the resource is selected or a little 'C' icon on the
Browse Resources page in the User Interface (UI).
• JBoss ON sends the configuration update asynchronously to the agent managing the specific
resource
• The agent applies the configuration changes and reports success or failure along with the now
current configuration back to the server
• The server lists the new configuration revision on the history page
• String
• Number
• Lists
JBoss ON will check the entered data when submitting the configuration update form.
Unset properties
For some properties, you will see an "Unset" checkbox just to the right of the property name, as in the
following example:
17
Chapter 3. Configuration
Such properties are considered optional properties. That is, they do not require a value to be specified.
If a property is marked unset, JBoss ON will not submit any value for that property to the managed
resource, which tells the managed resource to use its default value for that property (which may or
may not be null).
There are often properties on the configure tab or also when manually taking a resource into inventory
where you don't want or don't need to specify values (refer to Section 2.4.2.1, “Manually add child
resources”. An example of this is the username and password properties for a JBossAS resource; for
a JBossAS instance with an unsecured JNP server, these properties should be unset.
Revision IDs
Revisions are keyed by a numeric id. The id numbers are shared between all configurable resources.
This means that if you e.g. have two resources A and B and you first configure A and then B and then
A again, A will most likely have revision numbers 1,2 and 5,6 while B will have numbers 3 and 4 for its
configuration revisions.
Revision ids will also advance by a bigger number when the JON server is restarted. So if for example
the last revision id was 7 before the restart, it could be 50 after the restart.
• the JBoss ON Agent needs to be able to read and write the postgres configuration files.
18
History View
Clicking "Edit" at the top will allow you to change properties and display a "save" button at the bottom
of the page.
When "save" is invoked you will be forwarded to the history view where a message indicating that your
configuration request has been forwarded to the agent for processing will be displayed.
• on the top you will find some basic information about the current configuration
19
Chapter 3. Configuration
For each revision you can see when it was submitted, when the change was completed, if it
succeeded or failed and who triggered the change. If the JON system provided the revision (e.g. when
initially reading the configuration from the managed resource) the user field will be empty.
In case of a failure, you may click on the failure status and view details on why the request failed.
Clicking on a revision id will add a panel below that shows the properties of the selected revision. This
panel looks like the current view shown in Section 3.2.1, “Current (Edit) View”.
The revision id with the asterisk (*) next to it is the current configuration.
20
Chapter 4.
Monitoring
Monitoring is about gathering metric information from resources in order to graph them or to define
Alerts (Chapter 5, Alerts) on them.
Metric data is the information JBoss ON collects for a given platform, server or service. The data
JBoss ON collects depends on what type of server or service is being monitored. For instance, if
you monitor a Linux platform, you can see metric data about total, used, and free swap, total, used,
shared, and free memory, total, idle, and user CPU, and more. For an instance of Tomcat, you can
view details such as the JVM total memory, active thread count and thread group count, uptime,
process shared memory time, and more.
4.1. Concepts
This section identifies what can be monitored, the types of metrics and the collection intervals for the
metrics.
The data that finally is collected is defined in the Plugin Descriptor by the plugin writer.
• Numerical metrics
• Traits
• Response times.
Metrics can be viewed as graphs or as numerical values on the Monitor tab of the application.
4.1.2.2. Traits
Traits are rarely expected and are treated as text. This therefore means that they cannot be graphed.
Instead, current trait values for a resource are always shown at the top of a page below the general
properties of that resource as illustrated in the following screen shot.
21
Chapter 4. Monitoring
Here the Inet4Address marked in green (for this example) is a trait of this network adapter with name
"Inet4Address" and value "172.31.7.7"
This display at the top of the page is only enabled if a trait has displayType=summary in its Plugin
Descriptor.
Traits values are also gathered by the Agent on regular intervals, but only changed traits are sent to
the server, stored and processed for alert-able conditions. All traits and a history of the trait values can
be viewed on the monitor tab.
Please note that you can also modify the scheduled intervals to your requirements. You can either
change the default for all metrics of a certain resource type or only for a selected metric.
• Utilized types only: This will show a list of resource types that are in utilized by resources in the
inventory.
• All types: This will show a list of all defined resources, whether or not they are actually in use.
22
The Monitor Tab
Clicking on "Edit metric template will then show a list of all metrics for that resource type.
The list contains the name of the metric and a description, its type, sampling interval and whether it is
turned on by default.
To modify the interval or enable/disable the collection of data, select the checkbox on the row and
enter the new data on the settings displayed.
The modified settings will if you click "Update schedules for existing resources of marked type" (the
default), not only be applied to new resources that are taken in to inventory, but also to existing
resources.
23
Chapter 4. Monitoring
The network adapter row specifies a set of resources while the other three are single resources.
4.2.1.2. Indicators
This tab shows graphs for metrics that were marked as "summary" in the Plugin Descriptor. The little
graphs refresh at regular intervals showing the latest data.
The graph shows the values in the given display timeframe and the current values for min, max and
average for that timeframe. If you click on the title of the graph, you will be directed to Section 4.3,
“Metric Chart” where you can see a more detailed graph of this metric.
On top of the indicators, you will see a line with colored dots. Those dots show the Availability of the
resource in the given Display timeframe Section 4.2.1.4, “Display Timeframe”.
This availability strip will always show 60 dots. So if you choose to display a 10 minute timeframe,
every dot shows the availability within a 10 seconds interval. The percentage given in the title also
applies to the timeframe selected.
If you click on the name of a metric, it will be graphed on a larger graph display.
24
Events Subtab
Important
The timeframe setting is sticky. If you for example select the metric for a certain day,
you will from there on only view the data for that specific day until you explicitly select a
different time frame. This stickyness applies to metrics.
The screen shown is the same as shown above in Section 4.1.3.1, “Default Schedules”, except that
you can not apply the values to other resources.
At the top you find a panel to select the data that you want to be displayed in the graph. Section 4.3.1,
“Baseline” related items can only be selected if a baseline has already been computed for that value.
25
Chapter 4. Monitoring
This example contains the blue bars for the measurement values, the horizontal lines for the minimum,
maximum and average for the timeframe shown.
4.3.1. Baseline
At the bottom of the page you'll find a panel to select and display the baseline and an expected value
range
A metric baseline is a value that represents the norm for a particular metric. JBoss ON automatically
calculates the baselines for dynamic metrics currently being collected for a resource. The baseline is
the average value of a metric based on a time range that you specify (see administration section). In
addition, the high and low range values are also calculated for the metric. You can also simply specify
the expected mean, high, and low range values. You can set and chart these values when you chart a
metric for a resource.
The use of a baseline as an analysis method compares changes in actual data against a baseline
value. This functionality allows you to perform trending analysis, manage SLAs, and monitor overall
application health as a form of fault management.
When you click on "Change value" you can set the baseline to a new auto computed value and the
expected ones to new minimum and maximum values respectively.
It is possible to define Alerts (Chapter 5, Alerts) that refer to Baselines or expected values.
26
Data Storage
when an alert occurs as a result of a metric value collected, the alerting event is also tracked as a
problem metric occurrence for that metric.
Resources with problem metrics are shown in the Problem Metric portlet on the Dashboard.
Detailed data will be compressed in cascades into tables for 1 hour, 6 hours and 1 day values, where
for each interval the minimum, maximum and average values are kept. This way data is saved at
smaller resolution for up to one year. The timeframe for which raw data is kept, can be defined on the
admin screen under server configuration.
4.7.1. Concepts
Response times denote the time it takes to serve a web request or a EJB method call. Unlike the
numerical metrics, this is most of the time an array of data in the sense that the one metric you enable
brings you min/avg/max data for all methods of a Session Bean or all URLs of a web application.
Please refer to Section 4.1.3, “Collection Schedules” for more information about collection schedules
and defaults.
27
Chapter 4. Monitoring
Note
The JBossON server is already instrumented.
After the filter is installed, you need to open the inventory tab of the web application and specify the full
path to the logfile:
• URL Excludes: Specifies URLs that should not be taken into account for the response time metrics.
Examples are e.g. static files like CSS files or images. Entries are regular expressions separated by
spaces. For example to exclude gif, jpg, and png files, use:
(?i)\.(jpg|gif)$
• URL Transforms: If a page is called with a different parameter, you may decide to show them as
separate URLs or as one URL only. The transform allows you to rewrite URLs to e.g. strip off those
parameters. Entries are substitution expressions separated by spaces. A substitution expression
has the syntax:
|(.*)\?.*|$1|
For WARs, the functioning of URL transforms depends on the settings of the Response Time Filter
(Section 4.7.4, “Response Time Filter”); particularly the chopQueryString parameter.
After this is done, you need to open the configure section of the Monitor tab and enable the collection
of the response times:
28
Monitor Tab
Please refer to the Section 4.1.3, “Collection Schedules” for more information.
• on the left the raw data table with the resource, number of calls and times
29
Chapter 4. Monitoring
The two parts are a <filter/> and <filter-mapping/> directive. For the <filter/> directive,
you can just use the first one if you are happy with the defaults. If you want to modify the parameters,
you can use the enhanced one. Please use only one of the two options.
Previous to Servlet version 2.4 you must be careful to put the directives next to other directives of the
same kind. Filter related directives go in front of the <servlet/> sections.
Important
You may want to put the <filter/> in front of other filters so that the On Response Time
Filter can take their delay into account as well.
<filter>
<filter-name>RhqRtFilter </filter-name>
<filter-class>org.rhq.helpers.rtfilter.filter.RtFilter </filter-class>
</filter>
<filter>
<filter-name>RhqRtFilter </filter-name>
<filter-class>org.rhq.helpers.rtfilter.filter.RtFilter </filter-class>
<init-param>
<description>Shall the filter directly chop off the query parameters from
the URL? Default is true. </description>
30
Response Time Filter
<param-name>chopQueryString </param-name>
<param-value>true </param-value>
</init-param>
<init-param>
<description>Directory where logs are written to </description>
<param-name>logDirectory </param-name>
<param-value>/tmp </param-value>
</init-param>
<init-param>
<description>Prefix to written logfile names </description>
<param-name>logFilePrefix </param-name>
<param-value>localhost_7080_ </param-value>
</init-param>
<init-param>
<description>Patterns that should not be logged </description>
<param-name>dontLogRegEx </param-name>
<param-value> </param-value>
</init-param>
<init-param>
<description>Should the dontLog pattern be applied to the URI only? </
description>
<param-name>matchOnUriOnly </param-name>
<param-value>true </param-value>
</init-param>
<init-param>
<description>How many seconds between auto flushes of the logfile </
description>
<param-name>timeBetweenFlushesInSec </param-name>
<param-value>73 </param-value>
</init-param>
<init-param>
<description>How many lines shall be written to the logfiles before a
flush </description>
<param-name>flushAfterLines </param-name>
<param-value>13 </param-value>
</init-param>
<init-param>
<description>The maximum allowed size, in bytes, of the logfiles; if a
logfile exceeds this limit, the filter will truncate it; the default value
is 5242880 (5 MB) </description>
<param-name>maxLogFileSize </param-name>
<param-value>5242880 </param-value>
</init-param>
</filter>
and
<filter-mapping>
<filter-name>RhqRtFilter </filter-name>
<url-pattern>/* </url-pattern>
</filter-mapping>
31
Chapter 4. Monitoring
If your Servlet container's Servlet version is below Servlet 2.4, you will need to place it in the correct
section/order in the file - otherwise your servlet container will not start.
Parameter Description
chopQueryString Only the URI part of a query will be logged if this
parameter is set to true. Otherwise the whole
query line will be logged. Default is true.
logDirectory The directory where the logfiles will be written to.
Default setting is {jboss.server.log.dir}/
rt/ (usually server/xxx/log/rt). If
this property is not defined, the fallback is
{java.io.tmpdir}/rt/ (/tmp/ on Unix, and
~/Application Data/Local Settings/
Temp – check the TEMP environment variable)
is used. If you specify this init parameter, no
directory rt/ will be created, but the directory
you have provided will be taken literally.
logFilePrefix A prefix that is put in front of the logfile names.
Default is the empty string.
dontLogRegEx A regular expression that is applied to query
strings. See java.util.regex.Pattern. If the
parameter is not given or an empty string, no
pattern is applied.
matchOnUriOnly Should the dontLogRegEx be applied to the URI
part of the query (true) or to the whole query
string (false). Default is true.
timeBetweenFlushesInSec Log lines are buffered by default. When the
given number of seconds have passed and a
new request is received, the buffered lines will
be flushed to disk even if the number of lines to
flush after (see next point) is not yet reached..
Default value is 60 seconds (1 Minute).
flushAfterLines Log lines are buffered by default. When the given
number of lines have been buffered, they are
flushed to disk. Default value is 10 lines.
maxLogFileSize The maximum allowed size, in bytes, of the log
files; if a log file exceeds this limit, the filter will
truncate it; the default value is 5242880 (5 MB).
32
Response Time Filter
33
34
Chapter 5.
Alerts
5.1. Overview
Alerting is all about auditing events that happen across the system. After raw events are generated,
they are sent through the alerts processing engine. Here, they might be transformed, filtered, or
even correlated with data from other parts of the system. If some event makes it through all of those
gates successfully, then it is recorded permanently - the act of which might consequently trigger a
notification to various interested parties.
This definition, upon firing an alert, will disable itself. This prevents it from triggering any more alerts
while the problem that arose (and caused this alert to fire in the first place) is remedied either by
developers or system administrators.
5.2.2. Alert
An alert is a form of auditing data that tells you that some alert condition (Section 5.2.4, “Alert
Condition”) were known to be true at some point for some resource in inventory. Alerts are the end
product of an alert definition (Section 5.2.3, “Alert Definition”). An alert will tell you specifically which
conditions on the alert definition were true at the time it fired, and it will specify which parties were
notified at that time.
35
Chapter 5. Alerts
This is the default option, and indicates that no dampening should take place. In other words, every
single time the condition set is known to be true, an alert will fire.
This form of dampening is good to use when you have a system that spikes a lot. If you know that your
CPU will often momentarily hit some high point but then should return to normal processing levels,
then you can use this dampening option to ensure that you only get an alert if the CPU remains spiked
for 2 or 3 consecutive measurement collections.
Setting the X option for this dampening rule to a high number is not recommended (though there are
a few valid use cases to do so) because you may likely want to be notified sooner rather than later if
one of your systems is experiencing such sustained problems. Remember, this option only needs the
condition set to be found false once for it to reset the counter. Therefore using too high a number may
effectively prevents alerts from ever being generated if you have just a few negative evaluations of
your condition set in between lots of positive ones.
This dampening rule is very similar to the last one, but it's not as restrictive. This option allows for the
condition set to be evaluated to false several times over a long span of evaluations and will still fire an
alert.
This could be useful when alerting on memory usage. If you want to set up an alert definition check
whether your free memory is being released periodically, you might use this dampening rule with X=5,
Y=10. So, the alerts processing engine will look back at the last ten evaluations, and if at least half
of them were positive, this might indicate that your process is having trouble releasing memory back
down to acceptable levels, and further investigation should be performed.
This option is nearly identical to the previous one, except that it is based on time instead of the number
of evaluations. This time-based evaluation, however, can be dangerous because the effects are not
always obvious.
36
Alert Notification
Since the measurement subsystem is defined in terms of collection intervals, the alert processing
engine is thus restricted to the same concept when computing condition sets.
Assuming that you use this dampening rule and set the options to X=5, Y=30minutes. If the collection
interval is currently 5minutes, then Y=30minutes effectively becomes Y=6collections. However, if you
change your collection interval to 10 minutes, then Y=3collections. This might not seem so bad if the
person responsible for setting the collections intervals on this resource is the same as the person
responsible for creating all alert definitions too, but that is not always the case. Here, if someone
comes along and changes the collection interval for some measurement, he or she may inadvertently
and implicitly change how one or more alert definitions are dampened, resulting in either too many, too
few, or no alerts at all.
Instead of requiring users to perform this relatively slow method of checking on their alerts, JBoss ON
supports the concept of notifications. Notifications may be sent via SNMP traps or via email. The email
addressed can be registered against an alert definition in one of three ways: by direct email address,
by role, or by user. Each of these is discussed in the following sections. In addition it is possible to run
an operation when the alert fires.
37
Chapter 5. Alerts
If the resource type does not allow operations, the selection will only have one option of "none".
Note that it is currently only possible to run the predefined operations on the resource itself. It is not
possible to e.g. restart a Web application (WAR) when the CPU is at 100% usage.
5.2.7.1. ALL
Regardless of the size of the condition set, all alert conditions need to be true before an alert will fire.
It doesn't matter if one condition is known to be true several times in a row. The last known value
for each condition must be true simultaneously before this alert definition will fire an alert. This is
convenient when you have a system where individual events may happen frequently, but not actually
indicate a problem. Here, you can specify that multiple conditions must be true before the system
takes further action.
5.2.7.2. ANY
Regardless of the size of the condition set, only one alert condition needs to be true before an alert will
fire. This is really a convenience option for administrators. Instead of having to define 5 different alert
definitions, each with one condition based on the 5 different things that could happen in the system,
you only have to define one alert definition with 5 conditions and set the processing to ANY to get the
same effect.
38
Recovery
will be hidden from the alerts processing engine, and will never fire an alert until it is re-enabled /
activated.
An alert definition can always be disabled manually via the UI. However, alert definitions will
sometimes be disabled by a post-processing action filter. Regardless of how an alert definition is
disabled, it can always be re-enabled manually via the UI. However, an automated recovery process
can also kick in to re-enable an alert definition too.
5.2.11. Recovery
Sometimes it is necessary to have two alert definitions work in tandem to provide a more intelligent
dampening scenario. For instance, if some condition set becomes true, it may indicate some system
state which cannot be automatically recovered from (i.e. human intervention is needed). Therefore an
alert is fired off when the original condition set is met, and using an action filter this alert definition is
automatically disabled.
A systems administrator gets the alert notification, and takes some manual intervention to correct
the problem. Once the issue is resolved (and conditions return to normal), another alert definition is
triggered. This second definition is the "Recovery Alert" definition for the one that was disabled above.
Thus, when this second definition fires, it will automatically re-enable the first one again.
Since recovery alert definitions are mainly used to indicate healthy scenarios, and in theory healthy
scenarios should ensue as close to 100% of the time as possible, one should be hard pressed to find
a good reason to add even one notification to this type of alert definition. Nonetheless, the option is
there.
5.3. Integrations
The alerts subsystem is a funnel for all different kinds of events that happen in the various other
subsystems of JBoss ON. To date, alerts are integrated with and can record events that happen to the
following types of data:
• Availability
• Measurement
• Operations
• Traits
• Events
5.3.1. Availability
The integration with availability data is fairly straight forward. Since the availability of a resource can
only ever be in one of two states - UP or DOWN - these are precisely the two states that the alerts
subsystem uses.
However, being in one of these states is not as import as moving between these states. In other
words, it doesn't make much sense to constantly be notified that some resource is UP...the resource is
UP...the resource is UP, etc. Likewise, after a resource goes DOWN, notifications past that point while
it is still down would be redundant.
For availability therefore, you can only be notified if the resource changes its state. Below is a
screenshot of what this part of the UI looks like:
39
Chapter 5. Alerts
Notice this is different from how JBoss ON 1.x processed availability. Instead of being a number
(where 1 means UP, 0 means down) the availability states are now a true enumeration. In 1.x,
administrators had to indicate they wanted to be notified of a 'downed' resource by saying "availability
< 1.00". The enumerated, state-based method that JBoss ON 2.0 uses is much more straightforward
and precise.
5.3.2. Measurement
The integration with measurement data is the most feature-rich integration to date. Here, you're
given several options for how you want the alerts processing engine to operate on the incoming
measurement data.
First, no matter which alert condition option you choose, you must first select a specific measurement
to operate against. The list of measurement choices are derived from the type of resource you are
looking at. Below is an image that shows the available measurements for a Platform:
Let's take the "Used Physical Memory" above as an example when describing the rest of the
measurement-related alert condition options:
5.3.2.1. Absolute
This option is a comparison of the most recently collected used physical memory value against an
absolutely specified value chosen by the user.
Here, the comparison can use any of the following three operators: "greater than", "less than", or
"equal to". For "equal to" comparison, since we're dealing with floating point numbers, if the values are
within 10e-9 of one another, they are considered equal.
40
Operations
5.3.2.2. Percentage
For the example, the option is a comparison of the most recently collected used physical memory
value against a percentage of its known baseline. This alert condition option lets you choose whether
you want the comparison to be made against the minimum, mean, or maximum baseline value
currently recorded in the system. Notice how the last drop-down menu will show the current min,
mean, and max baseline values; this gives the users all the information they need on a single page,
enabling them to create the entire alert definition without having to navigate around to other parts of
the UI.
Again, you can again choose any of the following three operators: "greater than", "less than", or "equal
to". And, again, for "equal to" comparison, since we're dealing with floating point numbers, values are
considered equal if they are within 10e-9 of each other.
5.3.2.3. Relative
This option is a comparison of the most recently collected used physical memory value against its last
known value.
The user interface portion for this option is shown above, though it's rather dull.
5.3.3. Operations
To date, the integration with operations deals only with the current state of some operation, not its
operational data (arguments and results). The image below depicts what the UI will look like when
creating / editing an alert definition for a JON Agent resource type:
On the left-hand side you can view the list of operations for your resource. On the right-hand side, you
can view the list of all the states an operation can possibly be in. Each state is discussed below:
• INPROGRESS - this is the only begin state, all operations move through this en route to being
processed
41
Chapter 5. Alerts
• SUCCESS - this is a terminating state, operations move into this if no errors have occurred during
processing
• FAILURE - this is a terminating state, operations move into this if any error has occurred during
processing
• CANCELLED - this is a terminating state, operations move into this only if they are successfully
cancelled via the UI
5.3.4. Traits
The integration with traits is a subset of the functionality offered for measurement integration. Whereas
measurement data is always numeric and tends to change very frequently, trait data is rather static
and rarely changes. Thus, only relative comparison operations are supported for traits, which simply
compares the latest value collected for that trait to its last known value.
Above is an image that shows the available traits that you can monitor for a Platform.
5.3.5. Events
The integration with Events (Chapter 11, Events) is done in form of matching Severity and optionally a
string match on the Events detail.
5.4. Templates
It is possible to define alert templates that get applied to existing or new resources. Please refer to the
Monitoring Defaults page for details.
42
How to set up sending of Traps
Depending on the protocol you, need to provide more information. In SNMPv1, the generic trap id
should be 6 to conform to the standard. You might choose a specific trap id to suit your requirements.
The agent address should be set to the IP address of your JBossON server.
For the other fields, you can also specify values that suit your requirements.
• Port: target port of the management station - this is currently UDP only
• OID: The base OID for the values sent by this trap. If you want to use the RHQ MIB, this has to be
1.3.6.1.4.1.18016.2.1 as described below.
43
Chapter 5. Alerts
44
Chapter 6.
Operations
6.1. Overview
Operations are all about executing functions against resources in inventory. Some of these operations
could change the operational state of a resource (such as start, stop, or restart commands), while
others can be purely informational (obtain some report data, or get a list of deployments).
The latest version of JBoss ON brings with it a lot of new features in the operations subsystem. In
1.x, operations (previously referred to as control actions) did not support complex results, and did not
support arguments at all. In 2.0, operations support arbitrarily complex arguments and results
6.2. Concepts
So, if you have two JBoss AS instances in inventory that were the exact same version (same
4.0.5.GA), they will support the exact same operations. However, a JBoss AS 4.0.2 instance may have
a slightly different list of supported operations than JBoss AS 4.2.1.
6.2.2. Arguments
Operational arguments actually piggyback on top of the same underlying constructs used to support
arbitrarily complex resource configuration data. Consequently, arguments are strongly typed, can
be required or optional, and inherit support for validation. Thus, regardless of how complicated the
arguments to a function might be, they can still be supported structurally as well as displayed in the UI.
6.2.3. Results
Operational results also piggyback on the same underlying constructs used to support resource
configuration data. Thus, regardless of how complicated the results from a function are, they can still
be supported structurally as well as displayed in the UI.
As with arguments, results too will be strongly typed, and inherit support for validation. Result
validation is a more complex way in which a plugin might determine whether an operation was
successful or not.
6.2.4. Scheduling
An operation can be executed immediately, or it can be deferred for future execution. A deferred
execution can be invoked once, or it can be invoked on a repeating interval. An interval can be
unbounded (i.e., the operation will be repeatedly invoked on the specified interval infinitely), or it can
have a termination date.
Regardless of which options are chosen, all operations necessarily go through the scheduler - even
ones marked to execute immediately. The scheduler has the responsibility for creating new operation
45
Chapter 6. Operations
schedules, managing the repeat intervals of each, knowing when to fire each scheduled operation,
and unscheduling operations as appropriate.
However, the scheduler does not have any responsibility for actually executing the operations
themselves. For this, it communicates with the operation manager.
The user interface will show this history item as a pending operation, at which point the user has the
opportunity to cancel it. If it is cancelled, another message is sent to the agent. If the message gets
there before the agent begins the operation, the agent will remove it from the queue, and tell the
server that its state can be set to CANCELLED.
On the other hand, once the agent has started the operation on the managed resource, it can no
longer be cancelled. In other words, even if the user attempts to cancel this operation in the UI, the
cancel request will effectively be ignored once the operation has begun. At first glance, this may seem
like a rather restrictive semantic; however, it was deemed as necessary because it would be next to
impossible for a plugin to know precisely what intermediate state the managed resource was in when
the operation was forcibly cancelled (assuming it was even possible to forcibly cancel it). So, instead
of coming up with a potentially very complex mechanism for determining what semi-completed state a
forcibly cancelled resource was in, no operation can be cancelled once it has been started.
Eventually, the operation will complete on the managed resource and pass its raw value back to the
plugin communicating with it. This plugin must analyze the raw output from the managed resource and
modify, transform, or craft an entirely different response message depending on the raw result. The
raw result will never be sent directly to the server, it must be wrapped in an object that matches the
expect result type as defined by the plugin for that operation.
Regardless of the details of the response, a non-cancelled operation can only ever wind up in two
states: SUCCESS or FAILURE. Operations that fail may be accompanied by a detailed error message
explaining the failure.
Occasionally, the server may be unable to communicate with the agent that is managing the
target resource. In this case, the operation will immediately be put into the FAILURE state, and the
accompanying error message will explain the details of the connectivity issues.
6.2.5.1. Timeouts
Occasionally, there are instances where an operation will "hang" on a managed resource. This would
normally spell trouble for the plugin because it cannot start the next operation on the resource until the
current operation completes.
Luckily, each plugin supports a timeout for invocations that don't complete in a timely fashion. Once
the timeout period expires, the operation is forcibly halted, the operation is marked as FAILURE, and
the error message will contain details of the timeout.
46
History
The above is exactly what we were trying to avoid by not supporting forced cancellations of operation.
Halting an operation abruptly could potentially leave the resource in an inconsistent state. Though,
when an invocation is hung, there isn't much more that can be done other can a forcible termination of
the execution. This scenario is expected to be very rare.
Unfortunately, there are yet more risks in this scenario. The issue past this point is if there were other
operations waiting in the queue. If so, as soon as the currently executed operation is halted and
removed from the queue, the next operation proceeds as if nothing bad has happened. If the forced
cancellation was "safe", there should be no problem; but if the resource is in an inconsistent state, it
might cause a cascade failure of all operations executed against this resource in the future (perhaps
until the resource is restarted). Though if the administrator is using JBoss ON assiduously, he or she
should immediately be alerted that there have been consecutive operation execution failures, and that
manual intervention is probably needed to fix the problem.
6.2.6. History
The outcomes of all operations executed on a resource are recorded. The operation history is a way
to audit the results of these executions. When the scheduler deems that an operation needs to be
executed against some managed resource, it creates an operation history element and sets it state to
INPROGRESS. Items in this state are put in the pending operations table.
All other states of an operation - CANCELLED, SUCCESS, and FAILURE - are termination states.
Operations in any one of these states are shown in the completed operations table.
Completed operation data is never automatically purged, but a JBoss ON user can delete specific
elements that may be out-of-date or no longer relevant.
6.3.1. New
This tab presents you with a list of possible operations for the selected resource
When you choose one by clicking on it, it will be marked with a little asterisk and an option panel will
be displayed as illustrated below:
47
Chapter 6. Operations
You need to fill all required fields and decide if the operation should be scheduled for immediate (one
time) execution.
If you want to schedule the execution to happen at a different time or to recur, you need to select the
textbox. JON will present you with additional fields about the recurrence of the operation.
The "Other options" section lets you set a timeout and some notes.
Depending on when you scheduled the operation, you will be transferred to the "Schedule" or "History"
subtab.
6.3.2. Scheduled
This tab lists all operations scheduled for the future along with notes you entered when creating the
schedule and the owner of this scheduled operation
48
History
Clicking on the operation name provides you with the schedule information like recurrence and
operation parameters.
You can also cancel a scheduled operation by selecting the operation in the list and clicking on
"unschedule" at the bottom.
6.3.3. History
The history view consists of two parts:
Both panels show the name of the operation, when it was submitted and completed and by whom as
well as its status. In case of failure you can click on the failure link to see why the operation failed (e.g.
missing permissions).
6.4.1. New
Supports everything that a resource supports, but adds one additional section entitled "Resource
Operation Ordering".
49
Chapter 6. Operations
This section allows you to choose whether you want to execute the operation against all group
members simultaneously, or define an ordering between them. If the ordering is selected, then JON
will execute one at a time, and wait for some return value (success or failure), before executing the
next operation.
In the "other options" section, you can choose to immediately halt the processing if the operation fails
on any resource.
6.4.2. Scheduled
Missing from JON 1.x was the ability to save the ordering between group members for execution. In
JON 2.x the ordering is saved as part of a scheduled operation.
One handy use of this is for server/service clusters. For example, let's assume that you want to restart
a cluster. You might have to shutdown the resources in a particular order, and then restart them in the
reverse order. You can create two schedules - one for startup, one for shutdown - and schedule those
operations to occur at a sufficiently advanced date/time. This way, the schedule will be created but will
not immediately fire.
At some later point in time you may come back to the group operations UI and want to execute that
saved operation. JON 2.x now supports an "Execute Now" button on the schedules page.
50
Scheduled
However, if you want to make sure that you've selected the proper operation before executing it, click
on the appropriate row in the group operation schedule table, and view it's details. You can confirm
that the ordering is still as desired, and then click the "Execute Now" button from the schedule details
page.
51
Chapter 6. Operations
6.4.3. History
This section supports everything that a resource supports, but includes additional auditing data to be
able to show the operation results of each resource member in the group.
52
Script Execution
• .sh and .pl scripts for Unix/Linux. (Scripts need to have the x-bit set)
Scripts are auto-discovered when JBoss AS server is discovered, or every 24 hours thereafter. If you
just dropped a script into the AS bin directory, it might be faster to manually discover the script. Or you
can force a discovery through the Agent Command Prompt using discovery -f (refer to the Agent
Command Line Options section in the JON Agent Guide)
While the script is a service of the JBoss AS, it does not mean that the script has to be JBoss App
Server specific. It can also be other OS scripts that you want to run. For instance, if you want a script
to clean out hanging processes nightly, you can create a script that will run at midnight each night that
will search for processes and kill them.
2. Environment Variables
The environment variables that will be passed to the script; each variable must be on a new
line and have the syntax name=value; the variable's value can contain properties with the
syntax %propertyName% the script plugin will interpolate these with the current values of the
corresponding properties from the script's parent JBossAS server's connection properties.
You can edit the connection properties under the Inventory page for the script service.
3. Enter any Command Line Arguments values you wish to pass to the script.
b. If you wish to enter a specific start time enter the date and time and leave recur selected to
"never"
c. if you wish for the execution to recur, select "every" and choose how often you want the script
to recur. and finally choose a recurrence end, if you wish the recurrence to occur up to a
specific date.
53
Chapter 6. Operations
6.5.3. Results
All output that would appear in a console from running the script, will be viewable after running the
script by looking at the operations history details. To view the details, click on the name of the script in
the operations history list.
There you will see the details of the execution of the script including Name of the script, date and
submitted and date executed, the requester and the status. You will also see the command line
arguments that were passed, if any. and then Exit Code followed by the output. If you have a lot of
information expected in the output section, you might find it easier to view by selecting the text field's
contents and pasting it in your favourite text editor.
• when adding a new environment variable to be used as the value for some operation argument
remember to:
• change the environment on the managed server (as opposed to the JON server), and
• restart the agent managing that server (otherwise the new variable will not be propagated, and will
not resolve during the operation execution)
54
Chapter 7.
Content (Packages)
7.1. Overview
The content subsystem is a mechanism through which a plugin can expose specific pieces of content
on a resource. Typically, this content comes in the form of files related to the resource, including
executable, configuration, or log files. The content subsystem will record these files in the inventory
and capture metadata on different revisions of the artifact.
7.2.1. Package
A package refers to an arbitrary piece of content exposed by a plugin. In most cases, this comes in the
form of a file, such as a JBoss AS JAR file or an installable package on a Linux platform. However, it is
possible that a plugin writer would choose to expose a chunk of data that did not directly tied to a file.
• Display Name (optional) - A user interface friendly name of the package type.
• Description (optional) - Describes the type of content found in package of this type.
• Discovery Interval (optional) - Defines the time between package discovery scans for this type;
different packages types can be configured with intervals to represent the likelihood of the package
inventory changing.
• Creation Type Flag (optional) - If set to true, a package of this type is used when creating
resources of the enclosing resource type. An example of this situation is a Java EAR file. There is
an EAR resource type that represents the enterprise application in JBoss ON. Under that resource
type, there is a package type defined to represent the EAR file itself. This package type is flagged
as a creation type; when creating a new EAR resource, the EAR file must be created at the same
time. The default for this attribute is false, as typically packages will not represent the creation of a
new resource. See Chapter 2, Inventory for more information.
• Configuration (optional) - The configuration element allows the plugin to define an open-ended
set of attributes about the package type. These values will be populated during package discovery,
55
Chapter 7. Content (Packages)
and if not marked as read only can be specified by the user at artifact creation time. An example
of a property in this configuration element is a boolean that describes if an EAR file is deployed as
exploded or zipped. When EAR files are discovered, this flag will be populated and carry package
type specified information. Additionally, when deploying a new EAR file through JBoss ON, this flag
can be set to indicate how the package should be deployed on the AS instance.
More information about defining a Content Source of the type "JBossASPatchSource" can be found in
Section 7.5, “Applying JBoss Patches”.
7.2.7. Channel
A channel is an aggregator of package versions. Users define channels and associate package
versions with their channels (note that you can associate package versions that came from different
content sources to the same channel). You can then subscribe resources to one or more channels.
This allows users to determine which package versions a resource can view and install.
56
Package Discovery
Once inventoried in JBoss ON, the following data identifies each package:
• Name - When a plugin discovers a package, it assigns a descriptive name of what the package
represents in the system.
• Type - The package is defined as being of a particular type. Multiple packages can have the same
name as long as they are of different package types.
• Architecture - Identifies the architecture of the package, if applicable. This is required, however
there is a noarch option when the package is not built against a specific architecture.
Additionally, the following data are recorded for each package. All of these are optional and provided if
applicable. It is up to the plugin to decide which of these to populate:
• Content Retrieval Time - Time stamp at which the revision was discovered.
• Owner - Owner of the package (for the case of a file, the file system user who owns the file).
As was explained above, a Content Source connects your JON server to all the JBoss patches. A
Channel maps a Content Source to the resources in your inventory that you want to apply the patches
to.
57
Chapter 7. Content (Packages)
3. Before the Content Source can be used, you must provide your CSP (Customer Support Portal)
Username and Password, and activate the Content source. The following table details all the
settings for this Content Source, as well as which values you must modify.
Important
We recommend that you keep the Lazy Load checkbox activated, otherwise all
patches defined in the RSS feed (a total of over 1GB of data) will be pre-emptively
downloaded by the JON Server.
58
Subscribing Resources to the default JBoss Patch Channel
5. Use the Test Connection button to verify that the connection details are valid.
6. Alternatively, you can use Synchronize button to force the content source to pull down the latest
RSS Feed and synchronize it with the local data. They history of synchronization attempts is listed
in the Synchronization Results section.
1. Click the "Go To All Channels View" at the bottom of the Content Sources list.
3. By default, the channel has already been associated with the "JBoss Patch Content". However,
if you needed to associate the channel to another content source, you'd do so through the
ASSOCIATE button.
4. Click the SUBSCRIBE button to subscribe JBoss resources you'd like to patch.
• Once you've done this, you should see a screen similar to this, where the content source,
resources, and available packages are listed
59
Chapter 7. Content (Packages)
3. Verify that this resource is subscribed to a channel by clicking the Subscriptions subtab.
4. Click the New subtab. If any patches are available for this resource, they will be listed on this tab.
Important
JBoss Cumulative Patches are, as the name infers, cumulative. So all the fixes found
in CP03, CP02 and CP01 are included in CP04.
For this reason, it is recommended that you simply install the latest CP available for
your resource.
Due to the nature of Cumulative Patches, you will only be allowed to install one CP at
a time
5. Mark the checkbox for the CP to be installed and click Deploy Selected.
6. Review the details of the CP through the VIEW link or click CONTINUE to install the patch.
60
Applying a Patch
7. The Packages History subtab will be displayed. Once the patch has been installed, it will move
from "Currently Executing Requests" to the "Completed Requests", clicking the VIEW button will
load the audit trail for this package deployment request
61
62
Chapter 8.
Groups
A group contains one or more resources and can be used in different ways. This page discusses the
different kinds of groups JBoss ON supports and how to create groups.
8.1. Overview
You can group resources together within JBoss ON, making them easier to work with and to provide
security controls around the members of groups. There are different kinds of groups you can create, to
support different group models and functionality.
Another important application is to see the (combined) availability of all group members at a glance
(Section 8.5, “Groups and Availability”).
• Mixed Group
• Compatible Group
This is very useful in case you want to give an administrator full access to a JBoss Application Server.
You can create a mixed group, define it as a "recursive" group and add the JBoss Application Server
resource to it. At this point, the mixed group will now not only have the JBoss Application Server
resource as a member, but it will also have all of that server's child services as members too (which
would include all EJB, DataSource, JMX, etc. service resources).
63
Chapter 8. Groups
Clicking on it will open a page where you can enter the name of a group and a description for it.
Important
Only users with the global SECURITY or INVENTORY permission can create groups.
Since users without those permissions can only access resources in groups assigned
to their roles, and since new groups are not assigned to any roles initially, then such a
user would not even be able to use a group he created (since it will not exist in any of that
user's roles). For this reason, groups can only be created by those users that were given
explicit permission to see any and all resources and groups (i.e. those with SECURITY or
INVENTORY permission).
In the lower panel, you can select if you want a mixed or compatible group. For mixed groups it will
enable the "recursive" checkbox to enable recursive groups. For compatible groups you will see a drop
down menu to select the resource type that this group can contain (Section 2.2.1, “Resource Types”).
Important
Once you have chosen the type of group, if it is recursive or what resource types it
contains, you cannot change its properties. You have to delete the group on the Browse
Resources page and create a new group with the desired type instead. Please refer to
Removing groups below for details.
64
Group Inventory
The middle section lists the resource types contained in the group along with the number of resources
of the given type.
The individual resources are listed at the bottom. In the header you will see if it is a compatible or
mixed group along with the resource type for a compatible group (Jon Agent for the previous screen
shot).
There is also an Add to list... button that lets you select new members for the groups. Next to it is a
Remove from list button to remove explicitly added members from a list.
Only the "JON Agent JVM" has a checkbox in front meaning that only this resource got explicitly
added. All other resources were implicitly added as children.
65
Chapter 8. Groups
When you now remove the root of the implicit group, all members implicitly added will vanish, but
those explicitly added will stay in the group, even if the have also been added implicitly.
8.4. Removing_Groups
Groups can be removed by going to the Browse Resources page, selecting the type of group and
then the group you want to delete and pressing the delete button at the bottom of the page:
Removing the group does not remove any resource from inventory.
• YELLOW: some members of the group are up and some are down
66
Groups and Connection Properties
The screen shot below displays a compatible group of JMS Queue resources.
As mentioned above, this is an "average" of the individual connection properties on each of the
corresponding members of the group. The rules are as follows:
• If all of the resources in the group have identical values for some property, the group connection
property will be that exact value
• If even one resource has a different value than the rest of the resources in the group, then that
property will have a special marker value of "~ Mixed Values ~" (without quotes)
If override is checked, that property will be passed along to the resource for updating. If the override
box is left blank, then that property will remain untouched on all resources - regardless of whether the
value was already the same across all resources or had mixed values.
67
Chapter 8. Groups
In the screenshot above, you'll notice that the only row that has the override box checked is
Description Template. Therefore, this is the only property that will be affected when this change is
pushed out to the members of the group.
As shown above, on clicking 'OK' you will be redirected back to the Inventory tab of the resource group
and notified through a message at the top of the page that the asynch update is currently in progress.
Important
At this point, if you refresh the Inventory tab page, you may see the group connection
properties at the bottom of the Inventory tab change to values you may not be expecting.
Please ignore these values as they are expected.
When you press the refresh button, the JON Server goes out and finds the current
values of the connection properties for each resource in the group. If the asynchronous
update has not yet completed, but if it has successfully changed some of the resource's
68
Step 4 View History of Updates
connection properties, you might see some "intermediate" values. Again please ignore
these values. Please wait until the asynch update completes, then refresh the page to see
the final results.
In this case, you can see that three updates were made to this group recently, and that all updates
succeeded. In general, an update can be in one of three states:
• In Progress - there is at least one resource in this group that hasn't completed the update to its
connection properties yet
• Failed - the group update is complete, but at least one resources connection properties could not be
updated for some reason
• Success - the group update is complete, and the connection properties of all resources in the group
were successfully updated
69
Chapter 8. Groups
The upper section labelled Group Configuration Update Details will show you the details of what
you pushed out to all of the resources in the group. Remember, only the columns with the override box
checked are actually being pushed out to each resource in the group.
The lower section labelled Resource Configuration Updates Results will show whether and which
resource's connection properties failed to be updated. The failure reason will be listed in the Details
column. Clicking on the hyperlink in the Date Created column of this lower section will take you to
the Inventory tab for the corresponding resource. In almost every case, if there was some problem
connecting to the resource in question (because some value in the connection properties didn't make
sense), there will be an informational message at the top of the Inventory tab for the resource. You
can use the displayed information to fix localized issues first, then retry the group update later.
8.8.1. Introduction
A group definition is a rich, expressive "short-hand" for resource groups. At a high-level, a definition
tells the system how to create a group; the details are handled by specifying a list of rules that tell the
system how to find and aggregate the appropriate resources to add as members of the group.
Think of all the ways you might want to group resources in an enterprise: by cluster identifier, by
broadcast group or some other network-level means, by logical service layer, by geographical location,
by security domain, e.t.c.
Any individual resource may fall into multiple "buckets", and thus could potentially be a member of
multiple groups. However this becomes a problem and more evident in large inventories. Do you really
want to spend hours and hours creating hundreds of groups for thousands of resources across dozens
of attributes?
70
Subsystem Integrations
It might not seem so bad if you only had to do it once, but nowadays enterprises are changing every
day. Machines are stood up, reach an end of life, repurposed or upgraded (hardware or software).
With enterprises changing so rapidly, who really has the time to sit and make sure all of the hundreds
of resource groups have accurate memberships?
Whereas in JON 1.x you had to create and populate all of your compatible and mixed groups, now you
can leverage group definitions to do that tedious work for you. So what exactly can you do with this
rich, expressive short-hand?
• "groupby" <resource-expression>
The first format is called a simple expression; the latter, a pivoted expression. A group definition that
contains only simple expressions (the first format) will only create one child group. A group definition
that contains even one pivoted expression, has the potential to create many groups (see the other
"Syntax References" sections for more information).
Extended Backus Naur form was used in favor of its more classical predecessor primarily to take
advantage of the more concise and natural representation for repetition and grouping.
1
http://en.wikipedia.org/wiki/Extended_Backus-Naur_form
71
Chapter 8. Groups
<group-definition> = { <expression> } ;
<expression> = ( <simple-expression> | <pivoted-expression> ) ;
<simple-expression> = <simple-lhs-expression>, [ <string-match-
expression> ], "=", <value-expression> ;
<simple-lhs-expression> = <resource-expression> ;
<value-expression> = ? all visible characters ? ;
<pivoted-expression> = "groupby" <simple-lhs-expression> ;
<string-match-expression> = ".", ( "startsWith" | "endsWith" |
"contains" ) ;
<resource-expression> = "resource.", ( <parent-expression> | <grand-
parent-expression> | <resource-attributes-expression> ) ;
<parent-expression> = "parent.", <resource-attributes-expression> ;
<grand-parent-expression> = "grandParent.", <resource-attributes-
expression> ;
<resource-attributes-expression> = "id" | "name" | "version" |
<resource-type-expression> | <configuration-expression> | <measurement-
expression> ;
<resource-type-expression> = "type.", <resource-type-attributes-
expression> ;
<resource-type-attributes-expression> = "plugin" | "name" |
"category" ;
<configuration-expression> = ( "pluginConfiguration" |
"resourceConfiguration" ), <property-expression> ;
<measurement-expression> = "trait", <property-expression> ;
<property-expression> = "[", <property-name>, "]" ;
<property-name> = { <alpha-numeric-character> + "-" + "." } ;
resource.id
resource.name
resource.version
resource.type.plugin
resource.type.name
resource.type.category
resource.parent.id
resource.parent.name
resource.parent.version
resource.parent.type.plugin
resource.parent.type.name
resource.parent.type.category
resource.grandParent.id
resource.grandParent.name
resource.grandParent.version
resource.grandParent.type.plugin
resource.grandParent.type.name
resource.grandParent.type.category
72
A Not-So-Short Tutorial
resource.pluginConfiguration[<property-name>]
resource.resourceConfiguration[<property-name>]
resource.trait[<property-name>]
• suffixed with "= <value>" (if you want to form a simple expression)
Note
Simple expressions can match on a portion of the name using the optional <string-match-
expression> element above. (see the example entitled "Just the raw measurement tables"
below for sample usage)
4. Then select from some resource type in the list (such as "JBossAS Server"), and click it
6. On this page, the names of all of the valid elements are in the "propertyDefinitions" section of the
table
• For "JBossAS Server", you should see things like namingURL, principal, credentials,
jbossHomeDir, configurationPath, configurationSet, etc
You can follow this same procedure to find the names of the resourceConfiguration properties too, just
click the resourceConfigurationDefinition in step 5 instead of pluginConfigurationDefinition.
resource.parent.type.category = Platform
This means that you want to search your entire inventory and find any resources that have a parent
which happens to be a platform. In other words, you intend to create a single group, and put all of the
direct children resources of any platform in your inventory into it. You can also take a further step and
add another filter to the one above:
73
Chapter 8. Groups
resource.parent.type.category = Platform
resource.name.contains = JBossAS
This compound expression (each part of which must be on a separate line) will now search the entire
inventory as above, but this time it will only add resources to the group if they also have "JBossAS"
anywhere in their name.
Unfortunately for large inventories, this would almost certainly create a group with a very large
membership. So, from a practical standpoint, it starts to lose its luster. Luckily, we still have a few
tricks up our group definition sleeves...
Pivoted expressions are where the real power of group definitions shines through. Their features are
described below. As an example, if we had a pivoted expression like:
groupby resource.parent.name
The above expression would first take the portion after the "groupby" text, and ask the inventory
for ALL unique "resource.parent.name" results. In other words, it is going to find one result for each
uniquely named resource in the system, as long as that resource has one or more children resources.
For each unique result, it would create one group, and put any resource into it that matched that
criteria.
• ResourceParentA
• ResourceChildA1
• ResourceChildA2
• ResourceGrandChildA2a
• ResourceGrandChildA2b
• ResourceChildA3
• ResourceParentB
• ResourceChildB1
• ResourceChildB2
• ResourceChildB3
• ResourceChildB4
The first part of the expression would find all the unique names of the parent resources, in this case:
• ResourceChildA2 (which has 2 direct children, which are the grandchildren of its parent)
Then, it will create one group for each of them, and populate them as necessary to satisfy the
expression. The group members would be as follows:
74
Hints, Tips, and Tricks
With only a few characters we have now automated the creation of three groups (but this would be
more in larger inventories), and the memberships of those groups (which, again, in this case was
small, but would normally be on the order of dozens).
The above is only an introduction to pivoted expressions. JBoss ON also supports compound pivoted
expressions, which look very similar to the compound simple expression discussed at the beginning of
this tutorial. An example of a compound pivoted expression might be:
groupby resource.type.plugin
groupby resource.type.name
groupby resource.parent.name
The "groupby" text is required in the front of each expression that you want to make a pivot. This
compound expression creates a compatible group - since we know that the members of a compatible
group all have the same type, we've pivoted on both the plugin that defined the type as well as the
type name itself to ensure that we will automatically get one group for each unique type currently
known to the system.
And if that wasn't powerful enough we took the pivot concept one step further. Instead of having one
gigantic compatible group of, say, EJB3 Session Beans across your entire enterprise, we are also
pivoting on the parent. We will therefore get one group for each collection of Session Beans that share
the same parent.
As you can see, pivoted expressions give us the ability to create extremely fine-grained, automatically
managed, divisions of our resources. For a small inventory, this is handy tool; for a large inventory,
this is a priceless tool.
And if that weren't enough, we also support the mixing and matching of pivoted and non-pivoted
expressions in the same group definition. Let's use our last example, but filter the results even more
precisely as follows:
This compound, mixed expression would constrain the search a bit. Instead of creating one compatible
group for every single resource type known in the system, it would only create compatible groups for
every unique resource type that is also a server.
75
Chapter 8. Groups
Unfortunately, in JON 2.0.0 there was a restriction that all grouped expressions had to come at the
end of the list. If you try to put the grouped expression at the top of the list, or even in the middle, you
will see odd results. So, feel free to change the ordering as you see fit, within these restrictions. This
was fixed, and released in the 2.0.1 version of the product. Refer to http://jira.rhq-project.org/browse/
RHQ-471 for details on this issue.
8.8.6. Examples
resource.type.plugin = JBossAS
resource.type.name = JBossAS Server groupby
resource.trait[partitionName]
resource.type.plugin = Platforms
resource.type.category = PLATFORM groupby
resource.type.name
76
Examples
Note
Note: this could create very many groups in large inventories
groupby resource.type.plugin
groupby resource.type.name
groupby resource.parent.name
resource.type.plugin= Postgres
resource.type.name = Table
resource.parent.name = rhq Database
resource.name.contains = rhq_meas_data_num_
resource.type.plugin= RHQAgent
resource.type.name = RHQ Agent
resource.resourceConfiguration[rhq.communications.multicast-
detector.enabled] = true
resource.type.plugin= Platforms
resource.type.name = Windows
resource.pluginConfiguration[eventTrackingEnabled] = true
8.8.6.7. All JBossAS servers grouped by the machines they are running
on
groupby resource.parent.trait[Trait.hostname]
resource.type.plugin = JBossAS
resource.type.name = JBossAS Server
77
78
Chapter 9.
Security Model
JON 2.0 simplified the security model, as compared to JON 1.x. In the process, many bugs and design
flaws in the previous release were fixed. Rather than have a confusing (and often times useless) array
of permissions, JON 2.0 now supports the following set of permissions:
• GLOBAL
• Security
• Inventory
• Settings
• RESOURCE
• Modify
• Delete
• Create Child
• Alerts
• Measurements
• Content
• Control
• Configure
Permissions are set on a role. In addition to having permissions, a role also has:
A role, therefore, authorizes its associated users with a fixed set of permissions to operate on its
associated groups of resources.
You will notice the permissions are separated into two types - global and resource.
Global permissions apply across the entire JON system. Resource permissions give authorization to
do things, but only to resources found in groups assigned to the role.
• Global Permissions
• Security
• Allows the user to modify security settings (e.g. create, modify delete and assign roles) and it
allows the user to create, modify and delete other users. This is considered the "superuser" role
because once a user is given the security global permission, that user essentially has or can
have access to the entire system (because, even if the user doesn't currently have any other
permission or role assigned to him, he is free to add himself to any role and assign himself any
79
Chapter 9. Security Model
other permission). Because of this, you must be very restrictive on who is authorized with this
global security permission. Typically, if you give a user this global security permission, you also
give that user all other global permissions.
• Inventory
• Allows the user to perform any task on any resource. Having a role with this permission grants
the user to add, delete, configure, control and modify any resource, regardless of what other
roles and associated groups of resources the user has been given access to. This is also the
permission required in order to be able to import new resources into inventory.
• Settings
• Allows the user to view or modify the JON Server's administration settings.
• Resource Permissions
• Modify
• Allows the user to change information about the resource (its name, for example). This does
not include being able to modify the configuration of the managed resource itself, this is only
to modify the JON resource as it is represented in the JON inventory. (see the Configure
permission below)
• Delete
• Create Child
• Alerts
• Measurements
• Allows the user to modify the way measurements are collected for a resource.
• Content
• Control
• Configure
• Allows the user to view and modify the configuration of the actual managed resource. This
is different from Modify permission in that this permission actually allows you to change the
settings within the actual remote resource being managed (for example, "Modify" permission
would allow me to change the name of my JBossAS Data Source service resource as it
appears in the JON GUI Console; the "Configure" permission allows me to change the actual
JNDI name of my Data Source as it is deployed in the JBoss Application Server).
80
By default, there is a rhqadmin user that is a member of a system superuser role that provides full
access to everything. This role cannot be modified.
There is also an all resources role which provides full access to all resources in inventory. However, it
cannot modify users, roles or JON settings.
These predefined roles are built-in to include all resources, without the need for adding groups.
When creating your own roles, you will need to create your own groups to associate to your roles. It is
important to assign a group to a role in order to see resources. If you create a user and role, but do not
assign a group of resources, you will not be able to see any resources, and in two cases, you will see
an error appear in the Dashboard UI. The first is displayed in the lower left below the Summary Counts
portlet. The second is displayed where the Auto-Discovery portlet should be.
81
82
Chapter 10.
Administration
The Administration section allows you to modify the JON Server configuration. You can access it only
if you are assigned to a role that has the Administer JON Server settings and/or the Manage security
(users/roles) option enabled.
Authentication/Authorization
• Users
• Roles
• The two Monitoring Defaults pages allow you to modify which metrics are monitored by default, you
can modify the available metrics for either the resource types being utilized by your system, or all
resource types.
• The Manage JON license page allows you to view and update your current JON license.
• The Manage Plugins page allows you to view which plugins are currently deployed on your JON
system
• The View All Channels page allows you to create and edit channels that map content sources to
resources in your inventory.
• The List Agents page allows you to view your registered agent definitions, access agent details and
inspect server and affinity group assignments.
• The List Affinity Groups page allows you to view and manage your affinity groups, access affinity
group details, and inspect assignments.
83
Chapter 10. Administration
• The List Partition Events page allows you to view the audit of events affecting agent-server
assignment (partitioning of agents to servers).
From this page, you can view all of your content sources, create new ones, and edit existing ones.
Currently, the only supported Content Source type is "JBossASPatchSource", this source allows you
to apply Cumulative patches to JBossAS Server resources. More information about applying patches
to a JBoss Application Server resource can be found in the Section 7.5, “Applying JBoss Patches”.
Field Description
Name Name of the content source
Description Description of the content source
Sync Schedule Synchronization schedule, defined using the
1
Quartz Cron Synax
Lazy Load yes if all packages should be downloaded only
when they are installed;
The Test Connection button will test the connection settings for this content source. The result of the
test will be displayed at the top of the page, such as:
• "Failed the attempt to connect to the remote repository for [foobar] Check the configuration and
make sure the remote repository is up."
The Synchronize button will synchronize the meta data from the content source with the local
repository. The result of this action will be listed in the Synchronization Results table on this page.
84
View All Channels
After creating a channel via the Create New button, select the channel by clicking on its name.
• Use the ASSOCIATE button to associate a Content Source with this channel. Alternately, you can
associate the content source to this channel from the edit content source page.
• Use the SUBSCRIBE button to subscribe a Resource to this channel. Alternately, you can subscribe
a resource to this channel by browsing to that resource's package tab and select the subscription
sub-tab.
Actions
Set NORMAL
Select Servers in MAINTENANCE mode and click this Button to return them to NORMAL mode. Once
in normal operation mode Agents can once again initiate connections. Agents for whom this is their
primary Server will begin to migrate back incrementally.
Set MAINTENANCE
Select Servers in NORMAL or DOWN Mode and click this Button to set them to MAINTENANCE
Mode. Agents will no longer be able to communicate with the Servers and will attempt to fail over to an
available Server.
Remove
Select Servers in MAINTENANCE or DOWN Mode and click this Button to remove them from the HA
Server Cloud. Changing the size of the Server Cloud forces a repartition of agent-server assignments,
generating new server lists for each Agent. To return a removed Server to the cloud it will need to be
reinstalled.
85
Chapter 10. Administration
Click on the Server Name to go to the Server Detail Page. This page displays the Server definition and
lists the connected Agents, which link to the Agent definitions.
Edit
Click this button to edit the Server definition. Here you can update the Server's endpoint information if
it changes after installation.
Field Description
Name Unique Agent Name.
Connected Server The Server currently connected to by this Agent.
Down Agents may display the Server last
connected to.
Agent Bind Address The address used by the Server to communicate
with the Agent. Should be reachable by all
Servers.
Agent Bind Port Together with the Bind Address used by Servers
to communicate with the Agent.
Last Availability Report The time the last resource availability report was
received by the Server. This is a good indicator
of an active Agent.
Affinity Group The Affinity Group this Server is assigned to, if
any.
Click on the Agent Name to go to the Agent Detail Page. This page displays the Agent definition and
lists the Agent's Server List.
The Server List is ordered with the primary Server listed at the top. The currently connected Server
is listed in the Agent properties. In general the connected Server should be the primary Server, but in
failover situations another Server in the list may be servicing the Agent.
Field Description
Name Unique Affinity Group name.
2
http://support.rhq-project.org/display/RHQ/High+Availability+-+Agent+Failover
3
http://support.rhq-project.org/display/RHQ/High+Availability+-+Agent+Failover
86
List Partition Events
Field Description
Agent Count The number of Agents assigned to this Affinity
Group. This count does not reflect active
connections in any way, only a count of
assignments.
Server Count The number of Servers assigned to this
Affinity Group. This count does not reflect
active connections in any way, only a count of
assignments.
Actions
Create New
This defines a new Affinity Group with the given name. It does not initially have any Agent or Server
membership but will bring up the Affinity Group Detail page, which provides the assignment capability.
Remove Selected
This removes the selected Affinity Groups. Server an Agent Assignments will be lost. Affinity Group
removal forces a repartition of Agent-Server assignments, generating new server lists for each Agent.
Click on the Affinity Group Name to go to the Agent Detail Page. This page displays the Agent and
Server assignments for the Affinity Group. It also allows editing of the Affinity Group name.
Only Agents and Servers not currently assigned to an Affinity Group are eligible for assignment. So,
moving an Agent or Server from one group to another is a two step process of unassignment followed
by assignment.
To Add or Remove Agents or Servers to or from an Affinity Group, respectively, use the Affinity
Group's Detail page. The page is navigable from Section 10.2.3, “List Affinity Groups”, Section 10.2.1,
“List Servers”, and Section 10.2.2, “List Agents”. Once there you have two options:
The Detail Page displays a list of currently assigned Agents. Click on the Edit Group Agents button to
add or remove Agents to or from the group respectively.
The Detail Page displays a list of currently assigned Servers. Click on the Edit Group Servers button to
add or remove Agents to or from the group respectively.
Return to Section 10.2.3, “List Affinity Groups” to see the assignment breakdown.
87
Chapter 10. Administration
timeline it is possible to inspect the changes in the agent-server topology. See High Availability
4
Design for details of values or fields displayed, beyond what is described here.
Field Description
Execution Time The time of the partition event.
Type The partition event type. This indicates what
happened in the system affecting Agent partition.
This can be filtered to focus on specific types of
partition events.
Details Detailed information regarding the partition
event. Varies based on the partition event
type. This can be filtered to focus on specific
information, like an Agent or Server name.
Initiated By The user initiating the action generating
the partition event. "admin" if system
initiated.Together with the Bind Address used by
Servers to communicate with the Agent.
Execution Status See Below for status descriptions. This can be
filtered to focus on specific execution status, like
Completed.
Purge All
Force Repartition
4
http://support.rhq-project.org/display/RHQ/High+Availability+-+Agent+Failover
88
Manage JON license
If for whatever reason the administrator wants to regenerate the Server lists for all Agents outside
of performing a HAAC action that would otherwise do so, then clicking this button will request a full
repartition.
The JON Monitoring Defaults Configuration page allows you to specify the default settings for metrics
that are enabled by default and for alerts that are defined for resources of a given type. This can be
very useful for users with very large environments in order to keep the metrics being collected and the
alerts being fired consistent throughout their network.
The settings include whether or not a metric should be enabled by default and what its default
collection interval is. The configuration is applied to the resource type, and only affects new resources
that get imported or configured. To modify the settings, click on the EDIT METRIC TEMPLATE button
next to the resource type name.
5
http://support.redhat.com/jbossnetwork
89
Chapter 10. Administration
To enable metrics for collection by default and/or modify the collection interval:
1. select the metrics you want by checking the checkbox(es) next to the metric name(s).
2. enter the value you want in the Collection Interval for Selected field, selecting a time unit from the
drop-down list next to the field.
3. click the right arrow button to enable the metrics with the specified collection interval you specified.
1. select the metrics you want to disable by checking the checkbox(es) next to the metric name(s)
2. click the DISABLE COLLECTION button to prevent the metric(s) from being enabled when a new
resource of the specified type is imported, created, or configured.
Important
By default, the template will only be applied to NEW resources that are added to
the inventory after this template is defined. Use the Update schedules for existing
resources of marked type checkbox if this template should be applied to ALL
resources that are currently in inventory as well as resources added in the future.
Go To Administration | Monitoring Defaults, then click the Edit Alert Template button for the
resource type for which you want to create an alert.
The Alert Templates itself is defined just as individual alerts are defined.
90
Alert Templates
Editing an Alert
If you browse your page to a resource that has an alert template defined, you will notice (as shown
below) that alerts defined via a template are listed alongside individually defined alerts, but they are
denoted with a "Vew Template" link.
You can modify the individual instance of an alert template by editing it here, however, if the original
alert template is later modified, the changes to the individual alert definition will be overridden by the
alert template changes.
91
Chapter 10. Administration
10.6. Roles
Global Permissions
Global permissions apply to the entire JON console, not to a particular resource.
• Manage security (users/roles) : allows a user to create, update and delete users and roles
• Manage inventory (resources/groups) : allows a user to import resources into the inventory and
to delete resource from the inventory. Users with this permission can also create, update and delete
groups.
• Administer JON Server settings : allows a user to modify the JON Server console settings.
Resource Permissions
Resource permissions apply to all resources that are in the Groups (Chapter 8, Groups) associated
with this role.
• Create Children : allows a user to create child resources for the given resource.
• Measure : allows a user to modify the measurements that are collected for a resource.
92
List Roles
All the available users are listed on the left, all the users assigned to the role are listed on the right.
To assign a user to a role, simply select the user on the left with a checkbox. Use the arrow in the
center of the page to move it to the right. Then click OK
Similar to the "Add Users to Role" screen, all the available groups are listed on the left. All the groups
assigned to the role are listed on the right.
To assign a group to a role, simply select the group on the left with a checkbox. Use the arrow in the
middle of the page to move it to the right. Then click OK
The List roles page displays all the roles that have been configured for this JON instance. Clicking on
the role name loads the View Role page.
From this page you can view the permissions information for each role, as defined on the New Role
screen.
You can also view the user(s) and group(s) associated with this role. If you have the Manage security
(user/roles) permission, you will be able to modify the role's users and groups by clicking on the Add to
List and Remove from List buttons.
The URL that is used to access the JON GUI Console. This is also the URL used in the alert emails
that are sent to users (the URLs in alert emails will allow users to click the link directly from their email
client and get to the information on the alert). The GUI Console URL does not need to be changed
unless your JBoss ON installation connects through a proxy server.
The following outlines the main steps JBoss ON uses to archive its metric data:
• Raw metrics get aggregated over a one-hour window producing minimum, average and maximum
values.
93
Chapter 10. Administration
• Those one hour values get aggregated across a six hour window.
• Raw metric data which has been aggregated and is older than 7 days
• One hour data which has been aggregated and is older than 14 days
• Six hour data which has been aggregated and is older than 31 days
94
LDAP Configuration Properties
If LDAP authentication is enabled, it must be configured using the remaining settings, which are
described below.
(JONUser=TRUE)
or
(|(memberOf=CN=JBoss
Administrators,OU=Server Service
Accounts,OU=Servers,OU=Information
Systems,
DC=xyz,DC=com)
(memberOf=CN=Development
Department,OU=Development,OU=Information
Systems,DC=xyz,DC=com))
Login Property the LDAP attribute that contains the value that
should be used by JON as the user name (e.g.
"cn" or "uid"); if multiple matches are found, the
first entry found is used (required)
95
Chapter 10. Administration
Your settings can be verified by logging out of JBoss ON using the Logout link at the top of the page.
Log in using a user from the configured LDAP directory (i.e. the username should equal the value of
the Login Property attribute in a directory entry within the subtree rooted at the Search Base entry).
Upon successful authentication, JBoss ON will ask for additional information about that user (full
name, email address, etc.); this information will be persisted to the JBoss ON database.
Important
As with all new users in JBoss ON, LDAP users are not assigned to any roles by default
and therefore they will not be able to see any resources in the ON GUI until they have
been added to one or more roles. A JBoss ON administrator will need to add a new LDAP
user to one or more JON roles after the user has logged in for the first time.
If SNMP is enabled, it must be configured using the remaining settings. The settings vary depending
on which version of SNMP has been selected.
10.8. Users
General Properties
Define all the required fields to define a user. Once completed click the OK and Assign User to
Roles button.
• Email: the email address of this user, used to send email alert notifications. (required)
• Password: a 6-letter case-sensitive password for this user, used to login to the console. (required)
• Username: the username for this user, used to login to the console. (required)
• Phone: a phone number for this user, informational only - this data is not used by JON.
• Department: the department for this user, informational only - this data is not used by JON.
• Enable Login: there are two options to this yes (if the user should be able to login to the console)
and no (if not authorised).
All the available roles are listed on the left while all the roles assigned to the user are listed on the
right.
96
List Users
To assign a role to a user, simply select the role on the left with a checkbox. Use the arrow in the
centre of the page to move it to the right. Then click OK
The List users page displays all the users that have been configured for this JON instance. Clicking on
the username loads the View User page.
From this page you can view the basic information for each user, as defined on the New User screen.
You can also view the role(s) assigned to this user. If you have the Manage security (user/roles)
permission, you will be able to modify the user's roles via the Add to List and Remove from List
buttons.
97
98
Chapter 11.
Events
Events are a sort of measurement data, that unlike Metrics (see Chapter 4, Monitoring) are not
collected at fixed intervals, but that occur at random points in time. JBossON is able to pick up those
events, filter them by severity, display them in the user interface and have Chapter 5, Alerts sent
based on some event conditions.
11.1. Concepts
An EventSource is attached to a particular resource and defines the origin of incoming events. Typical
EventSource support is for logfiles but it is anticipated that sources such as incoming SNMP traps or
JMX notifications will be utilized as future EventSources.
As an EventSource is attached to a resource it is defined via that resource's Inventory page, under
Connection Properties - Events. The generated events are viewed via that resource's Monitor -
Events page.
An Event is triggered each time the conditions of an EventSource are met and reports the values
matching the criteria. For example, when a log entry matches defined severity and regex constraints
for an EventSource defined for a particular logfile.
Each Event has a Severity associated with it. Severities can be in the range of Debug, Info, Warn,
Error, Fatal and are oriented along the severities of the log4j framework.
Important
Resources, when auto-detected, may predefine an EventSource for a standard log file
found in a default location. For example, for a JBossAS Server resource an EventSource
will be predefined for the server.log. Although defined it will be disabled initially and must
be explicitly enabled. Note that the RHQ JBossAS Server resource will not predefine this
EventSource because the log file is not in the standard JBossAS location.
To enable a predefined EventSource select it from the Log Event Sources list. Or, to add a new log
EventSource:
99
Chapter 11. Events
On clicking the Add new button, a new page will be displayed, where you can specify the properties of
the log file EventSource:
• Log File Path: An absolute path to the logfile. The logfile does not need to exist at any given time,
but the path must be well formed.
• Enabled: When enabled event generation is active for the logfile and will affect log entries generated
from the activation time forward. When disabled no events will be reported.
• Date Format: Specify an uncommon date format here. For typical log4j based logfiles this is left
unset.
• Includes Pattern: A Pattern used to limit log entries that trigger events. When a pattern is specified
only log entries with a substring matching the pattern will trigger an event. The pattern can span
multiple lines in a logfile, for example, in the case of a stack trace. If left unset only Minimum
Severity will constrain event generation. For more information, please refer to the Section 11.2.1,
“Notes and Examples”.
100
Notes and Examples
• Minimum Severity: Specifies the minimum log entry severity necessary to trigger an event. This
allows for severity-based events. It is recommended to set this as high as possible to avoid
excessive event generation.
You can then choose to define another EventSource, edit or delete existing ones or to finish
configuring the EventSources by clicking OK again.
Below are a few examples to help you get familiar with these options:
101
Chapter 11. Events
• at the bottom of the Visibility tab (the default tab when you enter the monitoring pages)
• the Timeline tab, that shows Events in conjucntion with other things that happened on that particular
resource.
The color of a square indicates the most severe event that got recorded in that time. So if you have an
Event at debug level and one at warn level, the square will show yellow for the warning.
• Debug: blue
• Info: green
• Warn: yellow
102
Events tab
Clicking on a colored square will show a box with details of corresponding events:
In this case it is only one event. You can dismiss this box by clicking its close button in the top right
corner. You can investigate further by clicking the event id at the start of the event line, bringing you to
the Events tab.
In this example we have three events in the time range. The details are only partially visible. Along
with the Event Id, you see its severity, the EventSource, the time the event occurred and if any user
103
Chapter 11. Events
has acknowledged the event (event 11 shows an acknowledgement). Note that Time occurred is the
time stamp of the log entry, not the time the event was generated. Ordering by Time occurred will
present events in logging order, ordering by Id is a better representation of the order in which events
were stored by the system.
Clicking on Detail of an event in the list will populate the Event Detail view with its information.
To acknowledge an Event click on Ack!. The column should immediately change to show that the
Event got acknowledged.
Clicking on an Event detail (here the event with id 11) shows its full details:
The timeline view presents a timeline at the bottom. Within the view resource events are shown.
The resource events are shown amid other resource happenings, such as Chapter 6, Operations
executions.
104
Defining Alerts on Events
You can click and drag to scroll around in the timeline changing the visible time range. The vertical
purple bar always shows the time when the Timeline tab was invoked.
Clicking on an item in the timeline will display detailed information for the selected item on a new
window:
Alert conditions for events can be defined on Severity and/or an optional expression on the event
detail:
105
Chapter 11. Events
Note that the Severity setting is an exact match, not a Minimum Severity as specified in the
EventSource.
106
Appendix A. Revision History
Revision 1.0 Wed Jan 21 2009 Sarah Meehan [email protected]
First Conversion from wiki to docbook
107
108
Index
F
feedback
contact information for this manual, x
109
110