ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject [06/10] ambari git commit: AMBARI-15679. Stack definition for Logsearch (oleewre)
Date Sat, 09 Apr 2016 11:13:26 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/4a2dcfbe/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
new file mode 100644
index 0000000..36e88db
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<!-- This is a special config file for properties used to monitor status of the service
-->
+<configuration supports_adding_forbidden="true">
+
+  <property>
+    <name>logsearch_pid_dir</name>
+    <value>/var/run/ambari-logsearch-portal</value>
+    <description>Logsearch Process ID Directory</description>
+    <display-name>Logsearch pid dir</display-name>
+  </property> 
+
+  <property>
+    <name>logsearch_log_dir</name>
+    <value>/var/log/ambari-logsearch-portal</value>
+    <description>Log directory for Logsearch</description>
+    <display-name>Logsearch log dir</display-name>
+  </property>
+
+  <property>
+    <name>logsearch_user</name>
+    <value>logsearch</value>
+    <property-type>USER</property-type>
+    <description>Logsearch user</description>
+    <display-name>Logsearch User</display-name>
+  </property>  
+
+  <property>
+    <name>logsearch_group</name>
+    <value>logsearch</value>
+    <property-type>GROUP</property-type>
+    <description>Logsearch group</description>
+    <display-name>Logsearch Group</display-name>
+  </property>
+
+  <property>
+    <name>logsearch_app_max_memory</name>
+    <value>1g</value>
+    <description>Max memory for LogSearch</description>
+    <display-name>Logearch Max Memory</display-name>
+  </property>
+
+  <property>
+    <name>logsearch_solr_audit_logs_use_ranger</name>
+    <value>false</value>
+    <display-name>Ranger Audit Enabled</display-name>
+    <description>Use Ranger Audit collection. This is supported only if Ranger Solr
is installed in SolrCloud mode</description>
+  </property>
+
+  <property>
+    <name>logsearch_debug_enabled</name>
+    <value>false</value>
+    <display-name>Logsearch Debug Enabled</display-name>
+    <description>Enable debug mode for Logsearch Server</description>
+  </property>
+
+  <property>
+    <name>logsearch_debug_port</name>
+    <value>5005</value>
+    <display-name>Logsearch Debug Port</display-name>
+    <description>Debug port for Logsearch Server</description>
+  </property>
+
+  <property>
+    <name>logsearch_solr_audit_logs_zk_node</name>
+    <value>{logsearch_solr_znode}</value>
+    <display-name>Solr Audit Logs Znode</display-name>
+    <description>Only needed if using custom solr cloud. E.g. /audit_logs</description>
+  </property>
+
+  <property>
+    <name>logsearch_solr_audit_logs_zk_quorum</name>
+    <value>{zookeeper_quorum}</value>
+    <display-name>Solr Audit Logs ZK Quorum</display-name>
+    <description>Only needed if using custom solr cloud. E.g. zk1:2181,zk2:2182</description>
+  </property>
+
+  <!-- logsearch-env.sh -->
+
+  <property>
+    <name>content</name>
+    <description>This is the jinja template for logsearch-env.sh file</description>
+    <value>#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+set -e
+
+#path containing LogSearch.jar file
+export LOGSEARCH_PATH={{logsearch_dir}}
+
+export LOGSEARCH_CONF_DIR={{logsearch_server_conf}}
+
+export LOGFILE={{logsearch_log_dir}}/logsearch.log
+
+export PID_FILE={{logsearch_pid_file}}
+
+export JAVA_HOME={{java64_home}}
+
+export LOGSEARCH_JAVA_MEM=-Xmx{{logsearch_app_max_memory}}
+if [ "$LOGSEARCH_JAVA_MEM" = "" ]; then
+  export LOGSEARCH_JAVA_MEM="-Xmx1g"
+fi
+
+export LOGSEARCH_DEBUG={{logsearch_debug_enabled}}
+
+export LOGSEARCH_DEBUG_PORT={{logsearch_debug_port}}
+    </value>
+  </property>
+  
+</configuration>  

http://git-wip-us.apache.org/repos/asf/ambari/blob/4a2dcfbe/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml
new file mode 100644
index 0000000..a0a7bc9
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-log4j.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<!-- This is a special config file for properties used to monitor status of the service
-->
+<configuration supports_adding_forbidden="true">
+
+  <!-- log4j.xml -->
+
+  <property>
+    <name>content</name>
+    <description>This is the jinja template for log4j.xml file for logsearch server</description>
+    <value>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
+&lt;!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--&gt;
+&lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt;
+&lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"&gt;
+  &lt;appender name="console" class="org.apache.log4j.ConsoleAppender"&gt;
+    &lt;param name="Target" value="System.out" /&gt;
+    &lt;layout class="org.apache.log4j.PatternLayout"&gt;
+      &lt;param name="ConversionPattern" value="%d [%t] %-5p %C{6} (%F:%L) - %m%n" /&gt;
+    &lt;/layout&gt;
+  &lt;/appender&gt;
+
+  &lt;appender name="rolling_file" class="org.apache.log4j.RollingFileAppender"&gt;

+    &lt;param name="file" value="{{logsearch_log_dir}}/logsearch.log" /&gt; 
+    &lt;param name="append" value="true" /&gt; 
+    &lt;param name="maxFileSize" value="10MB" /&gt; 
+    &lt;param name="maxBackupIndex" value="10" /&gt; 
+    &lt;layout class="org.apache.log4j.PatternLayout"&gt; 
+      &lt;param name="ConversionPattern" value="%d [%t] %-5p %C{6} (%F:%L) - %m%n"/&gt;

+    &lt;/layout&gt; 
+  &lt;/appender&gt;
+
+  &lt;appender name="audit_rolling_file" class="org.apache.log4j.RollingFileAppender"&gt;
+    &lt;param name="file" value="{{logsearch_log_dir}}/logsearch-audit.log" /&gt;
+    &lt;param name="append" value="true" /&gt;
+    &lt;param name="maxFileSize" value="10MB" /&gt;
+    &lt;param name="maxBackupIndex" value="10" /&gt;
+    &lt;layout class="org.apache.log4j.PatternLayout"&gt;
+      &lt;param name="ConversionPattern" value="%d [%t] %-5p %C{6} (%F:%L) - %m%n"/&gt;
+    &lt;/layout&gt;
+  &lt;/appender&gt;
+
+  &lt;appender name="performance_analyzer" class="org.apache.log4j.RollingFileAppender"&gt;
+    &lt;param name="file" value="{{logsearch_log_dir}}/logsearch-performance.log" /&gt;
+    &lt;param name="Threshold" value="info" /&gt;
+    &lt;param name="append" value="true" /&gt;
+    &lt;param name="maxFileSize" value="10MB" /&gt; 
+    &lt;param name="maxBackupIndex" value="10" /&gt; 
+    &lt;layout class="org.apache.log4j.PatternLayout"&gt;
+      &lt;param name="ConversionPattern" value="%d [%t] %-5p %C{6} (%F:%L) - %m%n" /&gt;
+    &lt;/layout&gt;
+  &lt;/appender&gt;
+
+  &lt;logger name="org.apache.ambari.logsearch.audit" additivity="true"&gt;
+    &lt;appender-ref ref="audit_rolling_file" /&gt;
+  &lt;/logger&gt;
+  
+  &lt;logger name="org.apache.ambari.logsearch.performance" additivity="false"&gt;
+   &lt;appender-ref ref="performance_analyzer" /&gt;
+  &lt;/logger&gt;
+
+  &lt;category name="org.apache.ambari.logsearch" additivity="false"&gt;
+    &lt;priority value="info" /&gt;
+    &lt;appender-ref ref="rolling_file" /&gt;
+  &lt;/category&gt;
+
+  &lt;root&gt;
+    &lt;priority value="warn" /&gt;
+    &lt;appender-ref ref="rolling_file" /&gt;
+  &lt;/root&gt;
+&lt;/log4j:configuration&gt;  
+    </value>
+  </property>
+
+  
+</configuration>  


Mime
View raw message