diff --git a/protofiles/BaseConfMsg.proto b/protofiles/BaseConfMsg.proto index 73c7b51abe50c..1a55fe04e958b 100644 --- a/protofiles/BaseConfMsg.proto +++ b/protofiles/BaseConfMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "BaseConfMsg"; -import "GoProtoDefaults.proto"; + + message BaseConf { optional string dpiThreads = 7; diff --git a/protofiles/CarpenterConfig.proto b/protofiles/CarpenterConfig.proto index f3b6b2aebf34e..02ed8c60ee080 100644 --- a/protofiles/CarpenterConfig.proto +++ b/protofiles/CarpenterConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "CarpenterConfigMsg"; -import "GoProtoDefaults.proto"; + + message CarpenterConfig { optional int32 minutesToRest = 1; diff --git a/protofiles/CassandraConfig.proto b/protofiles/CassandraConfig.proto index ca28b4a516e37..f10a565112ca0 100644 --- a/protofiles/CassandraConfig.proto +++ b/protofiles/CassandraConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "CassandraConfigMsg"; -import "GoProtoDefaults.proto"; + + message CassandraConfig { optional string statsDBClusterName = 1; diff --git a/protofiles/ColumboConfig.proto b/protofiles/ColumboConfig.proto index 379027b818538..31048cf0a4084 100644 --- a/protofiles/ColumboConfig.proto +++ b/protofiles/ColumboConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "ColumboConfigMsg"; -import "GoProtoDefaults.proto"; + + message ColumboConfig { optional string requestQueue = 1; diff --git a/protofiles/CommandReply.proto b/protofiles/CommandReply.proto index b2a723bb54a84..80bb6775d63fd 100644 --- a/protofiles/CommandReply.proto +++ b/protofiles/CommandReply.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "CommandReplyMsg"; -import "GoProtoDefaults.proto"; + + message CommandReply { required bool success = 1; diff --git a/protofiles/CommandRequest.proto b/protofiles/CommandRequest.proto index 957143853d409..2c250d2e86375 100644 --- a/protofiles/CommandRequest.proto +++ b/protofiles/CommandRequest.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "CommandRequestMsg"; -import "GoProtoDefaults.proto"; + + message CommandRequest { enum CommandType { diff --git a/protofiles/ConfTypeMsg.proto b/protofiles/ConfTypeMsg.proto index f83241c85eda4..24e43a597725f 100644 --- a/protofiles/ConfTypeMsg.proto +++ b/protofiles/ConfTypeMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ConfTypeMsg"; -import "GoProtoDefaults.proto"; + + message ConfType { enum Type { diff --git a/protofiles/ConfigDefaults.proto b/protofiles/ConfigDefaults.proto index 3f9966f5ee796..e9d5fd1dc9da4 100644 --- a/protofiles/ConfigDefaults.proto +++ b/protofiles/ConfigDefaults.proto @@ -4,7 +4,8 @@ import "ConfTypeMsg.proto"; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ConfigDefaultsMsg"; -import "GoProtoDefaults.proto"; + + message ConfigDefaults { message DefaultValues { diff --git a/protofiles/ConfigDefaultsRequest.proto b/protofiles/ConfigDefaultsRequest.proto index fdb759a91219a..9ce029eaf3a50 100644 --- a/protofiles/ConfigDefaultsRequest.proto +++ b/protofiles/ConfigDefaultsRequest.proto @@ -8,7 +8,8 @@ option java_outer_classname = "ConfigDefaultsRequestMsg"; // For the ConfType request config parameters // The CommandReply will contain the ConfigDefaults.proto with // parameter name, default value, max, min -import "GoProtoDefaults.proto"; + + message ConfigDefaultsRequest { optional ConfType.Type type = 1; diff --git a/protofiles/ConfigReplyMsg.proto b/protofiles/ConfigReplyMsg.proto index 90009b7e144b8..4ad708d829f9f 100644 --- a/protofiles/ConfigReplyMsg.proto +++ b/protofiles/ConfigReplyMsg.proto @@ -4,7 +4,8 @@ option java_package = "com.logrhythm.configelements"; option java_outer_classname = "ConfigReplyMsg"; import "ConfigType.proto"; -import "GoProtoDefaults.proto"; + + message ConfigReply { enum ReplyType { diff --git a/protofiles/ConfigRequestMsg.proto b/protofiles/ConfigRequestMsg.proto index fd775c4b9878e..d4be248dfbf8b 100644 --- a/protofiles/ConfigRequestMsg.proto +++ b/protofiles/ConfigRequestMsg.proto @@ -4,7 +4,8 @@ option java_package = "com.logrhythm.configelements"; option java_outer_classname = "ConfigRequestMsg"; import "ConfigType.proto"; -import "GoProtoDefaults.proto"; + + message ConfigRequest { enum RequestType { diff --git a/protofiles/ConfigServerConfigMsg.proto b/protofiles/ConfigServerConfigMsg.proto index 37d4a8d048f6a..b2f923460136f 100644 --- a/protofiles/ConfigServerConfigMsg.proto +++ b/protofiles/ConfigServerConfigMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "ConfigServerConfigMsg"; -import "GoProtoDefaults.proto"; + + message ConfigServerConfig { repeated string configRequestQueue = 1; diff --git a/protofiles/DispatchClientConfig.proto b/protofiles/DispatchClientConfig.proto index 4da36621a76ff..dee2a618742c9 100644 --- a/protofiles/DispatchClientConfig.proto +++ b/protofiles/DispatchClientConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "DispatchClientConfigMsg"; -import "GoProtoDefaults.proto"; + + message DispatchClientConfig { diff --git a/protofiles/DispatchConfig.proto b/protofiles/DispatchConfig.proto index 544c545b00d31..7b60ae24d9e11 100644 --- a/protofiles/DispatchConfig.proto +++ b/protofiles/DispatchConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "DispatchConfigMsg"; -import "GoProtoDefaults.proto"; + + message DispatchConfig { diff --git a/protofiles/DpiMsgLRproto.proto b/protofiles/DpiMsgLRproto.proto index 6fa1064bbc7bd..5ed6e1465152b 100644 --- a/protofiles/DpiMsgLRproto.proto +++ b/protofiles/DpiMsgLRproto.proto @@ -3,7 +3,8 @@ package networkMonitor; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "DPIMessageProtosProtos"; -import "GoProtoDefaults.proto"; + + message DpiMsgLRproto { diff --git a/protofiles/DriveInfo.proto b/protofiles/DriveInfo.proto index c93101da93006..2cd67ff6a91d9 100644 --- a/protofiles/DriveInfo.proto +++ b/protofiles/DriveInfo.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "DriveInfoMsg"; -import "GoProtoDefaults.proto"; + + message DrivesInfo { message DriveInfo { diff --git a/protofiles/ESDataCollectionMsg.proto b/protofiles/ESDataCollectionMsg.proto index 263ee31048f0e..20c12fe85f30f 100644 --- a/protofiles/ESDataCollectionMsg.proto +++ b/protofiles/ESDataCollectionMsg.proto @@ -4,7 +4,8 @@ option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ESDataCollectionMsg"; import "ESDataMsg.proto"; -import "GoProtoDefaults.proto"; + + message ESDataCollection { repeated ESData message = 1; diff --git a/protofiles/ESDataMsg.proto b/protofiles/ESDataMsg.proto index 8ce46b9fe2d13..3d0a6021831c3 100644 --- a/protofiles/ESDataMsg.proto +++ b/protofiles/ESDataMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ESDataMsg"; -import "GoProtoDefaults.proto"; + + message ESData { enum RequestType { diff --git a/protofiles/ESSearchResult.proto b/protofiles/ESSearchResult.proto index a37eae63c92a0..72adaf746910d 100644 --- a/protofiles/ESSearchResult.proto +++ b/protofiles/ESSearchResult.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ESSearchResultMsg"; -import "GoProtoDefaults.proto"; + + message ESSearchResult { diff --git a/protofiles/ElasticSearchClientConfig.proto b/protofiles/ElasticSearchClientConfig.proto index 25c27561aa096..f1cd20bc684a7 100644 --- a/protofiles/ElasticSearchClientConfig.proto +++ b/protofiles/ElasticSearchClientConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "ElasticSearchClientConfigMsg"; -import "GoProtoDefaults.proto"; + + message ElasticSearchClientConfig { optional string elasticsearchClusterName = 1; diff --git a/protofiles/ForkerReply.proto b/protofiles/ForkerReply.proto index 1b63ffe7ee0ec..45acd3ea890c5 100644 --- a/protofiles/ForkerReply.proto +++ b/protofiles/ForkerReply.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ForkerReplyMsg"; -import "GoProtoDefaults.proto"; + + message ForkerReply { optional string output = 1; diff --git a/protofiles/ForkerRequest.proto b/protofiles/ForkerRequest.proto index bc9a4c82b13ef..07af841ce333d 100644 --- a/protofiles/ForkerRequest.proto +++ b/protofiles/ForkerRequest.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ForkerRequestMsg"; -import "GoProtoDefaults.proto"; + + message ForkerRequest { optional string command = 1; diff --git a/protofiles/GoProtoDefaults.proto b/protofiles/GoProtoDefaults.proto deleted file mode 100644 index 1f358289a6db3..0000000000000 --- a/protofiles/GoProtoDefaults.proto +++ /dev/null @@ -1,18 +0,0 @@ -package protoMsg; -option java_package = "com.logrhythm.nm.message"; -option java_outer_classname = "GoProtoDefaults"; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -//go options that improve code generation -option (gogoproto.gostring_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.benchgen_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; diff --git a/protofiles/HermesConfig.proto b/protofiles/HermesConfig.proto index 7b3d3b45300c5..93a0189d0fce3 100644 --- a/protofiles/HermesConfig.proto +++ b/protofiles/HermesConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "HermesConfigMsg"; -import "GoProtoDefaults.proto"; + + message HermesConfig { repeated string pollStatsQueue = 1; diff --git a/protofiles/HermesReply.proto b/protofiles/HermesReply.proto index 8f8bc53b23ecf..8cd26d564ef21 100644 --- a/protofiles/HermesReply.proto +++ b/protofiles/HermesReply.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "HermesReplyMsg"; -import "GoProtoDefaults.proto"; + + message HermesReply { message ValueTuple { @@ -17,7 +18,6 @@ message HermesReply { optional ValueTuple tupleValue = 3; } - optional int32 beginTimeSeconds = 1; - optional int32 endTimeSeconds = 2; - repeated Stat stat = 3; + optional string uuid = 1; + repeated Stat stat = 2; } diff --git a/protofiles/HermesRequest.proto b/protofiles/HermesRequest.proto index 7b518b0bf943a..3613d36b6359c 100644 --- a/protofiles/HermesRequest.proto +++ b/protofiles/HermesRequest.proto @@ -3,9 +3,12 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "HermesRequestMsg"; -import "GoProtoDefaults.proto"; + + message HermesRequest { - optional int32 beginTimeSeconds = 1; - optional int32 endTimeSeconds = 2; + optional string uuid = 1; + optional string indexName = 2; + optional int64 beginTimeMilliSeconds = 3; + optional int64 endTimeMilliSeconds = 4; } diff --git a/protofiles/IndexManagerConfig.proto b/protofiles/IndexManagerConfig.proto index 524a24481b768..3f0268ae86689 100644 --- a/protofiles/IndexManagerConfig.proto +++ b/protofiles/IndexManagerConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "IndexManagerConfigMsg"; -import "GoProtoDefaults.proto"; + + message IndexManagerConfig { diff --git a/protofiles/InfluxConfig.proto b/protofiles/InfluxConfig.proto index 4302e7599b7a8..e68ffdb378dee 100644 --- a/protofiles/InfluxConfig.proto +++ b/protofiles/InfluxConfig.proto @@ -3,11 +3,15 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "InfluxConfigMsg"; -import "GoProtoDefaults.proto"; + + message InfluxConfig { optional string hostname = 1; - optional string database = 2; - optional string username = 3; - optional string password = 4; + optional int32 port = 2; + optional string database = 3; + optional string adminUsername = 4; + optional string adminPassword = 5; + optional string dbUsername = 6; + optional string dbPassword = 7; } diff --git a/protofiles/InstallInfo.proto b/protofiles/InstallInfo.proto index 4aa7dfa0f005f..cbdbd48ffbba7 100644 --- a/protofiles/InstallInfo.proto +++ b/protofiles/InstallInfo.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "InstallInfoMsg"; -import "GoProtoDefaults.proto"; + + message InstallInfo { optional uint64 installTime = 1; diff --git a/protofiles/License.proto b/protofiles/License.proto index e014f0124e01e..eed3e8fa72979 100644 --- a/protofiles/License.proto +++ b/protofiles/License.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "LicenseMsg"; -import "GoProtoDefaults.proto"; + + message RawLicense { optional int32 bandwidthInMbps = 1; diff --git a/protofiles/LicenseReply.proto b/protofiles/LicenseReply.proto index bf9176fe6d733..6a47e71280719 100644 --- a/protofiles/LicenseReply.proto +++ b/protofiles/LicenseReply.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "LicenseReplyMsg"; -import "GoProtoDefaults.proto"; + + message LicenseReply { repeated bytes encodedLicenses = 1; diff --git a/protofiles/LicenseRequest.proto b/protofiles/LicenseRequest.proto index afb20ebc20190..9c9f556f4843c 100644 --- a/protofiles/LicenseRequest.proto +++ b/protofiles/LicenseRequest.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "LicenseRequestMsg"; -import "GoProtoDefaults.proto"; + + message LicenseRequest { enum RequestType { diff --git a/protofiles/LicenseUpdate.proto b/protofiles/LicenseUpdate.proto index af4f7de9c3706..74bbe5830401c 100644 --- a/protofiles/LicenseUpdate.proto +++ b/protofiles/LicenseUpdate.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "LicenseUpdateMsg"; -import "GoProtoDefaults.proto"; + + message LicenseUpdate { enum LicenseType { diff --git a/protofiles/LicenseUpdateReply.proto b/protofiles/LicenseUpdateReply.proto index 7bbfadb0962e1..fb1b02c184684 100644 --- a/protofiles/LicenseUpdateReply.proto +++ b/protofiles/LicenseUpdateReply.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "LicenseUpdateReplyMsg"; -import "GoProtoDefaults.proto"; + + message LicenseUpdateReply { optional bool success = 1; diff --git a/protofiles/LinkConfig.proto b/protofiles/LinkConfig.proto index 8f9c5b21f24ab..d3a09c03edb20 100644 --- a/protofiles/LinkConfig.proto +++ b/protofiles/LinkConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "LinkConfigMsg"; -import "GoProtoDefaults.proto"; + + message LinkConfig { optional int64 webHeartbeatIntervalMs = 1; diff --git a/protofiles/LogMessage.proto b/protofiles/LogMessage.proto index 08b8bd7265943..a72c2dfa9de56 100644 --- a/protofiles/LogMessage.proto +++ b/protofiles/LogMessage.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "LogMessageMsg"; -import "GoProtoDefaults.proto"; + + message LogMessage { enum LogType { diff --git a/protofiles/MaintenanceConfig.proto b/protofiles/MaintenanceConfig.proto index 302f5adb8ded3..76c6c666eacf9 100644 --- a/protofiles/MaintenanceConfig.proto +++ b/protofiles/MaintenanceConfig.proto @@ -4,7 +4,8 @@ option java_package = "com.logrhythm.configelements"; option java_outer_classname = "MaintenanceConfigMsg"; import "IndexManagerConfig.proto"; -import "GoProtoDefaults.proto"; + + message MaintenanceConfig { diff --git a/protofiles/MetricsClientConfigMsg.proto b/protofiles/MetricsClientConfigMsg.proto index 9da4f4cc326ec..38e15cc6e7a23 100644 --- a/protofiles/MetricsClientConfigMsg.proto +++ b/protofiles/MetricsClientConfigMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "MetricsClientConfigMsg"; -import "GoProtoDefaults.proto"; + + message MetricsClientConfig { optional string statsDestinationQueue = 1; diff --git a/protofiles/MetricsConfig.proto b/protofiles/MetricsConfig.proto index fc35263887dd4..4e0f470297ac9 100644 --- a/protofiles/MetricsConfig.proto +++ b/protofiles/MetricsConfig.proto @@ -4,7 +4,8 @@ option java_package = "com.logrhythm.configelements"; option java_outer_classname = "MetricsConfigMsg"; import "PortRange.proto"; -import "GoProtoDefaults.proto"; + + message MetricsConfig { repeated string statsQueue = 1; diff --git a/protofiles/NetInterfaceMsg.proto b/protofiles/NetInterfaceMsg.proto index e5ec16ecde859..45615595b144a 100644 --- a/protofiles/NetInterfaceMsg.proto +++ b/protofiles/NetInterfaceMsg.proto @@ -8,7 +8,8 @@ enum NetInterfaceMethod { STATICIP = 1; } -import "GoProtoDefaults.proto"; + + message NetInterface { optional string interface = 1 [default = "eth0"]; diff --git a/protofiles/NtpMsg.proto b/protofiles/NtpMsg.proto index 1e01adbb073a5..5cd8a131d0999 100644 --- a/protofiles/NtpMsg.proto +++ b/protofiles/NtpMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "NtpMsg"; -import "GoProtoDefaults.proto"; + + message Ntp { diff --git a/protofiles/PcapDownloadMsg.proto b/protofiles/PcapDownloadMsg.proto index 45a70f85273b0..b41ce9567e57b 100644 --- a/protofiles/PcapDownloadMsg.proto +++ b/protofiles/PcapDownloadMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "PcapDownloadMsg"; -import "GoProtoDefaults.proto"; + + message BulkPcapDownload { diff --git a/protofiles/PlaybackConfig.proto b/protofiles/PlaybackConfig.proto index 6c61502126af0..e42a025202042 100644 --- a/protofiles/PlaybackConfig.proto +++ b/protofiles/PlaybackConfig.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "PlaybackConfigMsg"; -import "GoProtoDefaults.proto"; + + message PlaybackConfig { diff --git a/protofiles/PortRange.proto b/protofiles/PortRange.proto index d0513340ce520..7398e11cde72f 100644 --- a/protofiles/PortRange.proto +++ b/protofiles/PortRange.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.configelements"; option java_outer_classname = "PortRangeMsg"; -import "GoProtoDefaults.proto"; + + message PortRange { optional int32 start = 1; diff --git a/protofiles/ProcessReply.proto b/protofiles/ProcessReply.proto index 2b86ce6cc53aa..30361bd920cfa 100644 --- a/protofiles/ProcessReply.proto +++ b/protofiles/ProcessReply.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ProcessReplyMsg"; -import "GoProtoDefaults.proto"; + + message ProcessReply { required bool success = 1; diff --git a/protofiles/ProcessRequest.proto b/protofiles/ProcessRequest.proto index f21e994a6f2d7..3951c5b7c3488 100644 --- a/protofiles/ProcessRequest.proto +++ b/protofiles/ProcessRequest.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ProcessRequestMsg"; -import "GoProtoDefaults.proto"; + + message ProcessRequest { required string path = 1; diff --git a/protofiles/QosmosConfMsg.proto b/protofiles/QosmosConfMsg.proto index 91d46e3490ba3..7854b7597651a 100644 --- a/protofiles/QosmosConfMsg.proto +++ b/protofiles/QosmosConfMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "QosmosConfMsg"; -import "GoProtoDefaults.proto"; + + message QosmosConf { message Protocol { diff --git a/protofiles/ReaderRuleConf.proto b/protofiles/ReaderRuleConf.proto index 9cfddcf4b257a..be53c3b8e006b 100644 --- a/protofiles/ReaderRuleConf.proto +++ b/protofiles/ReaderRuleConf.proto @@ -4,7 +4,8 @@ option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ReaderRuleConfMsg"; import "Rule.proto"; -import "GoProtoDefaults.proto"; + + message ReaderRuleConf { diff --git a/protofiles/RestartMsg.proto b/protofiles/RestartMsg.proto index a43e6c6b124d7..fbcb49b7f96da 100644 --- a/protofiles/RestartMsg.proto +++ b/protofiles/RestartMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "RestartMsgProto"; -import "GoProtoDefaults.proto"; + + message RestartMsg { optional bool restartAll = 1; diff --git a/protofiles/Rule.proto b/protofiles/Rule.proto index 2f8d4dcb32514..866eab4eb53b7 100644 --- a/protofiles/Rule.proto +++ b/protofiles/Rule.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "RuleConfMsg"; -import "GoProtoDefaults.proto"; + + message RuleConf { diff --git a/protofiles/ShutdownMsg.proto b/protofiles/ShutdownMsg.proto index cb34aa184980d..7f1c614dee949 100644 --- a/protofiles/ShutdownMsg.proto +++ b/protofiles/ShutdownMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "ShutdownMsgProto"; -import "GoProtoDefaults.proto"; + + message ShutdownMsg { optional bool now = 1 [default = true]; diff --git a/protofiles/StatsAggMsg.proto b/protofiles/StatsAggMsg.proto index 4eda801deb677..8e77711ce2416 100644 --- a/protofiles/StatsAggMsg.proto +++ b/protofiles/StatsAggMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "StatsAggMsg"; -import "GoProtoDefaults.proto"; + + message StatsAgg { required string Key = 1; diff --git a/protofiles/StatsMsg.proto b/protofiles/StatsMsg.proto index fd2f590192944..652c19be4f12d 100644 --- a/protofiles/StatsMsg.proto +++ b/protofiles/StatsMsg.proto @@ -3,7 +3,7 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "StatsMsg"; -import "GoProtoDefaults.proto"; + message Stats { required string Key = 1; diff --git a/protofiles/SyslogConfMsg.proto b/protofiles/SyslogConfMsg.proto index 0a801953356b1..e6e2c7541ee94 100644 --- a/protofiles/SyslogConfMsg.proto +++ b/protofiles/SyslogConfMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "SyslogConfMsg"; -import "GoProtoDefaults.proto"; + + message SyslogConf { optional string syslogEnabled = 1; diff --git a/protofiles/VersionMsg.proto b/protofiles/VersionMsg.proto index 8fe705348dc4e..cc306fe14d926 100644 --- a/protofiles/VersionMsg.proto +++ b/protofiles/VersionMsg.proto @@ -3,7 +3,8 @@ package protoMsg; option java_package = "com.logrhythm.nm.message"; option java_outer_classname = "VersionMsgProto"; -import "GoProtoDefaults.proto"; + + message VersionMsg { optional string globalVersion = 1; diff --git a/protofiles/stats/stats.proto b/protofiles/stats/stats.proto new file mode 100644 index 0000000000000..0eb0bb82db2fe --- /dev/null +++ b/protofiles/stats/stats.proto @@ -0,0 +1,38 @@ +package stats; + +option java_package = "com.logrhythm.nm.message"; +option java_outer_classname = "CounterMsg"; + + + +message Counter { + required string name = 1; + optional int64 value = 2; + optional int64 time = 3; + optional int32 sampleRate = 4; +} + +message Sample { + required string name = 1; + optional int64 value = 2; + optional int32 sampleRate = 3; + optional int64 time = 4; +} + +message Measure { + required string name = 1; + optional int64 min = 2; + optional int64 value = 3; + optional int64 max = 4; + optional int32 sampleRate = 5; + optional int64 time = 4; +} + +message Stats { + required string service = 1; + optional string host = 2; + optional string region = 3; + repeated Counter counters = 4; + repeated Measure measures = 5; + repeated Sample Samples = 6; +} diff --git a/scripts/buildProtoFiles.sh b/scripts/buildProtoFiles.sh index f7bd468564b25..32b560cb57357 100755 --- a/scripts/buildProtoFiles.sh +++ b/scripts/buildProtoFiles.sh @@ -51,45 +51,45 @@ export LD_LIBRARY_PATH="$protoInstallDir"/lib mkdir -p "$javaSrcDir" cd "$javaSrcDir" -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include:$thirdPartyDir::/usr/local/include:/usr/include --java_out=. "$protoFileDir"/BaseConfMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include:$thirdPartyDir::$DISTDIR/protobuf/include:/usr/include --java_out=. "$protoFileDir"/BaseConfMsg.proto # the build below will generate java code with single methods > 64k, to fix this # we would have to enable option optimize_for = CODE_SIZE -#"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include:$thirdPartyDir::/usr/local/include:/usr/include --java_out=. "$protoFileDir"/DpiMsgLRproto.proto -for file in `ls "$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include | grep -v DpiMsgLRproto | grep -v Applications` ; do -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --java_out=. "$protoFileDir"/$file +#"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include:$thirdPartyDir::$DISTDIR/protobuf/include:/usr/include --java_out=. "$protoFileDir"/DpiMsgLRproto.proto +for file in `ls "$protoFileDir" | grep -v DpiMsgLRproto | grep -v Applications` ; do +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --java_out=. "$protoFileDir"/$file done cd "$startDir" cd "$cppSrcDir" -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=liblrdpi "$protoFileDir"/DpiMsgLRproto.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=liblrdpi "$protoFileDir"/Applications.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libstats "$protoFileDir"/StatsMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/BaseConfMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/QosmosConfMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/ConfTypeMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/NetInterfaceMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/NtpMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/RestartMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/ShutdownMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/VersionMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/SyslogConfMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libconf "$protoFileDir"/ReaderRuleConf.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=liblua "$protoFileDir"/Rule.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libcommand "$protoFileDir"/CommandRequest.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libcommand "$protoFileDir"/CommandReply.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libprocess "$protoFileDir"/ProcessRequest.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libprocess "$protoFileDir"/ProcessReply.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libcommand "$protoFileDir"/DriveInfo.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libcommand "$protoFileDir"/ConfigDefaults.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libcommand "$protoFileDir"/ConfigDefaultsRequest.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libfork "$protoFileDir"/ForkerReply.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libfork "$protoFileDir"/ForkerRequest.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=liblicense "$protoFileDir"/LicenseReply.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=liblicense "$protoFileDir"/LicenseRequest.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=liblicense "$protoFileDir"/License.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libmessages "$protoFileDir"/LogMessage.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libmessages "$protoFileDir"/ESDataMsg.proto -"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include --cpp_out=libcommand "$protoFileDir"/PcapDownloadMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=liblrdpi "$protoFileDir"/DpiMsgLRproto.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=liblrdpi "$protoFileDir"/Applications.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libstats "$protoFileDir"/StatsMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/BaseConfMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/QosmosConfMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/ConfTypeMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/NetInterfaceMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/NtpMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/RestartMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/ShutdownMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/VersionMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/SyslogConfMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libconf "$protoFileDir"/ReaderRuleConf.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=liblua "$protoFileDir"/Rule.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/CommandRequest.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/CommandReply.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libprocess "$protoFileDir"/ProcessRequest.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libprocess "$protoFileDir"/ProcessReply.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/DriveInfo.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/ConfigDefaults.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/ConfigDefaultsRequest.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libfork "$protoFileDir"/ForkerReply.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libfork "$protoFileDir"/ForkerRequest.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=liblicense "$protoFileDir"/LicenseReply.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=liblicense "$protoFileDir"/LicenseRequest.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=liblicense "$protoFileDir"/License.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libmessages "$protoFileDir"/LogMessage.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libmessages "$protoFileDir"/ESDataMsg.proto +"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/PcapDownloadMsg.proto mv liblrdpi/DpiMsgLRproto.pb.cc liblrdpi/DpiMsgLRproto.pb.cpp mv liblrdpi/Applications.pb.cc liblrdpi/Applications.pb.cpp mv libstats/StatsMsg.pb.cc libstats/StatsMsg.pb.cpp @@ -124,6 +124,6 @@ cd "$startDir" mkdir -p "$phpSrcDir" cd "$phpSrcDir" for file in `ls "$protoFileDir"` ; do - "$phpprotoc" -i "$protoFileDir":$thirdPartyDir:/usr/include:/usr/local/include -o . --protoc="$protoc" "$protoFileDir"/$file + "$phpprotoc" -o . --protoc="$protoc -I "$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include" "$protoFileDir"/$file done cd "$startDir" diff --git a/scripts/buildProtoFilesGo.sh b/scripts/buildProtoFilesGo.sh index 3033ab4735a91..db492caf52ff1 100755 --- a/scripts/buildProtoFilesGo.sh +++ b/scripts/buildProtoFilesGo.sh @@ -4,7 +4,7 @@ if [ -z "$GOPATH" ]; then export GOPATH=~/go; fi if [ -z "$GOBIN" ]; then export GOBIN=$GOPATH/bin; fi if [ -z "$GOROOT" ]; then export GOROOT=/usr/local/go; fi startDir=`pwd` -goSrc=$GOPATH/src/github.schq.secious.com/Logrhythm/GoMessaging/ +goSrc=$GOPATH/src/github.schq.secious.com/Logrhythm/GoMessaging goLR=$GOPATH/src/github.schq.secious.com/Logrhythm protoFileDir="$startDir"/protofiles scriptsDir="$startDir"/scripts @@ -14,13 +14,17 @@ go get github.com/gogo/protobuf/protoc-gen-gogo go get github.com/gogo/protobuf/gogoproto mkdir -p $goSrc +mkdir -p $goSrc/stats if [ ! -d "$goSrc" ]; then cd $goLR git clone git@github.schq.secious.com:Logrhythm/GoMessaging.git cd $startDir fi + +(cd "$protoFileDir"/stats; cp "$protoFileDir"/stats/* "$goSrc"/stats/ ) +(cd "$protoFileDir"; cp `ls | grep -v Config | grep -v ESData | grep -v RuleConf | grep -v DpiMsgLRproto | grep -v Applications | grep -v BaseConfMsg | grep -v stats` "$goSrc"/ ) + +( cd $goSrc; protoc -I="$GOPATH"/src/:/usr/local/include:/usr/include:$goSrc:/$goSrc/stats/ --gogo_out=$GOPATH/src/ "$goSrc"/*.proto ) +( cd "$goSrc"/stats; protoc -I="$GOPATH"/src/:/usr/local/include:/usr/include:$goSrc:$goSrc/stats/ --gogo_out=$GOPATH/src/ "$goSrc"/stats/*.proto ) rm "$goSrc"/*.proto -cp `ls "$protoFileDir"/* | grep -v Config | grep -v ESData | grep -v RuleConf | grep -v DpiMsgLRproto | grep -v Applications | grep -v BaseConfMsg ` "$goSrc"/ -cd $goSrc -protoc -I="$GOPATH"/src/:/usr/local/include:/usr/include:$goSrc/ --gogo_out=$GOPATH/src/ $goSrc/*.proto -cd "$startDir" +rm "$goSrc"/stats/*.proto