ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject [1/9] ambari git commit: AMBARI-16091. Add 'logfeeder log level include' feature to logsearch stack definition (oleewere)
Date Mon, 25 Apr 2016 15:14:36 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 25ed583ee -> cda7f2a3e


AMBARI-16091. Add 'logfeeder log level include' feature to logsearch stack definition (oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cda7f2a3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cda7f2a3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cda7f2a3

Branch: refs/heads/trunk
Commit: cda7f2a3eb82a494a09ffca1a1c75ba3d658e307
Parents: 888faf2
Author: oleewere <oleewere@gmail.com>
Authored: Mon Apr 25 17:09:11 2016 +0200
Committer: oleewere <oleewere@gmail.com>
Committed: Mon Apr 25 17:10:34 2016 +0200

----------------------------------------------------------------------
 .../0.5.0/configuration/logsearch-site.xml      |  7 ++++++
 .../LOGSEARCH/0.5.0/package/scripts/params.py   |  1 +
 .../templates/input.config-logsearch.json.j2    |  6 ++---
 .../package/templates/logsearch.properties.j2   |  4 ++++
 .../0.5.0/properties/logfeeder-log4j.xml.j2     | 24 ++++++++++++++++----
 .../0.5.0/properties/logsearch-log4j.xml.j2     | 22 ++++++++++--------
 ambari-web/app/data/HDP2/site_properties.js     |  7 ++++++
 7 files changed, 53 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cda7f2a3/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-site.xml
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-site.xml
index 45aa69a..fb775bf 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-site.xml
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-site.xml
@@ -78,4 +78,11 @@
     </description>
   </property>
 
+  <property>
+    <name>logsearch.logfeeder.include.default.level</name>
+    <value>fatal,error,warn</value>
+    <description>Include default Logfeeder log levels for Logsearch</description>
+    <display-name>Logfeeder log levels</display-name>
+  </property>
+
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/cda7f2a3/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
index b461b1f..4084243 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
@@ -146,6 +146,7 @@ logsearch_repfactor = str(config['configurations']['logsearch-site']['logsearch.
 
 logsearch_solr_collection_service_logs = default('/configurations/logsearch-site/logsearch.solr.collection.service.logs',
'hadoop_logs')
 logsearch_solr_collection_audit_logs = default('/configurations/logsearch-site/logsearch.solr.collection.audit.logs','audit_logs')
+logsearch_logfeeder_log_level_include = default('/configurations/logsearch-site/logsearch.logfeeder.include.default.level',
'fatal,error,warn')
 
 solr_audit_logs_use_ranger = default('/configurations/logsearch-env/logsearch_solr_audit_logs_use_ranger',
False)
 solr_audit_logs_url = ''

http://git-wip-us.apache.org/repos/asf/ambari/blob/cda7f2a3/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/input.config-logsearch.json.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/input.config-logsearch.json.j2
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/input.config-logsearch.json.j2
index d9ef66d..06aaba6 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/input.config-logsearch.json.j2
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/input.config-logsearch.json.j2
@@ -20,17 +20,17 @@
     {
       "type":"logsearch_app",
       "rowtype":"service",
-      "path":"{{logsearch_log_dir}}/logsearch.log"
+      "path":"{{logsearch_log_dir}}/logsearch.json"
     },
     {
       "type":"logsearch_feeder",
       "rowtype":"service",
-      "path":"{{logfeeder_log_dir}}/logfeeder.log"
+      "path":"{{logfeeder_log_dir}}/logfeeder.json"
     },
     {
       "type":"logsearch_perf",
       "rowtype":"service",
-      "path":"{{logsearch_log_dir}}/logsearch-performance.log"
+      "path":"{{logsearch_log_dir}}/logsearch-performance.json"
     }
 
   ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/cda7f2a3/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logsearch.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logsearch.properties.j2
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logsearch.properties.j2
index 1e183bd..190d4e2 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logsearch.properties.j2
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logsearch.properties.j2
@@ -38,3 +38,7 @@ solr.audit_logs.replication_factor={{logsearch_repfactor}}
 solr.core.history=history
 solr.history.config_name=history
 solr.history.replication_factor={{logsearch_repfactor}}
+
+#Logfeeder Settings
+
+logfeeder.include.default.level={{logsearch_logfeeder_log_level_include}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/cda7f2a3/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logfeeder-log4j.xml.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logfeeder-log4j.xml.j2
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logfeeder-log4j.xml.j2
index cab680f..77318ee 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logfeeder-log4j.xml.j2
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logfeeder-log4j.xml.j2
@@ -34,24 +34,38 @@ limitations under the License.
     </layout>
   </appender>
 
+  <appender name="rolling_file_json"
+    class="org.apache.ambari.logsearch.appender.LogsearchRollingFileAppender">
+    <param name="file" value="logs/logsearch-logfeeder.json" />
+    <param name="append" value="true" />
+    <param name="maxFileSize" value="10MB" />
+    <param name="maxBackupIndex" value="10" />
+    <layout class="org.apache.ambari.logsearch.appender.LogsearchConversion" />
+  </appender>
+
+
   <!-- Logs to suppress BEGIN -->
   <category name="org.apache.solr.common.cloud.ZkStateReader" additivity="false">
     <priority value="error" />
-    <appender-ref ref="rolling_file" />
+    <appender-ref ref="daily_rolling_file" />
   </category>
 
   <category name="apache.solr.client.solrj.impl.CloudSolrClient" additivity="false">
     <priority value="fatal" />
-    <appender-ref ref="rolling_file" />
+    <appender-ref ref="daily_rolling_file" />
   </category>
+  <!-- Logs to suppress END -->
 
   <category name="org.apache.ambari.logfeeder" additivity="false">
-    <priority value="info"/>
-    <appender-ref ref="rolling_file"/>
+    <priority value="INFO" />
+    <appender-ref ref="console" />
+    <!-- <appender-ref ref="daily_rolling_file" /> -->
+    <appender-ref ref="rolling_file_json"/>
   </category>
 
   <root>
     <priority value="warn"/>
-    <appender-ref ref="rolling_file"/>
+    <!-- <appender-ref ref="rolling_file"/> -->
+    <!-- <appender-ref ref="daily_rolling_file" /> -->
   </root>
 </log4j:configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/cda7f2a3/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-log4j.xml.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-log4j.xml.j2
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-log4j.xml.j2
index a1f5539..7dc09ba2 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-log4j.xml.j2
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-log4j.xml.j2
@@ -24,8 +24,8 @@ limitations under the License.
     </layout>
   </appender>
 
-  <appender name="rolling_file" class="org.apache.log4j.RollingFileAppender">
-    <param name="file" value="{{logsearch_log_dir}}/logsearch.log"/>
+  <appender name="rolling_file_json" class="org.apache.log4j.RollingFileAppender">
+    <param name="file" value="{{logsearch_log_dir}}/logsearch.json"/>
     <param name="append" value="true"/>
     <param name="maxFileSize" value="10MB"/>
     <param name="maxBackupIndex" value="10"/>
@@ -34,8 +34,8 @@ limitations under the License.
     </layout>
   </appender>
 
-  <appender name="audit_rolling_file" class="org.apache.log4j.RollingFileAppender">
-    <param name="file" value="{{logsearch_log_dir}}/logsearch-audit.log"/>
+  <appender name="audit_rolling_file_json" class="org.apache.log4j.RollingFileAppender">
+    <param name="file" value="{{logsearch_log_dir}}/logsearch-audit.json"/>
     <param name="append" value="true"/>
     <param name="maxFileSize" value="10MB"/>
     <param name="maxBackupIndex" value="10"/>
@@ -44,8 +44,8 @@ limitations under the License.
     </layout>
   </appender>
 
-  <appender name="performance_analyzer" class="org.apache.log4j.RollingFileAppender">
-    <param name="file" value="{{logsearch_log_dir}}/logsearch-performance.log"/>
+  <appender name="performance_analyzer_json" class="org.apache.log4j.RollingFileAppender">
+    <param name="file" value="{{logsearch_log_dir}}/logsearch-performance.json"/>
     <param name="Threshold" value="info"/>
     <param name="append" value="true"/>
     <param name="maxFileSize" value="10MB"/>
@@ -56,20 +56,22 @@ limitations under the License.
   </appender>
 
   <logger name="org.apache.ambari.logsearch.audit" additivity="true">
-    <appender-ref ref="audit_rolling_file"/>
+    <appender-ref ref="audit_rolling_file_json"/>
   </logger>
 
   <logger name="org.apache.ambari.logsearch.performance" additivity="false">
-    <appender-ref ref="performance_analyzer"/>
+    <appender-ref ref="performance_analyzer_json"/>
   </logger>
 
   <category name="org.apache.ambari.logsearch" additivity="false">
     <priority value="info"/>
-    <appender-ref ref="rolling_file"/>
+    <appender-ref ref="rolling_file_json"/>
   </category>
 
   <root>
     <priority value="warn"/>
-    <appender-ref ref="rolling_file"/>
+    <!-- <appender-ref ref="console" /> -->
+    <!--<appender-ref ref="rolling_file" /> -->
+    <appender-ref ref="rolling_file_json"/>
   </root>
 </log4j:configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/cda7f2a3/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 19e0931..a687893 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -2171,6 +2171,13 @@ var hdp2properties = [
     "category": "Advanced logsearch-site",
     "index": 8
   },
+  {
+    "name": "logsearch.logfeeder.include.default.level",
+    "serviceName": "LOGSEARCH",
+    "filename": "logsearch-site.xml",
+    "category": "Advanced logsearch-site",
+    "index": 9
+  }
   /*logsearch-solr-env*/
   {
     "name": "logsearch_solr_datadir",


Mime
View raw message