Container of Cloud intelligence Platform Agent.
780
This repository is meant to build the base image for a CiAgent container. You will have to use the resulting image to configure and run the Agent.
The default image is ready-to-go. You just need to set your hostname and LICENSE_KEY in the environment.
docker run -d --name ciagent -h `hostname` -v /var/run/docker.sock:/var/run/docker.sock -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -e LICENSE_KEY={your_license_key_here} dataphant/docker-aiops-ciagent
If you are running on Amazon Linux, use the following instead:
docker run -d --name ciagent -h `hostname` -v /var/run/docker.sock:/var/run/docker.sock -v /proc/:/host/proc/:ro -v /cgroup/:/host/sys/fs/cgroup:ro -e LICENSE_KEY={your_license_key_here}
dataphant/docker-aiops-ciagent
A few parameters can be changed with environment variables.
TAGS set host tags. Add -e TAGS="simple-tag-0,tag-key-1:tag-value-1" to use [simple-tag-0, tag-key-1:tag-value-1] as host tags.LOG_LEVEL set logging verbosity (CRITICAL, ERROR, WARNING, INFO, DEBUG). Add -e LOG_LEVEL=DEBUG to turn logs to debug mode.PROXY_HOST, PROXY_PORT, PROXY_USER and PROXY_PASSWORD set the proxy configuration.CI_URL set the Cloudinsight intake server to send Agent data to CloudinsightTo enable integrations you can write your YAML configuration files in the /conf.d folder, they will automatically be copied to /etc/CiAgent/conf.d/ when the container starts.
Create a configuration folder on the host and write your YAML files in it.
mkdir /opt/CiAgent.d
touch /opt/CiAgent.d/nginx.yaml
When creating the container, mount this new folder to /conf.d.
docker run -d --name ciagent -h `hostname` -v /var/run/docker.sock:/var/run/docker.sock -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -v /etc/CiAgent.d:/conf.d:ro -e LICENSE_KEY={your_license_key_here} dataphant/docker-aiops-ciagent
The important part here is -v /etc/CiAgent/conf.d:/conf.d:ro
Now when the container starts, all files in ``/etc/CiAgent/conf.dwith a.yamlextension will be copied to/etc/CiAgent/conf.d/`. Please note that to add new files you will need to restart the container.
To configure custom checks, or setup integrations straight in the image, you will need to build a Docker image on top of this image.
Create a Dockerfile to set your specific configuration or to install dependencies.
FROM dataphant/docker-aiops-ciagent
# Example: MySQL
ADD conf.d/mysql.yaml /etc/CiAgent/conf.d/mysql.yaml
Build it.
docker build -t ciagent-image .
Then run it like the dataphant/docker-aiops-ciagent image.
docker run -d --name ciagent -h `hostname` -v /var/run/docker.sock:/var/run/docker.sock -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -e LICENSE_KEY={your_license_key_here} CiAgent-image
It's done!
To display information about the Agent's state with this command.
docker exec ciagent service ciagent info
Warning: the docker exec command is available only with Docker 1.3 and above.
That's the simplest solution. It imports container's log to one's host directory.
docker cp ciagent:/var/log/CiAgent /tmp/log-CiAgent
Basic information about the Agent execution are available through the logs command.
docker logs ciagent
Docker isolates containers from the host. As a result, the Agent won't have access to all host metrics.
Known missing/incorrect metrics:
Also, several integrations might be incomplete.
Content type
Image
Digest
Size
119.7 MB
Last updated
over 7 years ago
docker pull dataphant/docker-aiops-ciagent