7.2. Resources
Monitoring Library 2.0 collects telemetry data associated with observable resources. In this release, the observable resources are:
Application (one-to-one mapping to an OS process)
DomainParticipant
Topic
Publisher
Subscriber
DataWriter
DataReader
Each observable resource is identified by a GUID and a resource name. The
GUID is automatically assigned by Monitoring Library 2.0, and it is
globally unique across all the resources in the system (past and present).
The resource GUID can be accessed using the guid
label associated with
each metric. The fully qualified resource name for each observable resource is
represented by a Uniform Resource Identifier (URI). The URI
strings follow REST best practices for naming. Table 7.1
details of each available resource. See Metrics for
detailed information about the metrics available for each observable resource
in this release.
Resource |
Uniform Resource Identifier (URI) |
Dashboard Resource Name |
How to Configure |
---|---|---|---|
Application |
|
|
To set <AppName>, configure the
|
DomainParticipant |
|
|
To set <ParticipantName>, configure the
|
Topic |
|
|
<TopicName> is the name of the DDS Topic. This resource cannot be configured in the Monitoring QoS. |
Publisher |
|
Dashboards do not show information about Publishers |
To set <PublisherName>, configure the
|
Subscriber |
|
Dashboards do not show information about Subscribers |
To set <SubscriberName>, configure the
|
DataWriter |
|
|
To set <DataWriterName>, configure the
|
DataReader |
|
|
To set <DataReaderName>, configure the
|
The Dashboard Resource Name column describes how resource names appear in RTI Connext Observability Dashboards. To generate shorter names, Observability Dashboards does not show the resource class name (e.g, domain_participants).
Important
Observability Framework does not enforce unique resource names. You are responsible for assigning unique names. When two observable resources have the same name, the commands targeting the resource name are applied to both resources. For example, if two applications have the same name and you change the logging verbosity from Observability Dashboards, the change will apply to both applications. Otherwise, not having unique names should not affect functionality because each resource has a unique GUID.
7.2.1. Resource Pattern Definitions
There are two ways to configure telemetry data collection and forwarding. These are the initial configuration of the Monitoring Library 2.0 (see Monitoring Library 2.0) and use of the REST API to dynamically configure the collection of telemetry data (see Collector Service REST API Reference) for distribution. In both cases, the Uniform Resource Identifiers (URIs) shown in Table 7.1 are used to identify the observable resources being configured by the XML or REST API. Resource selectors are used in the XML file configuration and in REST API commands to provide a pattern string to match one or more URIs.
A resource selector is an expression made up of components, with each component separated by a forward slash (/). A component is a pattern string that follows the POSIX® fnmatch syntax, or a resource GUID. In addition, you can use XPath-style matching (//) to change the path level by 0 or more components until finding a component matching the pattern following (//).
When specifying resource selectors, POSIX fnmatch pattern matching can be used. The available POSIX® fnmatch special characters are described in Table 7.2.
Character |
Meaning |
---|---|
|
A |
|
A |
|
A |
|
Matches any one of the characters in charlist. |
|
Matches any character from [s]tart to [e]nd, inclusive. |
|
Escape character for special characters. |
Note: To use special characters in a resource selector string, you must escape them using a back slash (\). For example, the resource selector “myWriter[2]” will match a DataWriter with name “myWriter2” because of the POSIX® fnmatch processing. If the intent is to use the ‘[’ and ‘]’ characters in the resource selector to actually match a name, the ‘[’ and ‘]’ characters must be escaped as shown here “myWriter\[2\]”. This resource selector would match a DataWriter with the name “myWriter[2]”. Some example resource selectors using POSIX® fnmatch are shown below.
Resource Selector |
Description |
---|---|
/applications/SensorPublisher_1 |
refers to an application named “SensorPublisher_1” |
/applications/SensorPublisher_? |
refers to applications named “SensorPublisher_” with a single additional character (i.e. “SensorPublisher_1”, “SensorPublisher_2”, “SensorPublisher_a”) |
/app*/SensorPublisher_* |
refers to applications named “SensorPublisher_” with any number of additional characters, including none (i.e. “SensorPublisher_”, “SensorPublisher_1”, “SensorPublisher_10”, “SensorPublisher_xyz”) |
/applications/SensorPublisher_1/domain_participants/*/publishers/*/data_writers/Sensor with ID = [12] |
refers to data_writers of application “SensorPublisher_1” named “Sensor with ID = 1” or “Sensor with ID = 2” |
/applications/SensorPublisher_1/domain_participants/*/publishers/*/data_writers/Sensor with ID = [1-3] |
refers to data_writers of application “SensorPublisher_1” named “Sensor with ID = 1”, “Sensor with ID = 2”, or “Sensor with ID = 3” |
In addition to POSIX® fnmatch pattern matching, resource selectors also support the XPath (//). The (//) is essentially a relative path indicator that looks for the first occurrence of the text following the (//) in the resource selector. Think of the (//) as a global (*) to match any pattern before the specified text. Use of the XPath (//) can significantly shorten resource selectors. Some example resource selectors using XPath (//) and POSIX® fnmatch are shown below.
Resource Selector |
Description |
---|---|
/applications/SensorPublisher_1//data_writers/Sensor with ID = [12] |
refers to data_writers of application “SensorPublisher_1” named “Sensor with ID = 1” or “Sensor with ID = 2” |
//data_writers/Sensor with ID = [1-3] |
refers to any data_writers named “Sensor with ID = 1”, “Sensor with ID = 2”, or “Sensor with ID = 3” |
//TemperatureDataReader |
refers to any DDS entities with the name “TemperatureDataReader” |
As mentioned earlier, each DDS entity is assigned a unique identifier or GUID. When
creating resource selectors, an entity GUID and entity name are interchangeable. When
using a GUID in a resource selector, the format is GUID(<guid>)
. Some example
resource selectors are shown below.
Resource Selector |
Description |
---|---|
/applications/GUID(aaaaaaaa.bbbbbbbb.cccccccc.dddddddd)//data_writers/Sensor with ID = [12] |
refers to data_writers of application with GUID=aaaaaaaa.bbbbbbbb.cccccccc.dddddddd named “Sensor with ID = 1” or “Sensor with ID = 2” |
//data_writers/GUID(bbbbbbbb.aaaaaaaa.cccccccc.dddddddd) |
refers to the data_writer with GUID=bbbbbbbb.aaaaaaaa.cccccccc.dddddddd |
//GUID(dddddddd.cccccccc.bbbbbbbb.aaaaaaaa) |
refers to the DDS resource with GUID=dddddddd.cccccccc.bbbbbbbb.aaaaaaaa regardless of the class |
Note that the POSIX® fnmatch syntax may not be applied to the GUID(<guid>)
format.