3.5. Monitoring

This section provides documentation on Recording Service remote monitoring.

Note

Recording Service monitoring is based on the Monitoring Distribution Platform described in Section 10.4. We recommend that you read Section 10.4 before using Recording Service monitoring.

3.5.1. Overview

3.5.1.1. Enabling Service Monitoring

By default, monitoring is disabled in Recording Service. To enable monitoring you can use the <monitoring> tag (see Section 3.3.3) or the -remoteMonitoringDomainId command-line parameter, which enables remote monitoring and sets the domain ID for data publication (see Section 3.1.3).

3.5.1.2. Monitoring Types

The available Keyed Resource classes and their types that can be present in the distribution monitoring topics are listed in Table 3.20. The complete type relationship is shown in Figure 3.3.

Table 3.20 Recording Service Keyed Resources

Keyed Resource Class

Config

Event

Periodic

Service

ServiceConfig

ServiceEvent

ServicePeriodic

Session

SessionConfig

SessionEvent

SessionPeriodic

TopicGroup

TopicGroupConfig

TopicGroupEvent

TopicGroupPeriodic

Topic

TopicConfig

TopicEvent

TopicPeriodic

../_images/RecorderMonitoringTypes.svg

Figure 3.3 Keyed Resource Types for Recording Service monitoring

All the type definitions for Recording Service monitoring information are in [NDDSHOME]/resource/idl/ServiceCommon.idl and [NDDSHOME]/resource/idl/RecordingServiceMonitoring.idl.

Recording Service creates a DataWriter for each distribution Topic. All DataWriters are created from a single Publisher, which is created from a dedicated DomainParticipant. See Section 3.3.3 for details on configuring the QoS for these entities.

3.5.2. Monitoring Metrics Reference

This section provides a reference to all the monitoring metrics Recording Service distributes, organized by service resource class.

3.5.2.1. Service

Listing 3.1 Recording Service Types
            @mutable @nested
            struct SqliteDatabaseConfig {
                Service::FilePath db_directory;
                @optional Service::FilePath execution_directory_expression;
                @optional Service::FilePath user_data_file_expression;
            };           
            @mutable @nested
            struct SqliteDatabaseEvent {
                @optional Service::FilePath current_db_directory;
                @optional Service::FilePath current_file;
                @optional int32 rollover_count;
            };
            @mutable @nested
            struct SqliteDatabasePeriodic {
                @optional Service::FilePath current_file;
                @optional uint64 current_file_size;
                // These fields are no longer supported and carry no information.
                // Kept only to support older version.
                @deprecated int32 current_timestamp_sec;
                @deprecated uint32 current_timestamp_nanosec;
            };

            @mutable @nested
            struct ParticipantInfo {
                Service::BoundedString name;
            };

            @mutable @nested
            struct ServiceConfig : Service::Monitoring::EntityConfig {
                Service::BoundedString application_name;
                Service::Monitoring::ResourceGuid application_guid;
                @optional Service::Monitoring::HostConfig host;
                @optional Service::Monitoring::ProcessConfig process;
                @optional SqliteDatabaseConfig builtin_sqlite;
                @optional sequence<ParticipantInfo> participants;
            };
            @mutable @nested
            struct ServiceEvent : Service::Monitoring::EntityEvent {
                //to avoid unused variable warnings
                @optional SqliteDatabaseEvent builtin_sqlite;
            };
            @mutable @nested
            struct ServicePeriodic {
                @optional Service::Monitoring::HostPeriodic host;
                @optional Service::Monitoring::ProcessPeriodic process;
                int64 current_timestamp_nanos;
                @optional SqliteDatabasePeriodic builtin_sqlite;
            };

Table 3.21 ServiceConfig

Field Name

Description

Inherited fields from EntityConfig

See Table 10.14.

application_name

Name of the Recording Service instance. The application name is provided through:

  • appName command-line option when run as executable.

  • ServiceProperty::application_name field when run as a library.

application_guid

GUID of the Recording Service instance. Unique across all service instances.

host

See Table 10.10.

process

See Table 10.12.

builtin_sqlite

See Table 3.22

participants

Sequence of ParticipantInfo objects, one for each DomainParticipant inside the Recording Service. See Table 3.23.

Table 3.22 SqliteDatabaseConfig

Field Name

Description

db_directory

Path to the base directory where the database files will live. This is the prefix directory, and still the execution directory expression below will be appended to it to determine the final directory.

execution_directory_expression

The expression used to generate the directory where the database files live.
Note: this value is not set when running Replay Service. See Section 3.3.6.1.1

user_data_file_expression

The expression used to generate the names of the database files.
Note: this value is not set when running Replay Service.
See Section 3.3.6.1.1

Table 3.23 ParticipantInfo

Field Name

Description

name

Name of the DomainParticipant instance, as specified in the name attribute of the corresponding configuration tag.


Table 3.24 ServiceEvent

Field Name

Description

Inherited fields from EntityEvent

See Table 10.15.

builtin_sqlite

See Table 3.25

Table 3.25 SqliteDatabaseEvent

Field Name

Description

current_db_directory

Path to the current directory where files are being stored to. This is the actual final directory once the base directory and any execution directory expressions have been applied.

current_file

Path to the current file where data is being stored to.
Note: this value is not set when running Replay Service.

rollover_count

The total number of file rollover events that have happened to this moment.
Note: this value is not set when running Replay Service.


Table 3.26 ServicePeriodic

Field Name

Description

host

See Table 10.11.

process

See Table 10.13.

current_timestamp_nanos

Time in nanoseconds Recording Service has been running.

builtin_sqlite

See Table 3.27

Table 3.27 SqliteDatabasePeriodic

Field Name

Description

current_file_size

The size in bytes of the current file where data is being stored.
Note: this value is not set when running Replay Service.

3.5.2.2. Session

Listing 3.2 Session Types
            @mutable @nested
            struct SessionConfig : Service::Monitoring::EntityConfig {
                Service::BoundedString default_participant_name;
            };
            @mutable @nested
            struct SessionEvent : Service::Monitoring::EntityEvent {
                //to avoid unused variable warnings
                int32 _dummy;
            };
            @mutable @nested
            struct SessionPeriodic {
                @optional Service::Monitoring::NetworkPerformance network_performance;
                @optional @optional Service::Monitoring::ThreadPoolPeriodic thread_pool;
            };

Table 3.28 SessionConfig

Field Name

Description

Inherited fields from EntityConfig

See Table 10.14.

default_participant_name

The name of the default participant configuration.


Table 3.29 SessionEvent

Field Name

Description

Inherited fields from EntityEvent

See Table 10.15.


Table 3.30 SessionPeriodic

Field Name

Description

network_performance

Provides network performance metric as an aggregation of the same metric across the contained Topics and TopicGroups.
See Section 10.4.4.5.

3.5.2.3. TopicGroup

Listing 3.3 TopicGroup Types
            @mutable @nested
            struct TopicGroupConfig : Service::Monitoring::EntityConfig {
                Service::BoundedString participant_name;
            };
            @mutable @nested
            struct TopicGroupEvent : Service::Monitoring::EntityEvent {
                //to avoid unused variable warnings
                int32 _dummy;
            };
            @mutable @nested
            struct TopicGroupPeriodic {
                @optional Service::Monitoring::NetworkPerformance network_performance;
                int64 topic_count;
            };

Table 3.31 TopicGroupConfig

Field Name

Description

Inherited fields from EntityConfig

See Table 10.14.

participant_name

Name of the DomainParticipant from which the Topic is created.


Table 3.32 TopicGroupEvent

Field Name

Description

Inherited fields from EntityEvent

See Table 10.15.


Table 3.33 TopicGroupPeriodic

Field Name

Description

network_performance

Provides network performance metric as an aggregation of the same metric across the contained Topics.
See Section 10.4.4.5.

topic_count

Current number of Topics created from this TopicGroup.

3.5.2.4. Topic

Listing 3.4 Topic Types
            @mutable @nested
            struct TopicConfig : Service::Monitoring::EntityConfig {
                Service::BoundedString topic_name;
                Service::BoundedString registered_type_name;
                Service::BoundedString participant_name;
                Service::Monitoring::ResourceGuid topic_group;
            };
            @mutable @nested
            struct TopicEvent : Service::Monitoring::EntityEvent {
                //to avoid unused variable warnings
                int32 _dummy;
            };
            @mutable @nested
            struct TopicPeriodic {
                @optional Service::Monitoring::NetworkPerformance network_performance;
                @optional Service::Monitoring::CountStatus matched_status;
            };

Table 3.34 TopicConfig

Field Name

Description

Inherited fields from EntityConfig

See Table 10.14.

topic_name

Topic name as specified in the configuration.

registered_type_name

Topic registered type name as specified in the configuration.

paritcipant_name

Name of the DomainParticipant from which the Topic is created.

topic_group

GUID of the TopicGroup from which this Topic was created. This field is set to zero for standalone Topics.


Table 3.35 TopicEvent

Field Name

Description

Inherited fields from EntityEvent

See Table 10.15.


Table 3.36 TopicPeriodic

Field Name

Description

network_performance

Provides network performance metric as an aggregation of the same metric across the contained Topics.
See Section 10.4.4.5.

matched_status

Provides information about the matched endpoints associated with this Topic.