add grafana dashboard 19268 Prometheus All Metrics

This commit is contained in:
Gilles Mouchet 2025-06-17 15:05:18 +02:00
parent 44780c8f41
commit c065174d68
3 changed files with 11 additions and 9 deletions

View File

@ -183,7 +183,7 @@ docker exec -it <COMPOSE_PROJECT_NAME>-proxy-1 /bin/bash -c "curl -H \"Accept: a
- node exporter container - node exporter container
- grafana dashboard - grafana dashboard
- 1860 - Node Exporter Full - 1860 - Node Exporter Full
- 3662 - Prometheus 2.0 Overview - 19268 - Prometheus All Metrics
- 13502 - MinIO Dashboard - 13502 - MinIO Dashboard
- 13639 Logs / APP - 13639 Logs / APP

View File

@ -11,7 +11,7 @@ scrape_configs:
- targets: - targets:
- node-exporter:9100 - node-exporter:9100
- job_name: minio-job - job_name: minio-job
bearer_token: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJwcm9tZXRoZXVzIiwic3ViIjoibWluaW8iLCJleHAiOjQ5MDM0OTIwNjN9.ailN0Xo5ZXOGDUIe_jrqHpNP2JlQKhi7Ss4XIPIa5M8Hjm7UGJuOKLRnpdysHCYo1cPwlWzMCaGpkfE0KbHmqA bearer_token: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJwcm9tZXRoZXVzIiwic3ViIjoibWluaW8iLCJleHAiOjQ5MDM3NjQ0NTR9.NxAYmMmAy0w0sv0zfP9MvgllPCxokn305qy8cY1Zj6v0peaNnqFYuyqXWcXo-UjAua9ZK-7Gbfa5gCSme1an6g
metrics_path: /minio/v2/metrics/cluster metrics_path: /minio/v2/metrics/cluster
scheme: http scheme: http
static_configs: static_configs:

View File

@ -100,7 +100,7 @@ function remove_folder {
#----------------------------------------------------------------- #-----------------------------------------------------------------
# copy config file # copy config file
function copy_conf_file { function copy_conf_file {
echo -n "Copy loki config file into ${LOKI_CONF_DIR}/: " echo -n "Copy loki config file into '${LOKI_CONF_DIR}/': "
envsubst < ./config/loki/local-config.yaml.tmpl | \ envsubst < ./config/loki/local-config.yaml.tmpl | \
sudo tee ${LOKI_CONF_DIR}/local-config.yaml > /dev/null sudo tee ${LOKI_CONF_DIR}/local-config.yaml > /dev/null
rc=$? rc=$?
@ -111,7 +111,7 @@ function copy_conf_file {
exit $rc exit $rc
fi fi
echo -n "Copy proxy (nginx) config file into ${PRX_NGINX_CONF_DIR}/: " echo -n "Copy proxy (nginx) config file into '${PRX_NGINX_CONF_DIR}/': "
sudo cp ./config/nginx/default.conf ${PRX_NGINX_CONF_DIR}/. > /dev/null 2>&1 sudo cp ./config/nginx/default.conf ${PRX_NGINX_CONF_DIR}/. > /dev/null 2>&1
rc=$? rc=$?
if [ $rc -eq 0 ]; then if [ $rc -eq 0 ]; then
@ -121,7 +121,7 @@ function copy_conf_file {
exit $rc exit $rc
fi fi
echo -n "Copy the Prometheus configuration file into ${PROM_CONF_DIR}/: " echo -n "Copy the Prometheus configuration file into '${PROM_CONF_DIR}/': "
sudo cp ./config/prometheus/prometheus.yml ${PROM_CONF_DIR}/. > /dev/null 2>&1 sudo cp ./config/prometheus/prometheus.yml ${PROM_CONF_DIR}/. > /dev/null 2>&1
rc=$? rc=$?
if [ $rc -eq 0 ]; then if [ $rc -eq 0 ]; then
@ -131,7 +131,7 @@ function copy_conf_file {
exit $rc exit $rc
fi fi
echo -n "Copy promtail config file into ${PROMTAIL_CONF_DIR}/: " echo -n "Copy promtail config file into '${PROMTAIL_CONF_DIR}/': "
sudo cp ./config/promtail/config.yml ${PROMTAIL_CONF_DIR}/. > /dev/null 2>&1 sudo cp ./config/promtail/config.yml ${PROMTAIL_CONF_DIR}/. > /dev/null 2>&1
rc=$? rc=$?
if [ $rc -eq 0 ]; then if [ $rc -eq 0 ]; then
@ -469,14 +469,16 @@ EOF
fi fi
fi fi
# ---- # ----
db_name="Prometheus 2.0 Overview" #db_name="Prometheus 2.0 Overview"
db_name="Prometheus All Metrics"
echo -n "Import '$db_name' dashboard: " echo -n "Import '$db_name' dashboard: "
# check if already imported # check if already imported
response=$(curl -k -s -u "$GF_ADMIN_USER:$GF_ADMIN_PASS" "$GF_ROOT_URL/api/search?query=") response=$(curl -k -s -u "$GF_ADMIN_USER:$GF_ADMIN_PASS" "$GF_ROOT_URL/api/search?query=")
if echo "$response" | grep -iq "\"title\":\"$db_name\""; then if echo "$response" | grep -iq "\"title\":\"$db_name\""; then
echo -e "${VERT}ALREADY IMPORTED${NORMAL}" echo -e "${VERT}ALREADY IMPORTED${NORMAL}"
else else
import_gf_dashboard 3662 prometheus #import_gf_dashboard 3662 prometheus
import_gf_dashboard 19268 prometheus
rc1=$? rc1=$?
if [ $rc1 -eq 0 ]; then if [ $rc1 -eq 0 ]; then
echo -e "${VERT}SUCCESSFULLY IMPORTED${NORMAL}" echo -e "${VERT}SUCCESSFULLY IMPORTED${NORMAL}"
@ -487,7 +489,7 @@ EOF
fi fi
# ---- # ----
db_name="MinIO Dashboard" db_name="MinIO Dashboard"
echo -n "Import $db_name dashboard: " echo -n "Import '$db_name' dashboard: "
# check if already imported # check if already imported
response=$(curl -k -s -u "$GF_ADMIN_USER:$GF_ADMIN_PASS" "$GF_ROOT_URL/api/search?query=") response=$(curl -k -s -u "$GF_ADMIN_USER:$GF_ADMIN_PASS" "$GF_ROOT_URL/api/search?query=")
if echo "$response" | grep -iq "\"title\":\"$db_name\""; then if echo "$response" | grep -iq "\"title\":\"$db_name\""; then