Skip to content

Commit

Permalink
chore: moving container management to dedicated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
thezackm committed Dec 9, 2021
1 parent 1d23860 commit 2e984ff
Showing 1 changed file with 307 additions and 0 deletions.
@@ -0,0 +1,307 @@
---
title: Managing the 'ktranslate' container
tags:
- Integrations
- Network performance monitoring
- Advanced configuration
- ktranslate
metaDescription: Managing the 'ktranslate' Docker container for NPM
---

This page outlines the options for management of the **ktranslate** container used by New Relic NPM.

## Container requirements [#container-requirements]

lorem

<Callout variant="tip">
The ktranslate container image runs a single "job type" at a time. For instance, a container deployed for SNMP polling and trap collection will not be used for flow collection. Furthermore, containers deployed for flow collection are limited to a single `-nf.source` type per container. This means that it is common to have multiple containers deployed to a single Docker host at any given time. They can also share a common configuration file, but do not have to.
</Callout>

## Updating the container [#updating-the-container]

Keeping the **ktranslate** container image up to date is good practice to both receive the latest updates and resolve common problems through various bug fixes applied during the development lifecycle. It is recommended to always pull the latest available image when redeploying your containers.

1. Pull the latest container image available

```bash
docker pull kentik/ktranslate:v2
```

2. Collect the IDs and names of any existing containers

```bash
docker ps -a --filter ancestor=kentik/ktranslate:v2 --format "{{.ID}} - {{.Names}}"
```

Output Example:

```
3297b134a352 - ktranslate-snmp
4962a854b386 - ktranslate-sflow
```

3. Remove any pre-existing containers

```bash
docker rm -f $CONTAINER_ID
```

4. Redeploy your **ktranslate** container using the original settings you deployed with from either [SNMP](/docs/network-performance-monitoring/setup-performance-monitoring/snmp-performance-monitoring), [flow data](/docs/network-performance-monitoring/setup-performance-monitoring/network-flow-monitoring), or [syslog collection](/docs/network-performance-monitoring/setup-performance-monitoring/network-syslog-monitoring).

<Callout variant="important">
The configuration file used by **ktranslate** is applied to the container at runtime. Changes to this file require you to remove and restart your running container(s) to apply the edits.
</Callout>

## Container runtime options [#container-runtime-options]

Below are the various options available during Docker runtime for the **ktranslate** container image:

<table>
<thead>
<tr>
<th style={{ width: "200px" }}>
Option name
</th>
<th>
Type
</th>
<th>
Required
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
`-snmp`
</td>
<td>
Flag
</td>
<td>✓</td>
<td>
Sets the path to the `snmp-base.yaml` file on the Docker container, based on the volume mount from the Docker host passed as an option during runtime.
</td>
</tr>
<tr>
<td>
`-nr_account_id`
</td>
<td>
Flag
</td>
<td>✓</td>
<td>
The New Relic One account ID that **ktranslate** will ship data to.
</td>
</tr>
<tr>
<td>
`-log_level`
</td>
<td>
Flag
</td>
<td></td>
<td>
Overrides the default **info** log level for **ktranslate**. The available options are `debug`, `info`, `warn`, or `error`.
</td>
</tr>
<tr>
<td>
`-snmp_discovery`
</td>
<td>
Flag
</td>
<td></td>
<td>
Used to setup the container in SNMP discovery mode.
</td>
</tr>
<tr>
<td>
`-tee_logs`
</td>
<td>
Flag
</td>
<td></td>
<td>
Forwards Docker logs from **ktranslate** into New Relic One Logs.
</td>
</tr>
<tr>
<td>
`-metrics=jchf`
</td>
<td>
Flag
</td>
<td></td>
<td>
Forwards health metrics from **ktranslate** into New Relic One.
</td>
</tr>
<tr>
<td>
`-service_name`
</td>
<td>
Flag
</td>
<td></td>
<td>
Appended to the container name in Docker logs to help isolate logs from various containers in New Relic One Logs.
</td>
</tr>
<tr>
<td>
`-nr_region`
</td>
<td>
Flag
</td>
<td></td>
<td>
Sets the regional API endpoints for **ktranslate** to forward telemetry to New Relic One. Options are `US`, `EU`, and `GOV` (FedRAMP).
</td>
</tr>
<tr>
<td>
`-max_threads`
</td>
<td>
Flag
</td>
<td></td>
<td>
Lets you process higher volumes of data. We recommend one CPU core available for every 2,000 flows per second (fps) of network flow data sent, or every 1,000 SNMP devices being monitored, or every 2,000 syslog messages per second collected by a container. The default is `1`.
</td>
</tr>
<tr>
<td>
`-sample_rate`
</td>
<td>
Flag
</td>
<td></td>
<td>
Changes the default sample rate value at which flows are passed to New Relic One Events. This does not speed up the local configuration of flow sample rate on a device, but it can slow it down. Setting this to `1` will enable capturing all flows sent to the container. The default is `1000`.
</td>
</tr>
<tr>
<td>
`-nf.workers`
</td>
<td>
Flag
</td>
<td></td>
<td>
Overrides the number of workers used in processing network packets. Use one worker for every 4,000 of flows per second (fps) of network flow data sent. The default is `1`.
</td>
</tr>
<tr>
<td>
`-nf.port`
</td>
<td>
Flag
</td>
<td></td>
<td>
Overrides the listening port for incoming flow packets. The default is `9995`.
</td>
</tr>
<tr>
<td>
`-nf.source`
</td>
<td>
Flag
</td>
<td>✓ (For flow containers)</td>
<td>
Sets up the type of flow this container will process. Options are `ipfix`, `netflow5`, `netflow9`, and `sflow`.
</td>
</tr>
<tr>
<td>
`-application_map`
</td>
<td>
Flag
</td>
<td></td>
<td>
Sets the path to an [application map](/docs/network-performance-monitoring/setup-performance-monitoring/advanced-config) file on the Docker container, based on a volume mount from the Docker host passed as an option during runtime.
</td>
</tr>
<tr>
<td>
`nr1.flow`
</td>
<td>
Argument
</td>
<td>✓ (For flow containers)</td>
<td>
This argument statically sets the following flags: `compression: gzip`, `sink: new_relic`, `format: new_relic`, `max_before_sample: 100`, `flow_only:true`.
</td>
</tr>
<tr>
<td>
`nr1.snmp`
</td>
<td>
Argument
</td>
<td>✓ (For SNMP containers)</td>
<td>
This argument statically sets the following options: `compression: gzip`, `sink: new_relic`, `format: new_relic_metric`, `max_flows_per_message: 100`.
</td>
</tr>
<tr>
<td>
`nr1.syslog`
</td>
<td>
Argument
</td>
<td>✓ (For syslog containers)</td>
<td>
This argument statically sets the following flags: `compression: gzip`, `sink: new_relic`, `format: new_relic_metric`, `syslog:"0.0.0.0:5143"`.
</td>
</tr>
<tr>
<td>
`NEW_RELIC_API_KEY`
</td>
<td>
Environment Variable
</td>
<td>✓</td>
<td>
Environment variable that must be used during Docker runtime to hold the New Relic license key for **ktranslate** to send data to the New Relic APIs. Ex: `-e NEW_RELIC_API_KEY=$LICENSE_KEY`.
</td>
</tr>
<tr>
<td>
`HTTPS_PROXY`
</td>
<td>
Environment Variable
</td>
<td></td>
<td>
Environment variable that can be used during Docker runtime to setup **ktranslate** to ship data to New Relic via proxy. Ex: `-e HTTPS_PROXY=https://user:password@hostname:port`.
</td>
</tr>
</tbody>
</table>

0 comments on commit 2e984ff

Please sign in to comment.