Documentation Index
Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
Use this file to discover all available pages before exploring further.
To effectively manage your log data, you need to separate, or partition data into
meaningful slices that map to your business. Partitions provide a consistent
structure for attributing usage and costs to the appropriate owners in your
organization so they can isolate and control independent their parts of the business.
Partition hierarchy
Partitions are hierarchical, which lets you model the ownership structure of your
organization. A global partition is created by default, and captures all
consumption. Individual teams can create distinct partitions, with child partitions
for individual services and environments.
All created partitions are children of the global partition, and each created
partition has a default partition to collect any traffic not explicitly captured by
other partitions. Default partitions are created automatically, and ensure that all
consumption is accounted for at every level and sums correctly into parent
partitions.
The following diagram depicts the hierarchy of partitions stemming from the global
partition. Two created partitions are children of the global partition: one for the
ordering_team and another for the auth-team. Each of those partitions have child
partitions for each team’s individual service, with additional child partitions for
prod, staging, and dev environments.
View partitions
Select from the following methods to view and filter available partitions.
To use Chronoctl to return all partitions, use the
chronoctl consumption-config read command:chronoctl consumption-config read
To complete this action with the Chronosphere API, use the
ListConsumptionBudgets
endpoint.Because the Chronosphere API requires authentication, include an API token with your
curl request, as shown in the following example. For more details, see
Create an API token.export CHRONOSPHERE_API_TOKEN="TOKEN"
export CHRONOSPHERE_DOMAIN="INSTANCE.chronosphere.io"
curl -H "API-Token: ${CHRONOSPHERE_API_TOKEN}" \
-X METHOD "https://${CHRONOSPHERE_DOMAIN}/ENDPOINT_PATH"
Replace the following:
TOKEN: Your API token.
INSTANCE: The subdomain name for your organization’s Observability Platform instance.
METHOD: The HTTP method to use with the request, such as GET or POST.
ENDPOINT_PATH: The specific endpoint you want to access.
Create partitions
Select from the following methods to create partitions. The maximum number of
partitions you can create is 100, with up to five levels of child partitions.
Partitions are applied in match order as listed in your configuration file. If data
matches multiple partitions, Chronosphere Observability Platform applies the first
partition that the data matches in the configuration file.
To use Chronoctl to create a partitions, use the
chronoctl consumption-config create command:chronoctl consumption-config create
-
Run the following command to generate a sample partition configuration you can use
as a template:
chronoctl consumption-config scaffold
In the template, kind: ConsumptionConfig defines an individual partition.
-
With a completed definition, submit it with:
chronoctl consumption-config create -f FILE_NAME
Replace FILE_NAME with the name of the YAML definition file you want to use.
See the Chronoctl partition example for a completed
partition definition. When you run terraform plan to generate an execution plan, Chronosphere automatically
tests configurations that include notification policies by submitting them as dry runs.
For details, see the
Terraform provider
documentation. To create a partition with Terraform:
-
Create or edit a Terraform file and add the definition by using the
chronosphere_consumption_config type, followed by a name in a resource
declaration.
-
Run this command to apply the changes:
See the Terraform partition example for a completed
partition resource.To complete this action with the Chronosphere API, use the
CreateConsumptionBudget
endpoint.Because the Chronosphere API requires authentication, include an API token with your
curl request, as shown in the following example. For more details, see
Create an API token.export CHRONOSPHERE_API_TOKEN="TOKEN"
export CHRONOSPHERE_DOMAIN="INSTANCE.chronosphere.io"
curl -H "API-Token: ${CHRONOSPHERE_API_TOKEN}" \
-X METHOD "https://${CHRONOSPHERE_DOMAIN}/ENDPOINT_PATH"
Replace the following:
TOKEN: Your API token.
INSTANCE: The subdomain name for your organization’s Observability Platform instance.
METHOD: The HTTP method to use with the request, such as GET or POST.
ENDPOINT_PATH: The specific endpoint you want to access.
Next steps
After creating a partition, use the Logging License Consumption dashboard to
analyze consumption trends across partitions to
understand what’s driving growth and detect unwanted spikes.
Chronoctl partition example
The following Chronoctl example implements the partition structure outlined in the
diagram that describes log partitions at the start of this
page.
api_version: v1/config
kind: ConsumptionConfig
spec:
partitions:
- name: "Ordering Service"
slug: "ordering-service"
filters:
operator: "IN"
conditions:
log_filter:
query: "service = 'ordering'"
partitions:
- name: "Prod"
slug: "prod"
filters:
operator: "IN"
conditions:
log_filter:
query: "env = 'prod'"
- name: "Staging"
slug: "staging"
filters:
operator: "IN"
conditions:
log_filter:
query: "env = 'staging'"
- name: "Dev"
slug: "dev"
filters:
operator: "IN"
conditions:
log_filter:
query: "env = 'dev'"
- name: "Auth Service"
slug: "auth-service"
filters:
operator: "IN"
conditions:
log_filter:
query: "service = 'auth'"
partitions:
- name: "Prod"
slug: "prod"
filters:
operator: "IN"
conditions:
log_filter:
query: "env = 'prod'"
- name: "Staging"
slug: "staging"
filters:
operator: "IN"
conditions:
log_filter:
query: "env = 'staging'"
- name: "Dev"
slug: "dev"
filters:
operator: "IN"
conditions:
log_filter:
query: "env = 'dev'"
The following Terraform example implements the partition structure outlined in the
diagram that describes log partitions at the start of this
page.
resource "chronosphere_consumption_config" "example" {
partition {
name = "Ordering Service"
slug = "ordering-service"
filter {
operator = "IN"
condition {
log_filter {
query = "service = 'ordering'"
}
}
}
partition {
name = "Prod"
slug = "prod"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'prod'"
}
}
}
}
partition {
name = "Staging"
slug = "staging"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'staging'"
}
}
}
}
partition {
name = "Dev"
slug = "dev"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'dev'"
}
}
}
}
}
partition {
name = "Auth Service"
slug = "auth-service"
filter {
operator = "IN"
condition {
log_filter {
query = "service = 'auth'"
}
}
}
partition {
name = "Prod"
slug = "prod"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'prod'"
}
}
}
}
partition {
name = "Staging"
slug = "staging"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'staging'"
}
}
}
}
partition {
name = "Dev"
slug = "dev"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'dev'"
}
}
}
}
}
}
Update partitions
Select from the following methods to update log partitions.
To update partitions with Chronoctl, use the
consumption-config update command:chronoctl consumption-config update
-
Update the partition definition file.
-
Run the following command to submit the changes:
chronoctl consumption-config update -f FILE_NAME.yaml
Replace FILE_NAME with the name of the YAML definition file you want to use.
To edit partitions using Terraform:
-
Create or edit a Terraform file that updates the resource’s existing properties.
-
Run this command to apply the changes:
To complete this action with the Chronosphere API, use the
UpdateConsumptionBudget
endpoint.Because the Chronosphere API requires authentication, include an API token with your
curl request, as shown in the following example. For more details, see
Create an API token.export CHRONOSPHERE_API_TOKEN="TOKEN"
export CHRONOSPHERE_DOMAIN="INSTANCE.chronosphere.io"
curl -H "API-Token: ${CHRONOSPHERE_API_TOKEN}" \
-X METHOD "https://${CHRONOSPHERE_DOMAIN}/ENDPOINT_PATH"
Replace the following:
TOKEN: Your API token.
INSTANCE: The subdomain name for your organization’s Observability Platform instance.
METHOD: The HTTP method to use with the request, such as GET or POST.
ENDPOINT_PATH: The specific endpoint you want to access.
Delete partitions
Select from the following methods to delete log partitions.
To delete partitions with attached budgets, you must first
delete attached budgets, and then
delete the partition.
Users can modify Terraform-managed resources only by using Terraform.
Learn more.
To delete a partition with Chronoctl, use the
chronoctl consumption-config delete command:chronoctl consumption-config delete
To delete a resource that’s managed by Terraform:
-
Edit your Terraform configuration file to remove the pre-existing resource
definition.
-
Run this command to remove the resource from Observability Platform:
To complete this action with the Chronosphere API, use the
DeleteConsumptionConfig
endpoint.Because the Chronosphere API requires authentication, include an API token with your
curl request, as shown in the following example. For more details, see
Create an API token.export CHRONOSPHERE_API_TOKEN="TOKEN"
export CHRONOSPHERE_DOMAIN="INSTANCE.chronosphere.io"
curl -H "API-Token: ${CHRONOSPHERE_API_TOKEN}" \
-X METHOD "https://${CHRONOSPHERE_DOMAIN}/ENDPOINT_PATH"
Replace the following:
TOKEN: Your API token.
INSTANCE: The subdomain name for your organization’s Observability Platform instance.
METHOD: The HTTP method to use with the request, such as GET or POST.
ENDPOINT_PATH: The specific endpoint you want to access.