Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VC_ENABLE_RDS_OFFHOST build-arg for Alpine Linux #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ LABEL app=vividcortex
## REMOVE CONTAINER AND IMAGE: docker rm --force vividcortex; docker rmi --force vcimage

ARG VC_API_TOKEN
ARG VC_ENABLE_RDS_OFFHOST

WORKDIR /
ENTRYPOINT ["/usr/local/bin/vc-agent-007","-foreground","-forbid-restarts"]
Expand All @@ -29,4 +30,6 @@ RUN test -n "${VC_API_TOKEN}" && \
rm -f install && \
sed '1 a "log-max-size":"5",' /etc/vividcortex/global.conf > /etc/vividcortex/tempconf && \
sed '1 a "log-max-backups":"1",' /etc/vividcortex/tempconf > /etc/vividcortex/global.conf && \
rm -f /etc/vividcortex/tempconf && chmod 600 /etc/vividcortex/global.conf
rm -f /etc/vividcortex/tempconf && chmod 600 /etc/vividcortex/global.conf && \
test -n "${VC_ENABLE_RDS_OFFHOST}" && \
printf '{\n "force-offhost-digests": "true",\n "force-offhost-samples": "true"\n}\n' >/etc/vividcortex/vc-mysql-metrics.conf || true
17 changes: 17 additions & 0 deletions alpine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ To use, you should build a image for your environment:
docker build --force-rm --build-arg VC_API_TOKEN=xxxxxxxxxxxxxxxx -t vcimage \
https://raw.githubusercontent.com/VividCortex/docker/master/alpine/Dockerfile

Optional build-args:

* `VC_ENABLE_RDS_OFFHOST`, for AWS RDS DB instances, let the VividCortex agent
enable digests and query sampling since one cannot set relevant parameters in
`my.cnf` and it is not exposed in Parameter Groups. See [VividCortex docs][1].
Usage: `--build-arg VC_ENABLE_RDS_OFFHOST=1`. Creates
`/etc/vividcortex/vc-mysql-metrics.conf`:

{
"force-offhost-digests": "true",
"force-offhost-samples": "true"
}


You can get your API token from the host wizard in VividCortex as follows:
In your account from the Hosts page add a new host by clicking the "Add New
Host" button in the upper right. From "Where Is The Service You Want To
Expand All @@ -31,3 +45,6 @@ where:
```

Original work kindly contributed by @phobologic. Thanks Mike!


[1]: https://docs.vividcortex.com/getting-started/off-host-installation/#enabling-performance-schema-on-mysql