plainolneesh commented on a change in pull request #338: WIP# 254 
URL: https://github.com/apache/fluo-muchos/pull/338#discussion_r401653703
 
 

 ##########
 File path: ansible/roles/logstash/templates/pipeline.conf
 ##########
 @@ -0,0 +1,57 @@
+input {
+    beats { 
+        port => 5044
+    }
+    file {
+        path= "/media/ephemeral0/logs/accumulo/*.log"
+    }
+}
+filter {
+  if [fileset][module] == "logstash" {   
+      if [fileset][name] == "hadoop" {
+    grok {
+
+        #2020-03-30 15:01:17,801 INFO org.apache.hadoop.hdfs.StateChange: DIR* 
completeFile: /accumulo/tables/+r/root_tablet/F000003o.rf_tmp is closed by 
DFSClient_NONMAPREDUCE_69506301_11
+        match => { "message" => "%{TIMESTAMP_ISO8601}%{SPACE}%{WORD:log 
level}%{GREEDYDATA:hostname}%{GREEDYDATA:LINK}:%{GREEDYDATA:state}%{WORD:module}:
 %{GREEDYDATA:message}"}
+        match => { "message" => "%{TIMESTAMP_ISO8601}%{SPACE}%{WORD:log 
level}%{GREEDYDATA:ip}%{GREEDYDATA:LINK}:%{GREEDYDATA:state}%{WORD:module}: 
%{GREEDYDATA:message}"}
+    mutate {    
+        add_field => [ "received_at", "%{@timestamp}" ]
+        add_field => [ "received_from", "%{host}" ]
+    }
+
+    else if [fileset][name] = "accumulo"{
+#2020-03-30 14:01:06,322 [gc.GarbageCollectWriteAheadLogs] DEBUG: New tablet 
servers noticed: [worker3:9997[1000005c5390005], worker1:9997[1000005c5390004], 
worker2:9997[1000005c5390006]]
+        match=> { "message" => "%{TIMESTAMP_ISO8601:TIMESTAMP} 
\[%{GREEDYDATA:module}\.%{GREEDYDATA:class_name}\] %{WORD:level}: 
%{GREEDYDATA:message}\[%{GREEDYDATA:hostname}:%{GREEDYDATA:hostname}\:%{GREEDYDATA:hostname}\:%{GREEDYDATA:hostname}\]"}
+
+        match => { "message" => "%{TIMESTAMP_ISO8601:TIMESTAMP} 
\[%{GREEDYDATA:module}\.%{GREEDYDATA:class_name}\] %{WORD:level}: 
%{GREEDYDATA:message}\[%{GREEDYDATA:module}\]"}
+        
+        #2020-03-31 04:43:48,553 [gc.GarbageCollectWriteAheadLogs] DEBUG: New 
tablet servers noticed: []
+        #2020-03-30 14:00:35,898 [gc.SimpleGarbageCollector] DEBUG: Got GC 
ZooKeeper lock
+        match => { "message" => "%{TIMESTAMP_ISO8601:TIMESTAMP} 
\[%{GREEDYDATA:module}\.%{GREEDYDATA:class_name}\] %{WORD:level}: 
%{GREEDYDATA:message}"}
+       
+        #2020-03-30 14:01:06,223 [gc.SimpleGarbageCollector] INFO : Number of 
successfully deleted data files: 0   
+        match => { "message" => "%{TIMESTAMP_ISO8601:TIMESTAMP} 
\[%{GREEDYDATA:module}\.%{GREEDYDATA:class_name}] %{WORD:level} : 
%{GREEDYDATA:message}"}
 
 Review comment:
   This is one is a little different it takes account of the space. Ex: INFO : 
Number vs DEBUG: Returning... 
   
   Without that space, it does not find that match.  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to