-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitial-setup.sh
More file actions
61 lines (46 loc) · 1.46 KB
/
initial-setup.sh
File metadata and controls
61 lines (46 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Define the base directory
BASE_DIR="monitoring-stack"
# Create base directory
echo "Creating project structure in $BASE_DIR..."
mkdir -p $BASE_DIR
# Change to the base directory
cd $BASE_DIR
# Create .env and docker-compose.yml files
touch .env
touch docker-compose.yml
# Create prometheus directory and files
mkdir -p prometheus/alerts
touch prometheus/prometheus.yml
touch prometheus/alert.rules
touch prometheus/alerts/custom_alerts.yml
# Create grafana directory and files
mkdir -p grafana/provisioning/dashboards
mkdir -p grafana/provisioning/datasources
mkdir -p grafana/dashboards
touch grafana/provisioning/dashboards/dashboard.yml
touch grafana/provisioning/dashboards/node_exporter_dashboard.json
touch grafana/provisioning/datasources/datasource.yml
# Create alertmanager directory and files
mkdir -p alertmanager
touch alertmanager/alertmanager.yml
# Create node_exporter directory
mkdir -p node_exporter
# Create cadvisor directory
mkdir -p cadvisor
# Create blackbox_exporter directory and files
mkdir -p blackbox_exporter
touch blackbox_exporter/blackbox.yml
# Create loki directory and files
mkdir -p loki
touch loki/loki-config.yml
# Create promtail directory and files
mkdir -p promtail
touch promtail/promtail-config.yml
# # Make the script executable
# chmod +x setup.sh
echo "Project structure created successfully!"
echo "Directory structure:"
find . -type d -not -path "*/\.*" | sort
echo "Files created:"
find . -type f -not -path "*/\.*" | sort