Skip to content

Commit

Permalink
🎉 Release of add-on OpenTelemetry Collector 0.10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricziel committed Jul 21, 2024
1 parent 473a2f2 commit 01cd628
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ha-addon-otelcol/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## What’s changed

* No changes
12 changes: 12 additions & 0 deletions ha-addon-otelcol/DOCS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Home Assistant Add-on: OpenTelemetry collector addon

This AddOn brings the [OpenTelemetry collector](#) to your HomeAssistant.

## How to use

This add-on really does nothing. It is just an example.

When started it will print the configured message or "Hello world" in the log.

It will also print "All done!" in `/share/example_addon_output.txt` to show
simple example of the usage of `map` in addon config.
7 changes: 7 additions & 0 deletions ha-addon-otelcol/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Home Assistant Add-on: OpenTelemetry collector

![Supports aarch64 Architecture][aarch64-shield]
![Supports amd64 Architecture][amd64-shield]

[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
57 changes: 57 additions & 0 deletions ha-addon-otelcol/apparmor.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#include <tunables/global>

profile otelcol flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>

# Capabilities
file,
signal (send) set=(kill,term,int,hup,cont),

# S6-Overlay
/init ix,
/bin/** ix,
/usr/bin/** ix,
/run/{s6,s6-rc*,service}/** ix,
/package/** ix,
/command/** ix,
/etc/services.d/** rwix,
/etc/cont-init.d/** rwix,
/etc/cont-finish.d/** rwix,
/run/{,**} rwk,
/dev/tty rw,

# Bashio
/usr/lib/bashio/** ix,
/tmp/** rwk,

# Access to options.json and other files within your addon
/data/** rw,

# Start new profile for service
/usr/bin/otelcol-contrib cx -> otelcol_contrib,

profile otelcol_contrib flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>

# Receive signals from S6-Overlay
signal (receive) peer=*_example,

# Access to options.json and other files within your addon
/data/** rw,

# Access to mapped volumes specified in config.json
/share/** rw,

# Access required for service functionality
# Note: List was built by doing the following:
# 1. Add what is obviously needed based on what is in the script
# 2. Add `complain` as a flag to this profile temporarily and run the addon
# 3. Review the audit log with `journalctl _TRANSPORT="audit" -g 'apparmor="ALLOWED"'` and add other access as needed
# Remember to remove the `complain` flag when you are done
/usr/bin/otelcol-contrib r,
/bin/bash rix,
/bin/echo ix,
/etc/passwd r,
/dev/tty rw,
}
}
30 changes: 30 additions & 0 deletions ha-addon-otelcol/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: OpenTelemetry Collector

Check warning on line 1 in ha-addon-otelcol/config.yaml

View workflow job for this annotation

GitHub Actions / workflows / YAMLLint

missing document start "---"
version: 0.10.5
slug: otelcol
description: Bring the OpenTelemetry collector into your home
url: https://github.com/cedricziel/ha-addon-otelcol
ports:
4317/tcp: null
4318/tcp: null
ports_description:
4317/tcp: OTLP/gRPC
4318/tcp: OTLP/HTTP
arch:
- aarch64
- amd64
init: false
map:
- share:rw
- config:rw
apparmor: false
options:
config: "receivers:\n otlp:\n protocols:\n grpc:\n http:\nprocessors:\n\
\ batch:\nexporters:\n logging:\n# health-check is activated by default\nextensions:\n\
\ pprof:\n zpages:\nservice:\n extensions: [health_check,pprof,zpages]\n pipelines:\n\
\ traces:\n receivers: [otlp]\n processors: [batch]\n exporters:\
\ [logging]\n metrics:\n receivers: [otlp]\n processors: [batch]\n\
\ exporters: [logging]\n logs:\n receivers: [otlp]\n processors:\
\ [batch]\n exporters: [logging]\n"
schema:
config: str
image: ghcr.io/cedricziel/ha-addon-otelcol/{arch}
Binary file added ha-addon-otelcol/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ha-addon-otelcol/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions ha-addon-otelcol/translations/en.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
configuration:
config:
name: config.yaml
description: Collector config

0 comments on commit 01cd628

Please sign in to comment.