Usage¶
Before starting this tutorial make sure you have a general idea of the components that make up the Neblic platform. If not, please read the concepts page first.
There are two components that you need to set up to start using Neblic: a Collector and one or more Samplers. The following diagram outlines how these components interact with each other.
graph LR;
Samplers--Data telemetry/raw data-->col[Collector]
col--Configurations-->Samplers
col--Data telemetry/raw data -->Store
ctl[neblictl]--Configurations-->col
Collector¶
We provide binaries and container images. The container images run the Collector and contain the neblictl configuration CLI for easier configuration.
- Binaries can be found on the GitHub releases page.
- Containers are available on the GitHub packages page.
This guide will now walk you through deploying a container-based Collector.
Architectures supported
For now, only x86-64
builds are offered. If you need another architecture you can build your own container following this guide.
Container¶
You can find all the Collector container releases in this page. The latest release is always tagged as ghcr.io/neblic/otelcol:latest
.
The container is configured by default to expose a Control Plane server at port 8899 and a data collection point at port 4317. It will export Data Telemetry to Grafana Loki at the endpoint defined with the env var NEBLIC_DATA_PLANE_EXPORTER_LOKI_ENDPOINT
.
Beta users
If you are a beta user, you need to change the default configuration file. You will need to set the env vars OTELCOL_CONFIG_PATH=/etc/neblic/otelcol/config_cloud.yaml
and NEBLIC_DATA_PLANE_EXPORTER_BEARER_TOKEN=<api-key>
To create an API key you need to have an account at https://app.neblic.com/. You can then create the API key going to the API tokens section. Once created, write it down so you can provide it to the container.
Examples¶
docker-compose¶
version: "2.1"
services:
neblic-otelcol:
image: ghcr.io/neblic/otelcol:latest
container_name: neblic-otelcol
environment:
- NEBLIC_DATA_PLANE_EXPORTER_LOKI_ENDPOINT: "http://loki:3100/loki/api/v1/push"
# - OTELCOL_CONFIG_PATH=/etc/neblic/otelcol/config_cloud.yaml
# - NEBLIC_DATA_PLANE_EXPORTER_BEARER_TOKEN=<your-api-token>
restart: unless-stopped
kubernetes¶
Beta users
Create a secret with your exporter API token
# Service
apiVersion: v1
kind: Service
metadata:
name: neblic-otelcol
labels:
app: neblic-otelcol
spec:
ports:
- port: 8899
name: controlplane
protocol: TCP
- port: 4317
name: dataplane
protocol: TCP
selector:
app: neblic-otelcol
---
# StatefulSet
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: neblic-otelcol
labels:
app: neblic-otelcol
spec:
replicas: 1
selector:
matchLabels:
app: neblic-otelcol
template:
metadata:
labels:
app: neblic-otelcol
spec:
containers:
- name: neblic-otelcol
image: ghcr.io/neblic/otelcol:latest
env:
- name: NEBLIC_DATA_PLANE_EXPORTER_LOKI_ENDPOINT
value: "http://loki:3100/loki/api/v1/push"
# Beta users
# - name: OTELCOL_CONFIG_PATH
# value: /etc/neblic/otelcol/config_cloud.yaml
# - name: NEBLIC_DATA_PLANE_EXPORTER_BEARER_TOKEN
# valueFrom:
# secretKeyRef:
# name: neblic-otelcol
# key: exporter-bearer-token
volumeMounts:
- name: config
mountPath: /var/lib/otelcol
volumeClaimTemplates:
- metadata:
name: config
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10M
Learn more¶
To get more details into how the collector works and how to configure it take a look at this page.
Samplers¶
See this page to see a list of the available samplers and instruction on how to use them.