<commit_before>---
version: 0.20
category: "Reference Docs"
title: "Configuration"
next:
  url: "clients"
  text: "Clients"
---

# Overview

One of the most commonly asked questions when getting started with Sensu is
"where do the config files go"? Because Sensu was designed to be used alongside
configuration management solutions (e.g. [Chef](https://www.chef.io) and
[Puppet](https://puppetlabs.com)) and other automation tools, the answer to this
question has always been multifaceted.

This reference document provides information to help you:

- [Understand how the Sensu services are configured](#sensu-configuration-overview)
- [Understand configuration "scopes"](#configuration-scopes)
- [Understand the order in which Sensu loads configuration settings](#configuration-load-order)
- [Understand the anatomy of the Sensu configuration](#anatomy-of-a-sensu-configuration)

# Sensu Configuration {#sensu-configuration-overview}

By default, the main configuration file for the Sensu platform is located at
`/etc/sensu/config.json`. However, Sensu also provides support for loading
configuration from a directory (containing multiple/disparate configuration
files), and/or environment variables. Sensu merges configuration parameters
provided from these three distinct configuration sources (environment variables,
configuration file, and configuration directories) into a single Hash. This type
of Hash merging is often called "deep merging".

## Example Effect of Configuration Merging {#example-effect-of-configuration-merging}

To explain how Sensu merges configuration parameters from the various disparate<commit_msg>updated headings/anchors<commit_after>---
version: 0.20
category: "Reference Docs"
title: "Configuration"
next:
  url: "clients"
  text: "Clients"
---

# Overview

One of the most commonly asked questions when getting started with Sensu is
"where do the config files go"? Because Sensu was designed to be used alongside
configuration management solutions (e.g. [Chef](https://www.chef.io) and
[Puppet](https://puppetlabs.com)) and other automation tools, the answer to this
question has always been multifaceted.

This reference document provides information to help you:

- [Understand how the Sensu services are configured](#sensu-configuration-sources)
- [Understand configuration "scopes"](#configuration-scopes)
- [Understand the order in which Sensu loads configuration settings](#configuration-load-order)
- [Understand the anatomy of the Sensu configuration](#anatomy-of-a-sensu-configuration)

# Sensu Configuration Sources {#sensu-configuration-sources}

By default, the main configuration file for the Sensu platform is located at
`/etc/sensu/config.json`. However, Sensu also provides support for loading
configuration from a directory (containing multiple/disparate configuration
files), and/or environment variables. Sensu merges configuration parameters
provided from these three distinct configuration sources (environment variables,
configuration file, and configuration directories) into a single Hash. This type
of Hash merging is often called "deep merging".

## How Configuration Merging Works {#how-configuration-merging-works}

To explain how Sensu merges configuration parameters from the various disparate
{'fraction_non_alphanumeric': 0.07671064743786438, 'fraction_numerical': 0.001841055538508745, 'mean_word_length': 5.653061224489796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7537226', 'n_tokens_mistral': 861, 'n_tokens_neox': 811, 'n_words': 358}