<a id="c3-properties-files"></a>

# Control Center Configuration Examples for Confluent Platform

Control Center requires a configuration properties file to operate. You can modify the
properties file to customize Control Center configuration. The properties file is passed to Control Center when
you start it.

Several Control Center example properties files are provided in the
`etc/confluent-control-center` directory located in your `CONFLUENT_HOME`
directory. These files contain critical configuration options,
some of which are set to defaults or commented out. Not all of the available
configuration options are present in the properties files. For instance,
the majority of the [Access Control](configuration.md#controlcenter-access-control-settings)
options are not present by default and must be added manually. Depending on the
requirements of your environments, there are additional configuration options
documented in the [Control Center Configuration Reference for Confluent Platform](configuration.md#controlcenter-configuration) that you can add and
configure within your properties files. Defaults are typically different between
the available properties file templates.

Parameters are provided in the form of key/value pairs. Lines beginning
with `#` are ignored. To uncomment an option, remove the hash (`#`)
that precedes it.

When you add character strings to properties files, enter the string without
any double or single-quotes. You do not need to wrap character strings in quotes.

## Example Control Center configuration files

The following table lists the sample properties files that are provided
with Confluent Control Center in the `$CONFLUENT_HOME/etc/confluent-control-center` directory.

| File name                              | Description                                                                                                                                                                                 | Notes                                                                                                                                                                                                                                                                                                                          |
|----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `control-center.properties`            | Properties file sample with some basic settings.                                                                                                                                            | None                                                                                                                                                                                                                                                                                                                           |
| `control-center-dev.properties`        | Properties file sample for use in a non-production environment. Includes a single broker under<br/>a [developer license](/platform/current/installation/license.html#cp-developer-license). | Default properties file used with the `start` command on non-Debian/Ubuntu environments.                                                                                                                                                                                                                                       |
| `control-center-production.properties` | Properties file sample with settings that are appropriate for a production environment.                                                                                                     | You must set additional properties for a production setting.<br/>For example, you should set the data directory to a value other than `/tmp`,<br/>set hostnames to values other than `localhost` and configure security features.<br/>Default properties file used<br/>with the `start` command on Debian/Ubuntu environments. |
| `control-center-management.properties` | Properties file to enable a development environment where Control Center is running in<br/>[Reduced infrastructure mode](../overview.md#reduced-infra-mode).                                | This file is similar to the control-center-dev.properties file,<br/>but only contains properties relevant to Reduced infrastructure mode.<br/>Reduced infrastructure mode is typically used with [Monitor Confluent Platform with Health+](/platform/current/health-plus/index.html#health-plus).                              |
| `control-center-minimal.properties`    | Properties file sample optimized for a local environment.                                                                                                                                   | This properties file could be used with Control Center running<br/>locally for demonstration purposes. Must always be explicitly passed with a `start` command.                                                                                                                                                                |

<a id="c3-pass-props-files"></a>

## Passing in a Control Center properties file

By default, Control Center is aware of the properties files that reside in the
`$CONFLUENT_HOME/etc/confluent-control-center` directory and reads them
automatically when restarting using CLI commands. It is not necessary to
explicitly pass in the properties file name when starting Control Center unless:

- The properties file has a custom name. You might differentiate properties
  file names for testing purposes.
- The properties file does not reside in the default directory. Control Center needs
  the full path to the properties file in this case.
- The `.minimal` properties file must always be explicitly passed with a
  `start` command.
- The properties file must always be passed in when using the `control-center-start` script.

<a id="c3-restart"></a>

### Restarting Control Center

Follow these instructions for stopping and starting Control Center. Examples of
passing in a properties file when necessary or not are provided.

#### NOTE
Make the change in the appropriate Control Center properties file(s)
configured for your environments, which could include `control-center.properties`,
`control-center-dev.properties`, `control-center-production.properties`,
and `control-center-minimal.properties`. The properties files
are located in `/path-to-control-center/etc/confluent-control-center/`.

#### Example 1: Standard production environment

Example restarting Control Center and passing in the default properties file for the
configuration to take effect:

```bash
./bin/control-center-stop
./bin/control-center-start ../etc/confluent-control-center/control-center.properties
```

#### Example 2: Custom properties filename and location

Example starting Control Center with the bin start script and passing in a custom
properties filename and location:

```bash
./control-center-stop
./control-center-start /Users/myUserName/confluent/configs/c3.properties-rbac
```

The example assumes you are in the `/bin` directory.

#### Example 3: Local development environment

Example starting Control Center in a local (dev) environment with the local CLI. This
example assumes you have configured your `$CONFLUENT_HOME`. There is no need to
pass in the properties filename; Control Center passes in `control-center-dev.properties`
automatically (on non-Ubuntu/Debian).

#### IMPORTANT
Do not use [confluent local](https://docs.confluent.io/confluent-cli/current/command-reference/local/index.html) for production use.

```bash
confluent local stop
confluent local start
```

<a id="c3-props-files-excerpt-diffs"></a>

#### Example properties file excerpts

This section shows a few fundamental differences between a development and
production Control Center properties file.

Example excerpt from the production properties
(`control-center-production.properties`) file:

```RST
############################# Server Basics #############################

# A comma-separated list of Apache Kafka cluster host names (required)
# NOTE: should not be localhost
#bootstrap.servers=kafka1:9092
...

############################# Control Center Settings ###################

...
# Directory for Control Center to store data
# NOTE: this should be changed to point to a reliable directory
confluent.controlcenter.data.dir=/var/lib/confluent/control-center
...
```

Example excerpt from the development properties
(`control-center-dev.properties`) file:

```RST
############################# Server Basics #############################

# A comma-separated list of Apache Kafka cluster host names (required)
bootstrap.servers=localhost:9092
...

############################# Control Center Settings ###################

...
# Directory for Control Center to store data
# NOTE: this should be changed to point to a reliable directory
confluent.controlcenter.data.dir=/tmp/confluent/control-center
...
```

The `.dev` file is pre-configured with `localhost` where applicable.  The data directory points to
a `/tmp` directory.

<a id="config-c3-multi-cluster"></a>

## Multi-cluster configuration

You can use Control Center to manage and monitor multiple Apache Kafka® clusters.

The cluster ID is randomly generated by Apache Kafka, but you can assign meaningful names using Control Center.

For multi-cluster configurations in Control Center, if you are adding additional
connection configurations and specifying a cluster `<name>` instead of
a cluster ID, do not include `.streams` in the parameter string.
For more information, see [confluent.controlcenter.kafka.<name>.<connection config>](configuration.md#c3-addl-connection-config-cluster-name).

## Example deployments

The following example Control Center setups were tested internally.

### Broker monitoring

Given:
: * 1 Confluent Control Center (running on EC2 m4.2xlarge)
  * 3 Kafka Brokers
  * 1 ZooKeeper
  * 200 Topics
  * 10 Partitions per Topic
  * 3x Replication Factor
  * Default JVM settings
  * Default Control Center configuration
  * Default Kafka configuration

Expect:
: * Control Center state store size ~50 MB/hr
  * Kafka log size ~500MB/hr (per broker)
  * Average CPU load ~7 %
  * Allocated java on-heap memory ~580 MB and off-heap ~100 MB
  * Total allocated memory including page cache ~3.6 GB
  * Network read utilization ~150 KB/sec
  * Network write utilization ~170 KB/sec

### Streams monitoring

Given:
: * 1 Confluent Control Center (running on EC2 m4.2xlarge)
  * 3 Kafka Brokers
  * 1 ZooKeeper
  * 30 Topics
  * 10 Partitions per Topic
  * 150 Consumers
  * 50 Consumer Groups
  * 3x Replication Factor
  * Default JVM settings
  * Default Control Center configuration
  * Default Kafka configuration

Expect:
: * Control Center state store size ~1 GB/hr
  * Kafka log size ~1 GB/hr (per broker)
  * Average CPU load ~8 %
  * Allocated java on-heap memory ~600 MB and off-heap ~100 MB
  * Total allocated memory including page cache ~4 GB
  * Network read utilization ~160 KB/sec
  * Network write utilization ~180 KB/sec
