Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

add prometheus_rabbitmq_exporter #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ FROM rabbitmq:${RABBITMQ_VERSION}-management-alpine

ENV RABBITMQ_ERLANG_COOKIE="cookiemonster"

COPY rootfs/ /

RUN /rmq_prom_get.sh
RUN chgrp -R root /var/lib/rabbitmq /var/log/rabbitmq /etc/rabbitmq
RUN chmod g+w /etc/passwd &&\
chmod -R g+rwx /var/lib/rabbitmq /var/log/rabbitmq /etc/rabbitmq

ADD launch.sh /launch.sh
VOLUME /var/lib/rabbitmq
EXPOSE 15672/tcp 25672/tcp 4369/tcp 5671/tcp 5672/tcp

Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions rootfs/rmq_prom_get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
# Adapted from https://www.rabbitmq.com/prometheus.html

# make sure the directory exists
mkdir -p /opt/rabbitmq/plugins
cd /opt/rabbitmq/plugins

# Downloads prometheus_rabbitmq_exporter and its dependencies with wget

readonly base_url='https://github.com/deadtrickster/prometheus_rabbitmq_exporter/releases/download/v3.7.2.3'

get() {
wget "$base_url/$1"
}

get accept-0.3.3.ez
get prometheus-3.5.1.ez
get prometheus_cowboy-0.1.4.ez
get prometheus_httpd-2.1.8.ez
get prometheus_process_collector-1.3.1.ez
get prometheus_rabbitmq_exporter-3.7.2.3.ez