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><?xml version="1.0" encoding="UTF-8" ?> +<!-- + 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. +--> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> + <appender name="console" class="org.apache.log4j.ConsoleAppender"> + <param name="Target" value="System.out" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d [%t] %-5p %C{6} (%F:%L) - %m%n" /> + </layout> + </appender> + + <appender name="rolling_file" class="org.apache.log4j.RollingFileAppender"> + <param name="file" value="{{logsearch_log_dir}}/logsearch.log" /> + <param name="append" value="true" /> + <param name="maxFileSize" value="10MB" /> + <param name="maxBackupIndex" value="10" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d [%t] %-5p %C{6} (%F:%L) - %m%n"/> + </layout> + </appender> + + <appender name="audit_rolling_file" class="org.apache.log4j.RollingFileAppender"> + <param name="file" value="{{logsearch_log_dir}}/logsearch-audit.log" /> + <param name="append" value="true" /> + <param name="maxFileSize" value="10MB" /> + <param name="maxBackupIndex" value="10" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d [%t] %-5p %C{6} (%F:%L) - %m%n"/> + </layout> + </appender> + + <appender name="performance_analyzer" class="org.apache.log4j.RollingFileAppender"> + <param name="file" value="{{logsearch_log_dir}}/logsearch-performance.log" /> + <param name="Threshold" value="info" /> + <param name="append" value="true" /> + <param name="maxFileSize" value="10MB" /> + <param name="maxBackupIndex" value="10" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d [%t] %-5p %C{6} (%F:%L) - %m%n" /> + </layout> + </appender> + + <logger name="org.apache.ambari.logsearch.audit" additivity="true"> + <appender-ref ref="audit_rolling_file" /> + </logger> + + <logger name="org.apache.ambari.logsearch.performance" additivity="false"> + <appender-ref ref="performance_analyzer" /> + </logger> + + <category name="org.apache.ambari.logsearch" additivity="false"> + <priority value="info" /> + <appender-ref ref="rolling_file" /> + </category> + + <root> + <priority value="warn" /> + <appender-ref ref="rolling_file" /> + </root> +</log4j:configuration> + </value> + </property> + + +</configuration>
