/vividcortex

Primary LanguageDockerfile

VividCortex Alpine Docker container

Runs VividCortex agents in an Alpine Linux Docker container, for off-host monitoring (see here).

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. 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 Monitor?" choose the "Containerized" option. From the "Agents API Token" box copy the token and close the "Install VividCortex On A New Host" dialog.

At this point you should have a repository named "vcimage" in docker images.

Now create and start a container for your RDS host:

docker run --env VC_HOSTNAME=myprettyhostname \
  --env VC_DRV_MANUAL_HOST_URI='mysql://user:pass@domain.xyz:3306/db' \
  --detach --interactive --tty --name=vividcortex vcimage

where:

  • VC_HOSTNAME, optional, is a host name to use instead of Docker's random hex one.

  • VC_DRV_MANUAL_HOST_URI, optional, is a comma-separated list of database URLs to monitor. You can still add hosts using VividCortex's web app. Database URL format:

     <schema>://[<user>[:<password>]@]<host>:<port>[/<db>][?key1=value1&...]
    

Original work kindly contributed by @phobologic. Thanks Mike!