diff options
Diffstat (limited to 'packages/base/src/files/install/elk')
-rw-r--r-- | packages/base/src/files/install/elk/bin/elk.sh | 8 | ||||
-rw-r--r-- | packages/base/src/files/install/elk/config/elasticsearch.yml | 2 | ||||
-rw-r--r-- | packages/base/src/files/install/elk/init.d/elkd | 6 |
3 files changed, 11 insertions, 5 deletions
diff --git a/packages/base/src/files/install/elk/bin/elk.sh b/packages/base/src/files/install/elk/bin/elk.sh index 2f61547c9..86cfb46b3 100644 --- a/packages/base/src/files/install/elk/bin/elk.sh +++ b/packages/base/src/files/install/elk/bin/elk.sh @@ -29,7 +29,7 @@ function usage() { } function log() { - echo "$(date +"%Y-%m-%d_%H-%M-%S") $1" >> ${POLICY_HOME}/logs/elk.log + echo "$(date +"%Y-%m-%d_%H-%M-%S") $1" >> ${POLICY_LOGS}/policy/elk.log echo "$1" } @@ -128,7 +128,7 @@ function audit() { fi fi - $JAVA_HOME/bin/java -cp $POLICY_HOME/servers/pap/webapps/pap/WEB-INF/lib/ONAP-PAP-REST-*.jar:$POLICY_HOME/servers/pap/webapps/pap/WEB-INF/lib/*: -DPROPERTY_FILE=$POLICY_HOME/servers/pap/bin/policyelk.properties org.onap.policy.pap.xacml.rest.elk.client.ElasticSearchPolicyUpdate + $JAVA_HOME/bin/java -cp $POLICY_HOME/servers/pap/webapps/pap/WEB-INF/lib/ONAP-PAP-REST-*.jar:$POLICY_HOME/servers/pap/webapps/pap/WEB-INF/lib/*: -DPOLICY_LOGS=$POLICY_LOGS -DPROPERTY_FILE=$POLICY_HOME/servers/pap/bin/policyelk.properties org.onap.policy.pap.xacml.rest.elk.client.ElasticSearchPolicyUpdate } ######################################################################### @@ -175,6 +175,8 @@ if pidof -o %PPID -x $(basename $0) > /dev/null 2>&1; then exit 1 fi +. ${POLICY_HOME}/etc/profile.d/env.sh + case $OPERATION in audit) audit @@ -183,4 +185,4 @@ case $OPERATION in usage exit 1 ;; -esac
\ No newline at end of file +esac diff --git a/packages/base/src/files/install/elk/config/elasticsearch.yml b/packages/base/src/files/install/elk/config/elasticsearch.yml index 4191f0f6f..132f05ec9 100644 --- a/packages/base/src/files/install/elk/config/elasticsearch.yml +++ b/packages/base/src/files/install/elk/config/elasticsearch.yml @@ -56,7 +56,7 @@ node.name: "${{FQDN}}" # # Path to log files: # -path.logs: ${{POLICY_HOME}}/logs +path.logs: ${{POLICY_LOGS}} # # ----------------------------------- Memory ----------------------------------- # diff --git a/packages/base/src/files/install/elk/init.d/elkd b/packages/base/src/files/install/elk/init.d/elkd index 7b86904a9..11c6860a2 100644 --- a/packages/base/src/files/install/elk/init.d/elkd +++ b/packages/base/src/files/install/elk/init.d/elkd @@ -9,6 +9,8 @@ JMX_JAVA_OPTS="${JMX_JAVA_OPTS} -Dcom.sun.management.jmxremote.port=${{ELK_JMX_P JMX_JAVA_OPTS="${JMX_JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false" JMX_JAVA_OPTS="${JMX_JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false" +CMD_JAVA_OPTS="${CMD_JAVA_OPTS} -DPOLICY_LOGS=${POLICY_LOGS}" + RETVAL=0 function update_monitor() { @@ -34,7 +36,7 @@ function stop() { } function start() { - export ES_JAVA_OPTS="${JAVA_OPTS} ${JMX_JAVA_OPTS}" + export ES_JAVA_OPTS="${JAVA_OPTS} ${JMX_JAVA_OPTS} ${CMD_JAVA_OPTS}" $POLICY_HOME/elk/bin/elasticsearch -d RETVAL=$? if [[ ${RETVAL} != 0 ]]; then @@ -46,6 +48,8 @@ function start() { # main +. ${POLICY_HOME}/etc/profile.d/env.sh + case "$1" in status) pid=$(pgrep -f -u ${POLICY_USER} "${ELK_RUNNING}" 2> /dev/null) |