Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the Prometheus exporter by default #131

Merged
merged 8 commits into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ kubectl kudo install cassandra \
```

By default a 3-node Cassandra cluster is installed, with each Cassandra node
requiring 1 CPU and 4GiB memory. Alongside each Cassandra node a Prometheus
exporter container is also run, requiring 1 CPU and 512MiB memory each.
requiring 1 CPU and 4GiB memory.

The total resources needed are 6 CPUs and 13.5GiB memory
The total resources needed are 3 CPUs and 12GiB memory

The command above will start the operator instance installation. To check the
installation progress, the KUDO CLI provides us with the `plan status` command.
Expand Down
17 changes: 9 additions & 8 deletions docs/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ This guide explains how to set up monitoring for KUDO Cassandra.

## Description

The KUDO Cassandra operator will export metrics to Prometheus by default. It
achieves this using a Prometheus exporter based on the
The KUDO Cassandra operator can export metrics to Prometheus. It achieves this
using a Prometheus exporter based on the
[criteo/cassandra_exporter](https://github.com/criteo/cassandra_exporter).

When the `PROMETHEUS_EXPORTER_ENABLED` parameter is at its default value of
`true`:
When the `PROMETHEUS_EXPORTER_ENABLED` parameter is set to `true`:
nfnt marked this conversation as resolved.
Show resolved Hide resolved

- A `prometheus-exporter` container will run in the same pod as every Cassandra
`node` container. It will listen for connections on
Expand All @@ -27,7 +26,7 @@ When the `PROMETHEUS_EXPORTER_ENABLED` parameter is at its default value of
[Grafana](https://grafana.com/) set up in the cluster. The
[kube-prometheus](https://github.com/coreos/kube-prometheus) project provides
both of them.
- KUDO CLI installed (only necessary if you _had_ disabled this feature before).
- KUDO CLI installed.

The examples below assume that the instance and namespace names are stored in
the following shell variables. With this assumptions met, you should be able to
Expand All @@ -42,10 +41,9 @@ namespace_name=default

### 1. Make sure that Prometheus Exporter is enabled on the KUDO Cassandra instance

This parameter is `true` by default, so you only need to worry about this if you
explicitly disabled it.
This parameter is `false` by default, so you need to enable it explicitly.

If you do not remember, you can check the value of the parameter on a running
You can check the value of the parameter on a running
instance with a command like:

```bash
Expand Down Expand Up @@ -92,6 +90,9 @@ match the
[labels on the `ServiceMonitor` resource](../operator/templates/service-monitor.yaml#L7)
created by the KUDO Cassandra operator.

The Prometheus exporter container that is run alongside each Cassandra node
requires 1 CPU and 512MiB memory each.

## Custom Configuration

To use the custom
Expand Down
2 changes: 1 addition & 1 deletion docs/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
| **NODE_ANTI_AFFINITY** | Ensure that every Cassandra node is deployed on separate hosts | False |
| **SERVICE_ACCOUNT_INSTALL** | This flag can be set to true to automatic installation of a cluster role, service account and role binding | False |
| **EXTERNAL_SEED_NODES** | List of seed nodes external to this instance to add to the cluster. This allows clusters spanning multiple Kubernetes clusters. | |
| **PROMETHEUS_EXPORTER_ENABLED** | | True |
| **PROMETHEUS_EXPORTER_ENABLED** | | False |
| **PROMETHEUS_EXPORTER_PORT** | Prometheus exporter port. | 7200 |
| **PROMETHEUS_EXPORTER_CPU_MC** | CPU request (in millicores) for the Prometheus exporter containers. | 500 |
| **PROMETHEUS_EXPORTER_CPU_LIMIT_MC** | CPU limit (in millicores) for the Prometheus exporter containers. | 1000 |
Expand Down
2 changes: 1 addition & 1 deletion operator/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ parameters:
################################################################################

- name: PROMETHEUS_EXPORTER_ENABLED
default: "true"
default: "false"

- name: PROMETHEUS_EXPORTER_PORT
description: "Prometheus exporter port."
Expand Down
2 changes: 1 addition & 1 deletion templates/operator/params.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ parameters:
################################################################################

- name: PROMETHEUS_EXPORTER_ENABLED
default: "true"
default: "false"

- name: PROMETHEUS_EXPORTER_PORT
description: "Prometheus exporter port."
Expand Down
3 changes: 2 additions & 1 deletion tests/suites/sanity/sanity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ var _ = Describe(TestName, func() {
var err error

parameters := map[string]string{
"NODE_COUNT": strconv.Itoa(NodeCount),
"NODE_COUNT": strconv.Itoa(NodeCount),
"PROMETHEUS_EXPORTER_ENABLED": "true",
}
suites.SetSuitesParameters(parameters)

Expand Down