Datadog

DataDog Agent Container Detail

Getting Started with VNS3 Plugin System

The DataDog Agent is deployed to VNS3 as a plugin using the container system.

Please be familiar with the VNS3 Plug-In Configuration Guide.

DataDog Agent Container - What does it do?

The DataDog Agent Container collects information from a host VNS3 controller via SNMP and the VNS3 API, and reports VNS3 state information to DataDog.

These data can be visualized as graphs or status checks, with certain conditions triggering DataDog’s alert system.

The goal is to prevent outages by monitoring VNS3 system and network health, and to receive automatic alerts when unfavorable conditions arise.

DataDog Agent Container - What does it need?

The DataDog Agent setup script inside the container requires the following information:

  • A unique hostname to identify the Agent
  • An IP address at which the host VNS3 controller can be reached
  • A decision regarding whether to report the state of all overlay clients or only those whose state is “Checked Out”
  • A decision regarding how often data will be gathered from VNS3 and reported to DataDog
  • The VNS3 API username and password
  • A DataDog API key associated with your account

Deploying the DataDog Agent Container

Getting the DataDog Agent Container

The Linux-based (Ubuntu 14.04) DataDog Agent Container Image is accessible at the following URL:
https://vns3-containers-read-all.s3.amazonaws.com/DataDog/DataDog_v1-0.tar.gz

This is a read-only Amazon S3 storage location. Only Cohesive Networks can update or modify files stored in this location.

This URL can be used directly in a VNS3 Controller via the Web UI or API to import the container image for use in that controller. (General screenshot walkthrough and help available in the plug-in configuration document.)

Uploading the Container Image to the VNS3 Plugin System

From the Container —> Images menu item, choose Upload Image.

Provide a name for the image and a short description if you wish.

Enter the DataDog Container Image file URL:
https://vns3-containers-readall.s3.amazonaws.com/DataDog/DataDog_v1-0.tar.gz

Click Upload.

Uploading the Container Image to the VNS3 Plugin System

Allocating a Container from the Image

When the Image has imported it will say Ready in the Status Column.

To then launch a container from the image, choose Allocate from the Action menu.

Allocating a Container from the Image

Launching the DataDog Plugin

After selecting Allocate from the Actions menu, name your container, provide a description, and /usr/bin/supervisord as the Command to start the container.

You can allow VNS3 to auto-assign a container network IP, but it is recommended that you choose one manually. Note this address for the next step.

Launching the DataDog Plugin

DataDog Agent Container Firewall Rules

The DataDog Agent Container requires the following firewall rules be added to the VNS3 controller:

Anywhere it appears, replace <container_ip> with the container IP you noted in the previous step.

#Port forward tcp44 to DataDog container for ssh
PREROUTING_CUST -i eth0 -p tcp --dport 44 -j DNAT --to <container_ip>:22
#SNAT for container network
MACRO_CUST -o eth0 -s <container_ip> -j MASQUERADE
#Accept incoming SNMP from DataDog container
INPUT_CUST -p udp -s <container_ip> --dport snmp -j ACCEPT
INPUT_CUST -p tcp --dport 8000 -s <container_ip> -j ACCEPT
#Allow returning SNMP traffic
OUTPUT_CUST -p udp -d <container_ip> --sport snmp -j ACCEPT
OUTPUT_CUST -p tcp --sport 8000 -d <container_ip> -j ACCEPT

DataDog Agent Container Firewall Rules

Configure the DataDog Agent Container

Configuring the DataDog Agent Container

After allocating the container and applying the necessary firewall rules to VNS3, you can ssh into the container on port 44.

The username is container_admin, and the default password is container_admin_123!

We recommend that you change this password immediately: . sudo passwd container_admin

Configuring the DataDog Agent Container

Configuration of the DataDog agent is automated; run python ~/datadog-setup.py and answer the questions as they appear. Some defaults and values are auto-detected.

The What does it need? section details the information required.

After entering your DataDog API key, installation of the DataDog Agent will begin. When it is finished, new metrics will be reported to DataDog automatically.

The metric names are vns3.overlay.clients, vns3.peering, and vns3.ipsec.

Create Status checks on a Dashboard

Metrics vns3.overlay.clients, vns3.peering, and vns3.ipsec can be grouped by ip, peerid, and tunnel, respectively.

To create a status check widget, open a DataDog Dashboard and select Edit Board.

Drag a new Check Status widget from the widget bar onto your dashboard.

Select the appropriate check name from the dropdown, select A Cluster of Checks from the Statuses for: dropdown, select host:[the hostname you provided during setup] from the Reported by: list, and then choose one of the following for the Group by: field:
For vns3.overlay.clients, choose “ip”
For vns3.peering, choose “peerid”
For vns3.ipsec, choose “tunnel” (If you wish to create a widget for only one Endpoint, choose that endpoint in the “Statuses for:” box along with your host:[hostname] selection

Export a Container Image

In the event that your VNS3 controller needs to be replaced or upgraded, you will need a copy of your configured DataDog Agent Container. We recommend creating and downloading an image of your container as part of the deployment process:

From the Containers page in the VNS3 web UI, select Action > Save as Image for your new DataDog Container. Once that process is complete, you’ll be brought to the Images page. Select Action > Export on the new image, and provide a name.

Once Exporting is complete, you will have the option to download the image.