Skip to content

Commit

Permalink
Fixed fc /federate; fixed fc dashboard; removed alertmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
GilHoggarth committed Nov 23, 2023
1 parent b51654f commit c739093
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 40 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
File renamed without changes.
26 changes: 13 additions & 13 deletions monitor/aws/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ providers:
folder: ''
type: file
options:
path: /etc/grafana/dashboards
path: /etc/grafana/provisioning/dashboards
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
16 changes: 8 additions & 8 deletions monitor/aws/prometheus/prometheus.yml-template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions monitor/aws/start_monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c739093

Please sign in to comment.