Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceph-exporter: add support for launching the exporter daemon #89

Open
wants to merge 1 commit into
base: main
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
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
- PYTHONDONTWRITEBYTECODE=1
- RGW
- RGW_MULTISITE=${RGW_MULTISITE:-0}
- EXPORTER=${EXPORTER:-0}
- NVMEOF_GW=${NVMEOF_GW}
cap_add:
- ALL
Expand Down
1 change: 1 addition & 0 deletions docker/ceph/rpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ARG CEPH_RELEASE=main
COPY rpm/*.* /root/
RUN /root/set-ceph-repo.sh
RUN dnf install -y --nogpgcheck ceph-mds ceph-mgr-cephadm ceph-mgr-dashboard \
ceph-exporter \
ceph-mgr-diskprediction-local \
ceph-mon ceph-osd ceph-radosgw rbd-mirror \
&& dnf clean packages
Expand Down
6 changes: 6 additions & 0 deletions docker/ceph/set-start-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ fi
export RGW_DEBUG
export VSTART_OPTIONS

# Add --exporter to VSTART_OPTIONS if the exporter flag is set
echo "exporter starting"
if [[ "$EXPORTER" == 1 ]]; then
VSTART_OPTIONS="$VSTART_OPTIONS --exporter"
fi

HTTP_PROTO='http'
if [[ "$DASHBOARD_SSL" == 1 ]]; then
HTTP_PROTO='https'
Expand Down
8 changes: 8 additions & 0 deletions docker/prometheus/ceph-exporter-targets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"targets": [ "ceph:9926" ],
"labels": {
cluster: "cluster1"
}
},
]
9 changes: 9 additions & 0 deletions docker/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ scrape_configs:
- source_labels: [__address__]
target_label: cluster
replacement: 'cluster1'
- job_name: 'ceph-exporter'
honor_labels: true
file_sd_configs:
- files:
- ceph-exporter-targets.yml
relabel_configs:
- source_labels: [__address__]
target_label: cluster
replacement: 'cluster1'
- job_name: 'federate'
scrape_interval: 15s
honor_labels: true
Expand Down
Loading