### View Core Agent Installation Layout Source: https://docs.chronosphere.io/fleets/agent/windows-install Example directory structure for a Core Agent installation on Windows. ```shell C:\calyptia-fluent-bit\ ├── conf │ ├── calyptia-fluent-bit.conf │ └── parsers.conf │ └── plugins.conf └── bin ├── calyptia-fluent-bit.dll ├── calyptia-fluent-bit.exe └── calyptia-fluent-bit.pdb ``` -------------------------------- ### List collections via API Source: https://docs.chronosphere.io/tooling/api-info Example of a GET request to retrieve all collections from the configuration API. ```shell curl -H "API-Token: ${CHRONOSPHERE_API_TOKEN}" \ -X GET \ "https://${CHRONOSPHERE_DOMAIN}/api/v1/config/collections" ``` -------------------------------- ### Install Core Agent Package Source: https://docs.chronosphere.io/fleets/agent/macos-install Execute the installer command to install the downloaded package. Ensure the VERSION placeholder is updated to match the downloaded file. ```shell sudo installer -pkg calyptia-fluent-bit-VERSION-apple.pkg -target /usr/local/bin/ ``` -------------------------------- ### Example pipeline replica output Source: https://docs.chronosphere.io/pipeline-configure/scaling This is an example of the output format when querying pipeline replica information using the `calyptia get pipelines` command. ```text NAME REPLICAS STATUS AGE pipeline-name 3 STARTED 15 hours ``` -------------------------------- ### Install Core Instance with YAML File Source: https://docs.chronosphere.io/pipeline-configure/helm Use this command to install or upgrade the core instance by providing a YAML file with your configurations. ```shell helm upgrade -i core-instance calyptia/core-instance --values FILE ``` -------------------------------- ### Start Core Agent service Source: https://docs.chronosphere.io/fleets/agent/linux-debian-install Enable and start the Core Agent service using systemctl. ```shell sudo systemctl calyptia-fluent-bit start ``` -------------------------------- ### Scaffold OtelMetricsIngestion Resource with Chronoctl Source: https://docs.chronosphere.io/ingest/metrics-traces/otel/otel-ingest-config Use the `scaffold` command to generate an example `OtelMetricsIngestion` resource configuration. This is a starting point for defining your metrics ingestion settings. ```shell chronoctl otel-metrics-ingestion scaffold ``` -------------------------------- ### Install Core Agent Source: https://docs.chronosphere.io/fleets/agent/linux-debian-install Install the Core Agent package via APT. ```shell sudo apt-get install calyptia-fluent-bit ``` -------------------------------- ### Verify Core Agent Installation from Installer Source: https://docs.chronosphere.io/fleets/agent/windows-install Run this command in PowerShell to verify the installation after using an EXE or MSI installer. ```shell & "C:\Program Files\fluent-bit\bin\fluent-bit.exe" -i dummy -o stdout ``` -------------------------------- ### Install Core Instance with Shell Flags Source: https://docs.chronosphere.io/pipeline-configure/helm Use this command to install or upgrade the core instance by setting parameters directly via shell flags. ```shell helm upgrade -i core-instance calyptia/core-instance --set name="core-instance" --set cloudToken="CLOUD_TOKEN" --set coreInstance="CORE_INSTANCE" ``` -------------------------------- ### Install Pipeline CLI with Homebrew Source: https://docs.chronosphere.io/pipeline-cli/install Use Homebrew to tap the repository and install the Pipeline CLI on macOS or Linux. ```shell brew tap calyptia/tap brew install calyptia ``` -------------------------------- ### Install Pipeline CLI Components Source: https://docs.chronosphere.io/pipeline-cli Use the 'install' command to install Telemetry Pipeline components. Replace 'RESOURCE' with the component you wish to install. ```shell calyptia install RESOURCE ``` -------------------------------- ### List All Derived Metrics with Chronoctl Source: https://docs.chronosphere.io/investigate/querying/metrics/derived-telemetry/derived-metrics Use the `chronoctl derived-metrics list` command to view all available derived metrics. No specific setup is required beyond having Chronoctl installed. ```shell chronoctl derived-metrics list ``` -------------------------------- ### Hash function usage examples Source: https://docs.chronosphere.io/investigate/querying/query-logs/query-syntax Examples demonstrating hashing fields for error messages and HTTP request URLs. ```sql severity = "ERROR" | extend message_hash = hash("message") | summarize count() by message_hash, service | sort by count_ desc | limit 20 ``` ```sql service = "api-gateway" | extend url_hash = hash(httpRequest.requestUrl) | project timestamp, service, url_hash, httpRequest.requestUrl, message | limit 100 ``` -------------------------------- ### Get Specific Resource Help Source: https://docs.chronosphere.io/pipeline-cli To get detailed help for a specific resource's 'get' subcommand, append '--help'. Replace 'RESOURCE' with the resource type. ```shell calyptia RESOURCE get --help ``` -------------------------------- ### Example toleration string Source: https://docs.chronosphere.io/pipeline-configure/kubernetes/tolerations An example of a valid toleration string demonstrating omitted and included parameters. ```shell foo=Equal:bar:NoExecute:3600,baz=Exists::PreferNoSchedule ``` -------------------------------- ### Example toleration JSON file Source: https://docs.chronosphere.io/pipeline-configure/kubernetes/tolerations A valid JSON file example for specifying tolerations, showing omitted parameters. ```json [ { "key": "foo", "operator": "Equal", "value": "bar", "effect": "NoExecute", "tolerationSeconds": 3600, }, { "key": "baz", "operator": "Exists", "effect": "PreferNoSchedule" } ] ``` -------------------------------- ### Example change event filter Source: https://docs.chronosphere.io/investigate/querying/filter-events A practical example filtering for specific deploy types and titles containing a production cluster string. ```text category = "deploys" AND (type = "build_finished" OR type = "deploy_end") AND title =~ ".*production_cluster.*" ``` -------------------------------- ### Test chronotf installation on macOS (Intel) Source: https://docs.chronosphere.io/tooling/infrastructure/terraform/install Verify the chronotf installation by running the 'version' command. This confirms the binary is accessible and functional. ```shell chronotf version ``` -------------------------------- ### Verify Core Agent Installation from ZIP Source: https://docs.chronosphere.io/fleets/agent/windows-install Run this command in PowerShell from the root folder of the extracted ZIP archive to verify the installation. ```shell .\bin\calyptia-fluent-bit.exe -i dummy -o stdout ``` -------------------------------- ### Start Core Agent service with systemd Source: https://docs.chronosphere.io/fleets/agent/linux-rhel-install Use this command to enable and start the Core Agent service using systemd. This ensures the agent runs automatically. ```shell sudo service calyptia-fluent-bit start ``` -------------------------------- ### Get Pipeline CLI Resources Source: https://docs.chronosphere.io/pipeline-cli Use the 'get' command to list all resources of a specified type. Replace 'RESOURCE' with the resource type you want to query. ```shell calyptia get RESOURCE ``` -------------------------------- ### Example: Create a StatefulSet Pipeline with PVC Retention Policies Source: https://docs.chronosphere.io/pipeline-configure/kubernetes/workloads This example demonstrates creating a StatefulSet pipeline named `my-pipeline` with a specified storage class and PVC retention policies. PVCs are retained when scaled down and deleted when the pipeline is deleted. ```shell calyptia create pipeline \ --core-instance my-instance \ --name my-pipeline \ --kind statefulSet \ --storage-class standard \ --pvc-retention-policy-when-scaled Retain \ --pvc-retention-policy-when-deleted Delete ``` -------------------------------- ### Create Core Instance with Helm Source: https://docs.chronosphere.io/pipeline-install/create-instance Install the core-instance chart using Helm. Replace INSTANCE with your desired Core Instance name and TOKEN with your API token for authentication. ```shell helm install core-instance calyptia/core-instance --set coreInstance=INSTANCE --set cloudToken=TOKEN ``` -------------------------------- ### Match Envoy Cluster gRPC Metrics with Glob Source: https://docs.chronosphere.io/control/shaping/rules/drop-rules Use an asterisk (*) in `value_glob` to match any value. This example matches metrics starting with `envoy_cluster_grpc` for the `__name__` metric. ```json filters: - name: __name__ value_glob: envoy_cluster_grpc* ``` -------------------------------- ### Install Core Instance with Helm Source: https://docs.chronosphere.io/pipelines/release-notes Configure Core Instance deployment using Helm, including service creation and toleration settings. ```shell helm install ci calyptia/core-instance --set "skipServiceCreation=true" --set "coreInstance=12l34" --set "cloudToken=1l234" ``` ```shell helm install ci core-instance/ --set "tolerations=key1=Equal:value1:Execute:3600\,key2=Exists:value2:NoExecute" --set "coreInstance=12l34" --set "cloudToken=1l234" ``` -------------------------------- ### Generate Tail Sampling Rule Scaffold with Chronoctl Source: https://docs.chronosphere.io/control/sampling/tail-sampling Use this command to generate an example tail sampling rule scaffold. This is a starting point for defining your own rules. ```shell chronoctl trace-tail-sampling-rules scaffold ``` -------------------------------- ### API Request for Partitions Source: https://docs.chronosphere.io/control/consumption/partitions This example demonstrates how to make an API request to list consumption budgets, which can be used to view partitions. Ensure you have an API token and the correct instance domain. ```shell 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" ``` -------------------------------- ### Enable Wavefront Ingestion Source: https://docs.chronosphere.io/ingest/metrics-traces/collector/addl-metrics/wavefront Add this configuration block to enable Wavefront ingestion for the Collector. This is the basic setup required to start receiving metrics in Wavefront format. ```yaml push: wavefront: enabled: true ``` -------------------------------- ### Example pod status output Source: https://docs.chronosphere.io/ingest/metrics-traces/collector/discover/monitor-kubernetes Sample output showing a running pod status. ```text NAME READY STATUS RESTARTS AGE chronocollector-jtgfw 1/1 Running 0 1m ... ``` -------------------------------- ### Limit Pipeline Configuration History Results Source: https://docs.chronosphere.io/pipeline-configure/history-rollback Use the `--last` flag to limit the number of configuration snapshots displayed. This example shows how to get the last five snapshots. ```shell calyptia get pipeline_config_history --pipeline my-pipeline --last 5 ``` -------------------------------- ### View create subcommand help Source: https://docs.chronosphere.io/tooling/chronoctl Displays help information and available flags for the create subcommand of a specific resource. ```shell chronoctl RESOURCE create --help ``` -------------------------------- ### Example of a static query Source: https://docs.chronosphere.io/observe/dashboards/customization/dashboard-variables This is an example of a static query without any variables. ```text service=~"production" ``` -------------------------------- ### Install Collector Binary Source: https://docs.chronosphere.io/ingest/metrics-traces/collector/install/standalone Moves the binary to the system path and sets appropriate ownership. ```shell sudo cp ./chronocollector /usr/bin/ sudo chown chronocollector:chronocollector /usr/bin/chronocollector ``` -------------------------------- ### Generate a sample partition configuration with Chronoctl Source: https://docs.chronosphere.io/control/consumption/partitions Use this command to generate a sample partition configuration file that can be used as a template for creating new partitions. ```shell chronoctl consumption-config scaffold ``` -------------------------------- ### SWAPI Data Transformation Example Source: https://docs.chronosphere.io/pipeline-data/plugins/source-plugins/http-api-collector Example JSON structure for filtering specific properties. ```json { "next": "https://swapi.dev/api/people/?page=2", "results": [ { "name": "Luke Skywalker", ... }, { "name": "C-3PO", ... } ] } ``` -------------------------------- ### Create a partition using Chronoctl Source: https://docs.chronosphere.io/control/consumption/partitions Submit a completed partition definition file using the `chronoctl consumption-config create` command. Replace FILE_NAME with the name of your YAML definition file. ```shell chronoctl consumption-config create -f FILE_NAME ``` -------------------------------- ### Create Pipeline CLI Resources Source: https://docs.chronosphere.io/pipeline-cli Use the 'create' command to provision new resources such as Core Instances and pipelines. Replace 'RESOURCE' with the specific resource type you wish to create. ```shell calyptia create RESOURCE ``` -------------------------------- ### API Authentication Example Source: https://docs.chronosphere.io/ingest/logs/http-logs Example of how to authenticate your `curl` requests using an API token and domain. ```APIDOC ## Authentication ### Description All requests to the Chronosphere API require authentication using an API token. ### Method Any (e.g., GET, POST) ### Endpoint Any Chronosphere API endpoint ### Request Example ```shell 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" ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Response None ### Notes - Replace *`TOKEN`* with your API token. - Replace *`INSTANCE`* with your organization's subdomain name. - Replace *`METHOD`* with the HTTP method (e.g., `GET`, `POST`). - Replace *`ENDPOINT_PATH`* with the specific API endpoint. ``` -------------------------------- ### Rollout Pipeline CLI Configurations Source: https://docs.chronosphere.io/pipeline-cli Use the 'rollout' command to apply configurations to previously set up resources. Replace 'RESOURCE' with the target resource. ```shell calyptia rollout RESOURCE ``` -------------------------------- ### Generate a sample budget configuration with Chronoctl Source: https://docs.chronosphere.io/control/consumption/budgeting Use this command to generate a template for a budget configuration file. You can then edit this file to define your specific budget. ```shell chronoctl consumption-budgets scaffold ``` -------------------------------- ### Minif function usage example Source: https://docs.chronosphere.io/investigate/querying/query-logs/query-syntax Example calculating the minimum response size for values greater than 100. ```sql service = "nginx" | summarize minif(httpRequest.responseSize, httpRequest.responseSize > 100) by kubernetes.cluster_name ``` -------------------------------- ### Min function usage example Source: https://docs.chronosphere.io/investigate/querying/query-logs/query-syntax Example calculating the minimum response size grouped by cluster name. ```sql service = "nginx" | summarize min(httpRequest.responseSize) by kubernetes.cluster_name ``` -------------------------------- ### Run Fluent Bit with Configuration Source: https://docs.chronosphere.io/fleets/add-agent-to-fleet Execute this command to start Fluent Bit using the specified configuration file after updating it to include fleet settings. Replace 'CONFIG' with the actual filename of your configuration. ```shell fluent-bit -c CONFIG ``` -------------------------------- ### Create a budget using a configuration file with Chronoctl Source: https://docs.chronosphere.io/control/consumption/budgeting After creating and editing a budget configuration file, use this command to submit it to Chronosphere. Replace FILE_NAME with the actual name of your configuration file. ```shell chronoctl consumption-budgets create -f FILE_NAME ``` -------------------------------- ### Install bash-completion with Homebrew Source: https://docs.chronosphere.io/pipeline-cli Install the `bash-completion` package using Homebrew on macOS. This is a prerequisite for enabling shell autocompletion. ```shell brew install bash-completion ``` -------------------------------- ### Create a service account with Chronoctl Source: https://docs.chronosphere.io/administer/accounts-teams/service-accounts Applies the configuration file to create the service account. ```shell chronoctl service-accounts create -f service-account.yml ``` -------------------------------- ### Verify Core Agent Installation Source: https://docs.chronosphere.io/fleets/agent/macos-install Run a test command to confirm the Core Agent is correctly installed and operational. ```shell calyptia-fluent-bit -i dummy -o stdout -f 1 ``` -------------------------------- ### Allow Records Processing Rule Example Source: https://docs.chronosphere.io/pipeline-data/processing-rules/allow-records An example demonstrating how the allow records rule filters log data. ```APIDOC ## Allow Records Processing Rule Example ### Description This example shows how to use the allow records rule to filter telemetry data, retaining only records with specific key/value pairs. ### Input Log Data ```json { "timestamp": "2023-03-28T09:08:41.64283645Z", "user_id": 3, "page_id": 30, "action": "purchase" } { "timestamp": "2023-03-28T09:08:42.643343109Z", "user_id": 4, "page_id": 10, "action": "purchase" } { "timestamp": "2023-03-28T09:08:48.643600498Z", "user_id": 1, "page_id": 50, "action": "click" } { "timestamp": "2023-03-28T09:08:50.643773688Z", "user_id": 5, "page_id": 40, "action": "purchase" } { "timestamp": "2023-03-28T09:08:51.643932272Z", "user_id": 1, "page_id": 30, "action": "purchase" } { "timestamp": "2023-03-28T09:08:56.644080944Z", "user_id": 2, "page_id": 40, "action": "click" } { "timestamp": "2023-03-28T09:09:03.64425954Z", "user_id": 3, "page_id": 30, "action": "click" } { "timestamp": "2023-03-28T09:09:03.644317046Z", "user_id": 1, "page_id": 20, "action": "view" } { "timestamp": "2023-03-28T09:09:10.64447719Z", "user_id": 2, "page_id": 50, "action": "purchase" } { "timestamp": "2023-03-28T09:09:17.644810963Z", "user_id": 2, "page_id": 10, "action": "view" } { "timestamp": "2023-03-28T09:09:20.644994805Z", "user_id": 1, "page_id": 50, "action": "view" } ``` ### Rule Configuration - **Key**: `action` - **Regex**: `purchase` ### Resulting Log Data ```json { "user_id": 3, "page_id": 30, "action": "purchase", "timestamp": "2023-03-28T09:08:41.64283645Z" } { "user_id": 4, "page_id": 10, "action": "purchase", "timestamp": "2023-03-28T09:08:42.643343109Z" } { "user_id": 5, "page_id": 40, "action": "purchase", "timestamp": "2023-03-28T09:08:50.643773688Z" } { "user_id": 1, "page_id": 30, "action": "purchase", "timestamp": "2023-03-28T09:08:51.643932272Z" } { "user_id": 2, "page_id": 50, "action": "purchase", "timestamp": "2023-03-28T09:09:10.64447719Z" } ``` ### Explanation This rule retained records where the `action` key has the value `purchase`, effectively filtering out records related to other actions like `click` or `view`. ``` -------------------------------- ### Example Chronosphere Log Query Source: https://docs.chronosphere.io/investigate/querying/create-links Example of a log query with operators and a summarize function for use in Chronosphere Logs Explorer. ```sql httpRequest.requestMethod = "POST" AND httpRequest.status =~ "40*" AND service = "nginx" | summarize count() ``` -------------------------------- ### Enable and Start Service Source: https://docs.chronosphere.io/ingest/metrics-traces/collector/install/standalone Reloads systemd and manages the collector service lifecycle. ```shell sudo systemctl daemon-reload sudo systemctl start chronocollector sudo systemctl status chronocollector sudo systemctl enable chronocollector.service ``` -------------------------------- ### Example DogStatsD Query Source: https://docs.chronosphere.io/ingest/metrics-traces/collector/mappings/datadog/dogstatsd A basic example of a DogStatsD metric query, including the metric name, value, type, and tags. ```text users.online:2\|c\|#country:france ``` -------------------------------- ### Pipeline Configuration File Example Source: https://docs.chronosphere.io/pipeline-data/create-modify This YAML configuration defines a pipeline using mock data as input and standard output as the destination. Ensure the 'name' and 'tag' fields in the inputs are unique. ```yaml pipeline: inputs: - dummy: '{"message":"dummy"}' rate: "1" samples: "0" start_time_sec: "-1" start_time_nsec: "-1" name: dummy tag: dummy.92a99f85-50b8-401d-a619-a52b14288f21 filters: - name: lua match: dummy.92a99f85-50b8-401d-a619-a52b14288f21 outputs: - format: json Name: stdout Match_Regex: ^(?!.*_calyptia_cloud).*$ ``` -------------------------------- ### Binary to decimal conversion example Source: https://docs.chronosphere.io/pipeline-data/processing-rules/parse-number Demonstrates converting binary string values into decimal numbers using a base 2 configuration. ```json {"node":"1001010100010110"} {"node":"1001000001100010"} {"node":"1011010010011110"} {"node":"1101010111111011"} {"node":"0000000011011000"} ``` ```json {"node":38166} {"node":36962} {"node":46238} {"node":54779} {"node":216} ```