Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Jan 3, 2024
2 parents ddffd2b + a83ec1e commit 6cfb6c9
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 51 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/notify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Notify

on:
discussion:
types: [created, reopened]
issues:
types: [opened, reopened]

jobs:
notify:
runs-on: ubuntu-22.04
steps:
- name: Send notification
uses: USA-RedDragon/telegram-notification@v1.0.0
with:
bot-token: ${{ secrets.TG_BOT_TOKEN }}
chat-id: ${{ secrets.TG_CHAT_ID }}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f as prometheus-cpp-builder
FROM ubuntu:22.04@sha256:6042500cf4b44023ea1894effe7890666b0c5c7871ed83a97c36c76ae560bb9b as prometheus-cpp-builder

RUN apt update && export DEBIAN_FRONTEND=noninteractive && \
apt install -y curl git cmake build-essential file zlib1g-dev && rm -rf /var/lib/apt/lists/*

# renovate: datasource=github-tags depName=jupp0r/prometheus-cpp
ARG PROMETHEUS_CPP_VERSION=v1.1.0
ARG PROMETHEUS_CPP_VERSION=v1.2.0

RUN git clone https://github.com/jupp0r/prometheus-cpp -b ${PROMETHEUS_CPP_VERSION} /tmp/prometheus-cpp && \
cd /tmp/prometheus-cpp && \
Expand All @@ -18,7 +18,7 @@ RUN git clone https://github.com/jupp0r/prometheus-cpp -b ${PROMETHEUS_CPP_VERSI
cd - && \
rm -rf /tmp/prometheus-cpp

FROM robotastic/trunk-recorder:edge@sha256:5911bc9d338738da5aeaf8a4c4a8e6cc07a595df4a3f51db4c7c44b61e285e2a
FROM ghcr.io/robotastic/trunk-recorder:edge@sha256:f7b8fdf856d685c357daeac12bfcbac44fc800eaea5eb071fb8c44e45b561035

COPY --from=prometheus-cpp-builder /prometheus-cpp.deb /tmp/prometheus-cpp.deb
RUN apt update && export DEBIAN_FRONTEND=noninteractive && \
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ This is a plugin for Trunk Recorder that publishes metrics in Prometheus format.

A Grafana dashboard is available [here](https://grafana.com/grafana/dashboards/19959) and also in the `grafana/dashboard.json` file in this repository.

### Image

<details>
<summary>Dashboard Screenshot</summary>

![Grafana Dashboard](./grafana/dashboard.png)
</details>

## Install

1. **Build and install the current version of Trunk Recorder** following these [instructions](https://github.com/robotastic/trunk-recorder/blob/master/docs/INSTALL-LINUX.md). Make sure you do a `sudo make install` at the end to install the Trunk Recorder binary and libaries systemwide. The plugin will be built against these libraries.
Expand All @@ -24,7 +32,7 @@ mkdir _build
cd _build

# run cmake
cmake .. -DBUILD_SHARED_LIBS=ON -DENABLE_PUSH=OFF -DENABLE_COMPRESSION=OFF
cmake .. -DBUILD_SHARED_LIBS=ON -DENABLE_PUSH=OFF -DENABLE_COMPRESSION=ON

# build
cmake --build . --parallel 4
Expand Down
Loading

0 comments on commit 6cfb6c9

Please sign in to comment.