Skip to content

Commit

Permalink
Merge pull request elastic#186 from Logrhythm/2.4.1
Browse files Browse the repository at this point in the history
2.4.1
  • Loading branch information
Ben Aldrich committed Jun 6, 2014
2 parents 1f40993 + da88d27 commit baabf17
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
40 changes: 40 additions & 0 deletions protofiles/LogMessage.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package protoMsg;

option java_package = "com.logrhythm.nm.message";
option java_outer_classname = "LogMessageMsg";

message LogMessage {
enum LogType {
NORMALIZED = 0;
FULL = 1;
INTERMEDIATE = 2;
DEBUG = 3;
SYSTEM = 4;
EVENT = 5;
}
enum SourceType {
DPIMSG = 0;
JSON = 1;
RAW = 2;
}
enum SystemSubtype {
RESTART = 0;
FATAL_ERROR = 1;
UPGRADE = 2;
INDEX_DELETE = 3;
CONFIG_CHANGE = 4;
ADMIN_PASSWD_CHANGE = 5;
USER_ADD = 6;
USER_DEL = 7;
PCAP_DOWNLOAD = 8;
UNKNOWN = 9;
}

optional LogType outputType = 1;
repeated SourceType inputType = 2;
repeated string inputData = 3;
repeated SystemSubtype systemSubType = 4;
repeated string eventName = 5;
}


2 changes: 1 addition & 1 deletion scripts/buildESTemplate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ sub ReadProtoFile {
print "\"$remapping{application_end}\", ";
print "\"$remapping{application_id}\", ";
print "\"$remapping{application_id_end}\", ";
print "\"CaptureKey\", ";
print "\"FileID\" ";
print "]\n";
print "},\n";
Expand All @@ -53,7 +54,6 @@ sub ReadProtoFile {
print "\"Captured\" : { \"type\": \"string\", \"null_value\": \"false\"},\n";
print "\"Session\" : {\"type\": \"string\", \"index\" : \"not_analyzed\"},\n";
print "\"SrcMAC\" : {\"type\" : \"string\", \"index\" : \"not_analyzed\", \"ignore_malformed\" : true},\n";
print "\"CaptureKey\" : {\"type\" : \"string\", \"index\" : \"no\", \"store\" : false, \"ignore_malformed\" : true},\n";


for $app ( keys %typeHash ) {
Expand Down
4 changes: 3 additions & 1 deletion scripts/buildProtoFiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ ! -f "$phpprotoc" ]; then
sh "$scriptsDir"/getPhpProtobuffers.sh
fi

mkdir -p "$cppSrcDir"/liblrdpi "$cppSrcDir"/libstats "$cppSrcDir"/libconf $cppSrcDir/libcommand "$cppSrcDir"/libprocess "$cppSrcDir"/liblua "$cppSrcDir"/libtools "$cppSrcDir"/libfork "$cppSrcDir"/liblicense
mkdir -p "$cppSrcDir"/liblrdpi "$cppSrcDir"/libstats "$cppSrcDir"/libconf $cppSrcDir/libcommand "$cppSrcDir"/libprocess "$cppSrcDir"/liblua "$cppSrcDir"/libtools "$cppSrcDir"/libfork "$cppSrcDir"/liblicense "$cppSrcDir"/libmessages

cp "$protoFileDir"/DpiMsgLRproto.proto "$protoFileDir"/DpiMsgLRproto.proto.orig
cp "$protoFileDir"/Applications.proto "$protoFileDir"/Applications.proto.orig
Expand Down Expand Up @@ -78,6 +78,7 @@ cd "$cppSrcDir"
"$protoc" -I="$protoFileDir" --cpp_out=liblicense "$protoFileDir"/LicenseReply.proto
"$protoc" -I="$protoFileDir" --cpp_out=liblicense "$protoFileDir"/LicenseRequest.proto
"$protoc" -I="$protoFileDir" --cpp_out=liblicense "$protoFileDir"/License.proto
"$protoc" -I="$protoFileDir" --cpp_out=libmessages "$protoFileDir"/LogMessage.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
Expand All @@ -104,6 +105,7 @@ mv libfork/ForkerRequest.pb.cc libfork/ForkerRequest.pb.cpp
mv liblicense/LicenseReply.pb.cc liblicense/LicenseReply.pb.cpp
mv liblicense/LicenseRequest.pb.cc liblicense/LicenseRequest.pb.cpp
mv liblicense/License.pb.cc liblicense/License.pb.cpp
mv libmessages/LogMessage.pb.cc libmessages/LogMessage.pb.cpp
cd "$startDir"

mkdir -p "$phpSrcDir"
Expand Down

0 comments on commit baabf17

Please sign in to comment.