Geneos


The end of life (EOL) date for this module is on 31 January, 2020.

DataSets

What are DataSets?

The DataSet is the first port of call to access data from Gateway2 instances. DataSetQuery.create takes an XPath string and each DataSetItem matching the query is returned.

For those familiar with Gateway2 and the ActiveConsole, a DataSet is analogous to a ListView in functionality.

The events that can occur on a DataSet are ADD, UPDATE and REMOVE.

Depending on the XPath provided, the items will be of various different types from a gateway to a cell. Each type is presented below, along with screenshots from the ActiveConsole for reference.

Gateway2 Data Model

../../ImportedGeneosImages/datamodel_2.png

We start with a DataView. This consists of a main table of data and any headline data: key/value pairs that are not included in the main table.

These views are then stored under a tree made up of several hierarchical functional groupings:

../../ImportedGeneosImages/datamodel_1.png

The first of these are Samplers, which hold a number of views. These samplers have a name and potentially a type associated with them.

Several Samplers are grouped together under a ManagedEntity, designed to group together samplers that provide various facets of related monitoring. For example, a sampler that monitored the CPU usage of a Tomcat server and another that monitored the memory usage could be grouped together under an entity named Tomcat.

Several ManagedEntities are grouped under a Probe. This is an actual process running on a remote machine that is gathering together metrics and then publishing them back. In practice, most drill-down explorations start at the ManagedEntity level.

Finally, many Probes are managed by a single Gateway, which aggregates all the data together and makes it available to upstream components such as the Open Access cluster. A typical Geneos installation will have many Gateways.

Every item of data, whether it be a higher level grouping such as a Probe, a DataView or items within the view such as headlines or cells, has an ID associated with it. This is expressed as an XPath, where the steps in the path express the hierarchy of data and the predicates the name of the item and its parents:

/geneos/gateway[(@name="DevMaintenance Gateway")]/directory/probe[(@name="pebl")]/managedEntity[(@name="PEBL Bug-FC-NM-Open")]/sampler[(@name="PEBL Search - Format Rows")][(@type="PEBL Search")]/dataview[(@name="Issues")]/headlines/cell[(@name="rowCount")]

The above path matches a rowCount cell in a DataView named Issues. This view is published by the PEBLSearch-FormatRows sampler under the PEBLBug-FC-NM-Open entity under the peblProbe. Finally, the Gateway that is publishing this data is the DevMaintenanceGateway.

This is a lot to remember! Luckily, the API provides helpers such as the XPathBuilder to make dealing with paths easier.

DataSet Example

The code is included with the Open Access client

This example prints the Managed Entities across all gateways and any updates to those entities:

The output should look something like the following:

Change ADD
2 Items
{
	attribute.COUNTRY : UK
	attribute.CITY : LONDON
	name : MyEntityA
	path : /geneos/gateway[(@name="MyGateway")]/directory/probe[(@name="MyProbe")]/managedEntity[(@name="MyEntityA")]
	severity : UNDEFINED
	type : ENTITY
}
{
	attribute.COUNTRY : US
	attribute.CITY : NY
	name : MyEntityB
	path : /geneos/gateway[(@name="MyGateway")]/directory/probe[(@name="MyProbe")]/managedEntity[(@name="MyEntityB")]
	severity : UNDEFINED
	type : ENTITY
}

DataSet properties

DataSetItem has a method Map<String,String> getProperties(). This returns type specific properties outlined below.

Note: The properties are only published to the client if they have a value. All values are sent as Strings, so conversion is required. Boolean values that are not present are implicitly false.

Data TypePropertyProperty Type
AllnameString
 severityEnum(CRITICAL, WARNING, OK, UNDEFINED)
 snoozedBoolean
 inactiveBoolean
 knowledgeBaseBoolean
 userAssignedBoolean
 snoozedDescendantBoolean
GatewayhostNameString
 portInteger
 secondaryHostNameString
 secondaryPortInteger
 connectionStateEnum(Connected, Disonnected, Error, Disabled)
 hotStandbyRoleEnum(StandAlone, Primary, Secondary, Unknown)
 hotStandbyStateEnum(Active, Inactive, Pending, Standby, InactiveLicensePending, InactiveLicenseDenied, Error)
 databaseNameString
 databaseHostNameString
 databasePortPort
 databaseUserNameString
 databaseTypeEnum(MySQL, Sybase, Oracle, SQLServer)
 databaseConnectionStateEnum(Connected, Disonnected)
 databaseEnabledBoolean
 databasePasswordString
ProbehostNameString
 portInteger
 versionString
 connectionStateEnum(Up, Down, Rejected, Unreachable, Unknown, Removed, Unannounced, Suspended, WaitingForProbe)
 osTypeEnum(Windows, Solaris, Linux, HPUX, AIX, SolarisX86)
SamplergroupString
 pluginNameString
Entityattribute.<KEY>String
 connectionStateEnum(Up, Down, Rejected, Unreachable, Unknown, Removed, Unannounced, Suspended, WaitingForProbe)
DataviewgroupString
Headline/CellvalueString
 databaseLoggingEnum(Success, Failure)

DataViews in DataSets

The API provides a separate DataViewQuery to access the whole contents of a view rather than individual items using DataSetQuery.

If you know the individual metrics you are interested in, consider using a DataSetQuery for efficiency. If you need to work with all the metrics in individual or multiple views, use DataViewQuery.