summaryrefslogtreecommitdiffstats
path: root/packages/base/src/files/install/elk
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-05-24 11:04:37 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-24 11:04:37 +0000
commit2f8ab5851fb070fac82472cf8a3c8542a657ca01 (patch)
treec3c68f4ebc6539d2428268da1cba9dd39a1f42e7 /packages/base/src/files/install/elk
parenta08e498c52e5f778ec85cb698ac985488319b9f3 (diff)
parentee033842018375e0200a9b8f2e0dc813974440fd (diff)
Merge "Replace LOGPATH with LOGSUFFIX"
Diffstat (limited to 'packages/base/src/files/install/elk')
-rw-r--r--packages/base/src/files/install/elk/bin/elk.sh8
-rw-r--r--packages/base/src/files/install/elk/init.d/elkd6
2 files changed, 10 insertions, 4 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/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)