Was this page helpful?
Caution
You're viewing documentation for a previous version of ScyllaDB Monitoring. Switch to the latest stable version.
Scylla-Monitoring Stack is container-based. You can start and stop the Scylla Monitoring Stack with the start-all.sh and kill-all.sh scripts.
Docker Compose is an alternative method to start and stop the stack. It requires more manual steps, but once configured, it simplifies starting and stopping the stack.
Warning
docker-compose and start_all.sh are two alternative ways to launch Scylla Monitoring Stack. You should use one method, not both. In particular, creating and updating docker-compose.yml is ignored when using start_all.sh
Make sure you have docker and docker-compose installed.
The Prometheus configuration file contains among others the IP address of the alertmanager and either the location of the scylla_server.yml file or a Consul IP address of Scylla Manager, if Scylla Manager is used for server provisioning.
You can use ./prometheus-config.sh to generate the file, for example:
./prometheus-config.sh --compose
For production systems, It is advised to use an external directory for the Prometheus database. Make sure to create one and update the docker-compose file accordingly (see the docker-compose example below).
Grafana reads its provisioning configuration from files, one for the data-source and one for the dashboards. Note that the latter tells Grafana where the dashboards are located, it is not the dashboards themselves, which are at a different location.
Run the following command to update the datasource:
./grafana-datasource.sh --compose
You can see the generated file under: grafana/provisioning/datasources/datasource.yaml
To set the dashboard load file, you can run the ./generate-sashboards.sh with the -t command line flag and the -v flag to specify the version. For example, Scylla-enterprise version 2020.1:
./generate-dashboards.sh -t -v 2020.1
This command generates the files under: grafana/provisioning/dashboards/
You can use the following example as a base for your docker compose.
Pass the following to a file called docker-compose.yml
services:
alertmanager:
container_name: aalert
image: prom/alertmanager:v0.26.0
ports:
- 9093:9093
volumes:
- ./prometheus/rule_config.yml:/etc/alertmanager/config.yml
grafana:
container_name: agraf
environment:
- GF_PANELS_DISABLE_SANITIZE_HTML=true
- GF_PATHS_PROVISIONING=/var/lib/grafana/provisioning
- GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=scylladb-scylla-datasource
# This is where you set Grafana security
- GF_AUTH_BASIC_ENABLED=false
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_SECURITY_ADMIN_PASSWORD=admin
# To set your home dashboard uncomment the following line, set VERSION to be your current version
#- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/var/lib/grafana/dashboards/ver_VERSION/scylla-overview.VERSION.json
image: grafana/grafana:10.4.1
ports:
- 3000:3000
user: 1000:1000
volumes:
- ./grafana/build:/var/lib/grafana/dashboards
- ./grafana/plugins:/var/lib/grafana/plugins
- ./grafana/provisioning:/var/lib/grafana/provisioning
# Uncomment the following line for grafana persistency
# - path/to/grafana/dir:/var/lib/grafana
loki:
command:
- --config.file=/mnt/config/loki-config.yaml
container_name: loki
image: grafana/loki:2.9.5
ports:
- 3100:3100
volumes:
- ./loki/rules:/etc/loki/rules
- ./loki/conf:/mnt/config
promotheus:
command:
- --config.file=/etc/prometheus/prometheus.yml
container_name: aprom
image: prom/prometheus:v2.51.1
ports:
- 9090:9090
volumes:
- ./prometheus/build/prometheus.yml:/etc/prometheus/prometheus.yml
- ./prometheus/prom_rules/:/etc/prometheus/prom_rules/
# instead of the following three targets, you can place three files under one directory and mount that directory
# If you do, uncomment the following line and delete the three lines afterwards
#- /path/to/targets:/etc/scylla.d/prometheus/targets/
- ./prometheus/scylla_servers.yml:/etc/scylla.d/prometheus/targets/scylla_servers.yml
- ./prometheus/scylla_manager_servers.yml:/etc/scylla.d/prometheus/targets/scylla_manager_servers.yml
- ./prometheus/scylla_servers.yml:/etc/scylla.d/prometheus/targets/node_exporter_servers.yml
# Uncomment the following line for prometheus persistency
# - path/to/data/dir:/prometheus/data
promtail:
command:
- --config.file=/etc/promtail/config.yml
container_name: promtail
image: grafana/promtail:2.7.3
ports:
- 1514:1514
- 9080:9080
volumes:
- ./loki/promtail/promtail_config.compose.yml:/etc/promtail/config.yml
version: '3'
To start the Scylla Monitoring Stack run docker-compose up
and to stop run docker-compose down
.