JBoss Community Archive (Read Only)

RHQ 4.5

Inventory

One of the main advantages of integrating with RHQ is the ability to leverage the shared inventory model across all managed products. All plugins deployed in your RHQ system store their auto and manually discovered resources in the RHQ shared inventory subsystem. Almost all the other subsystems in RHQ (Configuration, Operations, Alerts, etc) are related to or use the Inventory subsystem in some manner. The Inventory subsystem, is therefore, a critical component to RHQ.

Resource

RHQ's Inventory domain model maintains information about all your resources that are currently managed by your agents. A Resource is an abstract concept that simply refers to a "thing" being managed, such as a JBossAS server, an Apache Web Server, a Tomcat Webapp application, a servlet, a Python script, etc. Resources are categorized by ResourceCategory, which can be one of the following:

  • Platform

    • Represents a computer or an operating system

    • e.g. Linux, Windows, AIX, etc...

  • Server

    • Represents an application or a running process, typically running on a platform.

    • e.g. JBossAS 4.2 Application Server, Tomcat Web Container, Apache Web Server, etc...

  • Service

    • Represents a component that typically runs in a server

    • e.g. Tomcat Web application, EJB, Servlet, .sh script, etc...

Resource Types

Indicating if a resource is a platform, server and service is a very generic form of categorization, but doesn't tell you what type of resource it is. This is where ResourceType comes in. As with the Resource domain object, ResourceType is an abstract concept that tells you what kind of resource it represents. Plugins define concrete types within their plugin descriptor; for example, a PostgreSQL plugin could define resource types of "Database", "Table", "User", etc. A JBossAS plugin could define "JBossAS Server", "EJB Stateless Bean", "DataSource", etc. Note that the plugin descriptor, as part of the resource type definition, implicitly defines the type's category. For example, the JBossAS plugin would categorize its "JBossAS Server" type as a "server", but its "EJB Stateless Bean" and "DataSource" types would each be categorized as a "service".

Hierarchical Relationships

The RHQ inventory model not only contains the types, categories and the resources themselves, but it also manages the relationships with one another. Resource types can have parent and child types; the same holds true for resources themselves. Typically the "platform" resources have no parents - they are at the top of the hierarchy. "server" resources are typically children of "platform" resources (as an example, a Linux platform resource can have a child JBossAS Server resource). "service" resources are typically children of "server" resources.

Plugin descriptors define this hierarchy by implicitly embedding <platform>, <server> and <service> tags within each other. The XML hierarchy within the plugin descriptor therefore defines the resource type hierarchy. When a plugin discovers resources, the plugin container will place those new resources in their proper place within the hierarchy of existing resources.

Plugin Descriptors

Take a look at the existing plugin descriptors for examples of how the inventory model is defined for different plugins. Specifically, look at the <platform>, <server> and <service> tags:

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-12 12:36:16 UTC, last content change 2008-02-19 16:22:15 UTC.