#if !defined(monitoring_logging_included) #define monitoring_logging_included #include "monitoring_resource.idl" @autoid @default_nested(TRUE) @observable_name("") module monitoring { @final struct Time_t { // DDS 1.5, https://issues.omg.org/browse/DDS15-13 int64 sec; uint32 nanosec; }; @appendable enum LoggingLevel { // DDS-Security 1.5 @value(0) EMERGENCY_LEVEL, // System is unusable. Should not continue use. @value(1) ALERT_LEVEL, // Should be corrected immediately @value(2) CRITICAL_LEVEL, // A failure in primary application. @value(3) ERROR_LEVEL, // General error conditions @value(4) WARNING_LEVEL, // May indicate future error if action not taken. @value(5) NOTICE_LEVEL, // Unusual, but nor erroneous event or condition. @value(6) INFORMATIONAL_LEVEL, // Normal operational. Requires no action. @value(7) DEBUG_LEVEL }; const uint8 SYSLOG_FACILITY_USER = 1; const uint8 SYSLOG_FACILITY_SECURITY_EVENT = 10; const uint8 SYSLOG_FACILITY_SERVICE = 22; const uint8 SYSLOG_FACILITY_MIDDLEWARE = 23; @appendable @nested struct LoggingFacilityLevel { LoggingLevel verbosity; uint8 facility; }; typedef sequence< LoggingFacilityLevel > LoggingFacilityLevelSequence; @appendable @nested @observable_group(distribution=ON_CHANGE) struct LoggingConfig { sequence logging; }; @final @nested struct NameValuePair { // DDS-Security 1.5 string name; string value; }; typedef sequence< NameValuePair > NameValuePairSequence; @final @nested struct StructuredDataEntry { string entry_key; sequence< NameValuePair > entry_value; }; @appendable @nested struct LoggingMessage { // DDS-Security 1.5 uint8 facility; // Set to 0x10. Indicates sec/auth msgs LoggingLevel severity; Time_t timestamp; // Since epoch 1970-01-01 00:00:00 +0000 (UTC) @optional string hostname; // IP host name of originator @optional string hostip; // IP address of originator @optional string appname; // Identify the device or application @optional string procid; // Process name/ID for syslog system string msgid; // Identify the type of message string message; // Free-form message // Note that certain string keys (SD-IDs) are reserved by IANA // map structured_data; sequence structured_data; uint64 sn; // Sequence number to uniquely identify msgs per facility }; @appendable @nested struct LoggingEventInfo { ResourceGUID root_resource_guid; // Why the root? uint64 epoch; boolean is_snapshot; }; @external typedef LoggingMessage LogReference; @topic("DDSMonitoringLoggingTopic") @appendable @nested(false) struct Logging { LoggingEventInfo info; @optional sequence update; @optional sequence snapshot; }; }; // End of module monitoring #endif /* monitoring_logging_included */