Geneos


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

DataViews

What are DataViews?

The DataView is the fundamental unit of data in the Gateway2 data model.

It is a table of changing cells, each having various items of metadata such as severity or snoozed status.

In addition, there may be headline cells that do not belong to a particular row in the table.

../../ImportedGeneosImages/datamodel_2.png

There are a number of events that can occur on a DataView. See DataViewChange.Type for the full list, including the subtypes of DataViewChangeData for each event.

If you are only interested in individual cells in a particular view, consider using a DataSetQuery instead for efficiency.

DataView Example

The code is included with the Open Access client.

This example shows an individual dataview along with any updates to the view:

The output will look something like this:

Change POPULATED
{
	col : 0
	data : 
		{
			id : /geneos/gateway[(@name="MyGateway")]/directory/probe[(@name="MyProbe")]/managedEntity[(@name="MyEntity")]/sampler[(@name="cpu")][(@type="")]/dataview[(@name="cpu")]
			sampleInterval : 1
			severity : UNDEFINED
		}
		[samplingStatus: OK]  [numOnlineCpus: 1]  [loadAverage1Min: 0.00]  [loadAverage5Min: 0.01]  [loadAverage15Min: 0.05]  [numPhysicalCpus: 1]
		
		+-------------+-----------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
		| cpu         | type                  | state              | clockSpeed         | percentUtilisation | percentUserTime    | percentKernelTime  | percentWaitTime    | percentIdle        |
		+-------------+-----------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
		| Average_cpu |                       |                    |                    | 1.00 %             | 0.00 %             | 1.00 %             | 0.00 %             | 99.00 %            |
		+-------------+-----------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
		| cpu_0       | GenuineIntel Intel(R) | on-line            | 2914.06 Mhz        | 1.00 %             | 0.00 %             | 1.00 %             | 0.00 %             | 99.00 %            |
		+-------------+-----------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
		
	sampleInterval : 1
	row : 0
}
Change CELL_UPDATE
{
	col : 4
	data : 
		{
			id : /geneos/gateway[(@name="MyGateway")]/directory/probe[(@name="MyProbe")]/managedEntity[(@name="MyEntity")]/sampler[(@name="cpu")][(@type="")]/dataview[(@name="cpu")]/rows/row[(@name="Average_cpu")]/cell[(@column="percentUserTime")]
			value : 1.00 %
			severity : UNDEFINED
		}
	row : 0
}
...

DataView properties

DataView, DataViewCell and DataViewHeadline 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
AllidString
 severityEnum(CRITICAL, WARNING, OK, UNDEFINED)
 snoozedBoolean
 inactiveBoolean
 userAssignedBoolean
 knowledgeBaseBoolean
DataViewsampleIntervalInteger
 sampleInfoString
CellvalueString
 databaseLoggingStateEnum(Success, Failure)