Created
September 22, 2024 15:24
-
-
Save tzach/fdf51fc891f042715cf7be9b88d68399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Example for updating Prometheus targets with out restart | |
#!/bin/bash | |
echo fs.aio-max-nr=1048576 | sudo tee /etc/sysctl.d/41-aio_max_nr.conf | |
sudo sysctl -p /etc/sysctl.d/41-aio_max_nr.conf | |
docker network create -d bridge scylla | |
cd scylla-monitoring | |
mkdir prom-data | |
mkdir prom-targets | |
cat << EOF > prometheus/scylla-3-nodes.yml | |
- targets: | |
- node1 | |
- node2 | |
- node3 | |
labels: | |
cluster: cluster1 | |
dc: datacenter1 | |
EOF | |
mv prometheus/scylla-3-nodes.yml prom-targets/scylla_servers.yml | |
cat << EOF > prometheus/scylla-6-nodes.yml | |
- targets: | |
- node1 | |
- node2 | |
- node3 | |
- node4 | |
- node5 | |
- node6 | |
labels: | |
cluster: cluster1 | |
dc: datacenter1 | |
EOF | |
./start-all.sh \ | |
--no-loki --no-alertmanager --no-renderer \ | |
--target-directory prom-targets \ | |
-D "--network scylla" | |
### Update Targets | |
mv scylla-monitoring/prometheus/scylla-6-nodes.yml scylla-monitoring/prom-targets/scylla_servers.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment