Skip to content

Commit

Permalink
add redis_exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Dudi Zimberknopf committed Mar 13, 2024
1 parent 3eb06d9 commit e28ab10
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions falkordb-node/.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FALKORDB_PASSWORD=
ADMIN_PASSWORD=
RUN_NODE=1
RUN_SENTINEL=0
RUN_METRICS=1
TLS=false

# SENTINEL
Expand Down
3 changes: 3 additions & 0 deletions falkordb-node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM oliver006/redis_exporter:alpine as redis_exporter

FROM falkordb/falkordb:edge

# Install curl
Expand All @@ -10,6 +12,7 @@ WORKDIR /falkordb
COPY sentinel.conf .
COPY node.conf .
COPY node-entrypoint.sh /usr/local/bin/
COPY --from=redis_exporter /redis_exporter /usr/local/bin/

RUN chown redis:redis /falkordb/* && \
chmod +x /usr/local/bin/node-entrypoint.sh
Expand Down
6 changes: 6 additions & 0 deletions falkordb-node/node-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FALKORDB_PASSWORD=${FALKORDB_PASSWORD:-''}
ADMIN_PASSWORD=${ADMIN_PASSWORD:-''}
RUN_SENTINEL=${RUN_SENTINEL:-0}
RUN_NODE=${RUN_NODE:-1}
RUN_METRICS=${RUN_METRICS:-1}
TLS=${TLS:-'false'}

SENTINEL_PORT=${SENTINEL_PORT:-26379}
Expand Down Expand Up @@ -155,6 +156,11 @@ if [ "$RUN_SENTINEL" -eq "1" ]; then
fi


if [[ $RUN_METRICS -eq 1 ]]; then
echo "Starting Metrics"
redis_exporter --redis.password $ADMIN_PASSWORD --tls-server-key-file $TLS_MOUNT_PATH/tls.key --tls-server-cert-file $TLS_MOUNT_PATH/tls.crt --tls-ca-cert-file $ROOT_CA_PATH --redis.addr $NODE_HOST:$NODE_PORT &
fi

while true; do
sleep 1
done
1 change: 1 addition & 0 deletions omnistrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ services:
ports:
- "6379:6379"
- "26379:26379"
- "9121:9121"
x-omnistrate-capabilities:
enableMultiZone: true
enableEndpointPerReplica: true
Expand Down

0 comments on commit e28ab10

Please sign in to comment.