mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-14 05:06:18 +00:00
- Fix prometheus files path - Fix sciprt allowing to execute w/out username param - Add oh-my-zsh installation - Fix typo un ssh authorized_keys file - Fix PermitRootLogin disabling
17 lines
600 B
Bash
17 lines
600 B
Bash
#!/bin/bash
|
|
|
|
function install_prometehus() {
|
|
REPO_URL="https://raw.githubusercontent.com/elAgala/monitoring-template/master"
|
|
username="$1"
|
|
monitoring_dir="/home/$username/monitoring"
|
|
|
|
echo "[ MONITOR ]: Starting Prometehus setup"
|
|
mkdir -p "$monitoring_dir"
|
|
wget "$REPO_URL/docker-compose.yml" -O "$monitoring_dir/docker-compose.yml"
|
|
wget "$REPO_URL/prometheus.yml" -O "$monitoring_dir/prometheus.yml"
|
|
cd "$monitoring_dir"
|
|
echo "[ MONITOR ]: Prometheus Installed. Starting on docker container"
|
|
sudo docker-compose up -d
|
|
echo "[ MONITOR ]: Prometehus up & running on port 9090"
|
|
}
|