diff --git a/.gitignore b/.gitignore index 83d6110..37460d7 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,8 @@ monitor/grafana/provisioning/dashboards/wa_status.json # aws generated content monitor/aws/alertmanager/config.yml -monitor/aws/grafana/datasources/frequent_crawl.yaml -monitor/aws/grafana/datasources/prometheus.yaml monitor/aws/grafana/grafana.ini +monitor/aws/grafana/provisioning/datasources/frequent_crawl.yaml +monitor/aws/grafana/provisioning/datasources/prometheus.yaml monitor/aws/prometheus/prometheus.yml +monitor/aws/_z/* diff --git a/monitor/aws/alertmanager/config.yml-template b/monitor/aws/_z/alertmanager/config.yml-template similarity index 100% rename from monitor/aws/alertmanager/config.yml-template rename to monitor/aws/_z/alertmanager/config.yml-template diff --git a/monitor/aws/prometheus/alert.rules.yml b/monitor/aws/_z/prometheus/alert.rules.yml similarity index 100% rename from monitor/aws/prometheus/alert.rules.yml rename to monitor/aws/_z/prometheus/alert.rules.yml diff --git a/monitor/aws/docker-compose.yml b/monitor/aws/docker-compose.yml index 76acbb9..9457948 100644 --- a/monitor/aws/docker-compose.yml +++ b/monitor/aws/docker-compose.yml @@ -2,24 +2,24 @@ version: '3.2' # prometheus monitoring service services: - alertmanager: - image: prom/alertmanager - ports: - - "${ALERTMANAGER_PORT}:9093" - volumes: - - ./alertmanager:/etc/alertmanager - - "${ALERTMANAGER_DATA}:/alertmanager" - command: - - '--config.file=/etc/alertmanager/config.yml' - - '--storage.path=/alertmanager' - - '--web.external-url=http://${ALERTMANAGER_SERVICE_NAME}/' + # alertmanager: + # image: prom/alertmanager + # ports: + # - "${ALERTMANAGER_PORT}:9093" + # volumes: + # - ./alertmanager:/etc/alertmanager + # - "${ALERTMANAGER_DATA}:/alertmanager" + # command: + # - '--config.file=/etc/alertmanager/config.yml' + # - '--storage.path=/alertmanager' + # - '--web.external-url=http://${ALERTMANAGER_SERVICE_NAME}/' prometheus: image: prom/prometheus:v2.30.3 ports: - "${PROMETHEUS_PORT}:9090" - depends_on: - - alertmanager:alertmanager +# depends_on: +# - alertmanager:alertmanager user: root volumes: - ./prometheus:/etc/prometheus diff --git a/monitor/aws/grafana/dashboards/blukwa.yaml b/monitor/aws/grafana/provisioning/dashboards/blukwa.yaml similarity index 65% rename from monitor/aws/grafana/dashboards/blukwa.yaml rename to monitor/aws/grafana/provisioning/dashboards/blukwa.yaml index 12d5d13..a59cc6a 100644 --- a/monitor/aws/grafana/dashboards/blukwa.yaml +++ b/monitor/aws/grafana/provisioning/dashboards/blukwa.yaml @@ -6,4 +6,4 @@ providers: folder: '' type: file options: - path: /etc/grafana/dashboards + path: /etc/grafana/provisioning/dashboards diff --git a/monitor/aws/grafana/dashboards/frequent_crawler_dashboard.json b/monitor/aws/grafana/provisioning/dashboards/frequent_crawler_dashboard.json similarity index 97% rename from monitor/aws/grafana/dashboards/frequent_crawler_dashboard.json rename to monitor/aws/grafana/provisioning/dashboards/frequent_crawler_dashboard.json index accf334..bde2ba1 100644 --- a/monitor/aws/grafana/dashboards/frequent_crawler_dashboard.json +++ b/monitor/aws/grafana/provisioning/dashboards/frequent_crawler_dashboard.json @@ -23,7 +23,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Frequent Crawler 06 Embedded Prometheus", + "datasource": "FC AWS Embedded Prometheus", "description": "Compares the last hour's queue activity with the same hour yesterday.", "fill": 1, "gridPos": { @@ -110,7 +110,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Frequent Crawler 06 Embedded Prometheus", + "datasource": "FC AWS Embedded Prometheus", "fill": 1, "gridPos": { "h": 5, @@ -200,7 +200,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Frequent Crawler 06 Embedded Prometheus", + "datasource": "FC AWS Embedded Prometheus", "fill": 1, "gridPos": { "h": 5, @@ -290,7 +290,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Frequent Crawler 06 Embedded Prometheus", + "datasource": "FC AWS Embedded Prometheus", "fill": 1, "gridPos": { "h": 5, @@ -379,7 +379,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Frequent Crawler 06 Embedded Prometheus", + "datasource": "FC AWS Embedded Prometheus", "fill": 1, "gridPos": { "h": 5, @@ -476,7 +476,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Frequent Crawler 06 Embedded Prometheus", + "datasource": "FC AWS Embedded Prometheus", "fill": 1, "gridPos": { "h": 5, @@ -585,7 +585,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Frequent Crawler 06 Embedded Prometheus", + "datasource": "FC AWS Embedded Prometheus", "fill": 1, "gridPos": { "h": 5, @@ -673,7 +673,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Frequent Crawler 06 Embedded Prometheus", + "datasource": "FC AWS Embedded Prometheus", "fill": 1, "gridPos": { "h": 5, @@ -761,7 +761,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Frequent Crawler 06 Embedded Prometheus", + "datasource": "FC AWS Embedded Prometheus", "fill": 1, "gridPos": { "h": 5, diff --git a/monitor/aws/grafana/dashboards/wa_servers.json b/monitor/aws/grafana/provisioning/dashboards/wa_servers.json similarity index 100% rename from monitor/aws/grafana/dashboards/wa_servers.json rename to monitor/aws/grafana/provisioning/dashboards/wa_servers.json diff --git a/monitor/aws/grafana/datasources/frequent_crawl.yaml-template b/monitor/aws/grafana/provisioning/datasources/frequent_crawl.yaml-template similarity index 100% rename from monitor/aws/grafana/datasources/frequent_crawl.yaml-template rename to monitor/aws/grafana/provisioning/datasources/frequent_crawl.yaml-template diff --git a/monitor/aws/grafana/datasources/prometheus.yaml-template b/monitor/aws/grafana/provisioning/datasources/prometheus.yaml-template similarity index 100% rename from monitor/aws/grafana/datasources/prometheus.yaml-template rename to monitor/aws/grafana/provisioning/datasources/prometheus.yaml-template diff --git a/monitor/aws/prometheus/prometheus.yml-template b/monitor/aws/prometheus/prometheus.yml-template index 3a56013..e363a87 100644 --- a/monitor/aws/prometheus/prometheus.yml-template +++ b/monitor/aws/prometheus/prometheus.yml-template @@ -7,17 +7,17 @@ global: # Specify the location of rules we want prometheus to load -rule_files: - - 'alert.rules.yml' +#rule_files: +# - 'alert.rules.yml' # prometheus has a dependency on alertmanager, as defined in docker_compose.yml -alerting: - alertmanagers: - - scheme: http - static_configs: - - targets: - - "${ALERTMANAGER_SERVICE_NAME}" +#alerting: +# alertmanagers: +# - scheme: http +# static_configs: +# - targets: +# - "${ALERTMANAGER_SERVICE_NAME}" # Define which resources prometheus should monitor diff --git a/monitor/aws/start_monitor.sh b/monitor/aws/start_monitor.sh index 432b490..cf90878 100755 --- a/monitor/aws/start_monitor.sh +++ b/monitor/aws/start_monitor.sh @@ -18,11 +18,11 @@ STORAGE_PATH=/mnt/data/monitor # alertmanager -export ALERTMANAGER_SERVICE_NAME='monitor' -export ALERTMANAGER_DATA=${STORAGE_PATH}/alertmanager -export ALERTMANAGER_PORT=9093 -[[ -d ${ALERTMANAGER_DATA}/ ]] || mkdir -p ${ALERTMANAGER_DATA} -envsubst < ./alertmanager/config.yml-template > ./alertmanager/config.yml +#export ALERTMANAGER_SERVICE_NAME='monitor' +#export ALERTMANAGER_DATA=${STORAGE_PATH}/alertmanager +#export ALERTMANAGER_PORT=9093 +#[[ -d ${ALERTMANAGER_DATA}/ ]] || mkdir -p ${ALERTMANAGER_DATA} +#envsubst < ./alertmanager/config.yml-template > ./alertmanager/config.yml # prometheus @@ -42,8 +42,8 @@ export FC_EMBEDDED_SERVICE_NAME='172.31.43.254' [[ -d ${GRAFANA_DATA}/ ]] || mkdir -p ${GRAFANA_DATA} chown -R ${USER}:${USER} ${GRAFANA_DATA} envsubst < ./grafana/grafana.ini-template > ./grafana/grafana.ini -envsubst < ./grafana/datasources/prometheus.yaml-template > ./grafana/datasources/prometheus.yaml -envsubst < ./grafana/datasources/frequent_crawl.yaml-template > ./grafana/datasources/frequent_crawl.yaml +envsubst < ./grafana/provisioning/datasources/prometheus.yaml-template > ./grafana/provisioning/datasources/prometheus.yaml +envsubst < ./grafana/provisioning/datasources/frequent_crawl.yaml-template > ./grafana/provisioning/datasources/frequent_crawl.yaml # start monitoring stacks