Skip to content

Commit

Permalink
Updated to support v0.111 of otelcol-contrib
Browse files Browse the repository at this point in the history
  • Loading branch information
rcastley committed Oct 7, 2024
1 parent 3046663 commit 1d8b1c3
Show file tree
Hide file tree
Showing 17 changed files with 165 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ sudo systemctl status otelcol-contrib
``` text
● otelcol-contrib.service - OpenTelemetry Collector Contrib
Loaded: loaded (/lib/systemd/system/otelcol-contrib.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-05-16 08:23:23 UTC; 25s ago
Main PID: 1415 (otelcol-contrib)
Tasks: 5 (limit: 1141)
Memory: 22.2M
CPU: 125ms
Active: active (running) since Mon 2024-10-07 10:27:49 BST; 52s ago
Main PID: 17113 (otelcol-contrib)
Tasks: 13 (limit: 19238)
Memory: 34.8M
CPU: 155ms
CGroup: /system.slice/otelcol-contrib.service
└─1415 /usr/bin/otelcol-contrib --config=/etc/otelcol-contrib/config.yaml
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: NumberDataPoints #0
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: Data point attributes:
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: -> exporter: Str(logging)
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: -> service_instance_id: Str(df8a57f4-abdc-46b9-a847-acd62db1001f)
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: -> service_name: Str(otelcol-contrib)
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: -> service_version: Str(0.75.0)
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: StartTimestamp: 2023-05-16 08:23:39.006 +0000 UTC
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: Timestamp: 2023-05-16 08:23:39.006 +0000 UTC
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: Value: 0.000000
May 16 08:23:39 ip-10-0-9-125 otelcol-contrib[1415]: {"kind": "exporter", "data_type": "metrics", "name": "logging"}
└─17113 /usr/bin/otelcol-contrib --config=/etc/otelcol-contrib/config.yaml
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: Descriptor:
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: -> Name: up
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: -> Description: The scraping was successful
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: -> Unit:
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: -> DataType: Gauge
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: NumberDataPoints #0
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: StartTimestamp: 1970-01-01 00:00:00 +0000 UTC
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: Timestamp: 2024-10-07 09:28:36.942 +0000 UTC
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: Value: 1.000000
Oct 07 10:28:36 petclinic-rum-testing otelcol-contrib[17113]: {"kind": "exporter", "data_type": "metrics", "name": "debug"}
```

{{% /tab %}}
Expand Down Expand Up @@ -221,6 +221,9 @@ cat /etc/otelcol-contrib/config.yaml
{{% tab title="config.yaml" %}}

```yaml { lineNos="table" wrap="true"}
# To limit exposure to denial of service attacks, change the host in endpoints below from 0.0.0.0 to a specific network interface.
# See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks
extensions:
health_check:
pprof:
Expand All @@ -232,9 +235,12 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
opencensus:
endpoint: 0.0.0.0:55678
# Collect own metrics
prometheus:
Expand All @@ -248,17 +254,22 @@ receivers:
jaeger:
protocols:
grpc:
endpoint: 0.0.0.0:14250
thrift_binary:
endpoint: 0.0.0.0:6832
thrift_compact:
endpoint: 0.0.0.0:6831
thrift_http:
endpoint: 0.0.0.0:14268
zipkin:
endpoint: 0.0.0.0:9411
processors:
batch:
exporters:
logging:
debug:
verbosity: detailed
service:
Expand All @@ -268,12 +279,17 @@ service:
traces:
receivers: [otlp, opencensus, jaeger, zipkin]
processors: [batch]
exporters: [logging]
exporters: [debug]
metrics:
receivers: [otlp, opencensus, prometheus]
processors: [batch]
exporters: [logging]
exporters: [debug]
logs:
receivers: [otlp]
processors: [batch]
exporters: [debug]
extensions: [health_check, pprof, zpages]
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The first step in installing the Open Telemetry Collector is downloading it. For
Obtain the `.deb` package for your platform from the [**OpenTelemetry Collector Contrib releases page**](https://github.com/open-telemetry/opentelemetry-collector-releases/releases)

``` bash
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.96.0/otelcol-contrib_0.96.0_linux_amd64.deb
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.111.0/otelcol-contrib_0.111.0_linux_amd64.deb
```

## Install the OpenTelemetry Collector Contrib distribution
Expand All @@ -22,18 +22,18 @@ Install the `.deb` package using `dpkg`. Take a look at the **dpkg Output** tab
{{% tab title="Install" %}}

``` bash
sudo dpkg -i otelcol-contrib_0.96.0_linux_amd64.deb
sudo dpkg -i otelcol-contrib_0.111.0_linux_amd64.deb
```

{{% /tab %}}
{{% tab title="dpkg Output" %}}

``` text
Selecting previously unselected package otelcol-contrib.
(Reading database ... 64218 files and directories currently installed.)
Preparing to unpack otelcol-contrib_0.96.0_linux_amd64.deb ...
Unpacking otelcol-contrib (0.96.0) ...
Setting up otelcol-contrib (0.96.0) ...
(Reading database ... 89232 files and directories currently installed.)
Preparing to unpack otelcol-contrib_0.111.0_linux_amd64.deb ...
Unpacking otelcol-contrib (0.111.0) ...
Setting up otelcol-contrib (0.111.0) ...
Created symlink /etc/systemd/system/multi-user.target.wants/otelcol-contrib.service → /lib/systemd/system/otelcol-contrib.service.
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ curl http://localhost:13133
{{% tab title="curl Output" %}}

``` text
{"status":"Server available","upSince":"2023-04-27T10:11:22.153295874+01:00","uptime":"16m24.684476004s"}
{"status":"Server available","upSince":"2024-10-07T11:00:08.004685295+01:00","uptime":"12.56420005s"}
```

{{% /tab %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ weight: 3

**ServiceZ** gives an overview of the collector services and quick access to the pipelinez, extensionz, and featurez zPages. The page also provides build and runtime information.

Example URL: [http://localhost:55679/debug/servicez](http://localhost:55679/debug/servicez) (change `localhost` to reflect your own environment).
Example URL: [**http://localhost:55679/debug/servicez**](http://localhost:55679/debug/servicez) (change `localhost` to reflect your own environment).

![ServiceZ](../../images/servicez.png)

Expand All @@ -22,7 +22,7 @@ Example URL: [http://localhost:55679/debug/servicez](http://localhost:55679/debu

**PipelineZ** provides insights on the running pipelines running in the collector. You can find information on type, if data is mutated, and you can also see information on the receivers, processors and exporters that are used for each pipeline.

Example URL: [http://localhost:55679/debug/pipelinez](http://localhost:55679/debug/pipelinez) (change `localhost` to reflect your own environment).
Example URL: [**http://localhost:55679/debug/pipelinez**](http://localhost:55679/debug/pipelinez) (change `localhost` to reflect your own environment).

![PipelineZ](../../images/pipelinez.png)

Expand All @@ -31,21 +31,13 @@ Example URL: [http://localhost:55679/debug/pipelinez](http://localhost:55679/deb

**ExtensionZ** shows the extensions that are active in the collector.

Example URL: [http://localhost:55679/debug/extensionz](http://localhost:55679/debug/extensionz) (change `localhost` to reflect your own environment).
Example URL: [**http://localhost:55679/debug/extensionz**](http://localhost:55679/debug/extensionz) (change `localhost` to reflect your own environment).

![ExtensionZ](../../images/extensionz.png)

{{% /tab %}}
{{% /tabs %}}

{{% notice style="info" %}}
You can use your browser to access your environment emitting zPages information at (replace `<insert_your_ip>` with your IP address):

- **ServiceZ:** [http://<insert_your_ip>:55679/debug/servicez](http://<insert_your_ip>:55679/debug/servicez)
- **PipelineZ:** [http://<insert_your_ip>:55679/debug/pipelinez](http://<insert_your_ip>:55679/debug/pipelinez)
- **ExtensionZ:** [http://<insert_your_ip>:55679/debug/extensionz](http://<insert_your_ip>:55679/debug/extensionz)
{{% /notice %}}

---

{{% expand title="{{% badge style=primary icon=user-ninja %}}**Ninja:** Improve data durability with storage extension{{% /badge %}}" %}}
Expand Down Expand Up @@ -286,7 +278,9 @@ Now that we've covered extensions, let's check our configuration changes.
{{< tabs >}}
{{% tab title="config.yaml" %}}
```yaml { lineNos="table" wrap="true" hl_lines="3" }
```yaml { lineNos="table" wrap="true" hl_lines="5" }
# See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks

extensions:
health_check:
endpoint: 0.0.0.0:13133
Expand All @@ -299,9 +293,12 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

opencensus:
endpoint: 0.0.0.0:55678

# Collect own metrics
prometheus:
Expand All @@ -315,17 +312,22 @@ receivers:
jaeger:
protocols:
grpc:
endpoint: 0.0.0.0:14250
thrift_binary:
endpoint: 0.0.0.0:6832
thrift_compact:
endpoint: 0.0.0.0:6831
thrift_http:
endpoint: 0.0.0.0:14268

zipkin:
endpoint: 0.0.0.0:9411

processors:
batch:

exporters:
logging:
debug:
verbosity: detailed

service:
Expand All @@ -335,12 +337,17 @@ service:
traces:
receivers: [otlp, opencensus, jaeger, zipkin]
processors: [batch]
exporters: [logging]
exporters: [debug]

metrics:
receivers: [otlp, opencensus, prometheus]
processors: [batch]
exporters: [logging]
exporters: [debug]

logs:
receivers: [otlp]
processors: [batch]
exporters: [debug]

extensions: [health_check, pprof, zpages]
```
Expand All @@ -353,4 +360,4 @@ service:
Now that we have reviewed extensions, let's dive into the data pipeline portion of the workshop. A pipeline defines a path the data follows in the Collector starting from reception, moving to further processing or modification, and finally exiting the Collector via exporters.
The data pipeline in the OpenTelemetry Collector is made up of receivers, processors, and exporters. We will first start with receivers.
The data pipeline in the OpenTelemetry Collector is made up of **receivers**, **processors**, and **exporters**. We will first start with receivers.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ prometheus/internal:
## Example Dashboard - Prometheus metrics
The following screenshot shows an example dashboard of spme of the metrics the Prometheus internal receiver collects from the OpenTelemetry Collector. Here, we can see accepted and sent spans, metrics and log records.
The following screenshot shows an example dashboard of some of the metrics the Prometheus internal receiver collects from the OpenTelemetry Collector. Here, we can see accepted and sent spans, metrics and log records.
{{% notice style="note" %}}
The following screenshot is an out-of-the-box (OOTB) dashboard from Splunk Observability Cloud that allows you to easily monitor your Splunk OpenTelemetry Collector install base.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ We've now covered receivers, so let's now check our configuration changes.
{{< tabs >}}
{{% tab title="config.yaml" %}}
```yaml {lineNos="table" wrap="true" hl_lines="10-30 39"}
```yaml {lineNos="table" wrap="true" hl_lines="13-33 45"}
# To limit exposure to denial of service attacks, change the host in endpoints below from 0.0.0.0 to a specific network interface.
# See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks

extensions:
health_check:
endpoint: 0.0.0.0:13133
Expand Down Expand Up @@ -96,9 +99,12 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

opencensus:
endpoint: 0.0.0.0:55678

# Collect own metrics
prometheus/internal:
Expand All @@ -112,17 +118,22 @@ receivers:
jaeger:
protocols:
grpc:
endpoint: 0.0.0.0:14250
thrift_binary:
endpoint: 0.0.0.0:6832
thrift_compact:
endpoint: 0.0.0.0:6831
thrift_http:
endpoint: 0.0.0.0:14268

zipkin:
endpoint: 0.0.0.0:9411

processors:
batch:

exporters:
logging:
debug:
verbosity: detailed

service:
Expand All @@ -132,12 +143,17 @@ service:
traces:
receivers: [otlp, opencensus, jaeger, zipkin]
processors: [batch]
exporters: [logging]
exporters: [debug]

metrics:
receivers: [otlp, opencensus, prometheus/internal]
receivers: [otlp, opencensus, prometheus]
processors: [batch]
exporters: [debug]

logs:
receivers: [otlp]
processors: [batch]
exporters: [logging]
exporters: [debug]

extensions: [health_check, pprof, zpages]
```
Expand Down
Loading

0 comments on commit 1d8b1c3

Please sign in to comment.