├── .github └── workflows │ └── docker-publish.yml ├── CHANGELOG.md ├── Dockerfile ├── README.md ├── docs └── pics │ ├── 00-start.png │ ├── 01-list-with-bpftrace.png │ ├── 02-list-with-sys_exit_read.png │ ├── 03-sys_exit_read-page.png │ ├── 04-at-map-page.png │ ├── 05-at-map-page-entries.png │ ├── 06-at-map-page-entries-repr.png │ ├── 07-grafana-ebpf.png │ ├── 08-grafana-syscallnum.png │ ├── X_002RN_syscall-grafana-example.png │ ├── X_003RN_graphview.png │ ├── X_003RN_tracepoints.png │ ├── X_004RN_mapedit.gif │ └── X_004RN_pins.png ├── nginx.conf └── scripts └── entrypoint.sh /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Docker 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | # Publish semver tags as releases. 7 | tags: [ 'v*.*.*' ] 8 | pull_request: 9 | branches: [ "main" ] 10 | 11 | env: 12 | # Use docker.io for Docker Hub if empty 13 | REGISTRY: ghcr.io 14 | # github.repository as / 15 | IMAGE_NAME: ${{ github.repository }} 16 | 17 | 18 | jobs: 19 | build: 20 | 21 | runs-on: ubuntu-latest 22 | permissions: 23 | contents: read 24 | packages: write 25 | # This is used to complete the identity challenge 26 | # with sigstore/fulcio when running outside of PRs. 27 | id-token: write 28 | 29 | steps: 30 | - name: Checkout repository 31 | uses: actions/checkout@v3 32 | 33 | # Install the cosign tool except on PR 34 | # https://github.com/sigstore/cosign-installer 35 | - name: Install cosign 36 | if: github.event_name != 'pull_request' 37 | uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0 38 | with: 39 | cosign-release: 'v1.13.1' 40 | 41 | 42 | # Workaround: https://github.com/docker/build-push-action/issues/461 43 | - name: Setup Docker buildx 44 | uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf 45 | 46 | # Login against a Docker registry except on PR 47 | # https://github.com/docker/login-action 48 | - name: Log into registry ${{ env.REGISTRY }} 49 | if: github.event_name != 'pull_request' 50 | uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c 51 | with: 52 | registry: ${{ env.REGISTRY }} 53 | username: ${{ github.actor }} 54 | password: ${{ secrets.GITHUB_TOKEN }} 55 | 56 | # Extract metadata (tags, labels) for Docker 57 | # https://github.com/docker/metadata-action 58 | - name: Extract Docker metadata 59 | id: meta 60 | uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 61 | with: 62 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 63 | 64 | # Build and push Docker image with Buildx (don't push on PR) 65 | # https://github.com/docker/build-push-action 66 | - name: Build and push Docker image 67 | id: build-and-push 68 | uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a 69 | with: 70 | context: . 71 | push: ${{ github.event_name != 'pull_request' }} 72 | tags: ${{ steps.meta.outputs.tags }} 73 | labels: ${{ steps.meta.outputs.labels }} 74 | cache-from: type=gha 75 | cache-to: type=gha,mode=max 76 | 77 | 78 | # Sign the resulting Docker image digest except on PRs. 79 | # This will only write to the public Rekor transparency log when the Docker 80 | # repository is public to avoid leaking data. If you would like to publish 81 | # transparency data even for private images, pass --force to cosign below. 82 | # https://github.com/sigstore/cosign 83 | - name: Sign the published Docker image 84 | if: ${{ github.event_name != 'pull_request' }} 85 | env: 86 | COSIGN_EXPERIMENTAL: "true" 87 | # This step uses the identity token to provision an ephemeral certificate 88 | # against the sigstore community Fulcio instance. 89 | run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }} 90 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 18 june, add and delete map entries 2 | --- 3 | 4 | Explorer v0.0.7 5 | 6 | * add and delete map entries 7 | * number length validation on entry submit 8 | 9 | Sub-releases: 10 | * **dev-agent** [v0.0.5](https://github.com/ebpfdev/dev-agent/blob/main/CHANGELOG.md#v005--18-june-2023--add-and-delete-map-entries) 11 | * **explorer-ui** [v0.0.6](https://github.com/ebpfdev/explorer-ui/blob/main/CHANGELOG.md#v006--18-june-2023--add-and-delete-map-entries) 12 | 13 | 13 june 2023, map editing and pinning 14 | --- 15 | 16 | Explorer v0.0.6 17 | 18 | * map entries table is now editable (experimental, only editing existing values in any available representation) 19 | * displaying paths of pinned maps (if bpffs is available): 20 | ![pins list](docs/pics/X_004RN_pins.png) 21 | * map pinning is available via GraphQL query 22 | 23 | Sub-releases: 24 | * **dev-agent** [v0.0.4](https://github.com/ebpfdev/dev-agent/blob/main/CHANGELOG.md#v004--13-june-2023--map-editing-and-pinning) 25 | * **explorer-ui** [v0.0.4](https://github.com/ebpfdev/explorer-ui/blob/main/CHANGELOG.md#v004--13-june-2023--map-editor-and-map-pins) 26 | 27 | 11 june 2023, more connections 28 | --- 29 | 30 | Explorer v0.0.5 31 | 32 | * **dev-agent** [v0.0.3](https://github.com/ebpfdev/dev-agent/blob/main/CHANGELOG.md#v003--11-june-2023--more-connections) 33 | * (feature) exposed tracepoints that programs are attached to 34 | * (feature) a new method in GraphQL to get a connected graph starting from a specific program or map 35 | * **explorer-ui** [v0.0.3](https://github.com/ebpfdev/explorer-ui/blob/main/CHANGELOG.md#v003--11-june-2023--more-connections) 36 | * (feature) new Graph View for exploring connected programs and maps (available from details page of both): 37 | ![graph view on map's details page](docs/pics/X_003RN_graphview.png) 38 | * (feature) showing list of tracepoints that program is attached to on program's details page: 39 | ![tracepoints on program's details page](docs/pics/X_003RN_tracepoints.png) 40 | 41 | 4 june 2023, Prometheus exporter 42 | --- 43 | 44 | Explorer v0.0.4 45 | 46 | * **dev-agent** [v0.0.2](https://github.com/ebpfdev/dev-agent/blob/main/CHANGELOG.md#v002--3-june-2023--export-to-prometheus-metrics) 47 | * (feature) eBPF metrics prometheus exporter: 48 | * progs statistics (run_time, run_count) 49 | * maps statistics 50 | * number of entries (if configured, see [README](./README.md)) 51 | * value of entries (if configured): 52 | ![example of bpftrace syscall number visualization](docs/pics/X_002RN_syscall-grafana-example.png) 53 | * **explorer-ui** [v0.0.2](https://github.com/ebpfdev/explorer-ui/blob/main/CHANGELOG.md#v002--4-june-2023--neat-fixes) 54 | * various layout fixes (see the changelog for details), e.g.: 55 | * better table for map entries 56 | 57 | 28 may 2023, kickstarted 58 | --- 59 | 60 | Explorer v0.0.2 61 | 62 | * **dev-agent** [v0.0.1](https://github.com/ebpfdev/dev-agent/blob/main/CHANGELOG.md#v001--28-may-2023--graphql-kickstarted) 63 | * GraphQL API, which exposes: 64 | * programs and maps metadata 65 | * traversing between programs and maps 66 | 67 | relation is defined by `bpf_prog_aux->used_maps` ([see in Linux](https://github.com/torvalds/linux/blob/4ecd704a4c51fd95973fcc3a60444e0e24eb9439/include/linux/bpf.h#L1400)) 68 | * map entries including various representation (hex, number, string) 69 | * **explorer-ui** [v0.0.1](https://github.com/ebpfdev/explorer-ui/blob/main/CHANGELOG.md#v001--28-may-2023--graphql-kickstarted) 70 | * react web app, which consumes GraphQL API 71 | * displays all programs and maps in a file tree on a sidebar 72 | * pages for viewing program and map details 73 | * on a map page, displays entries in a table with pagination -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | ARG AGENT_VERSION=v0.0.5 4 | ARG UI_VERSION=v0.0.7 5 | 6 | FROM ghcr.io/ebpfdev/explorer-ui:$UI_VERSION AS ui 7 | 8 | FROM ghcr.io/ebpfdev/dev-agent:$AGENT_VERSION 9 | 10 | RUN apt update 11 | RUN apt install nginx -y 12 | 13 | COPY --from=ui /usr/share/nginx/html /usr/share/nginx/html 14 | 15 | COPY nginx.conf /etc/nginx/nginx.conf 16 | 17 | COPY scripts/entrypoint.sh /entrypoint.sh 18 | RUN chmod +x /entrypoint.sh 19 | 20 | ENTRYPOINT ["/entrypoint.sh"] 21 | 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # eBPF explorer 2 | 3 | eBPF is a web UI that lets you explore eBPF subsystem of your Linux host. 4 | 5 | Explorer consists of two parts: an agent with GraphQL API, Prometheus scrape endpoint, and a web interface. 6 | It is currently shipped as a single container. But you can also run them separately. 7 | 8 | * [ebpfdev/dev-agent](https://github.com/ebpfdev/dev-agent), MIT license 9 | * [ebpfdev/explorer-ui](https://github.com/ebpfdev/explorer-ui), MIT license 10 | 11 | ## Features 12 | 13 | * view all maps and programs 14 | * view graph of interconnected maps and programs 15 | * view program's tracepoints/kprobe 16 | * map entries table (Hash, HashPerCPU, Array, ArrayPerCPU) 17 | * view and edit in number/hex/string formats 18 | * expose map entries as metrics for prometheus (also other useful metrics) 19 | 20 | ![map editor demo gif](docs/pics/X_004RN_mapedit.gif) 21 | 22 | ## Usage 23 | 24 | Run explorer as a container: 25 | 26 | ```shell 27 | docker run -ti --rm -p 8070:80 \ 28 | --cap-add CAP_SYS_ADMIN --pid=host \ 29 | -e BPF_DIR=/sys/fs/bpf -v /sys/fs/bpf:/sys/fs/bpf \ 30 | ghcr.io/ebpfdev/explorer:v0.0.7 31 | ``` 32 | 33 | Privileges breakdown: 34 | 35 | * `--cap-add CAP_SYS_ADMIN` (**required**) 36 | 37 | is needed for access BPF maps and programs (CAP_BPF is not yet enough) 38 | 39 | * `--pid=host` (_optional_) 40 | 41 | is needed to determine tracepoint/kprobe attachment 42 | 43 | * `-e BPF_DIR=/sys/fs/bpf -v /sys/fs/bpf:/sys/fs/bpf` (_optional_) 44 | 45 | is needed to determine paths of pinned maps, it is better to keep BPF_DIR (and target mount path) 46 | the same as your original eBPF FS, which can be determined with the following command: 47 | ```shell 48 | $ mount | grep bpf 49 | bpf on /sys/fs/bpf type bpf 50 | ``` 51 | 52 | 53 | Use `--etm` option to expose map (with name `AT_`) entries values to Prometheus endpoint: 54 | ```shell 55 | docker run -ti --rm -p 8070:80 \ 56 | --cap-add CAP_SYS_ADMIN --pid=host \ 57 | -e BPF_DIR=/sys/fs/bpf -v /sys/fs/bpf:/sys/fs/bpf \ 58 | ghcr.io/ebpfdev/explorer:v0.0.7 --etm -:AT_:string 59 | ``` 60 | 61 | If you only need GraphQL / Prometheus without web interface, you can run [agent](https://github.com/ebpfdev/dev-agent) independently: 62 | ```shell 63 | docker run -ti --rm -p 8080:8080 \ 64 | --cap-add CAP_SYS_ADMIN --pid=host \ 65 | -e BPF_DIR=/sys/fs/bpf -v /sys/fs/bpf:/sys/fs/bpf \ 66 | ghcr.io/ebpfdev/dev-agent:v0.0.5 server 67 | ``` 68 | 69 | Links: 70 | * [http://localhost:8070](http://localhost:8070) - web interface 71 | * [http://localhost:8070/dev-agent](http://localhost:8070/dev-agent) - Agent's GraphQL web client 72 | * [http://localhost:8070/dev-agent/metrics](http://localhost:8070/dev-agent/metrics) - Prometheus scrape endpoint 73 | 74 | # Demo 75 | 76 | Run the explorer as described above and open [http://localhost:8070](http://localhost:8070) in your browser. 77 | 78 | You should see a file tree view with a list of eBPF programs and maps: 79 | 80 | ![List of maps](docs/pics/00-start.png) 81 | 82 | Let's use [bpftrace](https://github.com/iovisor/bpftrace) to track amount of data read by each process: 83 | ```shell 84 | $ sudo bpftrace -e 'tracepoint:syscalls:sys_exit_read /args->ret/ { @[comm] = sum(args->ret); }' 85 | Attaching 1 probe... 86 | ``` 87 | 88 | Once you run it, list will be automatically updated: 89 | 90 | ![A list of maps containing two new maps](docs/pics/01-list-with-bpftrace.png) 91 | 92 | `...` 93 | 94 | ![A list of programs with the new sys_exit_read](docs/pics/02-list-with-sys_exit_read.png) 95 | 96 | Let's examine the `sys_exit_read` program: 97 | 98 | ![sys_exit_read program page](docs/pics/03-sys_exit_read-page.png) 99 | 100 | We can see that this new program is using a new map called `AT_`. 101 | Which probably means that it contains state of `@` variable of the program generated by `bpftrace`. 102 | 103 | There is also `printf` map of type PerfEventArray. It is probably used by `printf()` invocation within `bpftrace` programs 104 | and created regardless of whatever you actually use it or not: out program doesnt use it therefore we also 105 | don't see that is used by the program in UI. 106 | 107 | We can proceed to the `AT_` map page: 108 | 109 | ![Page of the AT map](docs/pics/04-at-map-page.png) 110 | 111 | On the `Entries` subpage we can examine current state of the map: 112 | 113 | ![Entries table of the AT map state](docs/pics/05-at-map-page-entries.png) 114 | 115 | Values are formatted as numbers by default if value size <= 8 bytes. Otherwise, they are displayed as hex strings. 116 | 117 | We can also switch `KEY` representation to `string`: 118 | 119 | ![Entries table of the AT map state with string keys](docs/pics/06-at-map-page-entries-repr.png) 120 | 121 | # Prometheus scrape endpoint 122 | 123 | There is a scrape endpoint for Prometheus available at `/metrics` path: 124 | ```shell 125 | % curl http://localhost:8070/metrics 126 | # HELP devagent_ebpf_map_count Number of eBPF maps 127 | # TYPE devagent_ebpf_map_count gauge 128 | devagent_ebpf_map_count{type="Hash"} 5 129 | devagent_ebpf_map_count{type="PerCPUHash"} 1 130 | devagent_ebpf_map_count{type="PerfEventArray"} 1 131 | # HELP devagent_ebpf_map_entry_count Number of entries in an eBPF map 132 | # TYPE devagent_ebpf_map_entry_count gauge 133 | devagent_ebpf_map_entry_count{id="14",name="AT_",type="PerCPUHash"} 351 134 | # HELP devagent_ebpf_map_entry_value Value of an eBPF map entry 135 | # TYPE devagent_ebpf_map_entry_value gauge 136 | devagent_ebpf_map_entry_value{cpu="0",id="14",key="(xtract-3)",name="AT_",type="PerCPUHash"} 0 137 | devagent_ebpf_map_entry_value{cpu="0",id="14",key="000resolvconf",name="AT_",type="PerCPUHash"} 0 138 | # (...) 139 | devagent_ebpf_map_entry_value{cpu="15",id="14",key="01-ifupdown",name="AT_",type="PerCPUHash"} 0 140 | # (...) 141 | # HELP devagent_ebpf_prog_count Number of eBPF programs 142 | # TYPE devagent_ebpf_prog_count gauge 143 | devagent_ebpf_prog_count{type="CGroupDevice"} 19 144 | devagent_ebpf_prog_count{type="CGroupSKB"} 10 145 | devagent_ebpf_prog_count{type="TracePoint"} 1 146 | # HELP devagent_ebpf_prog_run_count Number of times an eBPF program has been run 147 | # TYPE devagent_ebpf_prog_run_count gauge 148 | devagent_ebpf_prog_run_count{id="112",name="",tag="03b4eaae2f14641a",type="CGroupDevice"} 0 149 | devagent_ebpf_prog_run_count{id="113",name="",tag="03b4eaae2f14641a",type="CGroupDevice"} 0 150 | devagent_ebpf_prog_run_count{id="114",name="",tag="03b4eaae2f14641a",type="CGroupDevice"} 54 151 | devagent_ebpf_prog_run_count{id="118",name="sys_exit_read",tag="90964a143ba6aa2c",type="TracePoint"} 2.866732e+06 152 | devagent_ebpf_prog_run_count{id="127",name="",tag="3918c82a5f4c0360",type="CGroupDevice"} 7 153 | # (...) 154 | # HELP devagent_ebpf_prog_run_time Total time spent running eBPF programs 155 | # TYPE devagent_ebpf_prog_run_time gauge 156 | devagent_ebpf_prog_run_time{id="112",name="",tag="03b4eaae2f14641a",type="CGroupDevice"} 0 157 | devagent_ebpf_prog_run_time{id="113",name="",tag="03b4eaae2f14641a",type="CGroupDevice"} 0 158 | devagent_ebpf_prog_run_time{id="114",name="",tag="03b4eaae2f14641a",type="CGroupDevice"} 6.857e-05 159 | devagent_ebpf_prog_run_time{id="118",name="sys_exit_read",tag="90964a143ba6aa2c",type="TracePoint"} 1.405393686 160 | devagent_ebpf_prog_run_time{id="127",name="",tag="3918c82a5f4c0360",type="CGroupDevice"} 2.314e-06 161 | # (...) 162 | ``` 163 | 164 | By default, metrics `devagent_ebpf_map_entry_count` and `devagent_ebpf_map_entry_value` are disabled. 165 | To enable them for some of the maps (Array or Hash types), use `--etm option`, for the demo above: 166 | ```shell 167 | docker run -ti --rm -p 8070:80 \ 168 | --cap-add CAP_SYS_ADMIN --pid=host \ 169 | -e BPF_DIR=/sys/fs/bpf -v /sys/fs/bpf:/sys/fs/bpf \ 170 | ghcr.io/ebpfdev/explorer:v0.0.7 --etm -:AT_:string 171 | ``` 172 | 173 | Run with `--help` to see details of this option: 174 | ```shell 175 | % docker run -ti --rm ghcr.io/ebpfdev/explorer:v0.0.7 --help 176 | 177 | (edited) 178 | 179 | --entries-to-metrics value, --etm value [ --entries-to-metrics value, --etm value ] (experimental, api may change) 180 | Configure which map entries should be exposed as metrics, in the format: id_start-id_end:metric_name_regexp:key_format. 181 | Example: '-:.+:string' to export any map with non-empty name while treating key as string. 182 | or '10-:.*:hex' to export any map after ID 10 with key represented in HEX format 183 | Available key formats: string, number, hex 184 | If a map matches multiple entries, the first one is used. 185 | 186 | (edited) 187 | ``` 188 | 189 | Some interesting visualization you could build with this data: 190 | 191 | Programs run statistics: 192 | ![07-grafana-ebpf.png](docs/pics/07-grafana-ebpf.png) 193 | 194 | Amount of system calls per process: 195 | ![08-grafana-syscallnum.png](docs/pics/08-grafana-syscallnum.png) 196 | 197 | ## Features 198 | 199 | - [x] list of eBPF programs + details page 200 | - [x] list of eBPF maps + details page 201 | - [x] showing bounded maps of a programs (and vice versa) 202 | - [ ] showing map content 203 | - [x] Hash (+ per CPU) 204 | - [x] Array (+ per CPU) 205 | - [ ] others are planned 206 | - [ ] program introspection 207 | - [ ] eBPF bytecode 208 | - [ ] JIT disassembly 209 | - [ ] visualization of map's content 210 | 211 | Like plotting a chart of values of maps keys 212 | - [ ] program execution profiling 213 | 214 | I plan to keep track of duration/number of executions of a programs provided by kernel 215 | to draw nice charts 216 | - [ ] cluster support 217 | 218 | To traverse over a cluster of agents within a single interface 219 | 220 | Feedback and suggestions are welcome in [GitHub Issues](https://github.com/ebpfdev/explorer/issues) or via [alex@hsslb.ch](mailto:alex@hsslb.ch) 221 | 222 | -------------------------------------------------------------------------------- /docs/pics/00-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/00-start.png -------------------------------------------------------------------------------- /docs/pics/01-list-with-bpftrace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/01-list-with-bpftrace.png -------------------------------------------------------------------------------- /docs/pics/02-list-with-sys_exit_read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/02-list-with-sys_exit_read.png -------------------------------------------------------------------------------- /docs/pics/03-sys_exit_read-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/03-sys_exit_read-page.png -------------------------------------------------------------------------------- /docs/pics/04-at-map-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/04-at-map-page.png -------------------------------------------------------------------------------- /docs/pics/05-at-map-page-entries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/05-at-map-page-entries.png -------------------------------------------------------------------------------- /docs/pics/06-at-map-page-entries-repr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/06-at-map-page-entries-repr.png -------------------------------------------------------------------------------- /docs/pics/07-grafana-ebpf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/07-grafana-ebpf.png -------------------------------------------------------------------------------- /docs/pics/08-grafana-syscallnum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/08-grafana-syscallnum.png -------------------------------------------------------------------------------- /docs/pics/X_002RN_syscall-grafana-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/X_002RN_syscall-grafana-example.png -------------------------------------------------------------------------------- /docs/pics/X_003RN_graphview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/X_003RN_graphview.png -------------------------------------------------------------------------------- /docs/pics/X_003RN_tracepoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/X_003RN_tracepoints.png -------------------------------------------------------------------------------- /docs/pics/X_004RN_mapedit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/X_004RN_mapedit.gif -------------------------------------------------------------------------------- /docs/pics/X_004RN_pins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ebpfdev/explorer/a94247446a346cb90155ae60b489b334d835548f/docs/pics/X_004RN_pins.png -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | daemon off; 6 | 7 | error_log /dev/stdout warn; 8 | 9 | events { 10 | worker_connections 768; 11 | } 12 | 13 | http { 14 | sendfile on; 15 | tcp_nopush on; 16 | types_hash_max_size 2048; 17 | 18 | include /etc/nginx/mime.types; 19 | default_type application/octet-stream; 20 | 21 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE 22 | ssl_prefer_server_ciphers on; 23 | 24 | access_log /var/log/nginx/access.log; 25 | 26 | gzip on; 27 | 28 | server { 29 | listen 80 default_server; 30 | listen [::]:80 default_server; 31 | 32 | root /usr/share/nginx/html; 33 | index index.html; 34 | 35 | server_name _; 36 | 37 | # Any route containing a file extension (e.g. /devicesfile.js) 38 | location ~ ^.+\..+$ { 39 | try_files $uri =404; 40 | } 41 | 42 | # Any route that doesn't have a file extension (e.g. /program/1) 43 | location / { 44 | try_files $uri $uri/ /index.html; 45 | } 46 | 47 | location /metrics { 48 | proxy_pass http://localhost:8080/metrics; 49 | } 50 | 51 | location /dev-agent/ { 52 | proxy_pass http://localhost:8080/; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /scripts/entrypoint.sh: -------------------------------------------------------------------------------- 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 $? --------------------------------------------------------------------------------