Skip to content

Commit

Permalink
Revert everything related to ebpf integration (grafana#1665)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpaschalis committed Apr 29, 2022
1 parent 1c55d6c commit bc42ae8
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 217 deletions.
6 changes: 3 additions & 3 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ steps:
- name: lint
image: golangci/golangci-lint:v1.44
commands:
- apt-get update -y && apt-get install -y libsystemd-dev libbpfcc-dev
- apt-get update -y && apt-get install -y libsystemd-dev
- make DOCKER_OPTS="" lint

---
Expand All @@ -45,7 +45,7 @@ steps:
- name: docker
path: /var/run/docker.sock
commands:
- apt-get update && apt-get install -y rubygems rpm nsis apt-transport-https ca-certificates curl gnupg lsb-release libbpfcc-dev
- apt-get update && apt-get install -y rubygems rpm nsis apt-transport-https ca-certificates curl gnupg lsb-release
- gem install --no-document fpm
- rm -r /usr/local/go
- mkdir -p /usr/local/go/bin
Expand Down Expand Up @@ -246,6 +246,6 @@ get:
name: pat
---
kind: signature
hmac: fecfa28d1eb83659605f42dc3f1c62ac4666a6600a993a8347eb69822375481c
hmac: b14773ba7e50432dfe90920d442a850f85aed74f1419dd78502b1e76d91cde46

...
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ Main (unreleased)

- Introduce SNMP exporter integration. (@v-zhuravlev)

- Introduce ebpf exporter v2 integration. (@tpaschalis)

### Enhancements

- integrations-next: Integrations using autoscrape will now autoscrape metrics
Expand Down
6 changes: 1 addition & 5 deletions cmd/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@ ARG IMAGE_TAG
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev

# Add support for bcc bindings required to compile the eBPF integration
RUN apt-get update && apt-get install -qy libbpfcc-dev

RUN make clean && make IMAGE_TAG=${IMAGE_TAG} RELEASE_BUILD=${RELEASE_BUILD} BUILD_IN_CONTAINER=false agent

FROM debian:bullseye-slim

# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
# plus the libbpfcc library for running the eBPF integration.
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev && \
apt-get install -qy tzdata ca-certificates libbpfcc && \
apt-get install -qy tzdata ca-certificates && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=build /src/agent/cmd/agent/agent /bin/agent
Expand Down
6 changes: 1 addition & 5 deletions cmd/agent/Dockerfile.buildx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ RUN rm -rf /usr/local/go \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz

# Add support for bcc bindings required to compile the eBPF integration
RUN apt-get update && apt-get install -qy libbpfcc-dev

COPY . /src/agent
WORKDIR /src/agent
ARG RELEASE_BUILD=true
Expand All @@ -25,10 +22,9 @@ RUN make clean && IMAGE_TAG=${IMAGE_TAG} RELEASE_BUILD=${RELEASE_BUILD} BUILD_IN
FROM debian:bullseye-slim

# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
# plus the libbpfcc library for running the eBPF integration.
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev && \
apt-get install -qy tzdata ca-certificates libsystemd-dev libbpfcc && \
apt-get install -qy tzdata ca-certificates libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=build /src/agent/cmd/agent/agent /bin/agent
Expand Down
6 changes: 1 addition & 5 deletions cmd/agentctl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@ ARG IMAGE_TAG
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev

# Add support for bcc bindings required to compile the eBPF integration
RUN apt-get update && apt-get install -qy libbpfcc-dev

RUN make clean && make IMAGE_TAG=${IMAGE_TAG} RELEASE_BUILD=${RELEASE_BUILD} BUILD_IN_CONTAINER=false agentctl

FROM debian:bullseye-slim

# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
# plus the libbpfcc library for running the eBPF integration.
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev && \
apt-get install -qy tzdata ca-certificates libbpfcc && \
apt-get install -qy tzdata ca-certificates && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=build /src/agent/cmd/agentctl/agentctl /bin/agentctl
Expand Down
6 changes: 1 addition & 5 deletions cmd/agentctl/Dockerfile.buildx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ RUN rm -rf /usr/local/go \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz

# Add support for bcc bindings required to compile the eBPF integration
RUN apt-get update && apt-get install -qy libbpfcc-dev

COPY . /src/agent
WORKDIR /src/agent
ARG RELEASE_BUILD=true
Expand All @@ -26,10 +23,9 @@ RUN make clean && IMAGE_TAG=${IMAGE_TAG} RELEASE_BUILD=${RELEASE_BUILD} BUILD_IN
FROM debian:bullseye-slim

# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
# plus the libbpfcc library for running the eBPF integration.
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev && \
apt-get install -qy tzdata ca-certificates libsystemd-dev libbpfcc && \
apt-get install -qy tzdata ca-certificates libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=build /src/agent/cmd/agentctl/agentctl /bin/agentctl
Expand Down
8 changes: 0 additions & 8 deletions docs/developer/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ The Makefile provides several targets:
* `test`: run the tests
* `lint`: run linting checks

### Compiling on Linux
Compiling the Agent on Linux requires a couple of extra dependencies.
These are
* [systemd headers](https://github.com/grafana/agent/blob/main/cmd/agent/Dockerfile#L8-L9) for Promtail
* [bcc tools](https://github.com/grafana/agent/blob/main/cmd/agent/Dockerfile#L12-L13) for the eBPF integration on AMD64 systems

If you have issues installing the bcc tooling, you can use `-tags=noebpf` to compile the Agent without the eBPF integration.

## Pull Request Checklist

Changes should be branched off of the `main` branch. It's recommended to rebase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ integrations:
# Configs for integrations which do not support multiple instances.
[agent: <agent_config>]
[cadvisor: <cadvisor_config>]
[ebpf: <ebpf_config>]
[node_exporter: <node_exporter_config>]
[process: <process_exporter_config>]
[statsd: <statsd_exporter_config>]
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.18
require (
contrib.go.opencensus.io/exporter/prometheus v0.4.0
github.com/Shopify/sarama v1.32.0
github.com/cloudflare/ebpf_exporter v1.2.5
github.com/cortexproject/cortex v1.11.0
github.com/davidmparrott/kafka_exporter/v2 v2.0.1
github.com/docker/docker v20.10.14+incompatible
Expand Down Expand Up @@ -289,7 +288,6 @@ require (
github.com/infinityworks/go-common v0.0.0-20170820165359-7f20a140fd37 // indirect
github.com/influxdata/go-syslog/v3 v3.0.1-0.20201128200927-a1889d947b48 // indirect
github.com/influxdata/telegraf v1.16.3 // indirect
github.com/iovisor/gobpf v0.2.0 // indirect
github.com/jaegertracing/jaeger v1.31.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
Expand Down
6 changes: 0 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/alecthomas/units v0.0.0-20210912230133-d1bdfacee922/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
Expand Down Expand Up @@ -480,8 +479,6 @@ github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004 h1:lkAMpLVBDaj17e85keuznYcH5rqI438v41pKcBl4ZxQ=
github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA=
github.com/cloudflare/ebpf_exporter v1.2.5 h1:YJhA0xPx4ubRaSqkoLF7S5m9FAWDEkWO9LP1n/vBnaw=
github.com/cloudflare/ebpf_exporter v1.2.5/go.mod h1:fBXebODa2nqqCaYS6/HZJtqH8xTKbE5nK91mlMCdvlY=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
Expand Down Expand Up @@ -1509,8 +1506,6 @@ github.com/influxdata/telegraf v1.16.3/go.mod h1:fX/6k7qpIqzVPWyeIamb0wN5hbwc0AN
github.com/influxdata/toml v0.0.0-20190415235208-270119a8ce65/go.mod h1:zApaNFpP/bTpQItGZNNUMISDMDAnTXu9UqJ4yT3ocz8=
github.com/influxdata/wlog v0.0.0-20160411224016-7c63b0a71ef8/go.mod h1:/2NMgWB1DHM1ti/gqhOlg+LJeBVk6FqR5aVGYY0hlwI=
github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ=
github.com/iovisor/gobpf v0.2.0 h1:34xkQxft+35GagXBk3n23eqhm0v7q0ejeVirb8sqEOQ=
github.com/iovisor/gobpf v0.2.0/go.mod h1:WSY9Jj5RhdgC3ci1QaacvbFdQ8cbrEjrpiZbLHLt2s4=
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
github.com/j-keck/arping v1.0.2/go.mod h1:aJbELhR92bSk7tp79AWM/ftfc90EfEi2bQJrbBFOsPw=
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
Expand Down Expand Up @@ -2999,7 +2994,6 @@ golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210923061019-b8560ed6a9b7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
1 change: 0 additions & 1 deletion pkg/integrations/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (

_ "github.com/grafana/agent/pkg/integrations/v2/agent" // register agent
_ "github.com/grafana/agent/pkg/integrations/v2/app_agent_receiver" // register app_agent_receiver
_ "github.com/grafana/agent/pkg/integrations/v2/ebpf" // register ebpf integration
_ "github.com/grafana/agent/pkg/integrations/v2/eventhandler"
_ "github.com/grafana/agent/pkg/integrations/v2/snmp_exporter"
)
86 changes: 0 additions & 86 deletions pkg/integrations/v2/ebpf/integration.go

This file was deleted.

27 changes: 0 additions & 27 deletions pkg/integrations/v2/ebpf/integration_stub.go

This file was deleted.

2 changes: 0 additions & 2 deletions tools/seego/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ RUN rm -rf /usr/local/go \
&& rm golang.tar.gz
RUN apt-get update
RUN apt-get install -y nsis
RUN apt-get install -y libbpfcc-dev

0 comments on commit bc42ae8

Please sign in to comment.