Skip to content

Commit

Permalink
Merge pull request #159 from scylladb/prometheus_example_default_memory
Browse files Browse the repository at this point in the history
docs,example: lower default prometheus memory
  • Loading branch information
Henrik Johansson committed Jul 21, 2020
2 parents d497468 + c28e0c3 commit ebe9bbf
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
60 changes: 29 additions & 31 deletions docs/generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,39 +261,37 @@ After a restart the operator will use the security token when it interacts with
Both of them will be available under the `monitoring` namespace.
Customization can be done in `examples/generic/prometheus/values.yaml` and `examples/generic/grafana/values.yaml`.

1. Create the monitoring namespace
```console
kubectl create namespace monitoring
```
1. Install Prometheus
```console
helm upgrade --install scylla-prom --namespace monitoring stable/prometheus -f examples/generic/prometheus/values.yaml
```
2. Install Grafana
First you need to prepare the dashboards to make them available in Grafana.
You can do this by running the following command in the `examples` directory:
```console
./dashboards.sh -t generic
```
If you are deploying to `GKE` the replace the argument with `gke` instead of `generic`.

__NB__: Keep in mind that this is a test setup. For production use, check grafana and prometheus helm chart page for advanced deployment instructions.

Now the dashboards can be created along with the grafana plugin like this:
```console
helm upgrade --install scylla-graf --namespace monitoring stable/grafana -f examples/generic/grafana/values.yaml
```
1. Create the monitoring namespace
```console
kubectl create namespace monitoring
```
2. Install Prometheus
```console
helm upgrade --install scylla-prom --namespace monitoring stable/prometheus -f examples/generic/prometheus/values.yaml
```
If you want to tweak the prometheus properties, for example it's assigned memory, you can override it by adding a command line argument like this: `--set server.resources.limits.memory=4Gi`

3. Install Grafana
First you need to prepare the dashboards to make them available in Grafana.
You can do this by running the following command in the `examples` directory:
```console
./dashboards.sh -t generic
```
If you are deploying to `GKE` the replace the argument with `gke` instead of `generic`.

__NB__: Keep in mind that this is a test setup. For production use, check grafana and prometheus helm chart page for advanced deployment instructions.

Now the dashboards can be created along with the grafana plugin like this:
```console
helm upgrade --install scylla-graf --namespace monitoring stable/grafana -f examples/generic/grafana/values.yaml
```
To access Grafana locally, run:
```
kubectl --namespace monitoring port-forward $(kubectl get pods -n monitoring -l "app.kubernetes.io/instance=scylla-graf" -o jsonpath="{.items[0].metadata.name}") 3000
```
To access Grafana locally, run:
```
kubectl --namespace monitoring port-forward $(kubectl get pods -n monitoring -l "app.kubernetes.io/instance=scylla-graf" -o jsonpath="{.items[0].metadata.name}") 3000
```
You can find it on `http://0.0.0.0:3000` and login with the credentials `admin`:`admin`.
You can find it on `http://0.0.0.0:3000` and login with the credentials `admin`:`admin`.

## Scale Up

Expand Down
2 changes: 1 addition & 1 deletion examples/generic/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ server:
resources:
limits:
cpu: 4
memory: 16Gi
memory: 8Gi
# requests:
# cpu: 500m
# memory: 512Mi
Expand Down

0 comments on commit ebe9bbf

Please sign in to comment.