Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ac5d567
enriched the metrics-collector
reggeenr Feb 12, 2026
995714e
Adjusted prometheus configuration
reggeenr Feb 12, 2026
682fdc7
Updated the dashboard template
reggeenr Feb 12, 2026
2c75316
updated the code engine resources dashboard
reggeenr Feb 13, 2026
f3e0181
Updated the Readme.md
reggeenr Feb 13, 2026
e7cf7d9
Updated the Readme
reggeenr Feb 13, 2026
0b40fcf
added a draw.io
reggeenr Mar 2, 2026
e6f71d5
Merge branch 'main' of github.com:IBM/CodeEngine into metric-collecto…
reggeenr Mar 2, 2026
afa3b87
Merge branch 'main' of github.com:IBM/CodeEngine into metric-collecto…
reggeenr Mar 2, 2026
1869668
updated code engine dashboard
reggeenr Mar 2, 2026
108c1d8
Adjusted component name detection
reggeenr Mar 2, 2026
78015b5
Adjusted wording
reggeenr Mar 2, 2026
10118f0
Streamlined the Readme
reggeenr Mar 2, 2026
954371a
Updated the readme
reggeenr Mar 2, 2026
1fa87f2
Drop the default scrape metrics
reggeenr Mar 2, 2026
93ab17b
Adjusted the query for showing current number of instances
reggeenr Mar 3, 2026
0af2666
Refined wording
reggeenr Mar 3, 2026
11683af
Fixed incomplete region list
reggeenr Mar 3, 2026
b10575e
Update metrics-collector/prometheus.yml.template
reggeenr Mar 5, 2026
25d2eb3
Update metrics-collector/prometheus.yml.template
reggeenr Mar 5, 2026
9ef4a39
Enriched the network-test-app
reggeenr Mar 9, 2026
3ee1a2a
Minor changes
reggeenr Mar 10, 2026
cbd6af0
reworked the metrics examples
reggeenr Mar 13, 2026
9ca2f89
Update README.md
reggeenr Mar 13, 2026
7e480c1
we should not drop the job label of custom metrics
reggeenr Mar 15, 2026
4a4323f
Updated metrics-collector
reggeenr Mar 20, 2026
c9d7a3a
Added an indicator metric
reggeenr Mar 20, 2026
10089dc
Added examples for java, go and python
reggeenr Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ node_modules

# draw.io temp files
.$*.bkp
.$*.dtmp
.$*.dtmp
venv
2 changes: 2 additions & 0 deletions metrics-collector/.ceignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
images/
setup/
76 changes: 68 additions & 8 deletions metrics-collector/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,71 @@
FROM quay.io/projectquay/golang:1.23 AS build-env
# Stage 1: Build Go binary
FROM quay.io/projectquay/golang:1.25 AS go-builder
WORKDIR /go/src/app
COPY . .

COPY go.mod go.sum ./
RUN go mod download
RUN CGO_ENABLED=0 go build -o /go/bin/app main.go
COPY main.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app main.go

# Stage 2: Download and extract Prometheus
FROM busybox:1.36-glibc AS prometheus-downloader
ARG PROMETHEUS_VERSION=3.10.0
ARG TARGETARCH=amd64

WORKDIR /tmp
RUN wget https://github.com/prometheus/prometheus/releases/download/v${PROMETHEUS_VERSION}/prometheus-${PROMETHEUS_VERSION}.linux-${TARGETARCH}.tar.gz && \
tar xzf prometheus-${PROMETHEUS_VERSION}.linux-${TARGETARCH}.tar.gz && \
mv prometheus-${PROMETHEUS_VERSION}.linux-${TARGETARCH}/prometheus /prometheus

# Stage 3: Get CA certificates and curl
FROM alpine:latest AS certs
RUN apk --no-cache add ca-certificates curl

# Stage 4: Runtime image
FROM busybox:1.36-glibc

# Copy curl binary and all its dependencies from alpine
# Use following command locally to determine the correct source paths:
# docker run --rm alpine:latest sh -c "apk add --no-cache curl > /dev/null 2>&1 && ldd /usr/bin/curl"
COPY --from=certs /usr/bin/curl /usr/bin/curl
COPY --from=certs /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
COPY --from=certs /usr/lib/libcurl.so.4 /usr/lib/libcurl.so.4
COPY --from=certs /usr/lib/libz.so.1 /usr/lib/libz.so.1
COPY --from=certs /usr/lib/libnghttp2.so.14 /usr/lib/libnghttp2.so.14
COPY --from=certs /usr/lib/libnghttp3.so.9 /usr/lib/libnghttp3.so.9
COPY --from=certs /usr/lib/libbrotlidec.so.1 /usr/lib/libbrotlidec.so.1
COPY --from=certs /usr/lib/libbrotlicommon.so.1 /usr/lib/libbrotlicommon.so.1
COPY --from=certs /usr/lib/libssl.so.3 /usr/lib/libssl.so.3
COPY --from=certs /usr/lib/libcrypto.so.3 /usr/lib/libcrypto.so.3
COPY --from=certs /usr/lib/libcares.so.2 /usr/lib/libcares.so.2
COPY --from=certs /usr/lib/libidn2.so.0 /usr/lib/libidn2.so.0
COPY --from=certs /usr/lib/libpsl.so.5 /usr/lib/libpsl.so.5
COPY --from=certs /usr/lib/libzstd.so.1 /usr/lib/libzstd.so.1
COPY --from=certs /usr/lib/libunistring.so.5 /usr/lib/libunistring.so.5

# Copy CA certificates for TLS verification
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

# Copy Go binary
COPY --from=go-builder /go/src/app/app /app

# Copy Prometheus binary
COPY --from=prometheus-downloader /prometheus /bin/prometheus

# Copy configuration and scripts
COPY prometheus.yml.template /etc/prometheus/prometheus.yml.template
COPY start.sh /start.sh
RUN chmod +x /start.sh

# Create necessary directories with proper permissions
RUN mkdir -p /tmp/agent-data && \
mkdir -p /etc/secrets && \
chmod 777 /tmp/agent-data && \
chmod 777 /etc/secrets

# Set SSL certificate path environment variable
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

# Use non-root user
USER 1000:1000

# Copy the exe into a smaller base image
FROM gcr.io/distroless/static-debian12
COPY --from=build-env /go/bin/app /
CMD ["/app"]
ENTRYPOINT ["/start.sh"]
Loading
Loading