-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
I'm trying to follow the instructions to setup dd-agent using Docker containers in Heroku but I ran into two issues:
datadog-agentwon't start withoutDD_HOSTNAMEbeing set. There's code indatadog.shthat sets it but how isDD_HOSTAMEsupposed to be set without the buildpack?
heroku-buildpack-datadog/extra/datadog.sh
Lines 116 to 138 in 2f197c9
| if [ -z "$DD_HOSTNAME" ]; then | |
| if [ "$DD_DYNO_HOST" == "true" ]; then | |
| # Set the hostname to dyno name and ensure rfc1123 compliance. | |
| HAN="$(echo "$HEROKU_APP_NAME" | sed -e 's/[^a-zA-Z0-9-]/-/g' -e 's/^-//g')" | |
| if [ "$HAN" != "$HEROKU_APP_NAME" ]; then | |
| if [ "$DD_LOG_LEVEL_LOWER" == "debug" ]; then | |
| echo "WARNING: The appname \"$HEROKU_APP_NAME\" contains invalid characters. Using \"$HAN\" instead." | |
| fi | |
| fi | |
| D="$(echo "$DYNO" | sed -e 's/[^a-zA-Z0-9.-]/-/g' -e 's/^-//g')" | |
| export DD_HOSTNAME="$HAN.$D" | |
| else | |
| # Set the hostname to the dyno host | |
| DD_HOSTNAME="$(echo "$DYNOHOST" | sed -e 's/[^a-zA-Z0-9-]/-/g' -e 's/^-//g')" | |
| export DD_HOSTNAME | |
| fi | |
| else | |
| # Generate a warning about DD_HOSTNAME deprecation. | |
| if [ "$DD_LOG_LEVEL_LOWER" == "debug" ]; then | |
| echo "WARNING: DD_HOSTNAME has been set. Setting this environment variable may result in metrics errors. To remove it, run: heroku config:unset DD_HOSTNAME" | |
| fi | |
| fi |
-
CMD ["./scripts/entrypoint.sh"]does not start the agent. I can't find anything in Heroku documentation that would explain how to run multiple processes in a container. If I just run the script from the command line in the dyno the agent starts, there are no errors. -
PS. It would also be helpful to have an example of minimal
datadog.yamlconfig file to get everything going using Docker.
Metadata
Metadata
Assignees
Labels
No labels