Mesos-Marathon
Setup your collectors!¶
Epoch collectors can be run in both containerized as well as non-containerized environments. Only one collector is needed per host (VM or bare metal OS). Please follow the environment specific installation instructions below.
Installation¶
Before you begin: Consult Supported Platforms and Collector Requirements.
-
Save the manifest below as
epoch-dcos-collectors.json
{ "id": "epoch-collectors", "container": { "type": "DOCKER", "docker": { "network": "HOST", "image": "gcr.io/nutanix-epoch/collectors:latest", "parameters": [ { "key": "cap-add", "value": "NET_RAW" }, { "key": "cap-add", "value": "NET_ADMIN" } ] }, "volumes": [ { "containerPath": "/var/run/docker.sock", "hostPath": "/var/run/docker.sock", "mode": "RO" }, { "containerPath": "/host/proc/", "hostPath": "/proc/", "mode": "RO" }, { "containerPath": "/host/sys/fs/cgroup", "hostPath": "/sys/fs/cgroup/", "mode": "RO" } ] }, "cpus": 0.2, "mem": 512, "instances": 1, "acceptedResourceRoles": ["*", "slave_public"], "env": { "EPOCH_AOC_HOST": "${your_epoch_host}", "EPOCH_ORGANIZATION_ID": "${organizationId}", "EPOCH_INTERFACE": "any", "EPOCH_ANALYSIS_DEPTH": "layer7", "EPOCH_L7_SAMPLINGRATE": "20", "DEPLOY_ENV": "docker" }, "constraints": [ ["hostname", "UNIQUE"] ] }
-
Modify the
instances
field in the JSON to reflect the number of agent nodes in your mesos cluster.
1.Install the collectors.
dcos marathon app add epoch-dcos-collectors.json
Installing Integrations¶
Creating and Persisting the Config File¶
Below, we list some methods of creating the config file such that it will be persisted across container restarts.
If the service you are integrating with is running as a container, its integration likely supports autoconf.
Thus, your integrations config file should reside in the /etc/nutanix/epoch-dd-agent/conf.d/auto_conf
directory of your collectors.
Also, you should use%%host%%
and %%port%%
in place of any hardcoded host
and port
parameters in the config file.
Remember to use the Configuration section from the instructions page for your integration as reference for the name and contents of the config file.
Custom Images¶
Create a custom container image that derives from the base collector image provided by Epoch. The following is a template Dockerfile:
# Collectors follow the same versioning scheme as the AOC, replace x.x.x with your AOC version
FROM epoch/collectors:stable-x.x.x
# Copy the ".yaml" file(s) at collector build time
COPY *.yaml /etc/nutanix/epoch-dd-agent/conf.d/auto_conf
Volume-mounting¶
Volume-mount the configuration directory from the host, such that the yaml
configuration fields can be provided directly on the host file system. You will need to provide the following parameter to the container's run command:
-v /etc/nutanix/epoch-dd-agent/conf.d/:/etc/nutanix/epoch-dd-agent/conf.d/:ro
Running the Integration¶
After you have persisted the config file, the integration should start automatically when the collector image itself is run.
Checking Configuration¶
First, SSH into one of your mesos agent nodes where you have the collectors installed. Then, check to make sure that all yaml files are valid with the following command:
docker exec <collector-container-name> /etc/init.d/epoch-collectors configcheck
Checking Runtime¶
First, SSH into one of your mesos agent nodes where you have the collectors installed. Then, check to make sure that the integration is running correctly with the following command:
docker exec <collector-container-name> /etc/init.d/epoch-collectors info
The output of the info command should contain a section similar to the following:
Checks
======
[...]
<name-of-integration>
----------
- instance #0 [OK]
- Collected 8 metrics & 0 events
Reporting Troubleshooting Information¶
If you are having issues with your collectors, you can run an inspect
command which will gather troubleshooting information about the collectors, as well as any necessary logs.
-
SSH into one of your mesos agent nodes where you have the collectors installed.
-
Locate the container name of the collector and run:
docker exec <collector-container-name> /etc/init.d/epoch-collectors inspect
The tar file is created in the
/tmp
directory, and the file name begins withepoch-collectors-inspection
. -
Obtain this tarball with the following commands
# To get the exact name docker exec <collector-container-name> ls /tmp # To obtain the tarball docker cp <collector-container-name>:/tmp/<filename-of-inspect-tarball> .
-
Send the tar file to Epoch support through email at epoch-support@nutanix.com.
Uninstallation¶
To uninstall the collectors, run the following commands:
dcos marathon app stop epoch-collectors
dcos marathon app remove epoch-collectors