Skip to content

Commit d15c0a0

Browse files
committed
Update image with new agent with Prometheus metrics support
1 parent 834e6db commit d15c0a0

3 files changed

Lines changed: 28 additions & 16 deletions

File tree

Dockerfile

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1
22

3-
ARG AGENT_VERSION=main
4-
ARG UI_VERSION=main
3+
ARG AGENT_VERSION=v0.0.2
4+
ARG UI_VERSION=v0.0.1
55

66
FROM ghcr.io/ebpfdev/explorer-ui:$UI_VERSION AS ui
77

@@ -14,18 +14,9 @@ COPY --from=ui /usr/share/nginx/html /usr/share/nginx/html
1414

1515
COPY nginx.conf /etc/nginx/nginx.conf
1616

17-
COPY <<EOF /start.sh
18-
#!/bin/bash
19-
echo '{"agent_url": "/dev-agent"}' > /usr/share/nginx/html/config.json
17+
COPY scripts/entrypoint.sh /entrypoint.sh
18+
RUN chmod +x /entrypoint.sh
2019

21-
nginx &
22-
/app/dev-agent server --skip-welcome --path-prefix /dev-agent/ &
23-
wait -n
24-
exit $?
25-
EOF
26-
27-
RUN chmod +x /start.sh
28-
29-
CMD ["/start.sh"]
20+
ENTRYPOINT ["/entrypoint.sh"]
3021

3122

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
eBPF is a web application that lets you explore eBPF subsystem of your Linux host.
44

5-
Explorer consists of two parts: an agent with GraphQL API and a web interface.
5+
Explorer consists of two parts: an agent with GraphQL API, Prometheus scrape endpoint, and a web interface.
66
It is currently shipped as a single container. But you can also run them separately.
77

88
* [ebpfdev/dev-agent](https://github.com/ebpfdev/dev-agent), MIT license
@@ -13,12 +13,23 @@ It is currently shipped as a single container. But you can also run them separat
1313
Docker image should be run with `--privileged` flag to allow it to access eBPF subsystem.
1414

1515
```shell
16-
docker run -ti --rm --privileged -p 8070:80 ghcr.io/ebpfdev/explorer:main
16+
docker run -ti --rm --privileged -p 8070:80 ghcr.io/ebpfdev/explorer:v0.0.2
17+
```
18+
19+
Use `--etm` option to expose map (with name `AT_SYSCALLNUM`) entries values to Prometheus endpoint:
20+
```shell
21+
docker run -ti --rm --privileged -p 8070:80 ghcr.io/ebpfdev/explorer:v0.0.2 --etm -:AT_SYSCALLNUM:string
22+
```
23+
24+
If you only need GraphQL / Prometheus without web interface, you can run [agent](https://github.com/ebpfdev/dev-agent) independently:
25+
```shell
26+
docker run -ti --rm --privileged -p 8080:8080 ghcr.io/ebpfdev/dev-agent:v0.0.2 server
1727
```
1828

1929
Links:
2030
* [http://localhost:8070](http://localhost:8070) - web interface
2131
* [http://localhost:8070/dev-agent](http://localhost:8070/dev-agent) - Agent's GraphQL web client
32+
* [http://localhost:8070/dev-agent/metrics](http://localhost:8070/dev-agent/metrics) - Prometheus scrape endpoint
2233

2334
# Demo
2435

scripts/entrypoint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
echo '{"agent_url": "/dev-agent"}' > /usr/share/nginx/html/config.json
3+
4+
nginx &
5+
/app/dev-agent server --skip-welcome --path-prefix /dev-agent/ "$@" &
6+
7+
echo Started
8+
9+
wait -n
10+
exit $?

0 commit comments

Comments
 (0)