Skip to content

Adjust graylog entrypoint.sh with curl  #187

@samkhamk

Description

@samkhamk

Hello Team,

I was trying to bring curl command to bring some properties enabled once graylog is up but its not working for me

I tried below thing
graylog() {

exec "${JAVA_HOME}/bin/java"
${GRAYLOG_SERVER_JAVA_OPTS}
-jar
-Dlog4j.configurationFile="${GRAYLOG_HOME}/data/config/log4j2.xml"
-Djava.library.path="${GRAYLOG_HOME}/lib/sigar/"
-Dgraylog2.installation_source=docker
"${GRAYLOG_HOME}/graylog.jar"
server
-f "${GRAYLOG_HOME}/data/config/graylog.conf"
}

curl() {
curl something
}

run() {
setup
graylog
curl
}

run

but its not working , then I tried below thing

graylog() {

exec "${JAVA_HOME}/bin/java"
${GRAYLOG_SERVER_JAVA_OPTS}
-jar
-Dlog4j.configurationFile="${GRAYLOG_HOME}/data/config/log4j2.xml"
-Djava.library.path="${GRAYLOG_HOME}/lib/sigar/"
-Dgraylog2.installation_source=docker
"${GRAYLOG_HOME}/graylog.jar"
server
-f "${GRAYLOG_HOME}/data/config/graylog.conf" &&
curl something
}

it works command gets executed but container keeps on restarting , even I tried below thing s

graylog() {

"${JAVA_HOME}/bin/java"
${GRAYLOG_SERVER_JAVA_OPTS}
-jar
-Dlog4j.configurationFile="${GRAYLOG_HOME}/data/config/log4j2.xml"
-Djava.library.path="${GRAYLOG_HOME}/lib/sigar/"
-Dgraylog2.installation_source=docker
"${GRAYLOG_HOME}/graylog.jar"
server
-f "${GRAYLOG_HOME}/data/config/graylog.conf" &&
curl something
exec "$@"
}

it is also not working, can someone help me here how I can add curl after graylog is up in automated way, I tried to get help from community but no luck,

I dont want to use any operator or sidecar for this. please help I am sorry to for asking help in this manner.

Regards,
SAM

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions