# Academy
Source: https://docs-xcor.paloaltonetworks.com/academy
Self-paced training on Cortex XCOR and Palo Alto Networks Telemetry Pipeline, with links to related product documentation.
XCOR Academy offers self-paced courses on observability workflows, platform
features, and Palo Alto Networks Telemetry Pipeline. Open a course summary on this site, then continue
in [XCOR Academy](https://learn.chronosphere.io/) for the full lab or video.
Use product documentation for reference material; use XCOR Academy when you want a guided
path through a topic.
## Course tracks
> [card] [Introduction to Observability Platform](/academy/courses/introduction-to-observability-platform)
>
> Platform track: onboarding, dashboards, monitors, incident response, Lens, SLOs, and Terraform.
> [card] [Introduction to PromQL](/academy/courses/introduction-to-promql)
>
> Metrics track: PromQL fundamentals, exploring and controlling metrics, sparse metrics, and query optimization.
> [card] [Exploring Logs](/academy/courses/exploring-logs)
>
> Logs track: log querying and visualizations, advanced query labs, and logging control plane features.
> [card] [Exploring Traces](/academy/courses/exploring-traces)
>
> Traces track: distributed tracing in the platform and trace datasets, behaviors, and sampling.
> [card] [Palo Alto Networks Telemetry Pipeline](/academy/courses/chronosphere-telemetry-pipeline)
>
> Pipeline track: collect telemetry from sources, transform it, and route it to destinations.
## Take courses online
> [card] [Browse all courses in XCOR Academy](https://learn.chronosphere.io/)
>
> Open the full course catalog and sign in to take labs in XCOR Academy.
# Alert Response & Troubleshooting
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/alert-response-and-troubleshooting
Est. ~20–40 minutes. This course covers the essentials for on-call engineers onboarding onto the Observability Platform. You'll explore common troubleshooting strategies for monitor configuration, and break down tools in Cortex XCOR for optimizing incident response, such as Differential Diagnosis. Finally, you'll learn how to identify if shaping and control rules are affecting raw telemetry data once they arrive in Cortex XCOR.
Est. \~20–40 minutes. This course covers the essentials for on-call engineers onboarding onto the Observability Platform. You'll explore common troubleshooting strategies for monitor configuration, and break down tools in Cortex XCOR for optimizing incident response, such as Differential Diagnosis. Finally, you'll learn how to identify if shaping and control rules are affecting raw telemetry data once they arrive in Cortex XCOR.
> [card] [Take Alert Response & Troubleshooting in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Overview of alerting](/investigate/alerts)
* [Respond to incidents](/overview/guides/incident-response)
# Applying Budgets to Partitions
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/applying-budgets-to-partitions
Est. 15 to 20 minutes. Configure budgets and interpret partition consumption against thresholds.
Est. 15 to 20 minutes. Configure budgets and interpret partition consumption against thresholds.
> [card] [Take Applying Budgets to Partitions in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Telemetry data budgets](/control/consumption/budgeting)
* [Partitions](/control/consumption/partitions)
* [Manage telemetry data budgets](/overview/guides/manage-budgets)
# Building Dynamic Dashboards
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/building-dynamic-dashboards
Est. ~20–40 minutes. In this course, you will learn how to transform chaotic data into high-value insights. The course covers strategy for avoiding common dashboard pitfalls, as well as the technical tools that Cortex XCOR provides to build clear, dynamic, and actionable dashboards.
Est. \~20–40 minutes. In this course, you will learn how to transform chaotic data into high-value insights. The course covers strategy for avoiding common dashboard pitfalls, as well as the technical tools that Cortex XCOR provides to build clear, dynamic, and actionable dashboards.
> [card] [Take Building Dynamic Dashboards in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Visualize data using dashboards](/observe/dashboards)
# Palo Alto Networks Telemetry Pipeline
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/chronosphere-telemetry-pipeline
Est. ~2 hours. Learn the fundamentals of Palo Alto Networks Telemetry Pipeline. You will build pipelines that collect telemetry data from a variety of sources, transform it, and route the data to various destinations.
Est. \~2 hours. Learn the fundamentals of Palo Alto Networks Telemetry Pipeline. You will build pipelines that collect telemetry data from a variety of sources, transform it, and route the data to various destinations.
> [card] [Take Palo Alto Networks Telemetry Pipeline in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Palo Alto Networks Telemetry Pipeline](/pipeline)
# Configuring Services with Lens
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/configuring-services-with-lens
Est. ~20–40 minutes. This course provides a comprehensive guide to building a service-centric view of your environment using Cortex XCOR Services. You'll learn a four-step workflow to transform raw telemetry, such as OpenTelemetry and Prometheus, into actionable insights by discovering services, refining data with merge rules, and customizing service presentations. Finally, you'll master advanced configurations like pod mapping to ensure every service is accurately represented in your unified system view.
Est. \~20–40 minutes. This course provides a comprehensive guide to building a service-centric view of your environment using Cortex XCOR Services. You'll learn a four-step workflow to transform raw telemetry, such as OpenTelemetry and Prometheus, into actionable insights by discovering services, refining data with merge rules, and customizing service presentations. Finally, you'll master advanced configurations like pod mapping to ensure every service is accurately represented in your unified system view.
> [card] [Take Configuring Services with Lens in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Services](/observe/services)
# Controlling Logs
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/controlling-logs
Est. ~20–40 minutes. Become versed in the Control Plane features of Logging in our Observability Platform. Explore concepts like partitions, control rules and budgets. Learn how to take advantage of the utilization analysis page in Cortex XCOR to make decisions about your log data.
Est. \~20–40 minutes. Become versed in the Control Plane features of Logging in our Observability Platform. Explore concepts like partitions, control rules and budgets. Learn how to take advantage of the utilization analysis page in Cortex XCOR to make decisions about your log data.
> [card] [Take Controlling Logs in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Shape your log data](/control/shaping/shape-logs)
# Controlling Metrics
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/controlling-metrics
Est. ~20–40 minutes. Dive into the fundamentals of controlling your metric data and cutting costs without compromising visibility. Learn how to use Cortex XCOR features to understand the utility of your data, apply shaping rules, and monitor usage and value over time.
Est. \~20–40 minutes. Dive into the fundamentals of controlling your metric data and cutting costs without compromising visibility. Learn how to use Cortex XCOR features to understand the utility of your data, apply shaping rules, and monitor usage and value over time.
> [card] [Take Controlling Metrics in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Shape metric data](/control/shaping/shape-metrics)
# Controlling Traces
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/controlling-traces
Est. ~20–40 minutes. Explore more control features, this time for traces! You'll learn to create datasets and assign behaviors to those datasets to sample traces for datasets.
Est. \~20–40 minutes. Explore more control features, this time for traces! You'll learn to create datasets and assign behaviors to those datasets to sample traces for datasets.
> [card] [Take Controlling Traces in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Sample your traces](/control/shaping/sample-traces)
# Creating & Tuning Monitors
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/creating-and-tuning-monitors
Est. ~20–40 minutes. Learn the ins and outs of alerting in Cortex XCOR, from templating notifications, to setting up monitor queries, to configuring signals, to iterating on conditions based on simulation and visualizations.
Est. \~20–40 minutes. Learn the ins and outs of alerting in Cortex XCOR, from templating notifications, to setting up monitor queries, to configuring signals, to iterating on conditions based on simulation and visualizations.
> [card] [Take Creating & Tuning Monitors in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Overview of alerting](/investigate/alerts)
# Creating & Tuning SLOs
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/creating-and-tuning-slos
Est. ~20–40 minutes. How reliable is "reliable enough"? This course teaches you how to establish operational boundaries that balance system stability with feature velocity using Service Level Objectives (SLOs). You will learn how to define specific target percentages that protect the user experience without bottlenecking your development pipeline. This course is dedicated strictly to the implementation and management of Error Ratio SLOs within the platform.
Est. \~20–40 minutes. How reliable is "reliable enough"? This course teaches you how to establish operational boundaries that balance system stability with feature velocity using Service Level Objectives (SLOs). You will learn how to define specific target percentages that protect the user experience without bottlenecking your development pipeline. This course is dedicated strictly to the implementation and management of Error Ratio SLOs within the platform.
> [card] [Take Creating & Tuning SLOs in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Service level objectives](/observe/slo)
* [Manage service level objectives](/investigate/alerts/manage-slos)
# Designing Partitions
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/designing-partitions
Est. ~15–20 minutes. Partitions are hierarchical groupings used to categorize data and govern credit consumption with Consumption Pricing in Cortex XCOR. Take this course to learn how partitions categorize metrics, logs, and traces, to design a multi-level structure that matches your organization, and to navigate the UI to generate a consumption configuration.
Est. \~15–20 minutes. Partitions are hierarchical groupings used to categorize data and govern credit consumption with Consumption Pricing in Cortex XCOR. Take this course to learn how partitions categorize metrics, logs, and traces, to design a multi-level structure that matches your organization, and to navigate the UI to generate a consumption configuration.
> [card] [Take Designing Partitions in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Partitions](/control/consumption/partitions)
# Exploring Logs
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/exploring-logs
Est. ~20–40 minutes. Familiarize yourself with log querying and analysis tooling in the Observability Platform. Learn about log querying syntax, log visualizations for dashboards, and creating monitors to alert on log data.
Est. \~20–40 minutes. Familiarize yourself with log querying and analysis tooling in the Observability Platform. Learn about log querying syntax, log visualizations for dashboards, and creating monitors to alert on log data.
> [card] [Take Exploring Logs in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Ingest, query, and control your log data](/overview/types/logs)
* [Search and filter log data](/investigate/querying/query-logs)
# Exploring Logs 201
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/exploring-logs-201
Est. ~20–40 minutes. This 200-level course is a purely hands-on deep dive into writing advanced queries within Cortex XCOR. Designed for users who already know their way around the Logs Explorer, this course focuses entirely on using query logic to troubleshoot issues and extract actionable insights.
Est. \~20–40 minutes. This 200-level course is a purely hands-on deep dive into writing advanced queries within Cortex XCOR. Designed for users who already know their way around the Logs Explorer, this course focuses entirely on using query logic to troubleshoot issues and extract actionable insights.
> [card] [Take Exploring Logs 201 in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Search and filter log data](/investigate/querying/query-logs)
# Exploring Metrics
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/exploring-metrics
Est. ~20–40 minutes. You're sending metric data to Cortex XCOR — now what?! This course goes over the basics of querying metrics, even if you haven't done any learning on PromQL. It also covers anomaly detection using Differential Diagnosis for Metrics.
Est. \~20–40 minutes. You're sending metric data to Cortex XCOR — now what?! This course goes over the basics of querying metrics, even if you haven't done any learning on PromQL. It also covers anomaly detection using Differential Diagnosis for Metrics.
> [card] [Take Exploring Metrics in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Ingest, query, and control your metric data](/overview/types/metrics)
* [Search and query telemetry data](/investigate/querying)
# Exploring Services with Lens
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/exploring-services-with-lens
Est. ~20–40 minutes. This course provides a foundational look at navigating the service-centric landscape in Cortex XCOR. You'll learn to consolidate fragmented telemetry into a unified view to streamline troubleshooting without switching between disconnected tools. You will explore how to use the Services Page to manage high-volume environments and the My Services section to prioritize data relevant to your specific team. Finally, you'll gain hands-on experience through interactive labs to master service discovery and dashboard interaction.
Est. \~20–40 minutes. This course provides a foundational look at navigating the service-centric landscape in Cortex XCOR. You'll learn to consolidate fragmented telemetry into a unified view to streamline troubleshooting without switching between disconnected tools. You will explore how to use the Services Page to manage high-volume environments and the My Services section to prioritize data relevant to your specific team. Finally, you'll gain hands-on experience through interactive labs to master service discovery and dashboard interaction.
> [card] [Take Exploring Services with Lens in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Services](/observe/services)
# Exploring SLOs
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/exploring-slos
Est. ~20–40 minutes. This course focuses on the high-pressure moments when an SLO alert triggers and your error budget begins to burn. You'll learn to navigate the SLO Detail page in Cortex XCOR to quickly assess incident severity, track reliability trends, and pinpoint root causes. By leveraging your existing knowledge of monitors and notification policies, you will gain the tactical skills necessary to move from a paged state to a decisive, informed response.
Est. \~20–40 minutes. This course focuses on the high-pressure moments when an SLO alert triggers and your error budget begins to burn. You'll learn to navigate the SLO Detail page in Cortex XCOR to quickly assess incident severity, track reliability trends, and pinpoint root causes. By leveraging your existing knowledge of monitors and notification policies, you will gain the tactical skills necessary to move from a paged state to a decisive, informed response.
> [card] [Take Exploring SLOs in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Service level objectives](/observe/slo)
* [Manage service level objectives](/investigate/alerts/manage-slos)
# Exploring Traces
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/exploring-traces
Est. ~20–40 minutes. This course is a guide to distributed tracing in Cortex XCOR, which is essential for analyzing and troubleshooting requests across complex distributed systems. You'll learn to describe the components of a trace and leverage Cortex XCOR to explore and use trace data to pinpoint application slowdowns or errors.
Est. \~20–40 minutes. This course is a guide to distributed tracing in Cortex XCOR, which is essential for analyzing and troubleshooting requests across complex distributed systems. You'll learn to describe the components of a trace and leverage Cortex XCOR to explore and use trace data to pinpoint application slowdowns or errors.
> [card] [Take Exploring Traces in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Ingest, query, and control your trace data](/overview/types/traces)
* [Search and filter trace data](/investigate/querying/traces)
# Introduction to Consumption Pricing
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/introduction-to-consumption-pricing
Est. ~15–20 minutes. This course is a great first step in understanding Consumption Pricing in Cortex XCOR at a high level. Learn about resource pricing, the purpose of partitions and budgets, and the pages in the UI that will give you overall visibility into your organization's usage.
Est. \~15–20 minutes. This course is a great first step in understanding Consumption Pricing in Cortex XCOR at a high level. Learn about resource pricing, the purpose of partitions and budgets, and the pages in the UI that will give you overall visibility into your organization's usage.
> [card] [Take Introduction to Consumption Pricing in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Manage consumption](/control/consumption)
# Introduction to Observability Platform
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/introduction-to-observability-platform
Est. ~20–40 minutes. If you're onboarding onto our Observability Platform, this is a great place to start to learn how to navigate. Through a virtual lab, you'll take an interactive tour through a playground tenant that you'll revisit in future courses.
Est. \~20–40 minutes. If you're onboarding onto our Observability Platform, this is a great place to start to learn how to navigate. Through a virtual lab, you'll take an interactive tour through a playground tenant that you'll revisit in future courses.
> [card] [Take Introduction to Observability Platform in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Get started with Cortex XCOR](/overview/get-started)
* [Navigate the Cortex XCOR interface](/navigate)
# Introduction to PromQL
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/introduction-to-promql
Est. ~2 hours. Explore the foundations of the Prometheus Query Language (PromQL) and how you can use it to extract meaningful, actionable intelligence from your time series data. This is the 101 course, and it does not assume any prior knowledge of Prometheus.
Est. \~2 hours. Explore the foundations of the Prometheus Query Language (PromQL) and how you can use it to extract meaningful, actionable intelligence from your time series data. This is the 101 course, and it does not assume any prior knowledge of Prometheus.
> [card] [Take Introduction to PromQL in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Search and query telemetry data](/investigate/querying)
# Investigating Consumption Increases
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/investigating-consumption-increases
Est. ~15–20 minutes. Once your organization has partitions and budgets configured, this course is the perfect follow-up when credits climb or budgets fire. You'll explore how Cortex XCOR offers various angles for identifying the radius of the issue and determining next steps.
Est. \~15–20 minutes. Once your organization has partitions and budgets configured, this course is the perfect follow-up when credits climb or budgets fire. You'll explore how Cortex XCOR offers various angles for identifying the radius of the issue and determining next steps.
> [card] [Take Investigating Consumption Increases in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Analyze consumption](/control/consumption/analyze)
* [Manage consumption](/control/consumption)
# Managing Resources with Terraform
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/managing-resources-with-terraform
Est. ~15–30 minutes. Whether it's your first time using Terraform or you're a seasoned expert, this course offers a path for you to learn the relevant details for using the Terraform provider. The course begins with an optional introduction to Terraform, and it ends with a hands-on lab allowing you to practice provider set-up and refactoring resource files with modules.
Est. \~15–30 minutes. Whether it's your first time using Terraform or you're a seasoned expert, this course offers a path for you to learn the relevant details for using the Terraform provider. The course begins with an optional introduction to Terraform, and it ends with a hands-on lab allowing you to practice provider set-up and refactoring resource files with modules.
> [card] [Take Managing Resources with Terraform in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Cortex XCOR Terraform provider](/tooling/infrastructure/terraform)
# PromQL 201
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/promql-201
Est. ~2 hours. Build on your PromQL fundamentals to make sense of complex queries, and craft your own. This course focuses on vector matching, logical operators, aggregations over time and a few other helpful functions.
Est. \~2 hours. Build on your PromQL fundamentals to make sense of complex queries, and craft your own. This course focuses on vector matching, logical operators, aggregations over time and a few other helpful functions.
> [card] [Take PromQL 201 in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Search and query telemetry data](/investigate/querying)
# Query Optimization for Metrics
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/query-optimization-for-metrics
Est. ~2 hours. Dive into recording rules and derived telemetry to learn how they can help with query optimization. Learn how to identify the right optimization tool for your team's use case.
Est. \~2 hours. Dive into recording rules and derived telemetry to learn how they can help with query optimization. Learn how to identify the right optimization tool for your team's use case.
> [card] [Take Query Optimization for Metrics in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Search and query telemetry data](/investigate/querying)
* [Shape metric data](/control/shaping/shape-metrics)
# SLO Detail: Quick Tour
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/slo-detail-quick-tour
Est. ~5 minutes. This course provides a high-level walkthrough of the SLO Detail page, your central hub for monitoring service health against reliability goals. You'll explore the key sections of this comprehensive interface to understand how to track performance and investigate service-level issues in real-time. By the end of this tour, you will know exactly where to find the data needed to monitor your service effectively and maintain your defined objectives.
Est. \~5 minutes. This course provides a high-level walkthrough of the SLO Detail page, your central hub for monitoring service health against reliability goals. You'll explore the key sections of this comprehensive interface to understand how to track performance and investigate service-level issues in real-time. By the end of this tour, you will know exactly where to find the data needed to monitor your service effectively and maintain your defined objectives.
> [card] [Take SLO Detail: Quick Tour in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Service level objectives](/observe/slo)
* [Manage service level objectives](/investigate/alerts/manage-slos)
# Trusting Alerts: Troubleshooting Monitor Configuration
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/trusting-alerts-troubleshooting-monitor-configuration
Est. ~15 minutes. The task of setting up monitors and tuning their thresholds is hardly trivial. This course focuses on strategies for tweaking monitors so that an alert triggers when a real problem exists.
Est. \~15 minutes. The task of setting up monitors and tuning their thresholds is hardly trivial. This course focuses on strategies for tweaking monitors so that an alert triggers when a real problem exists.
> [card] [Take Trusting Alerts: Troubleshooting Monitor Configuration in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Overview of alerting](/investigate/alerts)
# Working with Sparse Metrics
Source: https://docs-xcor.paloaltonetworks.com/academy/courses/working-with-sparse-metrics
Est. ~15 minutes. This mini course explores the distinct challenges of working with metrics that don't report values at a regular interval. After exploring fundamental concepts about lookback windows and what it means to be sparse, learners will leave with several strategies in their toolbox for mitigating challenges with sparse metrics.
Est. \~15 minutes. This mini course explores the distinct challenges of working with metrics that don't report values at a regular interval. After exploring fundamental concepts about lookback windows and what it means to be sparse, learners will leave with several strategies in their toolbox for mitigating challenges with sparse metrics.
> [card] [Take Working with Sparse Metrics in XCOR Academy](https://learn.chronosphere.io/)
## Related documentation
* [Search and query telemetry data](/investigate/querying)
# Administer your tools and users
Source: https://docs-xcor.paloaltonetworks.com/administer
Palo Alto Networks Cortex XCOR offers tools and guidance for managing users, teams, collections, and your infrastructure-as-code settings.
Administrative users focus on observability tools so that developers can use those
tools to monitor and maintain the health of their distributed system. As an
administrative user, you might focus on one or more of the following tasks.
## Cost control
Track telemetry usage against your contract with the
[License Overview](/administer/limits-licensing/licensing), which
surfaces consumption snapshots and trends for each telemetry type. To investigate
what's driving growth, [analyze consumption](/control/consumption/analyze) across
partitions and budgets. Then use the
[Control Plane](/control/shaping) to shape, sample, and reduce the data you persist.
## Data collection
[Ingest telemetry data](/ingest) into Palo Alto Networks Cortex XCOR, which can
include metrics, traces, and change events. Your Collector selection depends on the
data you plan to ingest. Cortex XCOR recommends using the Chronosphere Collector,
but can also ingest data from the OpenTelemetry Collector.
## Data usability
[Explore your data](/investigate) to understand where you can normalize,
sanitize, and optimize telemetry data to make it usable for developers and to filter
out less actionable data. [Analyze usage metrics](/overview/types/metrics) and
implement aggregation rules to improve the quality and reduce the cardinality of
stored metrics data.
## Service level objectives
Define [service level objectives](/observe/slo) (SLOs) that measure your services'
availability from your users' perspective. Effective SLOs combine user-focused
indicators, realistic objectives based on historical performance, and tuned burn
rate alerts that help responders react before error budgets are exhausted.
[Design service level objectives](/administer/design-slos) to choose the right
indicators, set realistic objectives, and configure burn rate alerts for your
services.
## Command Center
Organize SLOs into [Command Center groups](/administer/command-center-groups) to
define the business units shown in the
[Command Center](/observe/command-center). Each group tracks a primary SLO and
optional related SLOs. Groups without a primary SLO don't appear in the Command
Center.
## Platform usability
Create and manage [collections](/administer/collections) to group Cortex XCOR resources
associated with a service or feature you want to monitor. You
create [teams](/administer/accounts-teams/teams) to organize accounts into groups and
define permissions for sensitive management and administrative operations. A team's
accounts have shared responsibility for individual services, which Cortex XCOR represents as collections.
# Accounts and teams
Source: https://docs-xcor.paloaltonetworks.com/administer/accounts-teams
Palo Alto Networks Cortex XCOR lets you manage user accounts, roles, and team permissions for streamlined access and collaboration.
Palo Alto Networks Cortex XCOR identifies users and services by their
*accounts*. As an administrator, you can organize accounts into *teams* and define
those teams' permissions.
* A [*user account*](/administer/accounts-teams/user-accounts)
represents a user's identity in Cortex XCOR.
* A [*service account*](/administer/accounts-teams/service-accounts)
represents a service's identity in Cortex XCOR.
* A [*team*](/administer/accounts-teams/teams) organizes accounts into
groups and defines permissions for sensitive management and administrative
operations.
Add accounts to teams based on the permissions you want grant to those accounts. For
example, to make a user or service account an *administrator*, assign it to a team
that has the SysAdmin role. This grants the account access to special Cortex XCOR
features, including team and account management and assignment.
## View accounts and teams
> [tab] Web - accounts
>
> In the navigation menu, click ** Go to admin view** and then select
> **Platform > Users**.
>
> The left-hand column lists all accounts. The list includes icons for
> additional context about each entry type:
>
> | Icon | Description |
> | :-: | - |
> | | An active user account. |
> | | A service account. |
> | | An invited user who's yet to confirm their account. |
> | | A deactivated user account. |
>
> A **System Administrator** icon to the right of an entry
> indicates either a team that has the System Administrator (SysAdmin) role, or
> a user or service account that's a member of a team with that role.
>
> To view details about an account, select its name from the list. To filter by
> account name, enter part or all of the account's name in the **Search** field.
> To filter by account type or status, click the filter icon.
>
> When you select an account, Cortex XCOR displays the account's team
> **Memberships** and **Recent User Actions**.
>
> If your user account belongs to a team with the SysAdmin role, this view also
> provides options to add or remove the account from teams.
> [tab] Web - teams
>
> In the navigation menu, click ** Go to admin view** and then select
> **Platform > Teams**.
>
> The table lists all teams by name and other details about their configuration:
>
> * **Role**: The role granted to all accounts in the team. The SysAdmin role
> grants administrative privileges.
> * **Source**: The source of this team's configuration. **UI** teams are
> configured in Cortex XCOR and can be edited in the app by users with
> the SysAdmin role. **Terraform** teams are configured exclusively through
> Terraform.
> * **Description**: A description of the team.
>
> To view a team's [home page](/administer/collections/home), click
> its name in the list. If your user account is part of a team with the SysAdmin
> role, you can edit the team's name, role, description, links, and membership
> from its home page.
> [tab] Chronoctl
>
> You can use [Chronoctl](/tooling/chronoctl) to list teams and their member accounts.
> This output includes the email address associated with each account. If an account's
> email address is an alphanumeric Cortex XCOR
> slug at the `serviceaccount.chronosphere.io` domain, that
> member is a [service account](/administer/accounts-teams/service-accounts). Other
> email addresses represent user accounts.
>
> > [!NOTE]
> >
> > To view accounts and teams with Chronoctl, you must authenticate as a user
> > that belongs to a team with the SysAdmin role, or as an unrestricted
> > [service account](/administer/accounts-teams/service-accounts).
>
> To list each team and its member accounts in separate YAML documents with
> [Chronoctl](/tooling/chronoctl), use the `teams list` command. You can also use
> this output as a template for updating each team separately using Chronoctl.
>
> ```shell theme={null}
> chronoctl teams list
> ```
>
> The output contains YAML documents separated by three dashes (`---`). Each document
> contains one team and any of its member accounts.
>
> For example, this output lists a team named *Control team* with one user account
> and one service account as members, and a second team named *DBAs* with two
> user account members:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Team
> spec:
> slug: control-team
> name: Control team
> user_emails:
> - adam@example.com
> - 4a5842df-4179-47c7-bcc0-d1e6589caaf0@serviceaccount.chronosphere.io
> ---
> api_version: v1/config
> kind: Team
> spec:
> slug: dbas
> name: DBAs
> user_emails:
> - adam@example.com
> - betty@example.com
> ```
> [tab] API
>
> To list all teams with the Cortex XCOR API, use the
> [`ListTeams`](/tooling/api-info/definition/operations/ListTeams) endpoint.
>
> To view a single team, use the
> [`ReadTeams`](/tooling/api-info/definition/operations/ReadTeam) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Grant System Administrator (SysAdmin) privileges to a team
A user account that's a member of a [team](/administer/accounts-teams/teams) with
the `SysAdmin` role has administrative access to Cortex XCOR features,
including the abilities to create teams and user accounts, assign users to teams,
and define team permissions.
For instructions about assigning roles to a team, see
[Add a role to a team](/administer/accounts-teams/teams#add-a-role-to-a-team).
# Okta user synchronization
Source: https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/okta
Configure user synchronization between Okta and Palo Alto Networks Cortex XCOR.
[System for Cross-domain Identity Management (SCIM)](https://en.wikipedia.org/wiki/System_for_Cross-domain_Identity_Management)
is a standard used to automate exchanges of user identity details between identity
systems or Identity Providers (IdP), like Okta. It's used to deprovision, update, and
provision users.
SCIM integration helps you control user access in Palo Alto Networks Cortex XCOR.
This document applies to existing customers using Okta who want to use SCIM. New
customers can configure SCIM when moving to Cortex XCOR.
After migrating to SCIM, Cortex XCOR Support sends you a list of users not managed
by SCIM. On a case-by-case basis, determine if a user should be deactivated, or if
the user is still active but has a new email address. Your Cortex XCOR team manually
remediates these issues to complete the migration process.
## Setup
Setting up SCIM with Okta requires configuration in both Cortex XCOR and
the Okta dashboard.
### Prepare Cortex XCOR for SCIM integration
> [!NOTE]
>
> Setting up SCIM with Okta requires a user with Okta super administrator access and a
> user with Cortex XCOR SysAdmin permissions. These accounts can be the same
> user.
Before proceeding with Okta integration, complete the following steps:
1. Contact Cortex XCOR Support to enable SCIM integration for Okta Workforce for
your application.
> [!WARNING]
>
> After Cortex XCOR Support enables SCIM integration, new users won't be able to
> access Cortex XCOR until the setup process is complete.
2. [Create an unrestricted service account in Cortex XCOR](/administer/accounts-teams/service-accounts#create-an-unrestricted-service-account).
You must be a member of a team with the SysAdmin role to create a new service account.
For the **New Service Account Name**, Cortex XCOR recommends a meaningful service
account name like `Okta SCIM integration`.
3. Copy the token to a safe place, as it's provided only once, and can't be
displayed or recovered later.
4. In Cortex XCOR,
[create a new, distinct team](/administer/accounts-teams/teams) for the purpose
of SCIM administration.
5. Assign the
[**User Administrator** role to the team](/administer/accounts-teams/teams#add-a-role-to-a-team).
For security, Cortex XCOR recommends only this team be assigned the **User
Admin** role, and the role be specifically scoped to only have permission to
communicate with the SCIM API, or have access to the service token.
6. Add the service account user you created.
### Configure SCIM integration on Okta
Your organization's Okta administrator must configure Okta provisioning integration.
Find general instructions for setting up Okta integration in the
[Okta documentation](https://developer.okta.com/docs/guides/scim-provisioning-integration-connect/main/).
1. Using an administrator account, sign in to the Okta app to be used for
single sign-on (SSO) integration with Cortex XCOR.
2. Next to your username, click **Admin**.
3. In the left sidebar menu, go to **Applications > Applications**.
4. In the **General** tab, next to **Provisioning**, select **SCIM** and then click
**Save**.
5. Click the **Provisioning** tab.
6. Click **Integration**, and then click **Edit**.
7. Enter information for the following fields:
* **SCIM connector base URL:**
`https://TENANT.chronosphere.io/api/scim/v2`. Replace *`TENANT`* with the name of your Cortex XCOR tenant.
* **Unique identifier field for users:** Enter `email`.
* **Supported provisioning actions:** Select only these values:
* **Push New Users**
* **Push Profile Updates**
8. For **Authentication Mode**, select `HTTP Header`.
9. For the **Authorization** section's **Bearer** field, copy and paste the service
token obtained when creating a service account in the Cortex XCOR
console.
10. Click **Test Connector Configuration** to ensure the integration configuration is
correct. If you encounter an error message, review the configuration and try
again.
11. Click **Save** to save the configuration. The **Provisioning to App** page
displays.
12. Select the **Enable** checkboxes for **Create Users** and
**Update User Attributes**.
13. Click **Save**.
> [!WARNING]
>
> You must complete both step 7 (select **Push new users**), and step 12 (Enable the
> checkbox for **Create Users**). Provisioning fails if either of these steps isn't
> completed.
### Update the Cortex XCOR default group in Okta
After completing SCIM integration setup process and connecting to Cortex XCOR, sync the
existing users in your Okta tenant with Cortex XCOR. To
do this, you must first remove all assigned users and groups, and then reassign them.
1. Sign in to Okta.
2. Click **Admin**.
3. In the left sidebar menu, go to **Applications > Applications**.
4. In the **Provisioning** tab, clear the **Deactivate Users** checkbox.
> [!NOTE]
>
> Clear this checkbox before updating the group.
5. Navigate to the **Assignments** tab and then select **Groups**.
6. To remove all **Existing Groups**, click the **X** icon next to each group.
7. Click the **Assign** button and reassign all **Existing Groups**.
8. Navigate to the **Provisioning** tab, and then click **Edit**.
9. Select the **Deactivate Users** checkbox.
The SCIM integration setup is now complete and users will be provisioned and
deprovisioned by Cortex XCOR.
### Verify successful provisioning
After completing the setup process, verify the provisioning process succeeded.
1. In Okta, navigate to **Dashboard -> Tasks**.
2. Look for failed requests. These display as
`Application assignments encountered errors`.
3. Retry any failed requests. If failures persist, contact [Cortex XCOR Support](/support).
It's a good practice to review for failed requests whenever deactivating users or
changing users assigned to Cortex XCOR. Use
[Okta Workflows](https://help.okta.com/wf/en-us/Content/Topics/Workflows/use-case-lifecycle-event-notification.htm)
to send notifications when provisioning or deprovisioning fails.
## Deprovisioned users
When a user is deprovisioned, personal access tokens and any outstanding credentials
they had from Cortex XCOR no longer work.
> [!WARNING]
>
> SCIM deactivates users from the time of enablement, but won't deactivate existing users who are
> no longer assigned to or were removed from the Cortex XCOR app.
Group memberships remain intact, and
[service accounts](/administer/accounts-teams/service-accounts)
continue to function.
Cortex XCOR doesn't revoke service accounts created by a given user during
user deactivation. Service accounts can be used in production, and deactivating them
can cause outages. This is consistent with other web services, such as Amazon Web
Services and Google Cloud Platform, where service accounts aren't tied to a user.
# Personal access tokens
Source: https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/personal-access-tokens
Use personal access tokens to securely access the Cortex XCOR API, Chronoctl, and Terraform.
A user can create a *personal access token* to authenticate their user account with
the Cortex XCOR API, Chronoctl, and Terraform. When you authenticate with a personal
access token, Palo Alto Networks Cortex XCOR associates the actions you take
with your identity and respects the permissions granted to your user account's team.
Unlike creating service accounts, you don't need to be a member of a team with the
SysAdmin role to create a personal access token.
For details about user accounts and teams, see [Accounts and Teams](/administer/accounts-teams).
For details about signing in to Cortex XCOR in a web browser, see
[Authenticating with Cortex XCOR](/overview/authenticating).
A personal access token expires and stops working after a defined period of up to 30 days.
You can't use a personal access token as an API token for the Chronosphere Collector.
To create a persistent identity for a service, define permissions for it, and provide it
with an API token, use a [service account](/administer/accounts-teams/service-accounts).
## Create a personal access token
To create a personal access token:
1. Click your profile icon from the menu bar and select **My Account**.
2. Click **+ Add Token** to open the **Add Token** window.
3. Enter a name for the personal access token.
4. In the **Token Expiration** dropdown, select a token duration in days.
5. Click **Generate Token** to save the personal access token.
6. Copy the resulting API token.
> [!WARNING]
>
> Store the API token securely, because it's as sensitive as your password. If you
> don't store the API token immediately after creation, you can't view it after
> navigating away from the **My Account** page. If you lose the API token, you must
> create a new personal access token.
## Use a personal access token
You can use the API token generated by your personal access token with Chronoctl
or the Cortex XCOR API to access the same things you can access in the
Cortex XCOR web app.
For details, see the [Chronoctl](/tooling/chronoctl),
[Prometheus API](/tooling/prometheus-api), and
[Cortex XCOR API](/tooling/api-info) documentation.
## Revoke personal access tokens
Cortex XCOR invalidates each personal access token and its associated API
token upon expiration. You can also manually revoke personal access tokens that
you've created.
> [!WARNING]
>
> When you revoke a personal access token, Cortex XCOR removes it and its
> associated API token immediately without any additional confirmation.
To revoke a token:
1. Click your profile icon from the menu bar and select **My Account**.
2. On the row of the token you want to revoke, click ** Revoke**.
To revoke all of your tokens:
1. Click your profile icon from the menu bar and select **My Account**.
2. Click **Revoke All**.
# Service accounts
Source: https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/service-accounts
An explanation of Cortex XCOR service accounts and usage.
A *service account* provides an identity that a service can use to access
the Cortex XCOR API, Chronoctl, Terraform, and the Chronosphere Collector. Use service
accounts for automated, programmatic interactions, such as CI/CD, ingesting
telemetry, or automated queries. Palo Alto Networks Cortex XCOR attributes all
actions that a service takes to its service account. A service account can't access
the user interface, only the APIs. Accounts can belong to
[*teams*](/administer/accounts-teams/teams).
When you create a service account, Cortex XCOR also creates a non-expiring API
token that the service account uses for authentication.
> [!NOTE]
>
> Service accounts are distinct from [*user accounts*](/administer/accounts-teams/user-accounts),
> which provide identities for users who can also authenticate interactively and use
> Cortex XCOR.
>
> To use tools that require non-interactive authentication, such as Chronoctl,
> Terraform, or the Cortex XCOR API, create a temporary
> [personal access token](/administer/accounts-teams/personal-access-tokens) with the
> same permissions as your user account. You can also assign service accounts to teams
> with the `SysAdmin` role, which also grants those service accounts administrative
> permissions.
>
> For details about accounts and teams, see
> [Accounts and Teams](/administer/accounts-teams).
> For details about interactive user account authentication, see
> [Authenticating with Cortex XCOR](/overview/authenticating).
## View service accounts
> [tab] Web
>
> In the navigation menu, click ** Go to admin view** and
> then select **Platform > Service Accounts**.
>
> The service account list contains the following information:
>
> * **Name:** The service account name.
> * **Service account email:** The unique email user for this service account.
> * **Created by:** The service account creator.
> * **Restriction:** The type of
> [restrictions](/administer/accounts-teams/service-accounts#create-a-restricted-service-account)
> on this account. Unrestricted accounts don't have a value here.
> * **Last used:** When this service token was last accessed. This field can be
> inaccurate if more than 1,000 service accounts are active.
> * **Metric label:** For restricted accounts, the key-value label pair restriction.
> [tab] Chronoctl
>
> To return all service accounts and their label restrictions, use the [Chronoctl](/tooling/chronoctl)
> `service-accounts list` command.
>
> For example, to return all service accounts in JSON format, run:
>
> ```shell theme={null}
> chronoctl service-accounts list --output=json
> ```
>
> The command returns the following fields for each service account:
>
> * `id`: The unique identifier for the service account. The `slug` field
> contains the same value.
> * `name`: The service account name.
> * `permission`: For restricted accounts, the access level: `READ_PERMISSION`,
> `WRITE_PERMISSION`, or `READWRITE_PERMISSION`. Omitted for unrestricted
> accounts.
> * `labels`: For restricted accounts, the key-value label pair restrictions.
>
> The command doesn't return the account email or creator. The default `table`
> output shows only the `id`, `slug`, and `name` fields.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListServiceAccounts`](/tooling/api-info/definition/operations/ListServiceAccounts) endpoint.
>
> The endpoint returns the following fields for each service account:
>
> * `slug`: The unique identifier for the service account.
> * `name`: The service account name.
> * `email`: The unique email user for this service account. Read-only.
> * `created_at`: When the service account was created.
> * `updated_at`: When the service account was last modified.
> * `unrestricted`: Whether the account has full access to the Cortex XCOR API.
> * `metrics_restriction`: For restricted accounts, the metric access
> restriction. Contains a `permission` level of `READ`, `WRITE`, or
> `READ_WRITE`, and optional `labels` that limit access to metrics with
> matching label names and values.
>
> The `token` field is returned only in the `CreateServiceAccount` response, so
> it's empty in list results.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
If you have a service account token, and don't know which account it belongs to,
use the following Chronoctl command:
```shell theme={null}
chronoctl auth whoami --api-token=TOKEN
```
Replace *`TOKEN`* with your service account token.
## Create a service account
New service accounts can be one of the following types, each configured differently:
* An *unrestricted service account*, which grants full access to all Cortex XCOR
APIs and entities, including administration and monitoring features.
* A *restricted service account*, which grants certain permissions to access only
telemetry data, and optionally limiting displayed metrics to those with one or
a pair of specific, case-sensitive label names and values.
To use a service account with Chronoctl or Terraform, you must create an unrestricted
service account.
To use a service account with the Chronosphere Collector, create a restricted
write-only service account.
### Create an unrestricted service account
A service account can access the entire Cortex XCOR API, but this access doesn't
necessarily grant it all possible privileges. You can also assign the `SysAdmin`
role to the team that the service account belongs to, but doing so is required only
if the service account needs to create, modify, and delete accounts, teams, and
[certain resources](/administer/accounts-teams/teams#assign-team-roles-and-permissions).
To make an unrestricted service account read-only, remove it from the **Default**
team and any other team that grants the `Editor` or `SysAdmin` role. The account
retains read-only access to the Cortex XCOR API. For more information, see
[Assign team roles and permissions](/administer/accounts-teams/teams#assign-team-roles-and-permissions).
> [!NOTE]
>
> You **must** be a member of a team with the `SysAdmin` role to create a new service
> account.
Select from the following methods to create an unrestricted service account.
> [tab] Web
>
> To create an unrestricted service account:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **Platform > Service Accounts**.
> 2. Click **+ Service Account**. This opens the **Add Service Account** dialog.
> 3. In the **Service Account Name** field, enter a descriptive name for the service
> account.
> 4. In the **Service Account Type** section, select **Unrestricted**.
> 5. Click **Save**.
>
> After creating the service account, Cortex XCOR displays its secret token.
>
> > [!WARNING]
> >
> > This is the only time Cortex XCOR displays the service account's token.
> > Store it securely. If you lose the token, you must delete and recreate the service
> > account to generate a new token.
> [tab] Chronoctl
>
> To create and manage service accounts with [Chronoctl](/tooling/chronoctl),
> the account you use must either be a member of a team with the
> [`SysAdmin` role](/administer/accounts-teams/user-accounts#grant-system-administrator-sysadmin-privileges-to-users)
> or an unrestricted service account.
>
> 1. Generate a templated service account resource with the
> `chronoctl service-accounts scaffold` command:
>
> ```shell theme={null}
> chronoctl service-accounts scaffold > service-account.yml
> ```
>
> Replace `service-account.yml` with any valid filename.
>
> 2. Edit the generated template to configure the new service account. Remove
> any fields that you don't need to configure.
>
> For example, to configure an unrestricted service account with the
> slug `ci-build-account` and name `CI Build Account`,
> the resulting resource is:
>
> ```yaml service-account.yml icon="square-terminal" theme={null}
> api_version: v1/config
> kind: ServiceAccount
> spec:
> slug: ci-build-account
> name: CI Build Account
> unrestricted: true
> ```
>
> 3. Create the resource by passing the file containing the resource to the
> `service-accounts create` command.
>
> ```shell theme={null}
> chronoctl service-accounts create -f service-account.yml
> ```
>
> The command returns the service account resource, including its secret API
> `token`:
>
> ```yaml Service account resource icon="square-terminal" theme={null}
> api_version: v1/config
> kind: ServiceAccount
> spec:
> slug: ci-build-account
> name: CI Build Account
> token: acc261....
> email: 7da....@serviceaccount.chronosphere.io
> unrestricted: true
> ```
>
> > [!WARNING]
> >
> > This is the only time Cortex XCOR displays the service account's token.
> > Store it securely. If you lose the token, you must delete and recreate the service
> > account to generate a new token.
> [tab] Terraform
>
> To create an unrestricted service account with [Terraform](/tooling/infrastructure/terraform),
> use the `chronosphere_service_account` resource type and assign a `name` to use
> in Cortex XCOR inside the resource declaration.
>
> For example, this code creates a service account without any restrictions that
> Terraform refers to as `all_access`:
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_service_account" "all_access" {
> name = "Terraform - Unrestricted"
> }
> ```
>
> 1. Add the definition to a Terraform file.
> 2. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
>
> Terraform stores the new service account's secret token in its state. To use the
> token in other Terraform resources, use the `.token` field of the service account
> resource.
>
> Using the previous example, the token for the service account with the Terraform
> resource name `all_access` is accessible at `chronosphere_service_account.all_access.token`.
>
> To view the token, inspect your Terraform state file. For example, you can use the
> [`jq`](https://stedolan.github.io/jq/) tool to filter service accounts in the state
> file:
>
> ```shell theme={null}
> jq '.resources[] | select(.type=="chronosphere_service_account")' terraform.tfstate
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateServiceAccount`](/tooling/api-info/definition/operations/CreateServiceAccount) endpoint
> and update the `service_account.unrestricted` key.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 a restricted service account
A restricted service account can access *only* the telemetry ingest and query APIs.
The account can't access any of the other APIs. It can't make configuration changes,
such as adding rules, creating monitors, or adding accounts.
You can also optionally define **Label Restrictions** on restricted accounts to
limit the account to querying or ingesting only specific labels or label-value pairs
when authenticating with the account's token.
The following types of restricted service accounts are available:
* **Read-only** accounts are permitted only to query data. If you also define
Label Restrictions, the account can query only metrics with the defined metric
label keys or key-value pairs.
* **Write-only** accounts are permitted only to ingest data. If you also define
Label Restrictions, the account can ingest only metrics with the defined metric
label keys or key-value pairs.
* **Read & write** accounts are permitted to both query and ingest data, following
any defined Label Restrictions.
Write-only accounts are based on the principle of least privilege. A robot whose only
job is to send ingest data to the server doesn't need query access.
Restricted, read-only service accounts are restricted to reading even if the service
account is added to a team with `Editor` or `SysAdmin` roles.
Restricted accounts using label restrictions force a label with a specific value to
be present on write, and allows queries that include only that label-value pair.
Label restrictions support a maximum of two key-value pairs.
Key-value pairs on individual service accounts must be unique. You can't set multiple
values for the same label key.
> [!NOTE]
>
> Cortex XCOR strips this label from query responses. Users with
> a restricted service account aren't aware that they're viewing metrics
> that match only the specified label.
>
> Users see all other telemetry.
Select from the following methods to create a restricted service account.
> [tab] Web
>
> To create a restricted service account, you must have administrative privileges.
>
> 1. In the navigation menu, click ** Go to admin view** and then select
> **Platform > Service Accounts**.
> 2. Click **+ Service Account**. This opens the **Add Service Account** dialog.
> 3. In the **Service Account Name** field, enter a descriptive name for the
> service account.
> 4. In the **Service Account Type** section, select **Restricted**. Cortex XCOR displays
> additional fields for you to complete.
> 5. Complete the creation process based on your needs. Use the
> **Label Restrictions** section to limit this account's metrics access to only
> labels with one, or a pair of specific key-value pairs. Click **+Add Label**
> to add a second key-value pair. Label restrictions are case sensitive.
> 6. Click **Save**.
>
> After creating the service account, Cortex XCOR displays its secret token.
>
> > [!WARNING]
> >
> > This is the only time Cortex XCOR displays the service account's token.
> > Store it securely. If you lose the token, you must delete and recreate the service
> > account to generate a new token.
> [tab] Chronoctl
>
> To create a restricted service account with [Chronoctl](/tooling/chronoctl), use the
> `service-accounts create` command.
>
> Specify required values as command arguments:
>
> * name (`--name`)
> * permission (`--permission`). Valid `permission` values are:
> * `READ`: Read-only access.
> * `WRITE`: Write access.
> * `READ_WRITE`: Read and write access.
>
> You can also specify optional metric label arguments:
>
> * label name (`--label-name`)
>
> * label value (`--label-value`)
>
> 1. Generate a templated service account resource with the `service-accounts scaffold`
> command:
>
> ```shell theme={null}
> chronoctl service-accounts scaffold > service-account.yaml
> ```
>
> Replace `service-account.yaml` with any valid filename.
>
> 2. Edit the generated template to configure the new service account. Remove any
> fields that you don't need to configure.
>
> For example, to configure a restricted service account that can read and write
> only metrics with the label `tenant` and the value `name`, the resulting resource
> is:
>
> ```yaml service-account.yaml icon="square-terminal" theme={null}
> api_version: v1/config
> kind: ServiceAccount
> spec:
> slug: tenant-name
> name: tenant
> metrics_restriction:
> labels:
> tenant: name
> permission: READ_WRITE
> ```
>
> 3. Create the service account:
>
> ```shell theme={null}
> chronoctl service-accounts create -f service-account.yml
> ```
>
> The command returns the service account resource, including its secret API
> `token`:
>
> ```yaml Service account resource icon="square-terminal" theme={null}
> api_version: v1/config
> kind: ServiceAccount
> spec:
> slug: tenant-name
> name: tenant
> metrics_restriction:
> labels:
> tenant: name
> token: acc261....
> email: 7da....@serviceaccount.chronosphere.io
> ```
>
> > [!WARNING]
> >
> > This is the only time Cortex XCOR displays the service account's token.
> > Store it securely. If you lose the token, you must delete and recreate the service
> > account to generate a new token.
> [tab] Terraform
>
> To create a restricted service account using
> [Terraform](/tooling/infrastructure/terraform), use the
> `chronosphere_service_account` resource type followed by a resource name, and include
> a `restriction` section in the resource declaration.
>
> You must add a `permission` value in the `restriction` section to define the
> account's access. Valid `permission` values are:
>
> * `READ`: Read-only access.
> * `WRITE`: Write access.
> * `READ_AND_WRITE`: Read and write access.
>
> You can optionally add a `labels` value in the `restriction` section to additionally
> restrict the service account's access to limit metrics to display only those that
> have the specified label name and value.
>
> For example, this code creates a restricted service account that Terraform refers to
> as `restricted_labeled`, which can only read and write metrics with the label name
> `tenant` and label value `name`:
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_service_account" "restricted_labeled" {
> name = "Terraform - Restricted, READ_AND_WRITE, labeled"
> restriction {
> permission = "READ_AND_WRITE"
> labels = { "tenant" : "name" }
> }
> }
> ```
>
> 1. Add the definition to a Terraform file.
> 2. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
>
> Terraform stores the new service account's secret token in its state. To use the
> token in other Terraform resources, use the `.token` field of the service account
> resource.
>
> Using the previous example, the token for the service account with the Terraform
> resource name `all_access` is accessible at `chronosphere_service_account.all_access.token`.
>
> To view the token, inspect your Terraform state file. For example, you can use the
> [`jq`](https://stedolan.github.io/jq/) tool to filter service accounts in the state
> file:
>
> ```shell theme={null}
> jq '.resources[] | select(.type=="chronosphere_service_account")' terraform.tfstate
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateServiceAccount`](/tooling/api-info/definition/operations/CreateServiceAccount) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
#### Label restriction example
Label restrictions support a third-party use case, where Cortex XCOR is the first
party, and a Cortex XCOR customer (CompanyX) is the second party. A Cortex XCOR
customer's customer (CompanyA, CompanyB, or CompanyC) is the third party.
In this scenario, CompanyX uses one tenant with Cortex XCOR to store data about
CompanyA, CompanyB, and CompanyC, discriminated by some key (such as `third-party`)
with a value of `A`, `B`, or `C`.
Employees of CompanyX can see all of the data.
Employees of CompanyA get a restricted service account with a label restriction of
`third-party=A`. CompanyA doesn't know this key or this value. Whenever they send
data to Cortex XCOR, Cortex XCOR augments the writes with `third-party=A`. Whenever
CompanyA does queries, Cortex XCOR lets them see time series that include only
`third-party=A`, but Cortex XCOR strips this label before showing the time series to
employees of CompanyA.
## Delete a service account
Select from the following methods to delete a service account.
> [!NOTE]
>
> Users can modify Terraform-managed resources only by using Terraform.
> [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
> [tab] Web
>
> To delete a service account, you must have administrative privileges.
>
> 1. In the navigation menu, click ** Go to admin view** and then select
> **Platform > Service Accounts**.
> 2. Select the checkboxes for one or more service accounts you want to delete.
> 3. Click ** Delete** at the top of the list of service
> accounts.
> [tab] Chronoctl
>
> To delete a service account with [Chronoctl](/tooling/chronoctl), the account you use must
> either be a member of a team with the
> [`SysAdmin` role](/administer/accounts-teams/user-accounts#grant-system-administrator-sysadmin-privileges-to-users),
> or
> an unrestricted service account.
>
> Use the `service-accounts delete` command, passing the account's slug as the `--slug`
> argument.
>
> For example, to delete a service account with the slug `tenant-name`:
>
> ```shell theme={null}
> chronoctl service-accounts delete tenant-name
> ```
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteServiceAccount`](/tooling/api-info/definition/operations/DeleteServiceAccount) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Teams
Source: https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/teams
Palo Alto Networks Cortex XCOR lets you create and manage teams, assign roles, and set permissions for effective collaboration.
A *team* defines how an organization grants permissions for sensitive
management and administrative operations to *accounts*, including
[*user accounts*](/administer/accounts-teams/user-accounts) and
[*service accounts*](/administer/accounts-teams/service-accounts).
A team's accounts have a shared responsibility for certain services. Palo Alto Networks Cortex XCOR
represents those services as [*collections*](/administer/collections), which contain
resources related to the service a collection represents, such as dashboards and
monitors. A team can own multiple collections.
All user and service accounts in a team that has the special System Administrator
(`SysAdmin`) role are *administrators*. If you're an administrator, you can
[add this role to a team](#add-a-role-to-a-team).
Teams can own collections and services, which in turn own other functions:
```mermaid actions={false} theme={null}
flowchart TD
accDescr: Ownership flow for teams and functions
Team[**Team**]
Col(Collections )
Ser(Services )
Team --> Col
Team --> Ser
Dash(Dashboards )
Mon(Monitors )
SLO(SLOs )
Col --> Dash
Col --> Mon
Col --> SLO
Dash2(Dashboards )
Mon2(Monitors )
SLO2(SLOs )
Ser --> Dash2
Ser --> Mon2
Ser --> SLO2
```
## View teams
To search for a team:
1. Click the search bar to focus on it, or use the keyboard shortcut
`Control+K` (`Command+K` on macOS).
2. Begin typing any part of the team's name.
3. Optional: Click the **Teams** filter at the top of the search results to
constrain your results to only Teams.
4. Click the search result you're interested in, or use the arrow keys to select it
and press enter, to go to that team.
### View teams and their collections
To view teams and the collections they own, in the navigation menu click
** Go to admin view**, and then select
**Platform > Collections** or
**Platform > Teams**. For details about working
with collections, see [Collections](/administer/collections).
### View a list of teams to manage
To view teams in a list that displays their members, provides an audit log of
membership changes, and includes management options for administrators:
> [tab] Web
>
> In the navigation menu, click ** Go to admin view** and then select
> **Platform > Teams**.
> [tab] Chronoctl
>
> Use the command:
>
> ```shell theme={null}
> chronoctl teams list
> ```
For details, see
[Accounts and Teams](/administer/accounts-teams#view-accounts-and-teams).
## Manage teams
> [!NOTE]
>
> To manage teams, you must use a user account or
> [service account](/administer/accounts-teams/service-accounts) that belongs to a team
> with the SysAdmin role.
To manage teams, in the navigation menu, click ** Go to admin view**
and then select **Platform > Teams**.
### Create a team
> [tab] Web
>
> To create a new team:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **Platform > Teams**.
> 2. Click **Create team**.
> 3. In the dialog that appears, enter a name for the new team and the access role it
> should have.
> 4. Click **Save** to create the team.
>
> The team now appears in the list of users and teams.
> [tab] Chronoctl
>
> > [!WARNING]
> >
> > To create teams or modify team membership with Chronoctl, you must use a user account
> > or [service account](/administer/accounts-teams/service-accounts) that
> > belongs to a team with the SysAdmin role.
>
> To create and manage a team with [Chronoctl](/tooling/chronoctl),
> use the `Team` resource type. The resource can contain these fields:
>
> | Field | Type | Description |
> | - | - | - |
> | `name` | String | The team name as displayed in Cortex XCOR. |
> | `slug` | String | Optional: A unique identifier that Cortex XCOR uses to identify the team. If omitted, Cortex XCOR generates a slug. |
> | `description` | String | Optional: A description displayed when viewing this team. |
> | `user_emails` | Collection of strings | Contains an item for each member account's email address. |
>
> To generate an example Team resource, run `chronoctl teams scaffold`.
>
> If an email address in `users` doesn't already have a Cortex XCOR
> account, the app creates a pending user account for that email address. When that
> user signs in, Cortex XCOR then activates the account.
>
> For example, this YAML resource creates a team named `DBAs` in Cortex XCOR, with the
> description `Database administrators`, and which the app
> identifies with the slug `dbas`. It also includes the listed accounts identified by
> their email addresses as team members:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Team
> spec:
> name: DBAs
> slug: dbas
> description: "Database administrators"
> user_emails:
> - adam@example.com
> - betty@example.com
> ```
>
> To include service accounts, add the service account's internal email address to
> the `users` list. For details, see [Service Accounts](/administer/accounts-teams/service-accounts).
> [tab] Terraform
>
> > [!WARNING]
> >
> > To create teams or modify team membership with Terraform, you must use a user account
> > or [service account](/administer/accounts-teams/service-accounts) that
> > belongs to a team with the SysAdmin role.
>
> To create and manage a team with [Terraform](/tooling/infrastructure/terraform),
> declare the `chronosphere_team` resource type and provide a resource name. The resource
> can contain these fields:
>
> | Field | Type | Description |
> | - | - | - |
> | `name` | String | The team name as displayed in Cortex XCOR. |
> | `slug` | String | Optional: A unique identifier that Cortex XCOR uses to identify the team. If omitted, Cortex XCOR generates a slug. |
> | `description` | String | Optional: A description displayed when viewing this team. |
> | `user_emails` | Array of strings | The email address for each member account. |
>
> For example, this resource creates a team referred to by Terraform as `dbas`, named
> `DBAs` in Cortex XCOR, and identified in the app with the slug `dbas`. It
> also includes the listed accounts identified by their email addresses as team
> members:
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_team" "dbas" {
> name = "DBAs"
> slug = "dbas"
> description = "Database administrators"
>
> user_emails = [
> "adam@example.com",
> "betty@example.com",
> ]
> }
> ```
>
> To include service accounts, add the service account's internal email address to
> the `user_emails` array. For details, see [Service Accounts](/administer/accounts-teams/service-accounts).
>
> 1. Add the definition to a Terraform file.
> 2. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateTeam`](/tooling/api-info/definition/operations/CreateTeam) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Edit team membership
> [tab] Web
>
> To add users to or remove users from a team:
>
> 1. In the navigation menu, click ** Go to admin view** and then select
> **Platform > Teams**.
> 2. [Select the team](/administer/accounts-teams#view-accounts-and-teams) to manage.
> 3. Click ** Edit Team**.
> 4. In the **Team Members** section, click **Update Membership**.
> 5. From the account list that appears, select the checkbox for each account you want
> to add to the team, and clear the checkbox for each account you want to remove
> from the team.
> 6. Click **Save** to edit the team's membership.
>
> The team page updates its membership list accordingly, and the audit log adds an
> entry logging the operation.
>
> The account list includes both user and service accounts. You can remove a service account
> from the **Default** team to make it read-only. For more information, see
> [Assign team roles and permissions](#assign-team-roles-and-permissions).
> [tab] Chronoctl
>
> > [!WARNING]
> >
> > To modify teams with Chronoctl, you must use a user account or
> > [service account](/administer/accounts-teams/service-accounts) that
> > belongs to a team with the `SysAdmin` role.
>
> You can use [Chronoctl](/tooling/chronoctl) to replace and update a team and
> its membership with those defined in a YAML file.
>
> To generate a YAML description of your current teams and accounts, see
> [View Accounts and Teams](/administer/accounts-teams#view-accounts-and-teams).
>
> Following the `DBAs` team example from [creating a team](#create-a-team),
> to add a user to that team, update the YAML to include the new user's email:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Team
> spec:
> name: DBAs
> slug: dbas
> description: "Database administrators"
> user_emails:
> - adam@example.com
> - betty@example.com
> - charles@example.com
> ```
>
> To apply the changes, use the Chronoctl `chronoctl teams update` command, which
> updates teams but doesn't create them if they don't already exist:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl teams update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the path to the YAML definition file.
>
> You can test the changes without applying them by including the `--dry-run` flag:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl teams update -f FILE_NAME.yaml --dry-run
> ```
>
> To force `teams update` to create a defined team if it doesn't exist, include the
> `--create-if-missing` flag:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl teams update -f FILE_NAME.yaml --create-if-missing
> ```
> [tab] Terraform
>
> To edit a team's membership using [Terraform](/tooling/infrastructure/terraform), modify the
> `user_emails` array in the team's `chronosphere_team` resource, and then apply the
> resource using Terraform.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateTeam`](/tooling/api-info/definition/operations/UpdateTeam) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Assign team roles and permissions
Cortex XCOR teams use *roles* to grant or restrict access to features
that create, edit, or delete resources, teams, and accounts. Roles are assigned
to teams, and all accounts that belong to a team gain the permissions granted by
that team's role.
### Default team properties
During creation, accounts are assigned to the **Default** team, which has the `Editor`
role. The **Default** team can't be deleted, and its role can't be changed.
To remove editing access from a user or service account,
[remove them from the **Default** team](#edit-team-membership). This limits
the account to read-only Viewer access if they don't have edit access through
membership in another team.
[Unrestricted service accounts](/administer/accounts-teams/service-accounts#create-an-unrestricted-service-account)
removed from the **Default** team have read-only access to the full Cortex XCOR API.
To create a read-only unrestricted service account that can access all APIs, remove
it from the **Default** team.
### Available roles
The available roles are:
* `None`: Accounts on teams with this role can view pages in Cortex XCOR
but can't create, edit, or remove resources or accounts. Any
[Operator](/navigate/operator) chats by these accounts aren't saved to the chat
history. Accounts that don't belong to any team also have the `None` role by
default.
* `Editor`: Accounts on teams with this role can create, view, edit, and delete
resources within Cortex XCOR, but can't create, edit, or delete accounts
and teams. Operator saves the last 20 chat sessions of accounts that have the
`Editor` or higher roles.
* `SysAdmin`: Any account that's a member of a team with the System Administrator
(`SysAdmin`) role can create, edit, and delete accounts and teams, assign accounts
to teams, and assign roles to teams. Accounts with this role are designated by a
key icon next to their name in the **Users** list.
* `User Administrator`: Accounts belonging to teams with this role can access the
System for Cross-domain Identity Management (SCIM) API, which manages accounts
that use single sign-on. This role grants no other permissions.
The `User Administrator` role can be assigned to teams only in organizations that
have SCIM integration enabled. For more information, see
[Okta user synchronization](/administer/accounts-teams/okta).
If an account belongs to multiple teams with different roles, they inherit the
highest-level permissions of each assigned team. For example, an account in a team
with the `Editor` role and a second team with the `SysAdmin` role has both sets of
privileges.
The following chart summarizes roles and permissions:
| Action | None | Editor | SysAdmin | User Admin |
| - | :-: | :-: | :-: | :-: |
| Interact with SCIM API | | | | |
| View pages in Cortex XCOR | | | | |
| Add and edit user and service accounts | | | | |
| Add, edit, and remove teams | | | | |
| Change users' team membership | | | | |
| Apply service configuration changes | | | | |
| Add, edit, and remove Trace Optimization datasets | | | | |
| Add, edit, and remove derived labels | | | | |
| Add, edit, and remove other resources | | | | |
Some features vary by role beyond whether an account can use them. Accounts with
the `None` role can chat with [Operator](/navigate/operator), but their
conversations aren't saved, don't appear in chat history, and can't be shared. See
[Availability and permissions](/navigate/operator#availability-and-permissions).
### Add a role to a team
To add a role to a team:
1. In the navigation menu, click ** Go to admin view** and then select
**Platform > Teams**.
2. [Select the team](/administer/accounts-teams#view-accounts-and-teams)
to manage.
3. In the **Team Information** section, click ** Edit**.
4. Click the **Role** dropdown and select the role you want to assign to the team.
5. Click **Save**.
### Remove a role from a team
To remove a role from a team:
1. In the navigation menu, click ** Go to admin view** and then select
**Platform > Teams**.
2. [Select the team](/administer/accounts-teams#view-accounts-and-teams) to manage.
3. In the **Team Information** section, click ** Edit**.
4. Click the **Role** dropdown and select the **None** role.
5. Click **Save**.
### Rename a team
To rename a team:
1. In the navigation menu, click ** Go to admin view** and then select
**Platform > Teams**.
2. [Select the team](/administer/accounts-teams#view-accounts-and-teams) to manage.
3. In the **Team Information** section, click ** Edit**.
4. Change the team's name in the **Name** field.
5. Click **Save**.
### Describe a team
Team pages can display a brief description in the **Team Information** section.
You can use this description to clarify the team's purpose, identify the people
responsible for managing it, or provide general information or context to the team's
activities.
You can also add links to URLs, whether within or external to Cortex XCOR,
to the **Team Information** section.
To access a team's information:
1. In the navigation menu, click ** Go to admin view** and then select
**Platform > Teams**.
2. [Select the team](/administer/accounts-teams#view-accounts-and-teams) to manage.
3. In the **Team Information** section, click ** Edit**.
To add, edit, or remove a team's description:
1. Enter the team description in the **Description** field.
2. Click **Save**.
To add links to a team's information:
1. In the **Team Links** section, click ** Add**. This
adds a row of fields to the section.
2. Enter the link text in the **Link Name** field.
3. Enter the link target in the **URL** field.
4. Repeat these steps to add more links.
5. Click **Save**.
To edit a team's links:
1. In the **Team Links** section, modify the link's **Link Name** and **URL** fields.
2. Click **Save**.
To remove links from a team's information:
1. In the **Team Links** section, click the delete
button in the rows of the links you want to delete.
2. Click **Save**.
### Delete a team
Use one of the following methods to delete a team. The **Default** team can't be
deleted.
> [tab] Web
>
> To delete a team:
>
> 1. In the navigation menu, click ** Go to admin view** and
> then select **Platform > Teams**.
> 2. [Select the team](/administer/accounts-teams#view-accounts-and-teams) to delete.
> 3. In the **Team Information** section, click ** Edit**.
> 4. Click **Delete team**.
> 5. In the confirmation dialog that appears, click **Delete**.
> [tab] Chronoctl
>
> To delete teams with [Chronoctl](/tooling/chronoctl), use the `chronoctl teams delete`
> command:
>
> ```shell /SLUG/ theme={null}
> chronoctl teams delete SLUG
> ```
>
> Replace *`SLUG`* with the unique slug of the team you want to delete.
>
> For example, to delete the team with the slug `dbas`, run:
>
> ```shell theme={null}
> chronoctl teams delete dbas
> ```
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteTeam`](/tooling/api-info/definition/operations/DeleteTeam) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# User accounts
Source: https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/user-accounts
Palo Alto Networks Cortex XCOR lets you manage user access by handling account creation, modification, and role assignments.
A *user account* represents a user's identity in Palo Alto Networks Cortex XCOR.
Accounts can belong to [*teams*](/administer/accounts-teams/teams), which group
and distribute permissions to its members.
## Grant System Administrator (`SysAdmin`) privileges to users
You can grant permissions to teams, which then confer those permissions to its users.
A user account that's a member of a team with the `SysAdmin` role has administrative
access to Cortex XCOR features. This includes the abilities to create teams
and user accounts, assign users to teams, and define team permissions.
For instructions about assigning roles to a team, see
[Add a role to a team](/administer/accounts-teams/teams#add-a-role-to-a-team).
## Authenticating as a user
To [authenticate](/overview/authenticating) with Cortex XCOR, a user
typically signs in interactively with their user account.
A user account can also use a temporary
[personal access token](/administer/accounts-teams/personal-access-tokens)
for non-interactive authentication, such as with tools like Chronoctl or for clients
that interact with the Cortex XCOR API.
Cortex XCOR attributes all actions that a user takes to their user
account.
> [!NOTE]
>
> User accounts are distinct from *service accounts*, which provide identities for
> services and allow administrators to define what each service can access. Service
> accounts authenticate non-interactively using a unique API token permanently associated
> with each account.
>
> For details, refer to [Service accounts](/administer/accounts-teams/service-accounts).
## View accounts
You can view accounts in the navigation menu, or by using Chronoctl.
In the navigation menu, click ** Go to admin view** and then select
**Platform > Users**.
For details, see
[Accounts and teams](/administer/accounts-teams#view-accounts-and-teams).
## Add a user account
> [!NOTE]
>
> To add user accounts, you must use an account that belongs to a team with the
> `SysAdmin` role.
>
> This process applies only to accounts *without* single sign-on enabled. For details,
> see [Authenticating with Cortex XCOR](/overview/authenticating).
To add a user account, you must have administrative privileges:
1. In the navigation menu, click ** Go to admin view** and then select
**Platform > Users**.
2. Click ** Add user**.
3. Enter the user's email address into the field.
4. Click **Invite User**.
5. Optional: Add the user to a [team](/administer/accounts-teams/teams). Users
without an assigned team receive viewer permissions.
Cortex XCOR sends an invitation email to the address containing a link to
verify and access the user account.
After the user accepts the invitation, they must verify their account, at which point
the user's email address appears in the list of accounts with a green checkmark.
## Delete a user account
To remove a user account from Cortex XCOR:
1. If your environment uses a single sign-on (SSO) provider, remove the user account
from the identity provider (IdP) permission group to prevent the user from signing
in to Cortex XCOR.
2. To remove the user account from display in Cortex XCOR itself, create a
ticket with Cortex XCOR Support and request to have the user account deleted.
### Users of Okta with SCIM
If you're using Okta and have SCIM integrated with the Cortex XCOR
connection, removing the user from access in the IdP deprovisions and removes the
user from Cortex XCOR.
### Service accounts
> [!WARNING]
>
> Ensure a service account isn't being used before you delete it. Service account
> tokens are used by critical components of Cortex XCOR (including the
> Chronosphere Collector), and incorrectly deleting a service account can significantly
> impact your environment.
Deleted user accounts with access to a service account token can continue to access
Cortex XCOR when using tools like Chronoctl and Terraform. To avoid access
by these accounts, delete any service accounts created by deleted user accounts. To
find these accounts, in the navigation menu, click
** Go to admin view** and then select
**Platform > Service Accounts**
and review the **Created By** column.
# Audit logs
Source: https://docs-xcor.paloaltonetworks.com/administer/audit-logs
View recent system and user actions in the Audit Log, including event details and the accounts and apps that generated them.
To view recent system and user actions, view the Audit Log, which is available
to users with administrative privileges. In the navigation menu, click
** Go to admin view** and then select
**Platform > Audit logs**.
Click one of the listed actions or events to view its details, including the
following:
* Description of the event.
* Date and time of the event.
* Service account ID of the user who performed the event.
* App that generated the event.
* App method that generated the event
* Method resource that generated the event.
* Full JSON payload of the event.
# Collections
Source: https://docs-xcor.paloaltonetworks.com/administer/collections
Learn how collections group dashboards, monitors, and other resources so a team can manage a service at scale.
A *collection* is a group of Palo Alto Networks Cortex XCOR resources, such as
[dashboards](/observe/dashboards) and [monitors](/investigate/alerts/monitors), associated with a
service or feature you want to monitor.
A [*team*](/administer/accounts-teams/teams), consisting of
[*user accounts*](/administer/accounts-teams/user-accounts) and
[*service accounts*](/administer/accounts-teams/service-accounts) that share
responsibility for the service or feature, is also responsible for each collection.
Collections help service and feature owners manage their services at scale and
streamline incident response by consolidating all relevant information about a
service or feature into one place, and sharing access to that information with
everyone in its responsible team.
For example, to ensure that your team and on-call engineers all have full context for
a service, you can create a collection for it that provides direct access to its
monitors, dashboards, and the team members who can respond to incidents.
Cortex XCOR then provides a menu of a team's collections to its members
who can quickly review resources most relevant to their services, and a homepage for
the collection that the team can share with on-call engineers or other stakeholders.
## View collections
> [tab] Web
>
> To search for a collection:
>
> 1. Click the search bar to focus on it, or use the keyboard shortcut
> `Control+K` (`Command+K` on macOS).
> 1. Begin typing any part of the collection's name.
> 2. Optional: Click the filters for all other listed resource types at the top of
> the search results to remove them and display only collections.
> 3. Click the search result you're interested in, or use the arrow keys to select
> it and press `Enter` (`Return` on macOS), to select that
> collection.
>
> An *unowned collection* is a collection that isn't assigned to a team. Unowned
> collections often originate from *buckets*, an earlier container for organizing
> resources that Cortex XCOR automatically converted to unowned
> collections. To resolve an unowned collection,
> [assign it to a team](#edit-a-collection).
>
> To browse collections in a filterable table:
>
> 1. In the navigation menu, click ** Go to admin view** and
> then select
> **Platform > Collections**.
> Clicking a collection or team in this table takes you to their respective
> homepages.
>
> * To filter this table by keyword, click **Search collections** and begin typing.
> The table automatically updates to display only the matching collections.
> * To filter this list by teams, select them in the **Select a Team** dropdown.
> * To display only collections that lack an owner, enable the **Unowned Collections Only**
> toggle.
>
> You can optionally select collections by checking the checkbox on each collection's
> row, which reveals an **Edit Team Association** button. Clicking this button allows
> you to select a parent team for all selected collections. If you select a team,
> click **Save** to save the edited association. For more Collection editing features,
> see [Edit a Collection](#edit-a-collection).
> [tab] Chronoctl
>
> To view a list of all collections using [Chronoctl](/tooling/chronoctl), use the
> `collections list` command:
>
> ```shell theme={null}
> chronoctl collections list
> ```
>
> This returns a list of YAML documents separated by three dashes (`---`), each
> representing a collection:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Collection
> spec:
> slug: example-collection
> name: Example Collection
> team_slug: example-team
> description: Example Team - Example Collection
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListCollections`](/tooling/api-info/definition/operations/ListCollections) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 a collection
You can use Cortex XCOR to create Terraform, Chronoctl, or API
configurations, which you must then apply using the respective application.
Collections use a `slug` as an identifier. [Services](/observe/services) also use a
`slug`. Collection and service slugs can have the same value.
> [tab] Web
>
> To create a collection, you must have administrative privileges.
>
> 1. In the navigation menu, click ** Go to admin view**
> and then click
> **Platform > Collections**.
> 2. Click **Create collection**.
> 3. In the dialog that appears, enter a descriptive name in the **Collection Name**
> field. Cortex XCOR displays this name anywhere that it refers to this
> collection.
> 4. Optional: Click the **Parent team** dropdown and select a team to which
> you're associating this collection. If the dropdown doesn't contain any teams,
> you can create one.
> 5. Optional: Enter a description in the **Collection Description** field.
> Cortex XCOR displays this description when you view this collection's
> homepage.
> 6. Click **Save**.
> [tab] Chronoctl
>
> To create a collection using [Chronoctl](/tooling/chronoctl), apply a `Collection` resource.
> The resource contains these fields:
>
> | Field | Type | Description |
> | - | - | - |
> | `name` | String | The collection name as displayed in Cortex XCOR. |
> | `slug` | String | Optional: A unique identifier that Cortex XCOR uses to identify the collection. If omitted, Cortex XCOR generates a slug. |
> | `team_slug` | String | Optional: The slug of the team with which you're associating with this collection. |
> | `description` | String | A description displayed when viewing this collection. |
> | `notification_policy_slug` | String | The slug of a notification policy that you're associating with this collection. |
>
> For example, this resource creates a new collection named `DBAs` with the slug
> `dbas-collection` and associated with `dbas-team`:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Collection
> spec:
> slug: dbas-collection
> name: DBAs
> team_slug: dbas-team
> description: Collection of database-related resources.
> notification_policy_slug: dbas-policy
> ```
>
> To create the collection:
>
> 1. Save the `Collection` resource definition to a file, such as `collection.yaml`.
>
> 2. Test the changes with a dry run:
>
> ```shell theme={null}
> chronoctl collections create -f collection.yaml -d
> ```
>
> 3. Apply the changes:
>
> ```shell theme={null}
> chronoctl collections create -f collection.yaml
> ```
> [tab] Terraform
>
> To create a collection using [Terraform](/tooling/infrastructure/terraform), use
> the `chronosphere_collection` resource type.
>
> | Field | Type | Description |
> | - | - | - |
> | `name` | String | The collection name as displayed in Cortex XCOR. |
> | `slug` | String | Optional: A unique identifier that Cortex XCOR uses to identify the collection. If omitted, Cortex XCOR generates a slug. |
> | `team_id` | String | Optional: The identifier of the team with which you're associating with this collection. |
> | `description` | String | A description displayed when viewing this collection. |
> | `notification_policy_id` | String | Optional: The identifier of a notification policy that you're associating with this collection. |
>
> For example, this resource creates a new collection that Terraform refers to as
> `databases`, names it `Databases` in Cortex XCOR, provides a description, associates
> the collection with a notification policy, and assigns the collection to the team `dbas`:
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_collection" "infra" {
> name = "Databases"
> team_id = chronosphere_team.dbas.id
> description = "Collection of resources related to database services."
> notification_policy_id = chronosphere_notification_policy.np.id
> }
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateCollection`](/tooling/api-info/definition/operations/CreateCollection) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Edit a collection
> [tab] Web
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To edit a collection, you must have administrative privileges.
>
> 1. In the navigation menu, click ** Go to admin view** and
> then select
> **Platform > Collections**.
> 2. Click the name of the collection you want to modify.
> 3. In the **Collection information** section, click
** Edit**.
> 4. In the dialog that appears, edit the collection based on your needs.
> 5. Click **Save**.
>
> You can optionally select collections by checking the checkbox on each collection's
> row, which reveals an **Edit Team Association** button. Clicking this button allows
> you to select a parent team for all selected collections. If you select a team,
> click **Save** to save the edited association. For more Collection editing features,
> see [Edit a Collection](#edit-a-collection).
> [tab] Chronoctl
>
> To edit a collection using [Chronoctl](/tooling/chronoctl), modify
> an existing `Collection` resource, then apply the change.
>
> To view `Collection` resources as Chronoctl YAML, see
> [View collections](#view-collections).
>
> 1. Copy the `Collection` resource for the collection you want to edit.
>
> 2. Save the collection to a file, such as `collection.yml`.
>
> 3. Modify the collection's fields. For details, see [Create a collection](#create-a-collection).
>
> 4. Test the changes with a dry run:
>
> ```shell theme={null}
> chronoctl collections create -f collection.yaml -d
> ```
>
> 5. Apply the changes:
>
> ```shell theme={null}
> chronoctl collections create -f collection.yaml
> ```
> [tab] Terraform
>
> To edit a collection using [Terraform](/tooling/infrastructure/terraform), modify
> its resource and apply it using Terraform.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateCollection`](/tooling/api-info/definition/operations/UpdateCollection) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 a collection
> [!WARNING]
>
> Before you delete a collection, you must first remove all of its monitors and dashboards.
> You can do this by either deleting them or moving them to other collections.
> [tab] Web
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To delete a collection, you must have administrative privileges.
>
> 1. In the navigation menu, click ** Go to admin view** and
> then select
> **Platform > Collections**.
> 2. Click the name of the collection you want to delete.
> 3. In the **Collection information** section, click
** Edit**.
> 4. In the dialog that appears, click **Delete collection**.
> [tab] Chronoctl
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To delete a collection using [Chronoctl](/tooling/chronoctl), use
> the `collections delete` command:
>
> ```shell /SLUG/ theme={null}
> chronoctl collections delete SLUG
> ```
>
> Replace *`SLUG`* with the slug for the collection you want to delete.
>
> For example, to delete a collection with the slug `dbas-collection`, run:
>
> ```shell theme={null}
> chronoctl collections delete dbas-collection
> ```
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteCollection`](/tooling/api-info/definition/operations/DeleteCollection) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Team and collection home pages
Source: https://docs-xcor.paloaltonetworks.com/administer/collections/home
View team and collection home pages to see associated monitors, alert statuses, dashboards, and context.
Each [*team*](/administer/accounts-teams/teams) and
[*collection*](/administer/collections) provides a *home*
page that lists its associated resources.
These pages provide an overview of alerting [monitors](/investigate/alerts/monitors)
and their statuses, links to associated [dashboards](/observe/dashboards),
and additional context about the team or collection.
## View a home page
To go to a team's or collection's home page:
1. In the navigation menu, click ** Go to admin view**, and then select
**Platform > Collections** or
**Platform > Teams**.
2. Click a team or collection name to view its home page.
You can also open a team or collection home page from [global search](/navigate/search).
### Alerting monitors
The **Monitors** section includes a table that lists any
[monitors](/investigate/alerts/monitors) associated with this team or
collection that are reporting alerts. The table's columns provide pertinent details
and links to each monitor:
* **Status:** The table lists any monitors associated with the team or collection
that have active alerts, sorted by descending severity from
critical to
warning levels.
Monitors not reporting alerts, including fully muted monitors, aren't listed here.
To view all monitors associated with this team or collection, click the section's
**View all monitors** link.
* **Name:** Each alerting monitor's name is a link to its **Monitor Info** view.
* **Alerting For:** This indicates the duration since the monitor triggered the
alert.
* **Notification Policy:** When viewing a collection, each alerting monitor links to
its [notification policy](/investigate/alerts/notifications/policies).
* **Collection:** When viewing a team, each alerting monitor links to its associated
collection home page.
#### Create a monitor
To create a monitor from a team's or collection's homepage, click the **+ Add**
button in the homepage's Monitors section. This opens the **Add Monitor** panel.
For more information, see
[Create a monitor](/investigate/alerts/monitors#create-a-monitor).
### Dashboards
The **Dashboards** section links to the first 10 dashboards associated with this
team or collection in alphabetical order. To view all associated dashboards, click
**View all dashboards**.
Team home pages exclusively show links to each dashboard's associated collection.
#### Create a dashboard
To create a dashboard from a team's or collection's homepage, click the **+ Add**
button in the homepage's Dashboards section. This opens the **Add Dashboard** modal.
For more information, see
[Create a dashboard](/observe/dashboards#create-a-new-dashboard).
### Notebooks
The **Notebooks** section lists [notebooks](/navigate/notebooks) owned by the
collection. Each row shows the notebook **Name** and **Date modified**, and each name
links to the notebook in a full-screen view. When the collection has no notebooks yet,
the section explains that the collection doesn't have any notebooks.
To open the [notebooks list](/navigate/notebooks#view-the-notebooks-list), click **View all**.
The list includes every notebook you can access, not only notebooks for this collection.
For search and visibility steps on that list, see
[Notebooks on a collection home page](/navigate/notebooks#notebooks-on-a-collection-home-page).
To assign an existing notebook to this collection, open the notebook in a full-screen
view, switch to **Editing** mode if needed, click ** Notebook
settings**, and select the collection under **Collection**. See
[Notebook ownership and sharing](/navigate/notebooks#notebook-ownership-and-sharing).
### Manage connected resources
You can connect collections to monitors and dashboards which are owned by another
collection or service.
To connect a monitor or dashboard to a service from a collection's home page:
1. Next to **Monitors** or **Dashboards**, click **Manage**.
2. Select **Connections**.
3. Add or remove a
[connected resource](/observe/services/extending-services#view-connected-resources).
### Collections
Team home pages have a **Collections** section that links to each collection
associated with the team, and includes text from the collection's description if
available.
#### Create a collection
To create a collection from a team's homepage, click the **+ Add** button in the
homepage's Collections section. This opens the **Add Collection** modal. For more
information, see
[Create a collection](/administer/collections#create-a-collection).
### Notification policies
Team home pages have a **Notification Policies** section that links to each
notification policy associated with the team.
### Links
The **Links** section contains links added to a team or collection home. These links
can point to any `http` or `https` URL.
### Description
Teams and collections can have a text description that's displayed in the
**Description** section of their home pages. This description can also appear in
other lists that include teams or collections, or when listing them in
[Chronoctl](/tooling/chronoctl).
### Team members
A team's home page also lists all team members sorted by their
[account's](/administer/accounts-teams) email address. The list
indicates accounts with administrative access by listing **Admin** with their email
address. Service accounts have an email address consisting of its
slug followed by `@serviceaccount.chronosphere.io`.
## Edit a home page
Each home page generates its content based on its team's or collection's associations
with other resources. To update those associations, see the documentation for those
resources.
### Teams
To edit a team's name, description, or membership, see [Teams](/administer/accounts-teams/teams).
Editing these details requires
[administrative access](/administer/accounts-teams/user-accounts#grant-system-administrator-sysadmin-privileges-to-users).
### Collections
To edit a collection's name, description, or team association, see
[Collections](/administer/collections).
> [!NOTE]
>
> Although you can click the ** Edit Collection** button in a collection's
> home page and view its name and description, you must use Terraform to update these
> details.
### Links
To add links to the **Links** section:
1. Go to the team's or collection's home page.
2. Click ** Edit Team** or
** Edit Collection**.
3. Under **Team Links** or **Collection Links**, click **+ Add**.
4. Enter a **Link Name** and **URL**.
5. Click **Save**.
To remove links from the **Links** section:
1. Go to the team's or collection's home page.
2. Click ** Edit Team** or
** Edit Collection**.
3. Under **Team Links** or **Collection Links**, click **+ Add**.
4. Click the delete button next to the link you want to
delete.
5. Click **Save**.
# Configure Command Center groups
Source: https://docs-xcor.paloaltonetworks.com/administer/command-center-groups
Create and manage the Command Center groups that define the business units shown in the Command Center.
Command Center groups define the business units shown in the
[Command Center](/observe/command-center). Each group appears as a section in the
**Business Observability Overview** panel, listing its SLOs by health state.
A group must have a primary SLO to appear in the Command Center. Related SLOs
appear alongside the primary SLO within the group.
Only tenant admins can create, edit, and delete groups. To open the
**Command Center Groups** page, click **Settings** in the
**Business Observability Overview** panel of the
[Command Center](/observe/command-center).
## Create a group
1. On the **Command Center Groups** page, click **Create group**.
2. In the **Name** field, enter a name for the group.
3. In the **Primary SLO** field, select the SLO that tracks this group's overall
health. A group without a primary SLO won't appear in the Command Center.
4. **Optional:** In the **Related SLOs** field, select additional SLOs to display
alongside the primary SLO in the group.
5. Click **Create**.
## Edit a group
1. On the **Command Center Groups** page, click the edit icon
next to the group.
2. Update the fields as needed.
3. Click **Save**.
## Delete a group
1. On the **Command Center Groups** page, click the delete icon
next to the group.
2. In the confirmation dialog, click **Delete**.
Deleting a group removes it from the Command Center. This action can't be undone.
# Design service level objectives
Source: https://docs-xcor.paloaltonetworks.com/administer/design-slos
Learn about fundamental concepts and best practices when designing service level objectives (SLOs) in Palo Alto Networks Cortex XCOR.
Effective service level objectives (SLOs) can take time and research to create.
Although Palo Alto Networks Cortex XCOR [SLOs](/observe/slo) are built around industry best
practices, you can tailor your SLOs to make them more effective alerting and
observation tools for your individual services.
## Design user-focused indicators
SLOs should measure availability of your services from your users' perspective. Design
your SLOs to identify when services are falling short of your users' needs.
Availability isn't always a binary state of up or down. Define your
service level indicators (SLIs) with your users' experience in mind. Slow responses,
non-blocking errors, or unexpected results can represent a lack of service availability
from your users' perspective, even if your service is technically available and
responsive.
Cortex XCOR SLOs are dynamic and can provide multiple error budgets from
a single query. Leverage these features when designing your indicators to create
low-maintenance SLOs that are also focused on metrics relevant to your users'
experience.
Some services might require tracking multiple SLI definitions, such as tracking
both latency and availability. In such situations, each SLI should have its own
SLO page with its own burn rate and alerting configuration.
## Set a reasonable objective
Although it might seem ideal to set a perfect target of 100% availability as your
objective, SLOs are most effective when they recognize that issues are inevitable.
Instead of aiming for perfection, define your objectives around your users' tolerance
for failures to meet their expectations.
This tolerance is inherently subjective. Beyond minimums set in legal agreements and
SLAs, you can iterate on your SLOs based on user feedback and research, your
development pace, and your ability to absorb risk.
Likewise, the error budgets created by your objectives help you define the amount
of risk you're willing to accept for a given service. This in turn helps you
[plan risky actions](#design-slos-for-risk-management), such as potentially
disruptive deployments, around your users' tolerance for downtime.
If possible, define your objective based on historical performance to ensure your
targets are realistic, and also to minimize on-call burdens on your responders.
## Determine an appropriate unit to measure
* Error ratio objectives help you identify issues with services where you have
a low tolerance for any number of errors.
* Time slice objectives help you identify issues with services where the length
of an incident is more relevant than the total number of errors, and can reduce
the noise of transient or low-impact errors.
Many SLOs measure the ratio of errors to total measurements over a time window.
Cortex XCOR refers to these as *error ratio SLO*. The resulting
percentile provides a straightforward indicator of the measured service's health
over time. Its error budget also refers to the ratio of errors that can be tolerated
over the remaining time window before the objective is breached.
Error ratio SLOs can be valuable when your service has a low tolerance for
errors of any type, regardless of how long they degrade the service's performance.
Since all errors count against the error budget in an error ratio objective, you
can track patterns of error counts over time to identify periodic or intermittent
errors before they degrade your service's availability. Burn rate measurements can
also alert you to spikes in errors at the early stages of an incident.
However, total error counts might not accurately reflect a service's availability.
The amount of time during which the service's performance was degraded can matter
more to end users than the total number of recorded errors. For such services, use
a *time slice SLO*, which instead measures intervals within the time window
to determine how long a service was degraded.
In a time slice SLO, the indicator and error budget refer to the percentage of time
during the time window that the service was available or degraded. Instead of a
certain number of errors triggering an objective's breach, a time slice SLO is breached
when the system is degraded for a percentage of time during the window that exceeds
the objective.
Time slice SLOs use intervals as small as one to five minutes. Choose the interval
based on your service's behavior when degraded and its affects on the service's
users. Since each slice is calculated independently, the objective only needs
to aggregate data for each time slice, instead of across the entire time window,
which can be weeks in length.
Services that can benefit from time slice SLOs might experience relatively uniform
load over the time window, don't have scheduled or expected downtime or outages,
and can safely recover from intermittent errors. However, these traits can mask
occurrences of low-impact and intermittent errors that still occur but fail
to breach the threshold of each time slice. Time slice SLOs can also delay responses
to incidents and burn rate measurements, especially over longer time slice intervals,
since the success or failure of a slice can be determined only when it breaches the
slice's threshold.
## Use template variables to reduce query maintenance
If you write your SLO's query, use [template variables](/investigate/alerts/manage-slos)
to refer to your time window (`{{.Window}}`) or time slice interval (`{{.TimeSlice}}`),
dimensions (`{{.GroupBy}}`), and label filters (`{{.AdditionalFilters}}`). These
variables automatically align your query to SLO changes, and also help facilitate
configuration as code by single-sourcing their definitions.
## Tune time window and burn rate definitions
Cortex XCOR uses opinionated default time windows and multi-window burn
rates, all based on industry best practices.
If you intend to change time window and burn rate definitions, ensure that they
remain realistic and stay mindful of the alerting noise that might result from changes.
When redefining time windows and burn rates, consider the following:
* Prioritize alerts: Ensure that alerts are prioritized by severity so that higher
burn rates trigger more urgent action than long-term trends or slower burn rates.
* Mind services' traffic volume: Services with lower traffic levels might have inconsistent
or spiky error rates that cause false positives. Use windows with longer time
frames and more conservative burn rates to reduce noise in your alerts.
## Design SLOs for rapid response to issues
An SLI measures your service's error rates across a defined time window to determine
whether your service achieves its objective. The SLO also provides tools that help
responders protect your service from breaching its objective.
Burn rates measure your error rates in time windows as small as several minutes,
rather than days or weeks. Burn rates can trigger alerts on the implication that if
a high error rate across a short time span continues unabated, then your SLO will
breach its objective before the end of its time window.
Cortex XCOR defaults provide multiple burn rates. SLOs provide
measurements across multiple windows per burn rate to reduce false positives. By
setting burn rate alerts, your SLO can identify and alert responders when a service
rapidly experiences more errors or downtime than expected. Your responders can
then intervene long before the error budget is exhausted.
## Design SLOs for risk management
You can also use SLOs in risk management and planning. Error budgets are designed to be
spent, and you can use them to plan upcoming deployments that you know might deplete
them.
For example, downtime from planned deployments and maintenance activities are part
of your error budget, and burn rate alerting can help you identify and react when
such planned actions have unexpected user-facing results.
Consider your error budget separately from your SLO objective. If you set a 99%
objective, consider your 1% error budget as its own amount of capacity that you
can spend on risky deployment or maintenance actions. Burn rates measure consumption
of your error budget rather than your total objective because they extrapolate how
much capacity you can sacrifice before your service breaches its objective.
Burn rate alerts help responders react to issues as they happen, and also help identify
how much downtime your users can tolerate for the rest of your time window.
An incident with a high burn rate leaves less error budget for the rest of your time
window, which affects how you allocate the remainder. Conversely, reducing the
downtime of risky actions gives you more budget to work with for more frequent
or riskier actions within your time window.
Use burn rate alerts to also alert stakeholders who determine deployment schedules,
and use visualizations in an SLO's page to find historical context when planning
deployments for future time windows.
## Create effective SLO alerts
For managing and responding to degraded service performance and outages, SLOs provide
significant benefits compared to other alerting practices:
* User-centric measurement: SLOs focus on visualizing and reporting on symptoms
rather than causes, which concentrates coverage on issues actively affecting your
services and reduces false positives.
* Standardized operational practices: The standardized features and presentation
of SLOs facilitate normalized alerts, dashboards, and operational reviews across
your organization to improve consistency in team transitions and on-call rotations.
* Data-driven decision making: By measuring error budgets against availability targets,
SLOs provide objective data toward balancing investments in a service's reliability
against new feature development. This allows for more consistent risk management
while you iterate on the service's implementation.
When you [define your SLO](/investigate/alerts/manage-slos#define-an-slo), use the **SLO** tab in
the **SLO preview** drawer to simulate alerts. This tab uses real data to project
where your SLO would have triggered alerts, and you can update those simulations
after tuning your objective and burn rates.
### Avoid high-impact alerts on new SLOs
New SLOs often require some iteration and tuning to become effective alerting tools.
The best-designed objectives and alerts can still result in alerts triggering too quickly
or too often.
For new SLOs, create alerts with a trial period of a few weeks. Use lower-impact
notification policies during this period to avoid recurring alerts, and use this period
to tune your SLO's objective, burn rates, and alerting settings.
After you've ensured that the SLO alerts your responders only when necessary,
switch your SLO to a higher-impact notification policy.
## Use SLOs with other Cortex XCOR features
In addition to alerts, Cortex XCOR SLO integrate with other features
that help you identify, analyze, and investigate issues.
* Use
[Differential Diagnosis (DDx) for metrics](/investigate/analyze/differential-diagnosis/metrics)
from SLO visualization panels to help identify the source of spikes or other unusual
shapes.
* Connect SLOs to [services](/observe/services), which includes the SLO's
status with other monitors when depicting the service's health. This can draw
responders' attention to SLOs when viewing a [service page](/observe/services/service-pages).
## Further reading
SLOs are a complex subject, and resources from across the observability industry
can help you better understand them and improve your SLO designs.
* [SRE Fundamentals: SLA versus SLO versus SLI](https://chronosphere.io/learn/know-the-sre-fundamentals-differences-between-sli-vs-slo-vs-sla/)
in Cortex XCOR Resource Center provides a high-level overview of SLO components,
purpose, and terminology.
* [The Art of SLOs](https://sre.google/resources/practices-and-processes/art-of-slos/)
workshop by Google's SRE team provides a theoretical basis and practical hands-on
examples of effective indicators and objectives.
# Licensing and system limits
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing
Learn about licensing and system limits and how they differ.
Palo Alto Networks Cortex XCOR enforces two categories of limits that govern
how telemetry data flows through the system: license limits and system limits.
To stay within defined limits, [control your telemetry data](/control) to manage data
volume.
## License limits
License limits are defined in your contract and track telemetry usage against your
purchased capacity. Licensing applies across metrics, traces, logs, and change
events, and is measured by using dimensions such as persisted writes, matched writes,
and persisted cardinality. Organizations that purchase credits can spend a single
pool of capacity across any telemetry type.
Track consumption against your budgets using the
[License Overview](/administer/limits-licensing/licensing), which surfaces snapshot
and trend views per telemetry type. Refer to these pages for terminology about
licensing in Cortex XCOR:
* [Concepts](/administer/limits-licensing/concepts) describe licensing concepts
across telemetry types.
* [Definitions](/administer/limits-licensing/definitions) provide formal definitions
of units like credits, persistence, and resolution.
## System limits
System limits are technical constraints that protect Cortex XCOR from
instability caused by abnormal traffic patterns. For organizations that use
consumption pricing, consumption system limits restrict rapid
increases in metrics, logs, and traces volume. View the thresholds, utilization,
and dropped data for your tenant in the
[Consumption System Limits dashboard](/observe/dashboards/managed-dashboards#consumption-system-limits).
Consumption system limits apply separately from contract credit consumption and
customer-configured budgets. Contact [Cortex XCOR Support](/support) to request an
adjustment to these limits.
Cortex XCOR also applies data validation, ingestion, and query
protections for each telemetry type. See
[system limits](/administer/limits-licensing/limits) for details.
# Licensing concepts
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/concepts
Learn about telemetry data licensing concepts and usage in Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR supports two pricing models: consumption and
capacity. Your contract with Palo Alto Networks determines which model applies to your
tenant. Each model has its own set of licensing concepts that govern how usage is
measured, reported, and controlled.
## Consumption pricing
In the consumption model, your organization purchases a pool of
[credits](/administer/limits-licensing/licensing#credits-consumption) over a defined
contract period and spends them across any telemetry type. Usage is measured in
volume-based units such as persisted series, data points, and bytes, each with a
per-unit credit price.
The consumption model provides flexibility to shift spend between metrics, logs, and
traces as operational needs change. To protect against overspending, configure
[budgets](/control/consumption/budgeting) with thresholds that alert or drop data
before credit exhaustion.
For the full list of consumption licensing concepts and how each unit is counted, see
[Consumption licensing](/administer/limits-licensing/concepts/consumption-licensing).
## Capacity pricing
In the capacity model, your organization contracts for fixed rate limits measured in
data points per second (DPPS) and active time series cardinality. Exceeding these
limits incurs penalties that can result in dropped data.
Capacity limits are enforced across three dimensions: persisted writes, matched
writes, and persisted cardinality. To control which data drops first when limits are
reached, configure [quotas](/control/shaping/shape-metrics/quotas) and split total
system capacity into per-pool allocations.
For the full list of capacity licensing concepts, metrics, and limit management
strategies, see
[Capacity licensing](/administer/limits-licensing/concepts/capacity-licensing).
# Capacity licensing concepts
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/concepts/capacity-licensing
Learn about metrics licensing concepts and usage in Palo Alto Networks Cortex XCOR in a capacity licensing model.
In a capacity model, [quotas](/control/shaping/shape-metrics/quotas) determine which
data drops first. You can split the total system-persisted writes per second into
per-pool quota allocations.
In a capacity model, Palo Alto Networks Cortex XCOR defines two types of metric licenses: the
**Standard Metrics License** and **Histogram Metrics License**.
## Standard Metrics License
The Standard Metrics License measures aggregations, persisted writes, and persisted
cardinality license consumption for the following Cortex XCOR metric
types:
* Cumulative counter
* Delta counter
* Gauge
> [!NOTE]
>
> Because Cortex XCOR aggregates and persists legacy Prometheus histograms
> and OpenTelemetry explicit bucket layout histograms as cumulative or delta counters,
> these metrics consume Standard Metrics License capacity.
## Histogram Metrics License
The Cortex XCOR histogram metric type supports both OpenTelemetry
exponential histograms and Prometheus native histograms.
The Histogram Metrics License measures aggregations, persisted writes, and persisted
cardinality license consumption for the following Cortex XCOR metric
types:
* Cumulative exponential histogram
* Delta exponential histogram
Use the **Trends** tab of the
[**License Overview**](/administer/limits-licensing/licensing)
page to observe histogram persisted writes, matched writes, and persisted cardinality
in the **Metrics consumption trends** graph.
## Capacity license metrics
The following metrics apply in a capacity licensing model.
### Matched writes
*Matched writes* are the number of writes per second being matched for transformation
and reshaping by the Cortex XCOR aggregation tier.
A matched write is counted for each data point matched into each aggregator rule,
whether [rollup](/control/shaping/shape-metrics/rules/rollup) or
[downsampling](/control/shaping/shape-metrics#downsample-data). If a data point matches one rule,
that's one matched write. If a data point matches two rules, that's two matched
writes. The sum of the matched data points per second per rule equals the total
matched writes. [Recording rules](/control/shaping/shape-metrics/rules/recording)
aren't considered an aggregation rule for the purpose of counting matched writes.
Writes also depend on your
[Collector scrape interval](/ingest/metrics-traces/collector/discover/scrape-configuration#global-scrape-configuration).
Increasing the scrape interval produces fewer writes, but can reduce visibility.
See your current **Matched Writes** level in the
[**License Overview**](/administer/limits-licensing/licensing) **Snapshot** in the
**Metrics Consumption** section. On the **Trends** page, review usage over time in
the **Metrics Consumption Trends** graph.
#### Matched writes metrics
The following metrics apply to [matched writes](#matched-writes), which are the
number of writes per second being matched for transformation and reshaping by the
Cortex XCOR aggregation tier.
| Metric name | Description |
| - | - |
| `chrono_metrics_matched_writes_license_dpps_limit` | License limit for matched write DPPS by datapoint type. |
| `chrono_metrics_matched_writes_license_dpps_capacity` | Capacity limit for matched write DPPS by datapoint type. |
| `chrono_metrics_matched_writes_license_dpps_consumed` | Consumption rate in DPPS of matched write license by datapoint type. |
Query the following metric to understand if data is actively being dropped:
```text theme={null}
chrono_metrics_matched_license_dpps_dropped
```
### Persisted writes
The number of persisted writes to the Cortex XCOR database consists of the
following:
```text theme={null}
(Number of unaggregated, raw data points written to the database)
+ (Number of aggregated data points written to the database)
```
If you exceed 100% of your persisted writes capacity limit, data points will be
dropped before being persisted.
To improve and enhance performance, stability, and features, Cortex XCOR
adds a small number of additional time series to your database. These data points
aren't counted against your license.
You can review your current usage in the **Persisted writes** graph on the
[**License Overview**](/administer/limits-licensing/licensing) **Snapshot** page, in the
**Metrics consumption** section. To see changes over time, select **Trends**, and
review the **Metrics consumption trends** graph.
#### Persisted writes metrics
The following metrics apply to [persisted writes](#persisted-writes).
| Metric name | Description |
| - | - |
| `chrono_metrics_persisted_writes_license_dpps_limit` | License limit for persisted write DPPS by datapoint type. |
| `chrono_metrics_persisted_writes_license_dpps_capacity` | Capacity limit for persisted write DPPS by datapoint type. |
| `chrono_metrics_persisted_writes_license_dpps_consumed` | Consumption rate in DPPS of persisted write license by datapoint type. |
For each of these metrics, you can query by `datapoint_type`, such as `histogram` or
`standard`. For the `_dpps_capacity` and `_dpps_consumed` metrics, you can
additionally query by `pool_name`, and `priority`.
For example, the following query returns the consumption rate in DPPS of your
persisted write license for `histogram` data points on the `Auth Services` pool.
Because `priority` isn't specified, the query returns a series for each priority:
```text wrap theme={null}
chrono_metrics_persisted_writes_license_dpps_consumed{datapoint_type="histogram", pool_name="Auth Services"}
```
If you wanted to return only high priority histogram data points for the
`Auth Services` pool, specify `priority = "high"` in your query:
```text wrap theme={null}
chrono_metrics_persisted_writes_license_dpps_consumed{datapoint_type="histogram", pool_name="Auth Services", priority="high"}
```
Query the following metric to understand if data is actively being dropped:
```text theme={null}
chrono_metrics_persisted_license_dpps_dropped{limit="persisted_writes"}
```
### Persisted cardinality
[Matched writes](#matched-writes) and [persisted writes](#persisted-writes) measure
the rate of data points per second at any given moment in time. Persisted cardinality operates
differently, because it's a *cumulative* measure that calculates the count of the
unique time series of the persisted writes that Cortex XCOR stores, seen
over the last 2.5 hours. This measure is also known as Active Time Series (ATS).
Persisted cardinality can be influenced by a change in ingested metrics, or you can
use [rollup rules](/control/shaping/shape-metrics/rules/rollup) to downsample and
aggregate metrics before they're stored. Because this measure is cumulative,
reductions in persisted cardinality aren't reflected immediately, as inactive time
series continue counting until they fall outside the 2.5 hour rolling window.
Read more about persisted cardinality limits work and how to manage them:
* [Learn how persisted cardinality limits work](#how-persisted-cardinality-limits-work)
* [Manage persisted cardinality limits](#manage-persisted-cardinality-limits)
* [Avoid persisted cardinality limits](#avoid-persisted-cardinality-limits)
To see persisted cardinality license usage changes over time, in the
[**License Overview**](/administer/limits-licensing/licensing) select **Trends**, and
review the **Metrics consumption trends** graph.
#### Persisted cardinality metrics
The following metrics apply to
[persisted cardinality](/administer/limits-licensing/concepts/capacity-licensing#persisted-cardinality).
| Metric name | Description |
| - | - |
| `chrono_metrics_persisted_cardinality_license_limit` | License limit for active persisted time series cardinality. |
| `chrono_metrics_persisted_cardinality_license_capacity` | Capacity limit for active persisted time series cardinality. |
| `chrono_metrics_persisted_cardinality_license_consumed` | Consumption of the persisted write cardinality limit by datapoint type. |
Query the following metric to understand if data is actively being dropped:
```text theme={null}
chrono_metrics_persisted_license_dpps_dropped{limit="persisted_cardinality"}
```
#### How persisted cardinality limits work
Persisted cardinality is comparable to a leaky bucket. Over time, new series can be
added until the bucket is full. When the bucket is at maximum capacity, there's no
space for new time series, so they're rejected. When existing time series expire,
they make room for new series.
In the following example, the persisted cardinality capacity is five unique time
series. The animated image shows the lifecycle of six, unique time series (A, B, C,
D, E, and F) as new data points are added, and as other data points expire.

As data points are introduced, they're either accepted or rejected based on whether
the persisted cardinality bucket is full (reached maximum capacity), and whether the
related time series already exists in the bucket:
* If the bucket is at maximum capacity and the series already exists, the data point
is accepted.
* If the bucket is at maximum capacity and the series doesn't exist, the series is
rejected.
The following table shows how data points A3, E1, and F1 are processed, based on the
bucket status:
| Data point | Status | Description |
| - | - | - |
| A3 | Accepted | Time series A is in the bucket, so data point A3 is accepted. |
| E1 | Accepted | Time series E isn't in the bucket, but the bucket has space for one more time series, so data point E1 is accepted in time series E. |
| F1 | Rejected | Time series F isn't in the bucket, and the bucket is at capacity, so data point F1 is rejected. |
Over time, data points expire based on when they entered the bucket. When data points
exceed the 2.5 hour window, they're excluded from the persisted cardinality bucket.
In the example, data points A1 and D1 expired, so they're excluded from the bucket.
When data point C1 expires, it's also excluded. Because data point C1 is the last
data point in time series C, the entire series is removed, making space for a new
time series in the bucket.
| Data point | Status | Description |
| - | - | - |
| A1 | Expired | Data point A1 expired, so it's excluded from the bucket. |
| D1 | Expired | Data point A1 expired, so it's excluded from the bucket. |
| C1 | Expired | Data point C1 is expiring, so it's excluded from the bucket. |
#### Manage persisted cardinality limits
If your organization exceeds 100% of their Persisted Cardinality Capacity Limit, data
points for any new time series not seen in the last 2.5 hours will be dropped until
you're under this limit. Data points for existing time series will continue to be
persisted.
Series that are more stable or regularly emitted aren't at risk of being dropped
because they're always in the system, and aren't categorized as new series. For
example, series that don't change any labels are considered more stable.
To fully resolve a penalty period, the rate of new series must be less than the rate
of expiring series. The higher the differential between these rates, the faster the
penalty resolves.
To manage persisted cardinality limits:
* Review the
[Persisted Cardinality Quotas](/observe/dashboards/managed-dashboards#persisted-cardinality-quotas)
dashboard, the
[Usage Dashboard](/observe/dashboards/managed-dashboards#usage-dashboard)
and the
[Metric Growth](/observe/dashboards/managed-dashboards#metric-growth)
dashboard to understand the source of cardinality growth.
* Create [drop rules](/control/shaping/shape-metrics/rules/drop-rules) and
[aggregation rules](/control/shaping/shape-metrics/rules) like mapping rules and rollup rules to
roll away sources of growth. Old series remain in the cardinality window for 2.5
hrs.
* Use the
[Recommendations](/control/shaping/shape-metrics/reduce-cardinality/recommendations)
page to help identify metrics and labels with no usage or utility over the past 30
days. You can then create drop rules and rollup rules based on the recommendations.
The 2.5 hour expiration window is a rolling window, which means the constant rate of
expiring series makes room for an equal rate of new series to be added. This behavior
means the penalty period you experience can be much shorter than 2.5 hours.
Queries with time ranges that overlap with penalty periods can produce inconsistent
or partial results due to the dropping of time series during those periods.
#### Avoid persisted cardinality limits
Create [thresholds](/control/consumption/budgeting) on budgets to help manage both
anomalous spikes in data and slow data growth over time. Configure actions on each
threshold. Fixed-volume drop thresholds discard all matching data after the limit is
exhausted until the window resets.
Use the following tools and techniques to avoid hitting persisted cardinality limits:
* Review the
[Persisted Cardinality Quotas](/observe/dashboards/managed-dashboards#persisted-cardinality-quotas)
dashboard, the
[Usage Dashboard](/observe/dashboards/managed-dashboards#usage-dashboard)
and the
[Metric Growth](/observe/dashboards/managed-dashboards#metric-growth)
dashboard to understand the source of cardinality growth.
* Learn about different methods to [reduce cardinality](/control/shaping/shape-metrics/reduce-cardinality).
* Proactively create [drop rules](/control/shaping/shape-metrics/rules/drop-rules) and
[aggregation rules](/control/shaping/shape-metrics/rules) like mapping rules and rollup rules
ahead of potential overages to evict older time series and make room for new ones.
* Proactively define [thresholds](/control/consumption/budgeting) on budgets to
better manage persisted cardinality.
* If your organization knows which new metrics services are generating, try to
control the rate that new series are introduced through smaller, more incremental
deploys.
## Capacity limits
> [!NOTE]
>
> Capacity limits only apply to capacity pricing. If your organization uses the
> consumption model, see [Manage consumption](/control/consumption).
Capacity limits indicate your maximum license capacity for telemetry data in
Cortex XCOR. Exceeding your capacity limits incurs penalties, which can
result in dropped data. Dropped data can affect dashboards, alerts, and other
reports.
Licensing capacity is based on your telemetry types and usage. The license limit
indicates your contractual license with Cortex XCOR.
The capacity and license limits display in the **Contracts** tab of the
[**License Overview**](/administer/limits-licensing/licensing) page. These limits are
broken down into individual limit graphs:
* **Persisted writes**
* **Matched writes**
* **Persisted cardinality**
* **Histogram persisted writes**
* **Histogram matched writes**
* **Histogram persisted cardinality**
Cortex XCOR recommends creating [alerts](/investigate/alerts) using the existing
capacity limit metrics, which are also used in the
[License Overview](/administer/limits-licensing/licensing). Use
alerts to be notified when you're close to or over 100% of your license limit and
therefore at risk of experiencing drops.
## Legacy licensing metrics
The following table explains metrics that might be present in your environment, but
will be replaced by new metrics. The following metrics replace this table:
* [Persisted writes](#persisted-writes)
* [Persisted cardinality](#persisted-cardinality)
* [Matched writes](#matched-writes)
These metrics create the following tags during
[dashboard creation](/observe/dashboards#create-a-dashboard):
* `chronosphere_service`
| Metric name | [Metric type](/control/shaping/shape-metrics/types) | Description |
| - | - | - |
| `limit_service_cardinality_count` replaced by `chrono_metrics_persisted_cardinality_license_consumed` | Counter | Current cardinality count across all Collectors. |
| `limit_service_licensed_cardinality_limit` replaced by `chrono_metrics_persisted_cardinality_license_limit` | Counter | Current cardinality limit across all Collectors. |
| `limit_service_licensed_persist_limit` replaced by `chrono_metrics_persisted_writes_license_dpps_limit` | Counter | Current limit for data points persisted in the database across all Collectors, as defined in the contract. |
| `limit_service_capacity_limit` | Counter | Current capacity limit for data points persisted in the database across all Collectors, based on grant by Cortex XCOR. |
| `limit_service_persisted_count` replaced by `chrono_metrics_persisted_writes_license_dpps_consumed` | Counter | Total number of data points persisted in database. |
| `limit_service_matched_limit` replaced by `chrono_metrics_matched_writes_license_dpps_limit` | Counter | Current license limit for matched write DPPS by datapoint type. |
| `limit_service_capacity_limit` replaced by `chrono_metrics_matched_writes_license_dpps_capacity` | Counter | Current capacity limit for matched write DPPS by datapoint type. |
| `chronosphere_rule_metrics_matched` replaced by `chrono_metrics_matched_writes_license_dpps_consumed` | Counter | Consumption rate in DPPS of matched write license by datapoint type. |
# Consumption licensing concepts
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/concepts/consumption-licensing
Learn about licensing concepts in Palo Alto Networks Cortex XCOR in a consumption model.
In a [consumption](/control/consumption) model, configure
[budgets](/control/consumption/budgeting) to take action and protect against
overspending. For each budget, define thresholds and priorities to define the actions
to take when a threshold is exceeded, and control the data that gets dropped. You can
then attach budgets to a [partition](/control/consumption/partitions).
The consumption model includes the following concepts, which are volume-based
licensing resources for telemetry data that you can spend
[credits](/administer/limits-licensing/licensing#credits-consumption) on.
## Logging license consumption
Spend credits flexibly across the following log resources in the consumption model:
* Persisted bytes: Log bytes stored in the database.
* Processed bytes: Log bytes matched for transformation and reshaping.
## Tracing license consumption
Spend credits flexibly across the following trace resources in the consumption model.
* Persisted bytes: Trace bytes stored in the database.
* Processed bytes: Trace bytes matched for transformation and reshaping.
## Metrics license consumption
Spend credits flexibly across the following metric resources in the consumption
model.
### Metrics persisted datapoint
A metrics *persisted datapoint* is an individual, timestamped data point that
Palo Alto Networks Cortex XCOR persists to storage. Each persisted data point counts as
exactly one unit, regardless of metric type.
Persisted datapoint pricing varies by effective datapoint resolution (EDR). EDR is
the average time between consecutive persisted data points of a time series, computed
across all persisted series and data points in your tenant.
### Metrics persisted series
A metrics persisted series is a unique time series, defined by a distinct combination
of metric name and labels, that Cortex XCOR persists to
storage.
Unlike [capacity licensing](/administer/limits-licensing/concepts/capacity-licensing#persisted-cardinality),
which counts all active time series within a 2.5-hour rolling window, the consumption
model counts one time for each unique persisted series when first observed.
#### How persisted series counting works
In the consumption model, a persisted series is counted only the first time a unique
time series (a specific combination of metric name and labels) is saved to storage.
The following animated image shows five instances of a service deploying at a
four-minute interval. Each instance produces one unique series, for a total of five
persisted series.
Because each series is counted only once at first observation, the total persisted
series count is five, regardless of how many data points those series produce over
time.

Cortex XCOR uses a 48-hour window to determine whether a series is new. If
a time series continuously receives data points, or reappears within 48 hours of its
last write, it isn't counted again. Only if a series reappears after a gap of more
than 48 hours is it treated as new and incurs a new persisted series charge.
The following example shows an incoming series, followed by gap that exceeds the
48-hour window. Any series after that period is considered a new series, which incurs
a new persisted series charge.

In practice, the vast majority of time series receive data points continuously for
their lifetime and are counted only once. The 48-hour window prevents double-counting
for series with brief gaps, rather than defining what's active at any moment.
#### How the consumption model differs from capacity
In the capacity model, the 2.5-hour window is inclusive: all series seen within the
window count toward the cardinality limit, regardless of whether they're still
actively emitting. Churn inflates the count because both old and new series overlap
in the window.
In the consumption model, the 48-hour window is exclusive: it prevents recently seen
series from being double-counted. A longer window reduces duplicate charges, and 48
hours is long enough that most series are never counted more than once.
This separation means cardinality in the consumption model reflects the actual
number of distinct series persisted, independent of timing effects.
### Combining persisted series and data points
In the consumption model, persisted data points and persisted series form the two
distinct halves of your total persistence cost, acting together to separate
cardinality from volume:
* Persisted series: captures how many unique time series exist. Counted once per
unique series at first observation.
* Persisted data points: captures how much data those series produce over time. Counted
for every data point written to storage.
The previous [animated image](#how-persisted-series-counting-works) contains five
instances. With an effective datapoint resolution (EDR) of 60 seconds, if each series
emits one data point per minute over a four-minute interval, the persisted data
points total 20:
```text theme={null}
five series * four data points per series = 20 persisted data points
```
The persisted series count remains five because each series is counted only once,
while the persisted data points count grows with each data point written.
### Metrics persisted histogram datapoint bucket
A metrics *persisted histogram datapoint bucket* is a bucket within a histogram
data point that Cortex XCOR persists to storage. One persisted histogram
datapoint bucket is incurred for each non-zero bucket within a persisted histogram
datapoint. Only populated bucket positions in the histogram's sparse encoding are
counted.
### Metrics matched datapoint
A metrics *matched datapoint* is a data point matched for aggregation. One matched
data point is incurred for each aggregation rule matched for each datapoint. If a
data point matches one rule, that's one matched datapoint. If a data point matches two
rules, that's two matched data points.
[Recording rules](/control/shaping/shape-metrics/rules/recording) don't count toward
matched data points.
### Metrics matched histogram datapoint bucket
A metrics *matched histogram datapoint bucket* is a bucket within a histogram
data point matched for aggregation. One matched histogram datapoint bucket is incurred
for each non-zero bucket within a matched histogram datapoint, multiplied by the
number of aggregation rules matched.
# License unit definitions
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/definitions
Learn about licensing unit concepts in Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR uses the following definitions for licensing
units across both capacity and consumption models:
* *Control* is the volume of data that undergoes transformation and reshaping.
Control is measured in `GB` for traces, `GB` for logs, and matched writes for
metrics.
* *Long Term Retention* is the number of months Cortex XCOR will retain data at
a negotiated resolution.
* *Persistence* is the volume of data stored following processing by control.
Persistence is measured in `GB` for traces, `GB` for logs, `WPM` for events,
and cardinality and resolution for metrics.
* *Raw Retention* is the number of days Cortex XCOR will retain raw data. For more
information, see [ingestion limits and retention policies](/administer/limits-licensing/licensing#contract-details).
* *Resolution* is the ratio of active time series to persisted writes per second.
* *Time series* is a set of data points with matching labels.
## Consumption definitions
The following definitions apply only to the
[consumption pricing model](/control/consumption) that uses partitions and budgets to
control your telemetry data usage:
* *Credits* are a flexible, fungible unit of currency that you can spend on any
telemetry type without needing to renegotiate your contract. Learn more about
[Credits consumption](/administer/limits-licensing/licensing#credits-consumption)
to understand how credits work in the consumption pricing model.
* *Effective Datapoint Resolution* (EDR) represents the average time interval between
data points for your time series.
* *Metrics Matched Datapoint* is a data point matched for aggregation. One Metrics
Matched Datapoint is incurred for each aggregation rule matched for each data point.
* *Metrics Matched Histogram Datapoint Bucket* is a bucket within a histogram
data point matched for aggregation. One Metrics Matched Histogram Datapoint Bucket
is incurred for each non-zero bucket within a matched histogram data point.
* *Metrics Persisted Datapoint* is an individual, timestamped data point that's
persisted to storage. Metrics Persisted Datapoints pricing varies by Effective
Datapoint Resolution.
* *Metrics Persisted Histogram Datapoint Bucket* is a bucket within a histogram
data point that's persisted to storage. One Metrics Persisted Histogram Datapoint
Bucket is incurred for each non-zero bucket within a persisted histogram data point.
* *Metrics Persisted Series* is a time series, defined as a combination of metric
name and labels, that's persisted to storage. One Metrics Persisted Series is
incurred for a time series if no identical time series have been persisted in the
last 48 hours. Metrics Persisted Series pricing varies by storage retention.
## Capacity definitions
The following definitions apply only to the capacity pricing model that uses
[quotas and pools](/control/shaping/shape-metrics/quotas) to control your telemetry
data usage:
* *Matched Writes* (`mW`) are the number of writes per second being matched for
transformation and reshaping. For more information, see
[matched writes](/administer/limits-licensing/concepts/capacity-licensing#matched-writes).
* *Persisted Cardinality* is the count of unique time series of the
persisted writes stored by Cortex XCOR. For more information, see
[persisted cardinality](/administer/limits-licensing/concepts/capacity-licensing#persisted-cardinality).
* *Persisted Writes Per Minute* (`WPM`) is the total count of individual, timestamped
data points persisted in a one-minute interval. For more information, see
[persisted writes](/administer/limits-licensing/concepts/capacity-licensing#persisted-writes).
* *Persisted Writes Per Second* (`WPS`) is the total count of individual, timestamped
data points persisted in a one-second interval.
# Cortex XCOR licensing
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/licensing
Learn about licensing concepts and retention periods in Palo Alto Networks Cortex XCOR.
To track your telemetry usage against your licensing dimensions, use
**License Overview**. Palo Alto Networks Cortex XCOR provides this overview to monitor data usage
against your licensing dimensions. Use the overview charts to help identify usage
trends across data types and proactively manage data usage to avoid exceeding your
organization's licensing limits.
The **License Overview** is available in your Cortex XCOR tenant. In
the navigation menu, click ** Go to admin view**, and then select
**
License > License Overview**.
The **License Overview** page consists of two main sections,
[**Consumption**](#consumption-tracking) and [**Contract**](#contract-details),
selectable by tab.
## Consumption tracking
The **Consumption** tab captures the current consumption rates across all license
dimensions, compared to your license limits. These statistics display across two
selectable tabs for **Snapshot** and overall **Trends**:
* **Snapshot** is an overview of your current license usage. When selected, this page
displays each licensing statistic as a percentage of your contract limit, along
with a graph for that statistic over a pre-selected time period.
* **Trends** explains how your license usage has changed over the selected time
period, grouped and graphed by telemetry type.
License dimensions currently exceeding capacity highlight in red, and licenses close
to exceeding capacity are orange.
### Metrics consumption
Use the **License Overview** to track metrics consumption against your metrics license
dimensions:
* On the **Snapshot** page, the **Metrics consumption** section displays aspects of
processed, persisted, and matched metrics data, measured in bytes. Panels also
display this information for histogram data. These panels include:
* Current percentage gauges for persisted writes, matched writes, and persisted
cardinality that display consumption versus capacity.
* Seven-day trend lines that plot consumption against capacity so you can spot
trends from week to week.
For most users, the processed and persisted consumption rates are for the current
month. If your organization uses consumption-based pricing, then the processed and
persisted bytes are measured against your contract to date.
* On the **Trends** page, you can view metrics consumption trends in higher resolution.
If your organization uses consumption-based pricing, click the link to view
consumption trends in the [**Consumption**](/control/consumption/analyze) page.
### Tracing consumption
Use the **License Overview** to track trace consumption against your tracing license
dimensions:
* On the **Snapshot** page, the **Traces consumption** section displays aspects of
processed and persisted tracing data, measured in bytes. These include:
* Daily average rates per second
* Month-to-date cumulative trends
For most users, the processed and persisted consumption rates are for the current
month. If your organization uses consumption-based pricing, then the processed and
persisted bytes are measured against your contract to date.
To help control costs and maximize the usefulness of your tracing data, click
**Go to Trace Optimization** to [sample your traces](/control/shaping/sample-traces).
* On the **Trends** page, you can view trace consumption trends in higher resolution.
If your organization uses consumption-based pricing, click the link to view
consumption trends in the [**Consumption**](/control/consumption/analyze) page.
### Logs consumption
Use the **License Overview** page to track log consumption against your logs license
dimensions:
* On the **Snapshot** page, the **Logging consumption** section displays the
following panels and graphs:
* Percentage of persisted writes and processed writes consumed against your full
licensing contract.
* Elapsed time against your full contract. Compare the percentage of persisted
writes and processed writes consumption against the time elapsed to understand
your true consumption rate.
* Daily persisted and processed log data over the past 30 days.
* Cumulative trend of persisted data and processed data against the license limit,
over the life of your licensing contract.
To view log license information, click **Go to Consumption**, which opens the
[Consumption page](/control/consumption).
* On the **Trends** page, you can view log consumption trends in higher resolution.
Trends display for the last seven days by default. The **Persisted** limit displays
the number of logs that can persist per minute in your tenant. If your organization
uses consumption-based pricing, click the link to view consumption trends in the
[**Consumption**](/control/consumption/analyze) page.
### Events consumption
Use the **License Overview** to track events consumption against your change events
license dimensions:
* On the **Snapshot** page, the **Events consumption** graph for **Persisted Capacity**
displays the percentage of events consumed against your events license capacity.
To filter change events by different attributes, click **Go to Changes Explorer**
to open the Changes Explorer page.
* On the **Trends** page, you can view event consumption trends in higher resolution.
The **Persisted capacity** limit displays the number of events that can persist per
minute in your tenant.
This limit is enforced and can incur penalties if exceeded. In certain circumstances,
this limit can exceed the license limit temporarily. The **Capacity limit** displays
the number of events that can persist per minute, as defined by your the license in
your contract with Palo Alto Networks.
The current consumption percentage displays a decimal ratio of persisted data
against your per-minute license limit for the selected time period. This value is
calculated by dividing the persisted events per minute by the number of events that
can persist per minute, defined by the license limit. Use this information to
understand the relationship between your persisted data consumption and the defined
license limit.
### Credits consumption
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Cortex XCOR users and
> might not be visible in your app. For information about enabling this feature in your
> environment, contact [Cortex XCOR Support](/support).
To pay for telemetry data usage across the Cortex XCOR ecosystem, use *credits*.
Credits are a flexible, fungible unit of currency that you can spend on any telemetry
type. Instead of buying separate capacities for metrics, logs, and other telemetry,
you purchase a pool of credits for a defined contract period. Spend those credits
across any product on the platform.
On the **Snapshot** page, the **Credit consumption** section includes:
* **Credit consumption (full contract)**: The percentage of total contracted credits
consumed to date.
* **Elapsed time in contract**: The percentage of the contract period that has elapsed.
Compare this against credit consumption to gauge spend rate.
* **Estimated Credit Runway**: The month and year when the remaining credit balance is
forecast to reach zero, based on the previous 60 days of consumption.
* **Credits cumulative trend**: A stacked line chart of cumulative credit usage by
product over the life of the contract. Forecast lines extend each product's
consumption trend through the contract end, based on the previous 60 days of
consumption.
* **Credit monthly consumption**: A bar chart of credits consumed per month.
> [!NOTE]
>
> The **Credit consumption** section displays for any of your telemetry types that use
> consumption pricing and credits. For any telemetry data that uses capacity pricing,
> or consumption pricing without credits where you purchase bytes, this section doesn't
> display. If a credit contract has expired or is no longer active, a message directs
> you to the [Consumption page](/control/consumption/analyze) instead.
The estimated runway and forecast lines are planning estimates and can vary as
consumption changes. Forecasts require an active contract that covers the full
60-day lookback period and enough recent consumption data. If consumption is too low
to calculate a meaningful runway date, the **Estimated Credit Runway** panel displays
`N/A`.
To view the total number of credits available in your license for the defined
contract period, click the **Contract** tab. The **Credits license** panel group
includes a pricing table that lists the products enabled in your tenant, the
resources included in your license, and the unit price for each resource.
The pricing table lists the following resources, grouped by product:
#### Metrics
| Resource | Unit | Description |
| - | - | - |
| Persisted series | Million time series | A time series, defined as a combination of metric name and labels, persisted to storage. One persisted series is incurred for a time series if no identical time series have been persisted in the last 48 hours. Pricing varies by storage retention. |
| Persisted datapoints | Billion datapoints | An individual, timestamped data point persisted to storage. Pricing varies by effective data point resolution, which is the average time between consecutive persisted data points of a time series. |
| Matched datapoints | Billion datapoints | A data point matched for aggregation. One matched data point is incurred for each aggregation rule matched for each data point. |
| Persisted histogram datapoint buckets | Billion buckets | A bucket within a histogram data point persisted to storage. One persisted histogram data point bucket is incurred for each non-zero bucket within a persisted histogram data point. |
| Matched histogram datapoint buckets | Billion buckets | A bucket within a histogram data point matched for aggregation. One matched histogram data point bucket is incurred for each non-zero bucket within a matched histogram data point. |
#### Logs
| Resource | Unit | Description |
| - | - | - |
| Persisted bytes | Gigabyte | Log bytes stored in the database. |
| Processed bytes | Gigabyte | Log bytes matched for transformation and reshaping. |
#### Traces
| Resource | Unit | Description |
| - | - | - |
| Persisted bytes | Gigabyte | Trace bytes stored in the database. |
| Processed bytes | Gigabyte | Trace bytes matched for transformation and reshaping. |
Because credits are fungible, your organization isn't locked into fixed capacities
for individual features. Spend your credit balance interchangeably across any of the
eligible resources as operational needs change. Usage can scale to accommodate
short-term demand without triggering budget controls unless your organization
configures them to do so.
To delegate spend across teams and ensure maximum value from your credit pool,
[create budgets](/control/consumption/budgeting) within consumption partitions.
Budgets let each team operate within a defined allocation while preserving overall
flexibility.
If your organization completely exhausts all credits before the end of the defined
contract period, further usage incurs additional charges per your contract terms. To
ensure that your organization doesn't spend credits before the end of the contract
period, use the included control capabilities to
[manage consumption](/control/consumption).
To analyze consumption across partitions to detect unwanted spikes and understand
what's driving growth, click **Go to Consumption**, which opens the
[Consumption page](/control/consumption/analyze).
## Contract details
The **Contract** tab is a view of your license limits, which are defined in your
contract with Palo Alto Networks.
This tab displays your licenses by limit type, with graphs for your license versus
your capacity. This page also shows your ingestion limits and retention policies.
*Retention policies* define the amount of time Cortex XCOR retains
telemetry data. Contact [Cortex XCOR Support](/support) to configure the intervals
used for your system. These policies might be based on your contract or license.
*Ingestion limits* define the amount of raw data Cortex XCOR can ingest.
View retention policies for all of your telemetry data in the **Contract** tab of the
**License Overview** page.
# Cortex XCOR system limits
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/limits
Learn about system limits in Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR applies system limits to protect itself from
failures caused by abnormal traffic patterns, such as sudden, unexpected spikes in
data ingestion.
For organizations that use consumption pricing, consumption system
limits restrict rapid increases in metrics, logs, and traces volume. The
[Consumption System Limits dashboard](/observe/dashboards/managed-dashboards#consumption-system-limits)
is the source of truth for the limits enforced in your tenant. Use it to view
thresholds, utilization, and data dropped by system limit enforcement.
Consumption system limits apply separately from contract credit consumption and
user-configured budgets. Contact [Cortex XCOR Support](/support) to request an
adjustment to these limits.
Cortex XCOR also applies data validation, ingestion, and query
protections. Learn more about the protections for the following data types:
* [Events](/administer/limits-licensing/limits/event-limits): Ingest rate caps and
field-level validation for change events.
* [Logs](/administer/limits-licensing/limits/log-limits): Maximum individual log size
and label length constraints.
* [Metrics](/administer/limits-licensing/limits/metric-limits): Label size, label
count, total series byte limits, and late- or future-arriving data windows.
* [Queries](/administer/limits-licensing/limits/query-limits): Per-query scale
protections, browser truncation limits, resource balancing, and automated source
rate limits.
* [Traces](/administer/limits-licensing/limits/trace-limits): Tag size, span timing
validity, trace span count, and per-pod ingest caps.
## Monitor capacity limits
For organizations that use capacity pricing, Cortex XCOR enforces
[license capacity limits](/administer/limits-licensing/concepts/capacity-licensing#capacity-limits)
for telemetry data. Exceeding these limits can put your organization at risk of
dropping data. The type of data that's dropped depends on the limit exceeded.
Exceeding your organization's license capacity limits can cause you to hit the defined
system limits, which shouldn't occur under normal operating circumstances. To prevent
your system from reaching system limits, use the following tools and information to
ensure that your Cortex XCOR tenant remains under your license capacity
limit at all times:
* Use the [License Overview](/administer/limits-licensing/licensing) to track your
telemetry usage against your licensing.
* Review the
[cardinality dashboards](/observe/dashboards/managed-dashboards#cardinality-dashboards)
to identify information you can use to help reduce cardinality.
* Query
[key metrics](/administer/limits-licensing/concepts/capacity-licensing#capacity-limits)
to understand
if Cortex XCOR is actively dropping data.
* Use the provided tools and techniques to
[avoid hitting persisted cardinality limits](/administer/limits-licensing/concepts/capacity-licensing#avoid-persisted-cardinality-limits).
# Change event limits
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/limits/event-limits
Reference the ingest rate, request size, and field limits that apply when creating change events with the CreateEvent API.
In addition to using Palo Alto Networks Cortex XCOR, you can use the
[CreateEvent API](/tooling/api-info/data_definition/operations/CreateEvent)
to create change events. This API can ingest 300 change events per minute, per block
in a single tenant. The total request size must be less than 1 MB.
## Change event fields
The CreateEvent API accepts the following fields with the stated limits:
| Field | Description | Required | Validation | Configurable | Failure |
| - | - | - | - | - | - |
| `title` | Brief description of the change event. | Yes | Maximum of 100 characters. | No | Error |
| `source` | Identifies where the data originated. | Yes | Maximum of 50 characters. | No | Error |
| `category` | Informs Cortex XCOR about the kind of change event. | Yes | Must be one of: `"alerts"` `"broadcasts"` `"chronosphere"` `"deploys"` `"feature_flags"` `"infrastructure"` `"third_party"` | Yes | Error |
| `happened_at` | Indicates when the change event occurred, which defaults to `now` if unset. | No | Must be a Unix epoch timestamp. Can be set only to 24 hours before or after the current time. | Yes, with a restart | Error |
| `type` | Differentiates change events within a particular `category` or `source`. | Yes | Maximum of 50 characters. | No | Error |
| `labels` | Key values associated with a change event. | No | Maximum of 200 labels (key-value pairs) per event. - Keys: Maximum of 500 characters. - Values: Maximum of 5,000 characters. | No | Error |
| `payload_json` | Payload associated with a change event. | No | Maximum of 100,000 characters. | No | - |
| `payload_object` | Payload associated with a change event, if the original event was in key-value format. | No | Maximum of 100,000 characters. | No | - |
# Log limits
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/limits/log-limits
Reference the license, log size, and label length limits that apply to log data in Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR logs have a variety of limits, depending on where your data
is in the
processing cycle.
Your [license](/administer/limits-licensing/licensing) limits the amount of data you
can write to and store within Cortex XCOR.
Logs have the following size limits, which help ensure consistency and prevent
issues with queries:
* Individual logs exceeding 1 MB are dropped.
* Label keys and values exceeding 1,024 characters are truncated to adhere to the 1,024
character limit.
# Metric limits
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/limits/metric-limits
Learn about the limits on metrics data within Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR metrics have a variety of limits, depending on where your
data is in the
processing cycle.
Your [license](/administer/limits-licensing/licensing) limits the amount of data you
can write to and store within Cortex XCOR.
[Metrics quotas](/control/shaping/shape-metrics/quotas) assign specific percentages of your total
persisted writes limit to pools of metrics. Use quotas to limit groups of metrics and
ensure Cortex XCOR retains the highest value metrics.
See [Managing invalid metrics](/investigate/querying/metrics/troubleshooting#managing-invalid-metrics)
for information about debugging invalid metrics.
## Size limits
Metrics have the following size limits, which help ensure consistency and prevent
issues with queries:
* Label names: 512 bytes
* Label values: 1,024 bytes
* Max number of labels: 64 labels
* Total time series bytes: 4,096 bytes
> [!NOTE]
>
> If label values exceed 1,024 bytes, Cortex XCOR shortens the label values
> to accept the time series.
Cortex XCOR shortens label values before validating the total time series
byte length. When label values that exceed the maximum length, Cortex XCOR
hashes the original value, and replaces the middle portion of the label with a hash
value in this format:
```text theme={null}
[Value shortened; Original=(len:1063 XXH64:aaf02cb52ed0a0fe)]
```
This strategy ensures that the original and shortened label values have the same
prefix and suffix. The inserted hash value preserves uniqueness in the shortened
values.
The following example shows a metric with a long label value.
> [accordion] Example metric with a long label value
>
> ```text lines theme={null}
> # HELP application_exceptions_total Total count of application-level exceptions.
> # TYPE application_exceptions_total counter
> application_exceptions_total{exception="JDBCConnectionException",error_detail="org.hibernate.exception.
> JDBCConnectionException: Error calling Driver#connect at org.hibernate.exception.internal.
> SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) at org.hibernate.exception.
> internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
> at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.convertSqlException(BasicConnectionCreator.
> java:111) at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection
> (DriverConnectionCreator.java:38) at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.
> createConnection(BasicConnectionCreator.java:58) at org.hibernate.engine.jdbc.connections.internal.
> DriverManagerConnectionProviderImpl$CheckConnectionTask.run(DriverManagerConnectionProviderImpl.java:285)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.
> FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker
> (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:624) at java.lang.Thread.run(Thread.java:748) Caused by: com.mysql.cj.exceptions.
> CJCommunicationsException: Communications link failure. The last packet sent successfully to the server
> was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.
> NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.
> newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.
> newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance
> (Constructor.java:423)"} 1.0
> ```
The following example shows the same metric, but with a shortened label value to
allow ingestion. The hashed value indicates where Cortex XCOR shortened
the label value.
> [accordion] Example metric with a shortened value
>
> ```text lines highlight=9 theme={null}
> # HELP application_exceptions_total Total count of application-level exceptions.
> # TYPE application_exceptions_total counter
> application_exceptions_total{exception="JDBCConnectionException",error_detail="org.hibernate.exception.
> JDBCConnectionException: Error calling Driver#connect at org.hibernate.exception.internal.
> SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) at org.hibernate.exception.
> internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) at org.hibernate.
> engine.jdbc.connections.internal.BasicConnectionCreator.convertSqlException(BasicConnectionCreator.
> java:111) at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.
> [Value shortened; Original=(len:1063 XXH64:aaf02cb52ed0a0fe)]makeConnection(DriverConnectionCreator.java:38)
> at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.createConnection(BasicConnectionCreator.
> java:58) at org.hibernate.engine.jdbc.connections.internal.
> DriverManagerConnectionProviderImpl$CheckConnectionTask.run(DriverManagerConnectionProviderImpl.java:285)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.
> FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker
> (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:624) at java.lang.Thread.run(Thread.java:748) Caused by: com.mysql.cj.exceptions.
> CJCommunicationsException: Communications link failure. The last packet sent successfully to the server
> was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.
> NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.
> newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.
> newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance
> (Constructor.java:423)"} 1.0
> ```
## Late-arriving metrics
Prometheus, OpenTelemetry, and other metric formats include one or more timestamp
values for each data point. These values indicate when a sample was observed, or
represent the time range of the data point. Cortex XCOR can
accept late-arriving data points within a time frame, depending whether the data
point matches an aggregation rule or is ingested without aggregation:
* Aggregation rules accept data points from two minutes to eight minutes past the
current ingestion time.
* Raw data points can be written to the database up to two hours before the ingestion
timestamp.
## Future-arriving metrics
Cortex XCOR accepts incoming metrics one minute ahead of the current
timestamp. If metrics arrive outside of this one-minute buffer, Cortex XCOR rejects
those metrics and returns an error indicating that metrics arrived
too far into the future.
# Query limits
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/limits/query-limits
Learn about query limits in Cortex XCOR, what happens when you hit limits, and how to avoid hitting limits.
Query resources are finite in any given system. Resource demand grows based on
factors such as the source of, and the amount of data the query retrieves.
Any very large query can request enough resources at either the database or browser
level that it leaves few resources for other queries, causing them to time out waiting
for resources to become available.
Palo Alto Networks Cortex XCOR employs several query limits at both the
[browser level](#query-truncation-at-the-browser) and the
[database level](#query-protections-in-the-database) to ensure a consistent user
experience across the system in response to current query demand. Queries can come
from one of two [query sources](#query-sources).
## Query sources
In Cortex XCOR, query demand comes from either an *automated* or a
*manual* source:
*Automated sources*, such as [monitors](/investigate/alerts/monitors) and
[recording rules](/control/shaping/shape-metrics/rules/recording) with regular evaluation
intervals, produce a relatively predictable demand on the query resources at the
database and at the browser.
Queries from an automated source often request a smaller set of data than something
like a dashboard query, but might incur high request volume. Although each individual
query is small, the amount of query resources they're demanding at regular intervals
is very large.
*Manual sources*, such as loading a dashboard, running a query in Metrics Explorer,
or making a direct API call, place demands on query resources at both the database
and browser that are cyclical or spiky.
Queries from a manual source are often exploratory, or retrieve longer time periods
than automated queries. The load these queries place on the system varies
significantly with the scale of data returned. Queries requesting more time series
and data points require more resources to retrieve information from the database, and
also can require more resources to deliver that information to the browser.
Individual queries of either type demand different query resources depending on the
amount of data retrieved from the database, amount of data returned the browser, or
both. For example:
* A query that places high load on the database but low load on the browser might
request the sum of a large set of data. The query retrieves all relevant data
points from the database (high database query load), but only returns a few summed
data points to the browser for a system's performance monitoring workflow.
* A query that places high load on both the database and browser might request the
raw, unaggregated data points from all services (many unique time series) to return
to the browser, such as for a debugging workflow.
### Automated source query limits
Cortex XCOR includes the
[Metrics Query Capacity Overview](/observe/dashboards/managed-dashboards#metrics-query-capacity-overview)
dashboard to measure your automated query consumption against system capacity. Use
this dashboard to understand how much query capacity remains as part of your budget.
The dashboard includes queries from monitors, recording rules, and service accounts
in the reporting metrics.
Cortex XCOR uses [selectors per second](#selectors-per-second) and
[data reads per second](#data-reads-per-second) metrics to track automated source
query limits. Exceeding either of these limits results in dropping data with an HTTP
`429 Too Many Requests` status code. Cortex XCOR continues dropping an
indiscriminate subset of incoming queries to keep query traffic within defined
limits.
To guard against prematurely dropping queries when unforeseen spikes occur,
Cortex XCOR doesn't start dropping data until either of the query limits
are exceeded for 10 minutes consecutively.
#### Selectors per second
These metrics track the count of selectors that queries issue per second. For
example, this metric includes a single selector named `up`:
```text theme={null}
up{app="webserver"}
```
A more complex query might include multiple selectors. The following query includes
two `sum` selectors:
```text wrap theme={null}
sum(rate(http_server_handled_total{status="200"}[2m]) / sum(rate(http_server_handled_total[2m]))
```
The Metrics Query Capacity dashboard displays the number of selectors consumed and
dropped against the limit per second. For more information about selectors, see the
[Prometheus documentation](https://prometheus.io/docs/prometheus/latest/querying/basics/#time-series-selectors).
> [!NOTE]
>
> The selectors per second query limit can't be increased.
To reduce query load for selectors per second, use the following strategies:
* Configure longer intervals for [monitors](/investigate/alerts/monitors) and
[recording rules](/control/shaping/shape-metrics/rules/recording).
For example, consider 1,000 monitor queries that include a single selector, each of
which runs every 15 seconds. These figures calculate to roughly 66 selectors per
second (`1000/15`). Increasing the execution interval to 60 seconds reduces the
number of selectors per second to roughly 16 (`1000/60`).
* Structure alert and monitor queries to use PromQL aggregations for optimal
efficiency. For example, you might create two separate alerts for service A and
service B error rates:
```text theme={null}
sum(rate(http_server_handled_total{service="A". status=~"5.*"}[1m])) > 10
sum(rate(http_server_handled_total{service="B". status=~"5.*"}[1m])) > 10
```
Instead, create a single monitor that checks both services:
```text wrap theme={null}
sum(rate(http_server_handled_total{service=~"A|B". status=~"5.*"}[1m])) by (service) > 10
```
#### Data reads per second
These metrics track the amount of raw data that Cortex XCOR fetched to run
the specified queries per second. Cortex XCOR calculates data consumed by
a query with this calculation:
```text /DATAPOINTS_RETURNED_FOR_SERIES/ theme={null}
READS = sum(DATAPOINTS_RETURNED_FOR_SERIES)
```
* `DATAPOINTS_RETURNED_FOR_SERIES` is the number of data points retrieved for query
execution.
This equation calculates the sum of all data points for a series, with a minimum of
60 data points per series. All smaller values are rounded up to `60`.
Consider a range query `sum(up{app="webserver"})` with a time range of
`[now()-1h, now()]`. If the query selects 10 steady series with a scrape interval of
30 seconds, the total number of retrieved data points is 1,200, as defined by this
equation:
```text theme={null}
READS = 10 * (1h/30s)
```
Next, consider an instant query `up{app="database"}` that selects 20 time series with
a scrape interval of one minute. Prometheus fetches five minutes of data by default,
so the resulting number of fetched data points is `100`, as defined by the following
equation.
However, this equation doesn't apply the minimum number of data points retrieved per
series, which is 60, so this equation isn't correct.
```text theme={null}
20 * 5 = 100
```
After applying the minimum number of data points retrieved per series, this rule
actually consumes 1,200 reads, as defined by this equation:
```text theme={null}
20 time series * 60 data points retrieved = 1200 reads
```
The following instant query is more advanced. This query requires Cortex XCOR to fetch
all data points for the selected series in a 30-day period, and
apply the minimum number (`60`) of data points retrieved per series.
```text theme={null}
sum_over_time(job_execution_errors[30d])
```
Queries that fetch [downsampled data](/control/shaping/shape-metrics/downsampling)
will consume less data reads because datapoint resolution for the selected series is
reduced, meaning less data points are used to process the query.
To reduce the consumption of data reads per second, use the following strategies:
* Write queries with a shorter time range or shorter range selectors.
* Create [rollup rules](/control/shaping/shape-metrics/rules/rollup) for unnecessary labels in your
most expensive queries to reduce the amount of data points the query needs to
fetch.
* Ensure that query selectors are as precise as possible, especially in join queries.
For example, consider this query:
```text wrap theme={null}
sum(rate(container_cpu_seconds{cluster="prod"}[1m]) by (node, container) / on (node) node_cpu_capacity
```
Including `{cluster="prod"}` in the latter part of the query reduces the number of
series and in turn data points the query needs to fetch for the right side of the
join. Use this instead:
```text wrap theme={null}
sum(rate(container_cpu_seconds{cluster="prod"}[1m]) by (node, container) / on (node) node_cpu_capacity{cluster="prod"}
```
## Optimize queries
Large queries might be good candidates for optimization by decreasing the amount of
data the query is trying to retrieve. Use the
[Metrics Query Capacity Overview](/observe/dashboards/managed-dashboards#metrics-query-capacity-overview)
to identify large queries.
Optimize queries by:
* Shortening the time window, or using [rollup rules](/control/shaping/shape-metrics/rules/rollup)
to decrease the data scale.
* Improving the query syntax by removing regular expressions to reduce the index
lookups performed by the query.
* Adjusting the number of concurrent unique requests in the system.
## Log query rate limits
When [querying log data](/investigate/querying/query-logs), be mindful of the
following limits that can impact your search experience, what happens if your tenant
exceeds limits, and how you can avoid hitting these limits.
* **Global query limit**: Each Cortex XCOR tenant has a global limit on
the total compute resources available for queries. If this limit is reached,
queries are queued and will run as soon as resources become available.
* **User query limit**: This limit prevents a single person from consuming all
available query resources. The user query limit is calculated based on the compute
resources required to run individual queries in addition to the number of user
queries that are run. Each user is limited to a percentage of the total available
query resources.
* **API query limit**: API queries are limited to a percentage of the total available
query resources.
### Avoid log query rate limits
If you experience slow or lagging queries on your log data, implement the following
changes to help increase the speed of your queries:
* Close unneeded tabs in your browser. Open tabs with long-running queries or that
refresh often, such as in Logs Explorer or in dashboards, consume more resources.
* Write efficient queries. Ensure your log queries are efficient so that they
complete faster and make resources available for other queries to run.
* Include the primary key in your query: Query on one of the predefined
[keys](/investigate/querying/query-logs/query-syntax#keys), such as `service` or
`severity`, and then use the
[query syntax](/investigate/querying/query-logs/query-syntax) to incorporate
additional attributes.
* Narrow the query scope. Reduce the time range or scope of your query to return
results faster.
## Query truncation at the browser
Cortex XCOR can truncate queries that return many unique time series or
data points to the browser to reduce the chances of long load times and query
timeouts. Truncating queries protects the browser from crashing when querying many
metrics. Dashboards and the Metrics Explorer both use query truncation.
Cortex XCOR calculates the browser limit using a combination of time
series, time granularity, and time period (and their resulting data points) requested
by the query.
The limits are:
* Time series a query can return to the browser: 2,500
* Data points a query can return to the browser: 300,000
The number of time series and data points returned to the browser might be the same
as the number requested from the database. If the query is doing some level of
aggregation, the number of time series and data points returned might be fewer than
what the query requests, but not greater.
To reduce the number of series returned to the browser, view the
[Aggregation Rules UI](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules)
to determine if a queryable aggregate metric already exists. If an aggregate metric
doesn't exist, use [aggregation rules](/control/shaping/shape-metrics/rules)
or [derived metrics](/investigate/querying/metrics/derived-telemetry/derived-metrics)
to:
* Query an aggregated subset of the raw data.
* Break the query into smaller chunks (by time, for instance) to reduce returned data
points.
### Enable or disable query truncation
By default, Cortex XCOR enables query truncation.
To disable or re-enable query truncation:
1. In the displayed dialog, select **Options**.
2. Click the **Truncate expensive query results** toggle.
3. Click **Done**.
> [!NOTE]
>
> Disabling query truncation causes expensive queries to take longer to load and can
> result in timeouts (no results returned for a single query), or might cause the
> browser to crash.

## Query protections in the database
Cortex XCOR employs protections against very large queries in the database
layer, in addition to the browser.
A query that requests many unique time series or data points from the database
can experience these situations:
* Per-query scale protections
* Across-query resource balancing protections
* Individual query timeouts
These protections ensure a positive user experience for the maximum number of users.
A query requests resources from the database until it has the data it needs, or
until resources run out. Available resources can run out due to these reasons:
* Individual query scale protections are in place.
* There are many queries sharing scarce query resources (query balancing).
* An individual query reached a timeout.
### Query scale protections
Query scale protections ensure a positive user experience for the maximum number of
users. Current database query scale protections are:
* [Time series](https://prometheus.io/docs/concepts/data_model/#notation) a query
can retrieve: 300,000
* Standard data points a query can retrieve: 200,000,000
> [!NOTE]
>
> For Cortex XCOR
> [histograms](/investigate/querying/promql/apply-functions#querying-histogram-metric-types),
> the query limit depends on the number of buckets containing data within a
> histogram.
The data points needed to satisfy the query's time requirement are calculated as:
```text wrap theme={null}
(Number of requested time series) * (Data resolution of the requested time series)
```
For example, a query does a sum of data points over two minutes, storing the
requested data with a 10-second resolution. That sum operation requires 12 data
points per time series, calculated as:
```text theme={null}
60s + 60s = 120s; 120s/10s resolution = 12 data points
```
If the query requests 20,000 time series, the number of data points is 240,000,
calculated as:
```text wrap theme={null}
20,000 time series * 12 data points per series for the 2 minute window
```
Dashboard queries request more data points because they use longer ranges. If the
previous example query is a dashboard query and the dashboard window is set to the
past one hour, the data points retrieved are calculated as:
```text theme={null}
60 minutes / 2 minute sum interval = 30 intervals
30 * 240,000 = 7,200,000 data points
```
Individual queries requesting more than the allowable limits will time out. Exceeding
query scale limits can produce one of the following error messages:
```text theme={null}
query processing would load too many samples into memory in decoding
```
```text theme={null}
The query exceeded the allowable resource limit.
```
These errors indicate that the query is trying to retrieve too many resources. Modify
the impacted query to reduce the scope and reduce the number of results being
fetched.
### Query resource balancing
Cortex XCOR tracks the number of concurrent queries received, the scale of
each query, and the unique users for each query. Cortex XCOR makes an
effort to fairly balance the available query resources between large and small
queries, and also between unique users.
If there are many concurrent queries, and each with relatively high scale, some
queries might need to complete in stages. This means that some queries must wait (be
throttled) to allow queries from other unique users to make use of the available
resources. The more unique users, the more balanced the system is in enabling
different queries to complete.
### Query timeouts
Even with balancing measures in place, if there are insufficient resources for a
query to complete within a specified time period, the query will time out.
Cortex XCOR displays an error message indicating the query timed out.
If a query times out, try these methods to resolve the issue:
* Modify the query syntax to retrieve less data per query. For example, try to
shorten the time range.
* Use shaping rules such as [aggregation rules](/control/shaping/shape-metrics/rules) to downsample
or roll up unnecessary labels, and then modify the query to retrieve aggregated
data points instead of the raw data points.
# Tracing ingest limits
Source: https://docs-xcor.paloaltonetworks.com/administer/limits-licensing/limits/trace-limits
Reference the tag, span, and trace ingest limits for tracing data in Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR uses the following ingest limits for tracing data. If you
exceed one or
more of these limits, Cortex XCOR truncates or rejects the data depending on the
limit itself. Exceeding a limit indicates that you might need to modify your
client-side instrumentation, or implement head or tail
[sampling rules](/control/shaping/sample-traces) to drop data that you don't want to
persist.
The following limits are in increasing order of granularity from most granular to
most broad.
## Invalid tags
Cortex XCOR limits the size of a tag to 200 bytes for any span. Cortex XCOR accepts
and processes the first 200 bytes and truncates any additional bytes. The related
span and trace aren't otherwise impacted by this limit.
## Invalid spans
If the start time of a span is greater than 10 minutes before or after the current
time, Cortex XCOR marks the span as invalid and drops it. The parent trace isn't
impacted, provided that the other spans in the trace have valid start times.
## Invalid traces
Cortex XCOR persists individual traces with 100,000 spans or fewer. If a trace has
more than 100,000 spans, Cortex XCOR rejects the trace and all included spans.
Although Cortex XCOR rejects invalid tracing data, you can view rejected data in
Trace Optimization, or by querying the
`chrono_trace_dropped_volume_in_bytes_count` metric. You can also
[create a monitor](/investigate/alerts/monitors#create-a-monitor) for this metric and generate
notifications when tracing data is rejected. The following query returns invalid
trace data by reason, such as when a span is too far in the past:
```shell theme={null}
sum(rate(chrono_trace_dropped_volume_in_bytes_count[5m])) by (reason) > 0
```
## Pod limits
Cortex XCOR limits data ingest to 2 GB per minute for each Kubernetes pod that
handles data ingest. Cortex XCOR scales these pods automatically to handle current
traffic, and imposes this limit to protect against sudden traffic surges to a single
pod. Your tenant might have anywhere from two to 100 pods at any given time,
depending on current load. The total ingest limit in one minute depends on the number
of pods in use times the 2 GB per minute for each pod.
## System limits
Cortex XCOR scales as rapidly as possible to manage sudden changes in trace data
volume. However, sudden spikes might trigger surge protections that drop trace data
until more resources are available. This system limit allows the majority of normally
observed data fluctuation patterns and guarantees the reliability of the Cortex XCOR
trace ingestion pipeline in the case of unexpected volume changes. Trace data volume
exceeding this limit is visible in Trace Optimization as a metric tracking
volume of traces dropped due to limiting.
# Manage service configuration
Source: https://docs-xcor.paloaltonetworks.com/administer/service-discovery
Discover and configure services in Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Cortex XCOR users and
> might not be visible in your app. For information about enabling this feature in your
> environment, contact [Cortex XCOR Support](/support).
The **Services** page provides a view into your applications based on
[services](/observe/services). If a service doesn't match the rules that you define,
you can edit the service configuration in Palo Alto Networks Cortex XCOR to include or remove
services from your display. You can also modify services' visual presentations of
your data.
For setup instructions, see
[Configure services](/observe/services/configure-services).
## Understand service configuration
The **Service Configuration** page lets you configure how to discover services that
exist in your environment, and what visualizations to present on your services pages,
based on their telemetry data.
All users can view service configurations and preview changes. Only users with
[SysAdmin permissions](/administer/accounts-teams/teams#add-a-role-to-a-team)
can save new or edit existing service configurations.
```mermaid actions={false} theme={null}
graph LR
PM[Service pod mapping] --> DJ["Discovery jobs"]
DJ --> MR["Merge rules"]
MR --> Prev["Preview"]
Prev --> Present["Presentations"]
```
## View service configuration
In the navigation menu, click ** Go to admin view**
and then select
**Platform > Service Configuration**
to open the **Service Configuration** page.
### Review changes
If there are unsaved changes, the **Review & apply changes** button indicates the
number of unsaved changes. An alert icon indicates
modified jobs that haven't yet been saved.
### Global mappings
Global mappings let services be discovered by jobs using metrics that have a Kubernetes
Pod or instance label but no obvious service labels.
Discovery jobs can be configured to join their
[Pod](https://kubernetes.io/docs/concepts/workloads/pods/) label with the pod label
from one of the global mapping configurations that has a label that's more likely to
map to a service name. For example, the `kube_pod_info` metric from
[kube-state-metrics (KSM)](https://github.com/kubernetes/kube-state-metrics) have a
`created_by_name` which is often a service name. Cortex XCOR uses
those labels to match the physical pods to a discovered service.
Users can't edit configurations in the **Global mapping** tab. These configurations
are commonly from standard KSM and OpenTelemetry libraries. Introducing new
potentially conflicting configurations here could cause services to be silently
ignored by discovery jobs.
* **Slug**: The slug name of the discovery rule defining the service pod mapping.
* **Name**: The rule name.
* **Service labels**: One or more labels that could be a candidate for the service
name.
* **Pod label**: The pod label is usually the name of the pod or instance and is used
as a key to map to the service name. These are created during
[metrics discovery jobs](#use-discovery-jobs-to-identify-and-add-services).
Click the three vertical dots icon and then
**Open in Metrics Explorer** to open the query for that service instance in
[Metrics Explorer](/investigate/querying/metrics/explorer).
### Configuration status
The **Configuration Status** tab title includes the number of changes since the last
run of a discovery job. If there are problems with discovery jobs, the tab includes
an orange dot in the corner.
Click the tab to review all messages. Use the search box to find specific messages.
Each message contains the following details:
* **Severity**: The severity of the alert.
* **Type**: The type of process causing the error. For example, type of `discovery
job` means a [discovery job](#use-discovery-jobs-to-identify-and-add-services) has
errors or conflicts that need correction.
* **Name**: The name of the item in the **Type** field.
* **Message**: Details about the error or conflict. Use these details to review your
configuration and make changes.
* **Labels**: A list of labels and values that explain the conflicting rule:
* `service_name`: The service with the conflict.
* `first_service_name`: The first instance of a service with the label causing
the conflict.
* `rule_slug`: The immutable ID of the rule for this discovery job.
* `source`: The label whose value causes the conflict.
* `dimension_value`: The value of the conflicting label.
## Use discovery jobs to identify and add services
*Discovery jobs* are templates that match metrics to a discovered service.
Cortex XCOR provides some common discovery jobs. Create your own jobs or copy and
customize existing jobs for your environment.
Use the **Search jobs** box to find a specific template.
* **Status**: Toggle the switch to enable or disable the job.
* **Managed by**: Jobs are manged by Cortex XCOR (non-editable), or by the user
(editable).
* **Job name**: The user-readable discovery job name.
* **Type**: Users can create jobs to discover services based on metrics (`Metrics`)
or change events (`Events`) types.
`Traces` are managed by Cortex XCOR and not user creatable or editable. `Traces`
is used by the **Trace Services Based on Service Attribute** job, and is
available only to customers with a Tracing license. Users can enable or disable the
discovery job.
* **Service label mapping**: Labels identifying the service name. Provided by the
the service label or instance label + identifying label (**Service template label**)
from the template form.
* **Services discovered**: The estimated maximum number of discovered services. This
number can be significantly different (often higher) than the actual number of
discovered services, depending on
[merge rules](#use-merge-rules-to-correct-or-remove-services).
### Create a discovery job
To create a discovery job:
1. On the **Service Configuration** page, click **Create**.
2. From the menu, choose **Metrics discovery** or **Change events discovery**.
3. Add a **Job name**.
4. Select **Manual** or **From dashboard JSON**.
5. Add **Job details**:
> [tab] Metrics
>
> For a **Metrics discovery job**, add:
>
> * **Metric name**: Cortex XCOR queries this metric to find labels
> which contain candidate service names based on the discovery job configuration.
> * **Metric name prefix**: A prefix of metric names to used filter and scope
> metrics this job applies to. This field uses
> [glob syntax](/investigate/querying/glob-syntax) to match metric names.
> When a service is discovered by this discovery job, metrics with this prefix
> will receive a [derived
> label](/investigate/querying/metrics/derived-telemetry/derived-labels) called
> `lens_service` which is set to the discovered service name.
>
> > [!WARNING]
> >
> > This prefix, along with optional target label names in this job, must not
> > conflict with the prefix in another enabled discovery job.
> * Optional: Click **Options** to add one or more **Target names** and **Target values**.
> These fields are respectively a label name and value
> [glob expression](/investigate/querying/glob-syntax) that further scope to
> which metrics Cortex XCOR applies the `lens_service` label. Use
> these fields to help scope the discovery job and avoid conflicts when you
> need to configure different discoveries on metrics with the same prefix.
> * **Service mapping**:
>
> Focus your template using one of the following groups:
>
> * **Service label**: A label containing the service name. This label must be
> found on the previously specified **Metric name**. This is the preferred
> option when you already have a good service name label on your metrics.
> Click the Click the icon to draft a
> `cardinality_estimate by () ()` query in
> [Metrics Explorer](/investigate/querying/metrics/explorer).
> * **Pod mapping**: Pod mappings are an advanced option. Use if you don't have
> an obvious label to use as the service name, but you have a pod or instance
> label that could join with a global mapping that has a service name.
> * **Instance label**: The label containing the instance or pod name. Label
> values are used as keys to map to the service name. For example, GRPC
> metrics have an **instance label** of `instance` and an identifying label
> of `grpc_service`.
> * **Transform regex**: A [regular
> expression](/investigate/querying/regular-expressions) that modifies the
> value in the instance label to match a value in the service instance
> mappings. This is often used to remove a pod name's prefix. Can be `(+.)`
> if no trimming is required.
> * **Transform replacement**: The regular expression replacing the
> original label, allowing modification of the value in the instance label
> so that it matches a value in the service instance mappings. You can use
> symbols like `$1` to insert regular expression capture groups.
> * **Identifying label**: A label containing information that uniquely
> identifies which service the time series belongs to. The identifying label
> can't be the `instance label` or other ephemeral label. It must be static,
> finite, and uniquely identify the service. For example, an identifying
> label value of `X` that indicates it belongs to `service1` must always
> map to `service1`. The value `X` can't map to another service.
>
> > [!WARNING]
> >
> > This mode of service discovery fails if this label is
> > [high cardinality](/control/shaping/shape-metrics/reduce-cardinality).
> [tab] Events
>
> For an **Events discovery job**, add a **Service label**, which is the label
> containing a the service name. Discovery jobs use this to find service name
> candidates.
>
> Use the **Preview events** graph to select a service and preview the events to show.
>
> For example, if you're sending an event to Cortex XCOR with the payload
> `"pipelineName": "PIPELINE_NAME"` as a label, you can search through the service
> labels to find and select that label. If the event doesn't have the `lens_service`
> label, you can create a [merge rule](#use-merge-rules-to-correct-or-remove-services)
> to map the existing label to the service. Events corresponding to that label
> display in charts on the applicable service's page.
> [tab] From a dashboard
>
> You can create both a presentation and a metrics discovery job from a dashboard.
>
> 1. Click **Import JSON file** to import a Cortex XCOR standard dashboard
> from its [JSON representation](/tooling/api-info/dashboard_schema). This
> feature isn't compatible with classic dashboards.
> 2. Optional: Click **Select dashboard** to automatically generate the JSON representation
> for an existing dashboard.
>
> If the JSON is valid, Cortex XCOR confirms this.
> 3. If the dashboard is confirmed to be valid, click the **Choose service variable**
> dropdown that appears and select an appropriate variable.
To complete discovery job completion:
1. Click **Create**.
2. Click **Review & apply changes**.
### Edit or delete a discovery job
You can edit or disable existing user-created jobs to ensure your configurations
match your services when those services change.
1. Click the three vertical dots and then select
**Edit config** to change or **Delete** to remove the job.
2. Available edits to job details include:
* Clear the **Enabled** checkbox to disable the job.
* Update the **Service label**.
* For metrics discovery, update the **Pod mapping** fields.
3. Click **Stage changes** to preview your updated configuration.
4. Review your changes.
5. Click **Review & apply changes** to save.
When editing a metrics discovery job, you can review the **Service discovery query**,
which is the query used to generate the discovery job. Click the
icon to open the query in
[Metrics Explorer](/investigate/querying/metrics/explorer).
## Use merge rules to correct or remove services
When a service doesn't match expectations, create *merge rules* to correct mismatches.
Merge rules define how to group or match service data when service names or
labels might not be the same across multiple instances.
Merge rules affect the number of displayed services in service pages. For example,
Trace Explorer might find a particular set of services, but a service page might have
a lower number of services based on the merge rules applied to those services.
Use the **Search rules** box to find a specific rule, or filter by **Rule type**.
The **Merge rules** table displays information that was set during rule creation.
Merge rules apply from the top to the bottom of the list, in **Order**. A service
matches the first rule that applies to it, and won't match additional rules. Use the
drag icon to move the rule up or down in the list to change the order that rules
apply.
Toggle the **Status** icon to disable a job.
### Preview and apply changes
This table is a list of changes that will take effect when you apply any staged
merge rule updates. To display only the staged changes, click the **Show diff only**
toggle. If **Review & apply updates** displays a **0** in the button, no user-created
changes are staged to apply. However, the preview pane can still display
staged changes. These changes are due to discovery jobs run by Cortex XCOR
that haven't yet been applied.
#### Add or modify services
To run discovery jobs:
1. Click **Review & apply changes** to open a larger **Review & apply changes**
drawer. This drawer lets you review a more detailed preview, including any
**Presentations** attached to services. Click the **Use freshest data** toggle to run the
preview without a cache from previous discovery runs.
2. Click **Run service discovery**. You must have
[SysAdmin](/administer/accounts-teams/teams#add-a-role-to-a-team) permissions to
run service discovery.
In the **Review & apply changes** drawer, the number of unchanged, added, deactivated,
and modified services displays under the drawer title. Select **Skip service discovery**
to wait until the next schedules discovery run.
To discard changes, click **Reset changes**.
### Create a merge rule
> [!NOTE]
>
> You can merge a limited number of service names together. Merge rules can be
> used to group service names like `gateway` and `gateway-staging` together. They can't
> merge high cardinality service names together like `gateway-1` and `gateway-2` to
> `gateway-n`.
>
> It's always better to have a service label that already uses the correct service
> name rather than using merge rules to fix them afterwards. Merge rules use
> [regular expressions](/investigate/querying/regular-expressions).
To create a merge rule:
1. In the **Merge rules** tab of **Service Configuration**, click **Create** and
then select a rule type:
* **Ignore** rules remove matching services from the interface, stop data collection
for them, and prevent discovery from adding new services that match this rule.
* **Merge** rules group services together.
* **Suppress**: Use this to prevent noisy service discovery jobs from creating
too many ephemeral services in your environment. Adding a **Suppress** rule
for a given **Suppressed Discovery Slug** means that this discovery job won't
discover new services. If a service is discovered by another discovery job,
presentations configured to display for the suppressed discovery job will
display.
2. Add the following fields:
* **Rule Description**: Describe what this service rule does. Displays on the
configuration page as **Description**.
3. The following fields display based on your rule type:
* **General Settings**: The **Rule description**.
* **Rule details**: The following fields display in the **Details** section of the
**Merge rules** page.
* **Source labels**: Specify which label's values the rules apply to. The
`Discovered service name` is a source label, and is most commonly selected.
* **Regex**: Add a new regular expression to replace the original. On the service
configuration page, the original **Regex** displays, along with the
**Replacement**, which is the value added here.
* **Suppressed Discovery Slug**: When using a **Suppress** rule, add a discovery
slug to suppress new services from being generated by that discovery.
* **Global Suppression Exceptions**: When using a **Suppress** rule, don't suppress the
listed services, even if they're generated by suppressed discoveries.
4. Click **Stage changes**. The **Service configuration** page displays, with your
updates displayed.
5. The **Preview** updates. Preview your changes using the table. The **Service name**
and **Discovery jobs** included in that service show what metrics are merged
into a given service name. Services and metrics being removed from display have
a **`[-]`** before them.
6. Click **Review & apply changes**.
#### Remove a service or prevent service creation
You can deactivate a service by removing the discovery rule that identifies it.
Cortex XCOR doesn't display an inactive service on the **Services** page
and no data is collected for it.
To deactivate specific services, or to prevent new services from being created that
match certain criteria, create a narrowly defined [ignore merge rule](#create-a-merge-rule)
that matches the unwanted service. For example, you can use ignore merge rules to
remove services that lack data from view.
Such services persist as inactive services. You can force the **Services** page
to display them by enabling the page's **Include inactive services** toggle. The
page of an inactive service also displays a banner indicating its inactive state.
### Edit or delete a rule
To edit or delete a service rule:
1. Click the three vertical dots icon.
2. Click **Edit rule** to change the rule, or **Delete** to remove the rule.
3. Edit the fields, per their descriptions in the [create rules](#create-a-merge-rule)
section.
4. Click **Stage changes**. The **Service discovery preview** displays your updates.
5. Click **Apply changes** to save or **Reset changes** to cancel.
## Presentations
Presentations are templates for how service data displays. Cortex XCOR
provides default presentations for your use. You can also create your own custom
presentations.
### View presentations
To review existing presentations, on the **Service Configuration** page, click
**Presentations**.
All of your presentations display as cards separated into the following groups:
* **Cortex XCOR Managed**: Default presentations, which can't be edited.
* **Custom Presentations**: Editable presentations created by users.
Each card displays the following information:
* **Name**: The presentation name.
* Enabled status: Either `Enabled` or `Disabled`.
* **Number of Services**: The number of services this presentation represents.
* **Number of panels**: The number of dashboard panels this presentation displays.
### Create a presentation
You can create custom presentations for your services. Presentations can use any
panel type that a [Cortex XCOR dashboard](/observe/dashboards/panels)
can use. To create a presentation:
1. In the **Presentations** page, click **Create**.
2. Add a **Name** and **Description** to identify the presentation.
3. Create conditions the presentation must meet. In the **IF service has** menu,
select a discovery job. The presentation will show on services that have been
discovered by this discovery job.
4. Click **+ Add condition** to **show** more services, or to **hide** specific
services from this presentation.
5. Review the list of services that match the selected conditions. Make changes to
the conditions if needed.
6. The **Review Content** section of the creation page defines how the content
displays on the [service page](/observe/services/service-pages).
7. Click **Start with existing dashboard** if you already have a dashboard created to
use. Click **Start a new view** to create a new dashboard, which opens the
dashboard editor in a new tab.
#### Use an existing dashboard
If you have a dashboard for an existing service, and you're creating a service
presentation, you can select the service as a variable. Cortex XCOR
replaces that variable in the JSON with `lens_service` to make the presentation
flexible for all services, which lets you reuse this presentation for multiple
services.
To import an existing dashboard:
1. Click **Start with existing dashboard**.
2. Select a [dashboard](/observe/dashboards) from the list.
3. Click **Save** when finished.
4. Click **Review & apply changes**.
#### Start a new view
If you select **Start a new view**, the dashboard editor opens in a new tab.
1. Add [panels](/observe/dashboards/panels) and
[variables](/observe/dashboards#create-and-configure-dashboard-variables) to your
new dashboard.
2. Click **Save** when finished.
3. Click **Save** in the **Create** screen.
4. Click **Review & apply changes**.
### Edit a presentation
To change an existing presentation:
1. On the **Service Configuration** page, click the
three vertical dots and then select **Edit presentation**, or on the
**Presentations** page, click the card for the service.
2. Make changes to your presentation. You can modify the presentation's **Name**
and **Description**, amd **Edit Conditions**. You can also
**Review services which match the conditions**.
3. Click **Save**.
### Delete a presentation
To delete a presentation:
1. [Edit the presentation](#edit-a-presentation).
2. Click **Delete presentation**.
3. Click **Delete** to confirm that you want to delete the presentation.
## Create SLOs from discovery jobs
After discovery finds and displays services, you can create
[service level objectives](/observe/slo) (SLOs) tied to a metrics discovery job from
**Service Configuration**.
### Edit SLO config
To create availability or latency SLOs for a metrics discovery job:
1. On the **Service Configuration** page, on the **Discovery jobs** tab, click
**See more actions** () on a metrics discovery job row,
and then select **Edit SLO config**.
2. Configure the SLO using the same fields described in
[Define an SLO](/investigate/alerts/manage-slos#define-an-slo).
3. Click **Save**.
**Edit SLO config** appears only for metrics discovery jobs, not event discovery jobs.
For the queryless RPC and gRPC builder and other creation paths, see
[Create a new SLO](/investigate/alerts/manage-slos#create-a-new-slo).
# Cortex XCOR compliance information
Source: https://docs-xcor.paloaltonetworks.com/compliance
Information about Cortex XCOR compliance standards
Palo Alto Networks Cortex XCOR is SOC 2 Type 2 and ISO 27001 audited. To request our report,
reach out to your assigned account manager, or contact
[Cortex XCOR Support](/support).
For more information about Cortex XCOR security, see the
[Security overview](https://chronosphere.io/security-overview/).
# Optimize your telemetry data
Source: https://docs-xcor.paloaltonetworks.com/control
Learn about how to optimize your telemetry data with Palo Alto Networks Cortex XCOR.
Your app generates a lot of data, but not all of it's actionable. Storing every byte
is costly, and can quickly overwhelm your capacity limit, license limit, or both.
Aside from financial cost, there's computing cost associated with generating,
processing, and temporarily storing your telemetry data.
Reducing telemetry data volume keeps costs predictable and manageable as your
business scales, and helps teams manage their data effectively by reducing the amount
of available information. When you optimize your telemetry data, on-call engineers
can find the data they need to solve problems faster.
To take control of your telemetry data, Palo Alto Networks Cortex XCOR provides
multiple tools you can use to identify and eliminate data that isn't used and doesn't
deliver value to your business. See [Data optimization concepts](/control/storage)
to learn about the mechanisms you can use to control your telemetry data.
The following diagram shows how the stages of the control workflow connect, and each
stage links to its section on this page. The workflow is a loop rather than a
one-time setup, because partitions and budgets reveal what your data consumes, which
sends you back to your shaping rules. For a guide that defines this workflow,
including how to set thresholds that alert or drop data, see
[Manage telemetry data budgets](/overview/guides/manage-budgets).
```mermaid actions={false} theme={null}
flowchart LR
Send["Send data"]
subgraph OP["Cortex XCOR"]
Reduce["Reduce"]
Shape["Shape"]
Review["Review"]
Partition["Partition"]
Analyze["Analyze"]
Budget["Budget"]
end
Send --> Reduce --> Shape --> Review --> Partition --> Analyze --> Budget --> Shape
click Reduce "#reduce-volume"
click Shape "#shape-and-sample-your-data"
click Review "#review-rules"
click Partition "#create-partitions"
click Budget "#create-budgets"
click Analyze "#analyze-consumption"
classDef rules fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF;
class Reduce,Shape,Review,Partition,Budget,Analyze rules
```
## Reduce volume
After sending data to Cortex XCOR, use the
[Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer) to identify
opportunities to reduce the overall volume of telemetry data. If you're sending
Prometheus metrics, you can also use the
[Telemetry Usage Analyzer](/investigate/analyze/usage) to identify obsolete or
unnecessary data, and understand the impact of a proposed shaping rule to users of
that data.
## Shape and sample your data
Use the Cortex XCOR Control Plane to
[shape and sample your telemetry data](/control/shaping) and reduce the amount of
data you persist. After implementing partitions and budgets to manage consumption,
you can revisit optimization rules to transform, reshape, retain, or exclude telemetry
data.
## Review rules
After creating shaping rules, use the various tools that Cortex XCOR
provides to [review the impact](/control/shaping/review-impact). If your shaping
rules reduced too much data or not enough, make changes to ensure the rules achieve
the intended outcome.
## Create partitions
To help [manage telemetry data consumption](/control/consumption), create
*partitions*, which are slices of your data with distinct owners. 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.
## Analyze consumption
After defining partitions, use the [Consumption page](/control/consumption/analyze)
to view persisted log data consumption against license capacity. This page helps to
detect unwanted spikes and understand what's driving growth across your telemetry
data. Use this information to [review shaping rules](#review-rules) and make changes
that impact your budgets.
Manage license consumption by
[reviewing licensing dashboards](/observe/dashboards/managed-dashboards#licensing-dashboards)
to identify usage trends and avoid exceeding your organization's licensing limits.
[Understand telemetry data limits](/administer/limits-licensing) for each telemetry type to ensure a
performant experience when ingesting, querying, and creating resources.
## Create budgets
After creating partitions and analyzing consumption, create and apply *budgets*,
which are shaping policies you assign to a partition to safeguard against runaway
usage and overspending. [Budgets](/control/consumption/budgeting) help track and
manage growth to ensure your license consumption remains predictable.
# Manage consumption
Source: https://docs-xcor.paloaltonetworks.com/control/consumption
Learn how to create partitions and budgets for your telemetry data in Palo Alto Networks Cortex XCOR and control the data you keep.
Telemetry data provides your teams with more detailed context to help identify and
fix the root causes of issues. However, not all telemetry data provides the same
utility, and you don't want to consume a portion of your license with unnecessary
data.
To help control data usage, first create
[*partitions*](/control/consumption/partitions), which are slices of your log data
with distinct owners. For example, you can create partitions for individual services,
teams, and environments to provide a consistent structure for attributing usage and
costs to the proper owners.
Partitions let you apply [*budgets*](/control/consumption/budgeting), which are
shaping policies you can assign to a partition to safeguard against runaway usage and
overspending.
After defining partitions, use the [Consumption page](/control/consumption/analyze)
to view persisted log data consumption against license capacity. You can then
[shape log data](/control/shaping/shape-logs/parse-logs) to apply finer-grained
control.
> [!NOTE]
>
> Prefer a guided lab? Take [Introduction to Consumption
> Pricing](/academy/courses/introduction-to-consumption-pricing) to learn pricing,
> partitions, budgets, and usage visibility, or take [Investigating Consumption
> Increases](/academy/courses/investigating-consumption-increases) when credits climb
> or budgets fire and you need to find scope and next steps.
## How to optimize telemetry data
To manage your telemetry data consumption, complete the following steps:
1. [Create partitions](/control/consumption/partitions).
2. [Analyze consumption](/control/consumption/analyze).
3. [Create budgets](/control/consumption/budgeting).
4. [Monitor budgets](/control/consumption/budgeting#next-steps).
5. [Shape telemetry data](/control/shaping/shape-logs).
> [!NOTE]
>
> To delete data from your Palo Alto Networks Cortex XCOR tenant, contact
> [Cortex XCOR Support](/support).
# Analyze consumption
Source: https://docs-xcor.paloaltonetworks.com/control/consumption/analyze
Analyze telemetry consumption across products, resources, and partitions to identify growth and unexpected spikes.
After [creating partitions](/control/consumption/partitions), use the Consumption
page to identify unexpected spikes, understand growth, and compare usage across
partitions.
The Consumption page displays consumption for the selected product, resource group,
resource, and time range. For applicable global partition views, the page also
displays contractual volume consumed and contract duration elapsed. The page
includes budget thresholds and consumption statistics for child partitions.
To compare telemetry rates with the system limits configured for your tenant, use
the
[Consumption System Limits dashboard](/observe/dashboards/managed-dashboards#consumption-system-limits).
That dashboard is the source of truth for system limit thresholds, utilization,
and data dropped by system limit enforcement.
> [!NOTE]
>
> Prefer a guided lab? Take
> [Investigating Consumption Increases](/academy/courses/investigating-consumption-increases)
> to trace spikes across partitions and products and decide what to do next.
## Analyze with the Consumption page
To analyze data consumption in the Consumption page, in the navigation menu, click
** Go to admin view** and then select
**License > Consumption**.
### Select consumption data
Use the page controls to define the consumption data to analyze:
1. Select a **Product**, **Resource Group**, and **Resource**. The available
resource groups and resources depend on the selected product.
2. Review the unit selector, if present. Select **Credits** or **Native units** when
both options are enabled. The page uses credits when the selection includes
multiple resources.
3. Select the page time range. The available ranges include **This month** and
**Previous month**.
The page time range controls which data the page retrieves. The **Time window**
menu in the Consumption chart controls how the retrieved data is aggregated.
### Review partition statistics
The partition summary is named for the selected partition. For example, the global
partition displays the Global Partition summary. The summary includes the following
statistics:
* Use **Consumed** to view the total data consumed and persisted during the selected
time range. For the global partition, this statistic also displays the percentage
of contractual volume when contract details apply to the selected range.
* Use **Dropped by budgets** to view the total data dropped by budget enforcement
during the selected time range.
* If **Dropped by system limits** appears, use it to view the total data dropped by
system limit enforcement during the selected time range. Click **View** to open
the [Consumption System Limits dashboard](/observe/dashboards/managed-dashboards#consumption-system-limits)
for the same time range.
* Use **Change over time** to view the percentage change in consumption compared to
the preceding period. The comparison period depends on the selected time range.
For the global partition, review **Contract duration elapsed** when the selected
time range falls within the contract period. Archived and
unpartitioned partitions display corresponding badges.
### Analyze consumption trends
In the Consumption chart, use the **Time window** menu to select how the chart
aggregates consumption:
* Use **Per second** to detect spikes.
* Use **Daily**, **Weekly**, and **Monthly (Cumulative)** to identify gradual
growth or sustained overconsumption.
* Use **Rolling 30 minutes**, **Rolling 1 hour**, **Rolling 3 hours**,
**Rolling 1 day**, or **Rolling 7 days** to identify recurring changes over
rolling periods.
Use the **Group by** menu to select how the chart divides the data:
* **Consumed vs dropped** compares persisted volume with dropped volume.
* **Consumed by partition** identifies which partitions account for the most
consumption.
* **Consumed by product** compares consumption across telemetry products.
* **Consumed by resource** compares the resources within the selected product.
* **Dropped by budget** or **Dropped by reason** compares dropped volume. If
**Dropped by reason** appears, use it to separate budget drops from system limit
drops.
* **Dropped by partition** identifies which partitions account for dropped data.
If the chart includes [budget thresholds](/control/consumption/budgeting#threshold-types),
dashed lines indicate the threshold values. Use **Show thresholds** to show or hide
these lines. When **Go to Explorer** appears for log data, click it to investigate
the underlying data in [Logs Explorer](/investigate/querying/query-logs).
### Review budgets
The Budgets table displays the thresholds that apply to the selected partition.
Use the following columns to review each threshold:
* **Product** and **Resource Group** identify the data that the threshold governs.
* **Time window** identifies the period over which the threshold is evaluated.
* **Action** identifies whether the threshold sends a warning alert, sends a
critical alert, or drops data. When an action has an associated monitor, click
the action to open that monitor.
* **Threshold** displays the received volume as a percentage and value relative to
the threshold. The received volume includes consumed and dropped data.
* **View** selects the threshold's product and resource group, resets the resource
to **All**, restores the threshold's original unit, and selects the matching chart
time window.
The Budgets table header reports the selected partition's budget status as Ok,
Alerting, or Dropping. A partition without a budget displays no status badge, and
the table displays `No budget`.
The table can also display a system limit as Per second (max consumption rate).
The Consumption System Limits dashboard remains the source of truth for system
limit thresholds and enforcement.
> [!NOTE]
>
> The budget for the `global` partition might exceed its threshold while budgets for
> all child partitions remain within their thresholds. To make the global partition
> budget reflect growth trends more accurately, set thresholds on budgets for
> individual partitions.
### Compare child partitions
The Child Partitions table compares the selected partition's immediate children.
Search for a partition by name, or sort the table by the following columns:
* **Order**: The order in which each child partition matches data.
* **Partition**: The child partition name. Click a linked name to open that
partition's Consumption page. Unpartitioned rows aren't linked. Archived and
unpartitioned rows display corresponding badges.
* **Consumed**: The partition's percentage of its parent's consumed volume and its
absolute consumed value.
* **Dropped**: The partition's percentage of its parent's dropped volume and its
absolute dropped value.
* **Change over time**: The percentage change in consumption compared to the
preceding period. The column name reflects the comparison period.
* **Current budget status**: The partition's current budget status. Partitions
without a budget display **No budget**. Rows with an unavailable or unknown status
display `--`.
Use this table to investigate partitions with growing consumption or dropped data.
## Next steps
Based on your findings, refine your [partitions](/control/consumption/partitions)
with more specific dimensions. For example, add child partitions to control
smaller subsets of data.
After analyzing your consumption and refining partitions, create
[budgets](/control/consumption/budgeting) to apply shaping policies that provide
guardrails against usage overages and overspending.
# Telemetry data budgets
Source: https://docs-xcor.paloaltonetworks.com/control/consumption/budgeting
Learn how to create and manage budgets and apply them to your data partitions.
After [defining partitions](/control/consumption/partitions),
[analyzing consumption](/control/consumption/analyze), and making any necessary
adjustments, you can create *budgets*, which are shaping policies that you can attach
to a partition.
Budgets provide guardrails to combat runaway usage and overspending, while providing
the flexibility to enforce accountability at the right level of ownership. Budgets
include *thresholds* that define which actions to take when a threshold is exceeded.
You can also set *priorities* to control the order in which an instant-rate threshold
drops data that exceeds its configured rate, with lower priority values dropped last. For
example, a priority of `10` is dropped first, and a priority of `1` is dropped last.
Priorities are evaluated in match order, and the first priority to match is applied.
All other priorities are ignored. Use the `default_priority` field to set the
priority on requests that don't match any defined priorities.
> [!NOTE]
>
> Prefer a guided lab? Take
> [Applying Budgets to Partitions](/academy/courses/applying-budgets-to-partitions)
> to configure multi-threshold budgets and read partition usage against those thresholds.
## Threshold types
Budgets can include *thresholds*, which help manage both anomalous spikes in data and
slow data growth over time, depending on the type. Use different threshold types
depending on the use case.
For each threshold, you can specify an action, such as sending an alert or dropping
data. When you define an alert action on a threshold, such as sending a warning
alert, Palo Alto Networks Cortex XCOR generates an associated monitor in the
**Cortex XCOR Managed** [collection](/administer/collections).
> [!NOTE]
>
> Although configuring thresholds is optional, Cortex XCOR strongly recommends setting
> thresholds to protect budgets and avoid overspending.
### Anomalous spikes in real time
To detect data spikes in real time and react accordingly, configure either an
instant-rate threshold or a rolling threshold. These thresholds implement shorter
time windows that are more responsive, but can result in more noise.
Instant-rate thresholds limit the rate of incoming data in bytes per second,
specified as fixed values. With an instant rate threshold, the configured action
(such as sending an alert) triggers when consumption exceeds the configured rate
threshold. For example, if a threshold is exceeded, Cortex XCOR can send
an alert to notify the team who owns the budget for the offending partition.
Alternatively, you can start dropping data when a threshold value is met so that the
budget isn't exceeded, which would otherwise impact your persisted data limit.
Instant-rate thresholds apply only to the `LOG_PERSISTED_BYTES` and
`LOG_PROCESSED_BYTES` resource groups. Metric, trace, and credit-based resource
groups don't support instant-rate thresholds. For those resource groups, use a
rolling or fixed volume-based threshold instead.
For alert actions on instant-rate thresholds, configure `instant_rate_sustain_secs`
in the `alert_action_config` to control how long consumption must exceed the
threshold before an alert triggers. The default is `0`, which triggers an alert
immediately on any breach.
Rolling thresholds help to detect and manage anomalous spikes in data over a short
period, such as one to three hours. The available rolling threshold types are:
* `ROLLING_30_MINUTE_VOLUME`: Rolling thirty-minute window.
* `ROLLING_1_HOUR_VOLUME`: Rolling one-hour window.
* `ROLLING_3_HOUR_VOLUME`: Rolling three-hour window.
* `ROLLING_1_DAY_VOLUME`: Rolling one-day window.
* `ROLLING_7_DAY_VOLUME`: Rolling seven-day window.
### Slow growth over time
To help detect and manage gradual data growth over a longer period (which can be
daily, weekly, or monthly), use fixed volume-based thresholds. These thresholds
implement longer time windows that are less responsive, but are also less noisy than
instant-rate or rolling thresholds. The available fixed volume threshold types are:
* `DAILY_VOLUME`: Resets daily at `00:00:00` UTC.
* `WEEKLY_VOLUME`: Resets weekly on Monday at `00:00:00` UTC.
* `MONTHLY_VOLUME`: Resets on the first of each month at `00:00:00` UTC.
Fixed volume-based thresholds set a limit over a fixed, non-overlapping period, such
as one day. The configured action, such as dropping data, triggers when consumption
over the specified time period exceeds the configured threshold. For example,
dropping data on a daily basis if a budget for a service exceeds a fixed value
threshold of a configured number of bytes.
> [!NOTE]
>
> The `HOURLY_VOLUME` threshold type is deprecated, and the Cortex XCOR API rejects it
> when you create or update a budget. To set an hourly window, use
> `ROLLING_1_HOUR_VOLUME` instead.
### Drop data with thresholds
When certain thresholds with a drop action are exceeded, Cortex XCOR drops
data according to the length of the time window and the threshold type:
* Instant-rate thresholds: Cortex XCOR accepts requests at a rate of up to
the threshold value, and drops data when the rate is over the threshold in priority
order. Data resumes when the incoming rate becomes less than the threshold.
* Fixed volume-based thresholds: Cortex XCOR drops data until the end of
the time window. For example, a daily volume-based threshold that's configured to
drop data at 12:00 AM drops all matching requests until 11:59 PM. Priorities don't
protect data after a fixed-volume threshold is exhausted.
* Rolling thresholds: Cortex XCOR drops data until the data in the
affected budget naturally ages out of the rolling window, and your tenant
consumption is under the configured threshold.
Avoid setting multiple volume-based thresholds with a drop action on the same budget.
For example, setting a daily, weekly, and monthly volume-based threshold provides
considerable overlap, and could result in unwanted noise, such as excessive alerts.
> [!NOTE]
>
> The `DROP` action isn't supported for the trace resource groups
> (`TRACE_PROCESSED_BYTES`, `TRACE_PERSISTED_BYTES`, and `TRACE_ALL`) or for the
> cross-telemetry `ALL` resource group. For those resource groups, use an alert action
> instead. See [Create budgets](#create-budgets) for an explanation of configuring
> alert actions on budget thresholds.
Each combination of resource group, action, and threshold type must be unique within
a budget. For example, a budget can't contain two `DROP` thresholds that are both
`INSTANT_RATE` for the `LOG_PERSISTED_BYTES` resource group. Two `DROP` and
`INSTANT_RATE` thresholds are allowed when their resource groups differ.
The `global` partition enforces the rate limits from your contract as system
thresholds. You can't create a threshold on the `global` partition that duplicates a
system-enforced combination of resource group, action, and threshold type. Set custom
thresholds on child partitions instead.
## Budgeting order
If you attach multiple budgets to every level of your partition hierarchy, a single
request must pass through multiple thresholds before being accepted. Budgets are
evaluated in order, from the most-specific partition that you created, to the
least-specific partition (the global partition). If a budget drops a request, then
data isn't counted in the received rates of any parent budgets.
For example, consider the following partitions and budgets:
* A partition for `global/team-a` has an `instant_rate` threshold of 2 MB per
second.
* A partition for `global/team-a/service-1` has an instant rate threshold of
1 MB per second.
```mermaid actions={false} theme={null}
flowchart TD
accTitle: Budget hierarchy
accDescr: The global partition contains the team-a partition, which contains the service-1 partition.
global --> team-a
team-a --> service-1
```
If the partition `global/team-a/service-1` receives a huge data spike of 1 GB
per second, then 999 MB of that overage is dropped before it's counted against
the budget for `global/team-a`. Therefore, the `global/team-a` partition receives
only 1 MB per second, and won't be impacted by data drops.
This budget hierarchy ensures that drop data from the `global/team-a/service-1`
partition only, and not from `global/team-a`. The budget that's configured on the
individual service ensures that the team budget isn't impacted. This behavior lets
you penalize bad actors without impacting the upstream partitions.
## View budgets
Select from one of the following methods to view budgets for partitions.
> [tab] Web
>
> To view budgets for a partition:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **License > Partitions and Budgets**.
> 2. Select a partition from the side navigation or the **Child partitions** table.
> 3. Click the **Budget** tab.
>
> The **Budget Thresholds** section displays configured thresholds, and the
> **Log priorities** section displays the priority order for drop actions.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to return all budgets, use the
> `chronoctl consumption-budgets list` command:
>
> ```shell theme={null}
> chronoctl consumption-budgets list
> ```
>
> To filter for a specific budget, use the `chronoctl consumption-budgets read`
> command:
>
> ```shell /SLUG/ theme={null}
> chronoctl consumption-budgets read SLUG
> ```
>
> Replace *`SLUG`* with the slug of the budget you want to display.
> [tab] API
>
> To return a list of budgets with the Cortex XCOR API, use the
> [`ListConsumptionBudgets`](/tooling/api-info/definition/operations/ListConsumptionBudgets)
> endpoint.
>
> To return a single budget definition, use the
> [`ReadConsumptionBudget`](/tooling/api-info/definition/operations/ReadConsumptionBudget) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 budgets
When creating a budget, complete the following actions:
* Required: Include the slug path of the partition that the budget applies to.
* Optional: Specify an alert notification policy to use for routing alerts.
* Optional (but highly suggested): Define thresholds and actions to take if a
threshold is exceeded.
* Optional: Apply priorities for each of the query conditions that match.
Configure alert actions before enforcing drops. Alerts provide visibility without
impacting persisted data. Cortex XCOR generates a monitor in the
**Cortex XCOR Managed** collection for each resource group and threshold type
combination that has an alert action.
To configure a generated monitor, specify metadata in the `alert_action_config`
section of the budget definition. For example, you can add `annotations` that include
links to runbooks, and specify `labels` that can include metadata like `team` and
`environment`. These labels can be used for routing notifications, such as to
specific teams to notify when an alert triggers. For details, see the
[Chronoctl documentation](/tooling/chronoctl) and
[budget example](#chronoctl-budget-example), or the
[Terraform provider documentation](/tooling/infrastructure/terraform) and
[budget example](#terraform-budget-example).
You can specify multiple alert actions for the same resource group and threshold type.
For example, define a warning alert at one value, and then a critical alert at a higher
value. Cortex XCOR combines those alert actions into one monitor.
### Prerequisites
Before creating budgets, [define partitions](/control/consumption/partitions).
Use the slug or ID of your partition to assign budgets.
Because budgets use Cortex XCOR alerts to send notifications when thresholds are
exceeded, you need to define [notification policies](/investigate/alerts/notifications/policies)
to reference in your budgets.
### Create partition budgets
Use one of the following methods to create budgets for partitions.
> [tab] Web
>
> Define the budget in Cortex XCOR, and then
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply the
> definition.
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **License > Partitions and Budgets**.
> 2. Select the partition you want to add a budget to.
> 3. Click the **Budget** tab.
> 4. In the **Budget Thresholds** section, click **Add threshold**.
> 5. For each threshold, select values for the **Product**, **Resource group**,
> **Time window**, and **Action** fields, and then enter a threshold value. After
> entering a threshold value, select a unit for the value. The available units depend
> on the selected resource group and time window.
> 6. Optional: In the **Log priorities** section, click **Add priority** to define
> drop-order priorities. For each priority, enter a value in the **Priority** field
> and a query in the **Filter** field.
> 7. Optional: In the **Notification policy** section, select a notification policy
> to route alerts raised by budget thresholds.
> 8. To save the budget and apply changes to the configuration, click the
> **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> the definition.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to create a budget, use the
> `chronoctl consumption-budgets create` command:
>
> ```shell theme={null}
> chronoctl consumption-budgets create
> ```
>
> 1. Run the following command to generate a sample budget configuration you can use as
> a template:
>
> ```shell theme={null}
> chronoctl consumption-budgets scaffold
> ```
>
> In the template, `kind: ConsumptionBudget` defines an individual budget.
>
> You can redirect the results (using the redirection operator `>`) to a file for
> editing.
>
> 2. With a completed definition, submit it with:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl consumption-budgets create -f FILE_NAME
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
>
> See the [Chronoctl example](#chronoctl-budget-example) for a completed budget
> resource.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create a budget with the
> [Terraform provider](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file and add the definition by using the
> `chronosphere_consumption_budget` type.
> 2. Enter a `consumption_config_id` for the budget.
> 3. Include the `notification_policy_id` that references the ID of the
> notification policy you want to use for routing alerts.
> 4. Include the `partition_slug_path` that references the slug of the partition you
> want to assign this budget to.
> 5. Define a `threshold` condition to send alerts.
> 6. Define a `threshold` condition to drop data.
> 7. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> See the [Terraform budget example](#terraform-budget-example) for a completed
> budget resource.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateConsumptionBudget`](/tooling/api-info/definition/operations/CreateConsumptionBudget)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 budgets, use the Consumption page to monitor and
[analyze consumption](/control/consumption/analyze) for the budget you added to your
partition:
* Review relative consumption trends: In the **Consumption** panel group, use the
dropdown menus to view consumption trends across different time periods to
understand what's driving data growth.
* Detect budgets approaching thresholds: Use the **Budgets** panel group to compare
data for the selected partition with its threshold. The global partition uses the
maximum consumption rate set in your contract. Custom partitions use their
configured thresholds.
* Observe drops from rate-limiting thresholds per partition: In the **Group by** menu,
select **Consumed vs dropped**. The chart groups the rate of data dropped by a
threshold for the selected partition by priority, if configured.
### Chronoctl budget example
The following Chronoctl example adds a budget for the Ordering Service, which is
included in the
[partition hierarchy](/control/consumption/partitions#partition-hierarchy) diagram.
See the
[Chronoctl example](/control/consumption/partitions#chronoctl-partition-example)
that implements a partition for this service.
This budget is scoped to the partition `global/ordering-team/ordering-service`, and
defines the following thresholds:
* An alert warning (`ALERT_WARN`) with a threshold of 4,500 bytes per second.
* A critical warning (`ALERT_CRITICAL`) with a threshold of 5,000 bytes per second.
* A drop action (`DROP`) with a threshold of 5,000 bytes per second.
* A drop action (`DROP`) for daily volume, with a threshold of 909,997 bytes.
Each `priority` controls which data the instant-rate `DROP` action discards first.
Higher priority values are dropped first, and lower priority values are dropped last:
* The query `"env = 'dev'"` has a priority of `10`, so it's dropped first.
* The query `"env = 'staging'"` has a priority of `5`, so it's dropped next.
* The query `"env = 'prod'"` has a priority of `1`, so it's dropped last.
The daily volume `DROP` action drops all matching requests after its threshold is
exhausted, regardless of these priorities.
```yaml expandable Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: ConsumptionBudget
spec:
slug: "ordering-service-logs"
name: "Ordering Service Logs"
partition_slug_path: "global/ordering-team/ordering-service"
alert_action_config:
annotations:
runbook: "https://wiki.example.com/runbooks/log-budget-alerts"
team: "ordering-engineering"
description: "Custom description for log budget alerts"
labels:
severity: "high"
environment: "production"
service: "ordering-service"
instant_rate_sustain_secs: 60
priorities:
- filters:
- log_filter:
query: "env = 'dev'"
priority: 10
- filters:
- log_filter:
query: "env = 'staging'"
priority: 5
- filters:
- log_filter:
query: "env = 'prod'"
priority: 1
thresholds:
- action: ALERT_WARN
instant_rate:
fixed_value_per_sec: 4500
type: INSTANT_RATE
resource_group: LOG_PERSISTED_BYTES
unit: NATIVE
- action: ALERT_CRITICAL
instant_rate:
fixed_value_per_sec: 5000
type: INSTANT_RATE
resource_group: LOG_PERSISTED_BYTES
unit: NATIVE
- action: DROP
instant_rate:
fixed_value_per_sec: 5000
type: INSTANT_RATE
resource_group: LOG_PERSISTED_BYTES
unit: NATIVE
- action: DROP
volume:
fixed_value: 909997
type: DAILY_VOLUME
resource_group: LOG_PERSISTED_BYTES
unit: NATIVE
notification_policy_slug: "budget-alerts-slack"
```
### Terraform budget example
The following Terraform provider example adds a budget for the Ordering Service,
which is included in the
[partition hierarchy](/control/consumption/partitions#partition-hierarchy) diagram.
See the
[Terraform provider example](/control/consumption/partitions#terraform-partition-example)
that implements a partition for this service.
This budget is scoped to the partition `global/ordering-team/ordering-service`, and
defines the following thresholds:
* An alert warning (`ALERT_WARN`) with a threshold of 4,500 bytes per second.
* A critical warning (`ALERT_CRITICAL`) with a threshold of 5,000 bytes per second.
* A drop action (`DROP`) with a threshold of 5,000 bytes per second.
* A drop action (`DROP`) for daily volume, with a threshold of 909,997 bytes.
Each `priority` controls which data the instant-rate `DROP` action discards first.
Higher priority values are dropped first, and lower priority values are dropped last:
* The query `"env = 'dev'"` has a priority of `10`, so it's dropped first.
* The query `"env = 'staging'"` has a priority of `5`, so it's dropped next.
* The query `"env = 'prod'"` has a priority of `1`, so it's dropped last.
The daily volume `DROP` action drops all matching requests after its threshold is
exhausted, regardless of these priorities.
The `notification_policy_id` references a notification policy created with the
Terraform provider. To reference a notification policy created in Cortex XCOR, enclose the
value in double quotes.
```terraform expandable Terraform example icon="square-terminal" theme={null}
resource "chronosphere_consumption_budget" "ordering_service_budget" {
consumption_config_id = chronosphere_consumption_config.example.id
name = "Ordering Service Logs"
slug = "ordering-service-logs"
notification_policy_id = chronosphere_notification_policy.budget_alerts_slack.id
partition_slug_path = "global/ordering-team/ordering-service"
# Alert action configuration
alert_action_config {
# Additional annotations to set on generated monitors
# These override settings on default annotations if they match default keys
annotations = {
"runbook" = "https://wiki.example.com/runbooks/log-budget-alerts"
"team" = "ordering-engineering"
"description" = "Custom description for log budget alerts"
}
# Additional labels for notification routing
labels = {
"severity" = "high"
"environment" = "production"
"service" = "ordering-service"
}
# Determines how long instant rate consumption must sustain above the threshold
# before triggering an alert
# Default is 0 (any consumption over threshold triggers immediately)
instant_rate_sustain_secs = 60
}
# Threshold configurations
threshold {
action = "DROP"
type = "INSTANT_RATE"
resource_group = "LOG_PERSISTED_BYTES"
unit = "NATIVE"
instant_rate {
fixed_value_per_sec = 5000
}
}
threshold {
action = "ALERT_WARN"
type = "INSTANT_RATE"
resource_group = "LOG_PERSISTED_BYTES"
unit = "NATIVE"
instant_rate {
fixed_value_per_sec = 4500
}
}
threshold {
action = "ALERT_CRITICAL"
type = "INSTANT_RATE"
resource_group = "LOG_PERSISTED_BYTES"
unit = "NATIVE"
instant_rate {
fixed_value_per_sec = 5000
}
}
threshold {
action = "DROP"
type = "DAILY_VOLUME"
resource_group = "LOG_PERSISTED_BYTES"
unit = "NATIVE"
volume {
fixed_value = 909997
}
}
# Priorities determine the instant-rate drop order
# The default priority applies to requests that don't match any priority filter.
# If unset, the priority defaults to 10 (dropped first).
default_priority = 5
priority {
priority = 1
filter {
log_filter {
query = "env = 'prod'"
}
}
}
priority {
priority = 5
filter {
log_filter {
query = "env = 'staging'"
}
}
}
priority {
priority = 10
filter {
log_filter {
query = "env = 'dev'"
}
}
}
}
```
## Update budgets
Select from one of the following methods to update budgets for available partitions.
Any changes to the `notification_policy_slug` or `alert_action_config` are
automatically updated in the monitor for the associated threshold.
> [!WARNING]
>
> If you remove an alert threshold, Cortex XCOR deletes the generated
> monitor only when no other alert uses the same resource group and threshold type.
> [tab] Web
>
> To edit a budget in Cortex XCOR:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **License > Partitions and Budgets**.
> 2. Select the partition whose budget you want to update.
> 3. Click the **Budget** tab.
> 4. To edit a threshold, click the actions menu on the threshold row and select
> **Edit**. Update the values inline.
> 5. To reorder priorities, drag and drop priority rows to change their match order.
> 6. To change the notification policy, select a different policy from the
> **Notification policy** dropdown.
> 7. To save changes to the configuration, click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> the definition.
> [tab] Chronoctl
>
> To update budgets with [Chronoctl](/tooling/chronoctl), use the
> `consumption-budgets update` command:
>
> ```shell theme={null}
> chronoctl consumption-budgets update
> ```
> [tab] Terraform
>
> To edit a budget using the
> [Terraform provider](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateConsumptionBudget`](/tooling/api-info/definition/operations/UpdateConsumptionBudget)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 budgets
Select from one of the following methods to delete budgets for partitions.
> [!NOTE]
>
> Users can modify Terraform-managed resources only by using Terraform.
> [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
> [tab] Web
>
> To delete individual thresholds or priorities from a budget:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **License > Partitions and Budgets**.
> 2. Select the partition whose budget items you want to remove.
> 3. Click the **Budget** tab.
> 4. To delete a threshold, click the actions menu on the threshold row and select
> **Delete**.
> 5. To delete a priority, click the actions menu on the priority row and select
> **Delete**, and then confirm the deletion.
> 6. To apply the deletion, click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> the definition.
> [tab] Chronoctl
>
> To delete budgets with [Chronoctl](/tooling/chronoctl), use the
> `consumption-budgets delete` command:
>
> ```shell theme={null}
> chronoctl consumption-budgets delete SLUG
> ```
>
> Replace *`SLUG`* with the slug of the budget you want to delete.
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteConsumptionBudget`](/tooling/api-info/definition/operations/DeleteConsumptionBudget)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Partitions
Source: https://docs-xcor.paloaltonetworks.com/control/consumption/partitions
Use partitions in Palo Alto Networks Cortex XCOR to create slices of your data with meaningful dimensions and distinct owners.
*Partitions* separate telemetry data in Palo Alto Networks Cortex XCOR 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 independently control their parts of the business.
> [!NOTE]
>
> Prefer a guided lab? Take [Designing Partitions](/academy/courses/designing-partitions) to
> design partition hierarchy and generate consumption configuration, or take [Applying Budgets
> to Partitions](/academy/courses/applying-budgets-to-partitions) to attach budgets
> and interpret usage against thresholds.
## 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.
```mermaid actions={false} theme={null}
---
title: Partition tree
---
flowchart TD
accTitle: Partitions stemming from the global partition
accDescr: The diagram shows a global partition, with three child partitions. One each for the ordering team, auth team, and a default partition. The ordering team and auth team partitions have child partitions for their individual services, which have their own partitions for different environments.
global[global]
global --> ordering_team[ordering-team]
ordering_team --> ordering_service[ordering-service]
ordering_service --> ordering_prod[prod]
ordering_service --> ordering_staging[staging]
ordering_service --> ordering_dev[dev]
ordering_service --> ordering_default[default]
ordering_team --> ordering_team_default[default]
global --> auth_team[auth-team]
auth_team --> auth_service[auth-service]
auth_service --> auth_prod[prod]
auth_service --> auth_staging[staging]
auth_service --> auth_dev[dev]
auth_service --> auth_default[default]
auth_team --> auth_team_default[default]
global --> global_default[default]
classDef green fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF,font-weight:bold,underline;
classDef coral fill:#FA582D,stroke-width:2px,stroke:#FA582D,color:#000000,font-weight:bold,underline;
classDef orange fill:#ff9d1c,stroke-width:2px,stroke:#ff9d1c,color:#FFFFFF,font-weight:bold,underline;
class ordering_team,ordering_service,ordering_dev,ordering_staging,ordering_prod green
class auth_team,auth_service,auth_prod,auth_staging,auth_dev coral
class global_default,ordering_team_default,ordering_default,auth_team_default,auth_default orange
```
## Filters
Each partition uses one or more filters to determine which telemetry data the
partition captures. A request must match every filter to be assigned to the
partition.
Each filter uses one of the following operators:
* `IN`: the request must match at least one of the filter's conditions.
* `NOT_IN`: the request must not match any of the filter's conditions.
A partition with multiple `IN` or `NOT_IN` filters save each condition into a single
`IN` and `NOT_IN` operator collection.
Each condition matches exactly one telemetry type through one of the following fields:
* `log_filter`: matches log data with a log query.
* `metric_filters`: matches metric data by label. A metric must match every label
filter in the condition. Label values support glob patterns, such as
`service:{svc1,svc2}` to match alternatives.
* `trace_span_filters`: matches trace data at the span level. A span must satisfy
every span filter in the condition.
### Trace span filters
A trace span filter matches spans on one or more of the following fields. To match
alternatives, use an `IN` string filter or separate conditions.
* `service`: the service of the span.
* `operation`: the operation of the span.
* `parent_service`: the service of the span's parent span. Root spans don't match.
* `parent_operation`: the operation of the span's parent span. Root spans don't match.
* `duration`: the duration of the span. An omitted or zero bound is unbounded on that
side.
* `error`: the error status of the span.
* `tags`: the tags of the span. A numeric matcher also compares numeric-looking string
tag values.
* `is_root_span`: whether the span is the root span of its trace.
## View partitions
Select from the following methods to view and filter available partitions.
> [tab] Web
>
> To view partitions:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **License > Partitions and Budgets**.
>
> The global partition and any defined child partitions display.
>
> 2. To view the definition for a specific partition, select it from the
> **Child partitions** table, or from the side navigation.
>
> The child partition's definition displays in the **Details** tab.
>
> 3. With a child partition selected, click the **Budget** tab to view the defined
> [budget thresholds](/control/consumption/budgeting) attached to that partition.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to return all partitions, use the
> `chronoctl consumption-config read` command:
>
> ```shell theme={null}
> chronoctl consumption-config read
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ReadConsumptionConfig`](/tooling/api-info/definition/operations/ReadConsumptionConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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. Each partition can have up to
five levels of nesting. Partitions are applied in match order as listed in your
configuration file. If data matches multiple partitions,
Palo Alto Networks Cortex XCOR applies the first partition that the data matches in
the configuration file.
> [!NOTE]
>
> A consumption configuration supports a maximum of 100 total partitions, including
> the default partition that Cortex XCOR generates automatically for each
> non-empty partition list. For example, a flat configuration supports up to 99
> configured partitions because its default partition brings the total to 100.
> Nested configurations can support fewer configured partitions because each non-empty
> child partition list generates another default partition. If you reach the limit,
> consolidate partitions or contact [Cortex XCOR Support](/support).
> [tab] Web
>
> Define the partition definition in Cortex XCOR, and then
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply the
> definition.
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **License > Partitions and Budgets**.
>
> 2. Click **New partition**, and then enter a name for your partition.
>
> 3. In the side navigation, select your new partition to configure it.
>
> 4. If you want to use a different display name or slug for the new partition, enter
> new values.
>
> > [!WARNING]
> >
> > After applying the partition configuration, the slug value can't be changed.
>
> 5. Select the parent partition for the new partition to belong to.
>
> 6. Define filters, which determine the data that belongs to this partition. For each
> filter, select **In** or **Not in** from the **Operator** menu to include or
> exclude matching data, and then enter the **Conditions**. The condition format
> depends on the telemetry type:
>
> * Logs: a log query.
> * Metrics: label-value pairs.
> * Traces: span fields, such as service or operation.
>
> For how the **In** and **Not in** operators combine, see [Filters](#filters). For
> examples of filters, see the [Chronoctl example](#chronoctl-partition-example) and
> the [Terraform example](#terraform-partition-example).
>
> 7. To create child partitions in the new partition, in the **Child partitions**
> section, click **New partition**.
>
> > [!NOTE]
> >
> > Partitions support a maximum nesting depth of five levels from the global
> > partition.
>
> 8. To save the new partition and apply changes to the configuration, click the
> **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> the definition.
>
> After applying the changes with the Code config tool, the new partitions displays in
> the list of available partitions.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to create partitions, use the
> `chronoctl consumption-config create` command:
>
> ```shell theme={null}
> chronoctl consumption-config create
> ```
>
> 1. Run the following command to generate a sample partition configuration you can use
> as a template:
>
> ```shell theme={null}
> chronoctl consumption-config scaffold
> ```
>
> In the template, `kind: ConsumptionConfig` defines an individual partition.
>
> 2. With a completed definition, submit it with:
>
> ```shell /FILE_NAME/ theme={null}
> 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](#chronoctl-partition-example) for a completed
> partition definition.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create a partition with the
> [Terraform provider](/tooling/infrastructure/terraform):
>
> 1. 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.
>
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> See the [Terraform partition example](#terraform-partition-example) for a completed
> partition resource.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateConsumptionConfig`](/tooling/api-info/definition/operations/CreateConsumptionConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 [Consumption](/control/consumption/analyze) page
to view usage across partitions to understand what's driving growth and detect
unwanted spikes. From the **Partitions and Budgets** page in Cortex XCOR,
click **View in Consumption** to open the **Consumption** page.
After analyzing consumption, create [budgets](/control/consumption/budgeting) and
assign them to each of your partitions.
### Chronoctl partition example
The following [Chronoctl](/tooling/chronoctl) example defines two partitions at the
team level, each with a child service partition and environment sub-partitions for
production, staging, and development environments.
Each partition uses conditions for logs, metrics, and traces so that data from all
three telemetry types is attributed to the correct owner. The `Ordering Team`
partition matches services with a regular expression log query, a glob-based metric
filter, and an `IN` trace span filter. The `Auth Team` partition adds a `NOT_IN`
filter to exclude load-test traffic from its consumption totals.
```yaml expandable Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: ConsumptionConfig
spec:
partitions:
- name: "Ordering Team"
slug: "ordering-team"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "service =~ 'ordering|order-processor'"
- metric_filters:
- name: "service"
value_glob: "ordering*"
- trace_span_filters:
- service:
match: "IN"
in_values:
- "ordering"
- "order-processor"
partitions:
- name: "Ordering Service"
slug: "ordering-service"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "service = 'ordering'"
- metric_filters:
- name: "service"
value_glob: "ordering"
- trace_span_filters:
- service:
match: "EXACT"
value: "ordering"
partitions:
- name: "Prod"
slug: "prod"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "env = 'prod'"
- metric_filters:
- name: "env"
value_glob: "prod"
- name: "Staging"
slug: "staging"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "env = 'staging'"
- metric_filters:
- name: "env"
value_glob: "staging"
- name: "Dev"
slug: "dev"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "env = 'dev'"
- metric_filters:
- name: "env"
value_glob: "dev"
- name: "Auth Team"
slug: "auth-team"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "service =~ 'auth|auth-proxy'"
- metric_filters:
- name: "service"
value_glob: "auth*"
- trace_span_filters:
- service:
match: "IN"
in_values:
- "auth"
- "auth-proxy"
- operator: "NOT_IN"
conditions:
- log_filter:
query: "env = 'load-test'"
- metric_filters:
- name: "env"
value_glob: "load-test"
partitions:
- name: "Auth Service"
slug: "auth-service"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "service = 'auth'"
- metric_filters:
- name: "service"
value_glob: "auth"
- trace_span_filters:
- service:
match: "EXACT"
value: "auth"
partitions:
- name: "Prod"
slug: "prod"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "env = 'prod'"
- metric_filters:
- name: "env"
value_glob: "prod"
- name: "Staging"
slug: "staging"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "env = 'staging'"
- metric_filters:
- name: "env"
value_glob: "staging"
- name: "Dev"
slug: "dev"
filters:
- operator: "IN"
conditions:
- log_filter:
query: "env = 'dev'"
- metric_filters:
- name: "env"
value_glob: "dev"
```
### Terraform partition example
The following [Terraform provider](/tooling/infrastructure/terraform) example defines
the same structure as the
[Chronoctl example](#chronoctl-partition-example), which includes two team partitions
with nested service and environment partitions. Each filter block includes separate
conditions for `log_filter`, `metric_filter`, and `trace_span_filters` so that logs,
metrics, and traces are all routed to the matching partition. The `Auth Team`
partition demonstrates combining an `IN` filter with a `NOT_IN` filter to include
`auth` services while excluding `load-test` environment data.
```terraform expandable Terraform example icon="square-terminal" theme={null}
resource "chronosphere_consumption_config" "example" {
partition {
name = "Ordering Team"
slug = "ordering-team"
filter {
operator = "IN"
condition {
log_filter {
query = "service =~ 'ordering|order-processor'"
}
}
condition {
metric_filter {
name = "service"
value_glob = "ordering*"
}
}
condition {
trace_span_filters {
service {
match = "IN"
in_values = ["ordering", "order-processor"]
}
}
}
}
partition {
name = "Ordering Service"
slug = "ordering-service"
filter {
operator = "IN"
condition {
log_filter {
query = "service = 'ordering'"
}
}
condition {
metric_filter {
name = "service"
value_glob = "ordering"
}
}
condition {
trace_span_filters {
service {
match = "EXACT"
value = "ordering"
}
}
}
}
partition {
name = "Prod"
slug = "prod"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'prod'"
}
}
condition {
metric_filter {
name = "env"
value_glob = "prod"
}
}
}
}
partition {
name = "Staging"
slug = "staging"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'staging'"
}
}
condition {
metric_filter {
name = "env"
value_glob = "staging"
}
}
}
}
partition {
name = "Dev"
slug = "dev"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'dev'"
}
}
condition {
metric_filter {
name = "env"
value_glob = "dev"
}
}
}
}
}
}
partition {
name = "Auth Team"
slug = "auth-team"
filter {
operator = "IN"
condition {
log_filter {
query = "service =~ 'auth|auth-proxy'"
}
}
condition {
metric_filter {
name = "service"
value_glob = "auth*"
}
}
condition {
trace_span_filters {
service {
match = "IN"
in_values = ["auth", "auth-proxy"]
}
}
}
}
filter {
operator = "NOT_IN"
condition {
log_filter {
query = "env = 'load-test'"
}
}
condition {
metric_filter {
name = "env"
value_glob = "load-test"
}
}
}
partition {
name = "Auth Service"
slug = "auth-service"
filter {
operator = "IN"
condition {
log_filter {
query = "service = 'auth'"
}
}
condition {
metric_filter {
name = "service"
value_glob = "auth"
}
}
condition {
trace_span_filters {
service {
match = "EXACT"
value = "auth"
}
}
}
}
partition {
name = "Prod"
slug = "prod"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'prod'"
}
}
condition {
metric_filter {
name = "env"
value_glob = "prod"
}
}
}
}
partition {
name = "Staging"
slug = "staging"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'staging'"
}
}
condition {
metric_filter {
name = "env"
value_glob = "staging"
}
}
}
}
partition {
name = "Dev"
slug = "dev"
filter {
operator = "IN"
condition {
log_filter {
query = "env = 'dev'"
}
}
condition {
metric_filter {
name = "env"
value_glob = "dev"
}
}
}
}
}
}
}
```
## Update partitions
Select from the following methods to update partitions.
> [tab] Web
>
> To update partitions:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **License > Partitions and Budgets**.
>
> 2. In the sidebar navigation, select the partition you want to update. Alternatively,
> in the **Child partitions** table, click the name of the partition, or click the
> three vertical dots icon in the row of the
> partition you want to update and then click **Edit**.
>
> 3. Make changes to the partition in the definition pane.
>
> 4. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply your
> changes.
> [tab] Chronoctl
>
> To update partitions with [Chronoctl](/tooling/chronoctl), use the
> `consumption-config update` command:
>
> ```shell theme={null}
> chronoctl consumption-config update
> ```
>
> 1. Update the partition definition file.
> 2. Run the following command to submit the changes:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl consumption-config update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> To edit partitions using the
> [Terraform provider](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateConsumptionConfig`](/tooling/api-info/definition/operations/UpdateConsumptionConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 partitions.
To delete partitions with attached budgets, you must first
[delete attached budgets](/control/consumption/budgeting#delete-budgets), and then
delete the partition.
> [!NOTE]
>
> Users can modify Terraform-managed resources only by using Terraform.
> [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
> [tab] Web
>
> To delete partitions:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
> **License > Partitions and Budgets**.
>
> 2. In the sidebar navigation, select the partition you want to delete. Alternatively,
> in the **Child partitions** table, click the
> three vertical dots icon in the row of the partition you want to delete and then
> click **Delete**.
>
> 3. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply your
> changes.
> [tab] Chronoctl
>
> To delete a partition with [Chronoctl](/tooling/chronoctl), use the
> `chronoctl consumption-config delete` command:
>
> ```shell theme={null}
> chronoctl consumption-config delete
> ```
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteConsumptionConfig`](/tooling/api-info/definition/operations/DeleteConsumptionConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Shape and sample your data
Source: https://docs-xcor.paloaltonetworks.com/control/shaping
Learn how to use shaping rules to take control of your telemetry data.
To take control of your telemetry data, Palo Alto Networks Cortex XCOR provides
multiple tools you can use to identify and eliminate data that isn't used and doesn't
deliver value to your business.
Use the Cortex XCOR Control Plane to reduce the amount of data retained in your
system over time. Create *shaping rules* to drop data before it reaches Cortex XCOR,
aggregate and rewrite data into more manageable and usable statistics, and
alias expressions to improve data queries and references.
## Shape metric data
Use the Cortex XCOR Control Plane to [shape your metric data](/control/shaping/shape-metrics)
and reduce the amount of data you persist. Manage your telemetry data with tools that
help you shape that traffic, such as creating drop rules, quotas, and aggregation
rules.
## Sample trace data
Create [trace datasets](/control/shaping/sample-traces/datasets) that map tracing
license consumption to relevant business units in your organization. Datasets let you
track and measure trace data usage over time before you implement proactive sampling
strategies, whereas head and tail sampling alone require you to measure and implement
together.
You can then apply [behaviors](/control/shaping/sample-traces/behaviors) to set
sampling rules for your datasets without having to write, coordinate, and manage head
and tail sampling rules individually.
## Control log data
Understanding your license consumption helps identify where you're spending the most
money on your log data, and which services or operations are consuming the most of
your license capacity. [Control log data](/control/shaping/shape-logs) to determine
what portion of your license is allocated to the most important data.
## Review impact
After creating rules that shape and sample your data, use the tools that
Cortex XCOR provides to
[review rule impact](/control/shaping/review-impact) and ensure the rules you created
have the intended outcome.
# Review shaping rules impact
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/review-impact
Learn how to review the impact of your shaping rules to better apply controls to your telemetry data.
After [creating shaping rules](/control/shaping), you want to understand their impact
to ensure they have the intended outcome. Palo Alto Networks Cortex XCOR
provides several tools to understand the impact of the shaping rules you create.
## Review metric shaping rules
Use the
[Aggregation Rules UI](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules)
to understand your existing metric shaping rules and how they affect your
environment. Use the
[shaping impact preview](/control/shaping/shape-metrics/reduce-cardinality/shaping-impact)
to preview the impact of a rule on your overall system, which helps prevent breaking
changes and ensure the rules you create operate as expected.
You can then use the [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer)
to review metrics with a **Data phase** filter that shows what data was dropped,
matched, or rejected by specific rule types.
Periodically review the
[Recommendations](/control/shaping/shape-metrics/reduce-cardinality/recommendations)
page to help identify metrics and labels with no usage or utility over the past 30
days. You can then create drop rules and rollup rules based on the recommendations.
> [!NOTE]
>
> If your organization uses capacity pricing, you can define metrics
> [quotas and pools](/control/shaping/shape-metrics/quotas/manage-pools) to assign specific
> percentages of your total persisted writes limit to pools of metrics.
If you identify data with no business value, apply
[relabel rules](/investigate/querying/metrics/derived-telemetry#differences-between-relabeling-and-deriving)
in your Chronosphere Collector to adjust which metrics you send from the client side to
Cortex XCOR.
## Review log optimization rules
When [creating a log shaping rule](/control/shaping/shape-logs), enter a filter to
display a preview of the log data that the filter matches. This preview lets you
confirm that the optimization rule targets the intended logs before applying the optimization
rule.
After creating log shaping rules, use the [Logs Usage](/investigate/analyze/logs-usage)
page to review and understand frequent patterns in your log data. Use this
information to identify high-volume, low-utility patterns, and confirm that a
pattern's volume has changed after applying an optimization rule. You can then create an
optimization rule for a pattern from the **Logs Usage** page with a defined filter, which
ensures you're matching the correct pattern.
## Review trace optimization rules
Use [Trace Optimization](/control/shaping/sample-traces) to both create and
review the control mechanisms for trace data. After creating datasets, you can view
the total processed and persisted bytes for a selected period to understand the data
consumption.
Before assigning behaviors,
[run a preview](/control/shaping/sample-traces/behaviors#preview-behaviors)
against a specific dataset to understand how it impacts data volume before shaping
the data. Select a behavior to view head and tail sampling statistics so you can
understand how the behavior affects traces that impact multiple datasets.
After creating a [trace metric](/control/shaping/sample-traces/trace-metrics), you
can pivot to view similar traces or view similar logs to cross-reference what data
the metric is capturing.
# Sample your traces
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/sample-traces
Use sampling in Palo Alto Networks Cortex XCOR to help control costs and maximize the usefulness of your tracing data.
Distributed traces provide an additional layer of context for solving problems across
complex systems that include hundreds or thousands of microservices. However, you
want to ensure you're only ingesting tracing data that's relevant and valuable. To
help control costs and maximize the usefulness of your tracing data, use Trace
Optimization to narrow your focus to only a representative sample of your data
and drop everything else.
To access Trace Optimization, in the navigation menu click
** Go to admin view**, and then select
** Optimization > Trace Optimization**.
> [!NOTE]
>
> Prefer a guided lab? Take [Controlling Traces](/academy/courses/controlling-traces) to trace datasets, behaviors, and
> sampling.
## Head and tail sampling
*Head sampling* and *tail sampling* are the best-known strategies for sampling trace
data
* [Head sampling](/control/shaping/sample-traces/head-sampling) is a more blunt strategy that
seeks to make a sampling decision as early as possible. Head sampling evaluates
only a defined percentage of traces to take a representative sample of whole
traces.
* [Tail sampling](/control/shaping/sample-traces/tail-sampling) is more fine-grained, and
evaluates every trace after assembling all spans. Tail sampling rules can consider
request outcomes, such as whether a request succeeded or how long it took to
complete, which isn't possible with head sampling.
Creating and managing head and tail sampling rules can be challenging to ensure
you're discarding and keeping the most impactful data. To simplify this process and
decrease the learning curve of sampling, Palo Alto Networks Cortex XCOR developed two concepts to
group, track, and apply sampling rules: [datasets](#datasets) and
[behaviors](#behaviors).
## Datasets
Create [*datasets*](/control/shaping/sample-traces/datasets) to map sets of traces to named groups
relevant to your organization so you can track processed and persisted bytes for
those groups over time. Datasets don't impact your license consumption, so you can
experiment with creating datasets to understand your license usage and make changes
as needed without consuming a portion of your license. With datasets in place,
you can then apply behaviors to your datasets.
## Behaviors
After creating datasets for individual business units, you can apply
[*behaviors*](/control/shaping/sample-traces/behaviors) to your datasets to set sampling rates
without needing to write and manage large sets of fine-grained sampling rules.
You set a baseline behavior that implements data-driven best practices with default
parameters. You can modify those parameters based on the needs of your organization.
For example, modify the defined criteria to drop low-value traces as quickly as
possible and keep high-value traces at a specified rate for one or more datasets from
a single behavior.
You can also set a behavior to allow (sample at 100%) or deny (sample at 0%) all
traces for a specific period. For example, set an allow behavior when you need to
increase the amount of high-fidelity data during a deploy, or when debugging issues.
Alternatively, set a deny behavior when you want to decrease the amount of noisy or
spam traces to keep your budget spend within limits.
## Get started with sampling
Complete the following steps to get started with trace sampling in Cortex XCOR.
1. [Instrument head sampling](/control/shaping/sample-traces/head-sampling#configure-head-sampling),
which is a prerequisite for using behaviors.
Head sampling drives total trace volume for each root service and operation. Use
Trace Optimization to manage head sampling as part of behaviors.
2. Optional: Create head and tail sampling rules:
* [Create head sampling rules](/control/shaping/sample-traces/head-sampling#create-head-sampling-rules)
* [Create tail sampling rules](/control/shaping/sample-traces/tail-sampling#create-tail-sampling-rules)
> [!NOTE]
>
> Create these rules if you don't want to use behaviors for sampling management,
> or if you already have head and tail sampling rules you want to migrate to and
> manage within Cortex XCOR.
3. [Use the incomplete traces dataset](/control/shaping/sample-traces/datasets#identify-incomplete-traces)
to identify incomplete traces.
Incomplete traces are those where one or more spans lacks a parent span, like from
a lack of instrumentation.
4. Recommended: Improve local instrumentation to ensure a higher volume of complete
traces before creating independent datasets.
5. [Create a dataset](/control/shaping/sample-traces/datasets#create-datasets) per team or per
environment to track the exact volume of trace data for that team or environment
over time.
6. [Assign a baseline behavior](/control/shaping/sample-traces/behaviors#get-started-with-behaviors)
to your datasets to ensure that you capture all of your most meaningful traces
(such as slow traces and error traces) for incident response purposes.
Use the baseline behavior to optionally capture fewer of your lower-priority
traces (such as fast traces and successful traces) to obtain a system baseline.
As you learn more about your trace data, you can
[edit facets of the baseline behavior](/control/shaping/sample-traces/behaviors#customize-your-sampling-strategy)
to modify your sampling strategy and more clearly define which traces to drop and
which to keep. In most cases, you want to assertively drop less interesting,
lower-value traces and keep more interesting, higher-value traces. In the
Cortex XCOR app, you can modify the baseline sampling strategy and apply
it across one or more datasets.
# Use trace behaviors with datasets
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/sample-traces/behaviors
Use behaviors in Palo Alto Networks Cortex XCOR to set sampling rules for your trace datasets without writing fine-grained sampling rules.
Controlling the tracing data you process and persist is necessary to manage your
license consumption.
After creating [datasets](/control/shaping/sample-traces/datasets), you can apply trace
*behaviors* to set sampling rates for your datasets without needing to write
fine-grained sampling rules. Although datasets are the underpinning of behaviors, the
behaviors themselves let you change the sampling rates of one or more datasets from
either the Palo Alto Networks Cortex XCOR app or by using Chronoctl.
## Get started with behaviors
Create the right datasets for your organization and then use behaviors to manage the
data that those datasets generate. Use the built-in [behavior types](#trace-behavior-types)
to control sampling rates and apply them across datasets.
Cortex XCOR includes an unassigned dataset you can use for
experimentation. The baseline behavior is mapped to the unassigned dataset by
default, which lets you start sending traces to Cortex XCOR with
pre-configured sampling rules based on best practices. As you learn about how the
unassigned dataset generates data, create additional datasets for each of your
individual services.
As you learn more about your trace data, you can
[edit facets of the baseline behavior](#customize-your-sampling-strategy) to modify
your sampling strategy and define which traces to drop and which to
keep. In most cases, you want to assertively drop less interesting, lower-value
traces and keep more interesting, higher-value traces. In the Cortex XCOR
app, you can quickly modify the baseline sampling strategy and apply it across one or
more datasets.
Trace behaviors implement head sampling rules by default, which means you need only
set the percentage at which you want to keep processed data. For example, if you set
the head sampling rate to 100%, you're keeping 100% of traces. If you don't set a
behavior for a dataset, Cortex XCOR uses defined
[tail sampling](/control/shaping/sample-traces/tail-sampling) rules. However, you can use trace
datasets and behaviors without needing to write tail sampling rules.
> [!NOTE]
>
> To specify a sample rate for head sampling in the baseline behavior, you must
> instrument [head sampling](/control/shaping/sample-traces/head-sampling) first. Cortex XCOR
> supports the OpenTelemetry JaegerRemoteSampler head sampling standard.
>
> Explicitly-defined [head sampling rules](/control/shaping/sample-traces/head-sampling#create-head-sampling-rules)
> take precedence over head sampling rules defined by a behavior. To use behavioral
> head sampling, [edit the baseline behavior](#edit-the-baseline-behavior) to define a
> head sampling strategy, and then remove your existing head sampling rules.
Behaviors are part of Trace Optimization, which also includes datasets and head
and tail sampling rules. You need administrative access to use Trace Optimization.
## Trace behavior types
Trace behaviors can be one of the following types:
* **Baseline behavior**: Sample data in your datasets using data-driven best
practices. Select which facets to apply to your low-value and high-value trace
data, and modify the criteria as you learn more about the characteristics of your
trace data.
The baseline behavior is mostly proactive, and helps to identify what trace data to
bring into Cortex XCOR and what data to drop.
* **Allow behavior**: Sample your data at 100% to allow all traces.
The allow behavior can be both proactive and reactive. For example, you might want
more high-fidelity data during a deploy to catch any issues (proactive), or allow
all traces from a specific service or operation when debugging issues (reactive).
* **Deny behavior**: Sample your data at 0% to block all traces.
The deny behavior can be both proactive and reactive. For example:
* Proactive: drop all traces from a service because the data isn't needed.
* Reactive: stop traces from a dataset that's currently generating too much data so
you don't exceed your license limit.
## View behaviors
You can view and filter available trace behaviors using Cortex XCOR, and
return the trace behavior definition using Chronoctl.
> [tab] Web
>
> To view trace behaviors:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Optimization**.
> 2. Select the **Behaviors** tab to view the baseline, allow, and deny behaviors,
> including which datasets each behavior type currently applies to. The dataset
> match criteria displays the dataset definition the behavior operates on.
> 3. Select the individual behavior you want to view details for:
>
> * **Allow**: Displays the assignment history for the datasets where the allow
> behavior is currently active, and the datasets where this behavior ended.
> * **Deny**: Displays the assignment history for the datasets where the deny
> behavior is currently active, and the datasets where this behavior ended.
> * **Baseline**: Displays head and tail sampling statistics for the baseline
> behavior when it was active for any datasets. The assignment history displays
> the datasets where the baseline behavior is currently active, and the
> datasets where this behavior ended.
>
> You can [edit the baseline behavior](#customize-your-sampling-strategy) to
> change the tail sampling methodology and modify the facets that define which
> traces to drop and keep.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to return the trace behavior definition, use the
> `chronoctl trace-behavior-config read` command:
>
> ```shell theme={null}
> chronoctl trace-behavior-config read
> ```
>
> The definition includes the main behavior and override behavior assignments for each
> of your datasets, and also displays the dataset shaping order. See the
> [Manage assigned behaviors](#manage-assigned-behaviors) section of this page for more
> information about assigning behaviors to datasets.
>
> See the [Chronoctl behavior example](/control/shaping/sample-traces/datasets#chronoctl-behavior-example)
> for a completed behavior definition.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ReadTraceBehaviorConfig`](/tooling/api-info/definition/operations/ReadTraceBehaviorConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Manage assigned behaviors
You can manage the assigned behaviors for a dataset on two levels:
* Assign a *main behavior* to define the primary behavior for a dataset.
* Assign an *override behavior* to temporarily override the main behavior.
> [!NOTE]
>
> You can assign only one main behavior and one override behavior to a dataset.
Both the main and override layers can use any of the
[trace behavior types](/control/shaping/sample-traces/behaviors#trace-behavior-types), which are
baseline, allow, and deny. You can also
[create custom behaviors](/control/shaping/sample-traces/behaviors#create-custom-behaviors) and
assign them to the main or override layers on datasets. When assigning a behavior to
the override layer, you can set the behavior to start immediately, or schedule it to
start at a future time.
When managing assigned behaviors, you can set the shaping order for overlapping trace
datasets. The shaping order determines the priority order to apply behaviors when
traces in one dataset overlap with traces in another dataset. For example, if a trace
belongs to more than one dataset with an assigned behavior, Cortex XCOR
uses the behavior assigned to the dataset that's first in the shaping order.
The shaping order applies only when the selected behavior is active.
Select from the following methods to assign behaviors to a dataset.
> [tab] Web
>
> > [!NOTE]
> >
> > If a behavior isn't currently assigned to a dataset, you must
> > [assign behaviors](/control/shaping/sample-traces/datasets#assign-behaviors) to the dataset by
> > selecting a dataset from the **Overview** tab of Trace Optimization.
>
> To assign behaviors to a dataset:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Optimization**.
>
> 2. Click the **Behaviors** tab, and then click the name of the behavior you want to
> manage.
>
> 3. On the **Behavior Details** page, locate the dataset you want to manage behaviors
> for, click the three vertical dots icon, and select
> **Manage behaviors**.
>
> > [!NOTE]
> >
> > The selected behavior must be assigned to a dataset to manage it from the
> > **Behaviors** tab of Trace Optimization.
>
> 4. On the **Manage behaviors** page, in the **Main layer** pane, select a main
> behavior from the dropdown.
>
> 5. Optional: In the **Override layer** pane, select an override behavior and choose
> the override start and end time, and select a duration for how long the
> override remains active.
>
> 6. Select a shaping order for your main behavior. Shaping order is in decreasing
> priority, so a behavior in position one takes precedence over a behavior in
> position three.
>
> The shaping order section indicates the percentage of overlap between datasets so
> you can better understand the impact to traces in other datasets.
>
> 7. Click **Save** to save the behavior definition for your dataset.
> [tab] Chronoctl
>
> > [!NOTE]
> >
> > If you don't already have a YAML configuration file, use the `scaffold` Chronoctl
> > parameter to generate a template for a specific resource type:
> >
> > ```shell theme={null}
> > chronoctl trace-behavior-config scaffold
> > ```
> >
> > You can redirect the results (using the redirection operator `>`) to a file for
> > editing.
>
> To assign a behavior with [Chronoctl](/tooling/chronoctl):
>
> 1. Run the following command to generate a sample behavior configuration you can use
> as a template:
>
> ```shell theme={null}
> chronoctl trace-behavior-config scaffold
> ```
>
> In the template, `kind: TraceBehaviorConfig` defines an individual dataset.
>
> 2. With a completed definition, submit it with:
>
> ```shell theme={null}
> chronoctl trace-behavior-config create -f FILE_NAME
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
>
> See the [Chronoctl behavior example](/control/shaping/sample-traces/datasets#chronoctl-behavior-example)
> for a completed behavior definition.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateTraceBehaviorConfig`](/tooling/api-info/definition/operations/UpdateTraceBehaviorConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Preview behaviors
When viewing a dataset in Cortex XCOR, you can select a different behavior
from the active behavior and preview its effects on the data volume of the selected
dataset. This lets you temporarily preview a behavior to understand its
impact before assigning it. On-call engineers can use this feature to show that a
temporary override won't consume your organization's entire tracing license, which
can let an administrator promote the preview behavior with confidence.
When you preview a behavior, it runs for up to seven days or until you stop the
preview. Preview behaviors don't shape datasets until you promote them. When
promoted, preview behaviors inherit the same shaping order as your active behaviors.
If no behaviors are active for the selected dataset for which you're previewing a
behavior, the shaping order defaults to one, which is the highest priority.
> [!NOTE]
>
> If you use datasets with tail sampling rules but have no active behaviors, any
> behaviors that you preview will default to shaping order `1` until you assign
> behaviors to your datasets.
To preview behaviors:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Trace Optimization**.
2. On the **Overview** tab, select the dataset you want to preview a behavior for.
3. On the selected dataset page, under **Preview behavior**, select the behavior you
want to preview.
4. Click **Start** to start the preview.
The preview starts running, and the volume license consumption charts display a
dotted line indicating the effect of the preview if it's promoted. It can take up
to two minutes before the dotted line displays on each of the charts.
> [!NOTE]
>
> You might need to zoom in on the graphs to the current day or the last few minutes
> for the dotted line to display.
5. To stop the preview, click **Stop**.
When previewing a behavior, an administrator can promote it. To promote the preview
behavior, click **Promote** and then select one of these options:
* **Main**: sets the preview behavior as the primary behavior for the dataset.
* **Override**: sets the preview behavior as a temporary override for the main
behavior.
## Customize your sampling strategy
You can edit the facets of the baseline behavior to modify the tail sampling strategy
you want to apply to your datasets. There are two main parts of the tail sampling
strategy with different facets you can modify: drop less interesting, low-value
traces and keep more interesting, high-value traces.
* *Less interesting traces* might be ones that denote success. These traces indicate
that your app is working as designed, but you likely don't need to keep most of
them.
* *More interesting traces* might be error traces, which indicate an issue that
requires attention. Keeping more interesting traces helps when you're debugging
issues and need to identify the source of the problem.
There are several facets you can configure:
* **Failed traces**: Traces containing root spans that have a status set to `Error`,
as defined by the OpenTelemetry
[span status](https://opentelemetry.io/docs/concepts/signals/traces/#span-status).
* **Small traces**: Traces with very few spans that often indicate repeated messages
about successful operations or incomplete instrumentation.
* **Large traces**: Traces that are difficult to parse because of their large size,
and which are rarely used in incident debugging due to a high ratio of noise to
signal. These traces also consume a large amount of the persistence budget.
* **Slow traces**: Traces that take a long time to complete, which can indicate
issues in a related operation or service.
* **Fast traces**: Traces that complete very quickly, which can be either repeated
messages about successful operations or incomplete traces.
Although each part of the baseline sampling strategy includes a set of facets by
default, you can move facets from the low-value section to the high-value section,
and the reverse. You can select the number of spans to keep, the duration for slow
and fast traces, and the sampling rate for each facet.
This flexibility lets you shape your sampling strategy as you learn more about your
trace data and determine what information is valuable to your organization, and what
isn't. You can disable some of the facets if you don't want to use them in your
baseline strategy.
For example, you don't want to keep most of your successful traces because you know
they're successful, and you want to sample only a portion of your very small traces.
In the **Default** section of the sampling strategy, you set the sample rate to 0.1%,
and then set the sample rate for small traces to 10%.
In the high-value section of the sampling strategy, you define the criteria for the
traces you want to keep. The facets for this part of the strategy might include
failed traces, large traces, and slow traces.
When you assign your customized baseline behavior to a dataset, Cortex XCOR applies the
following match criteria in order:
1. All traces in the dataset get matched against the behavior's low-value trace
criteria. If a trace meets one or more of these criteria, the lowest possible
sample rate applies.
2. All remaining traces in the dataset get matched against the high-value trace
criteria. If a trace meets one or more of these criteria, the highest possible
sampling rate applies.
3. If a trace doesn't match either of these criteria, the sample rate specified
in the **Default** section applies.
When viewing [span details](/investigate/querying/traces/features#span-details) in
Trace Explorer, use the `tail_sampling_rate` tag on the root span of the trace to
determine the tail sampling rate for the entire trace. The rate can be in a range of
`0` to `1`, expressed as a decimal percentage. For example, a `tail_sampling_rate` of
`0.01` equates to 1%, whereas a value of `0.25` equates to 25%. In the
**Span details** section of Trace Explorer, use this tag in conjunction with the
`behavior_dataset_slug` tag to understand which [dataset](/control/shaping/sample-traces/datasets)
a trace inherits its sampling rate from.
### Edit the baseline behavior
> [!NOTE]
>
> You can edit facets of the baseline behavior using the Cortex XCOR app
> only.
To edit the baseline behavior:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Trace Optimization**.
2. Click the **Behaviors** tab, and then click the **Baseline** behavior.
3. On the **Behavior details** panel, click **Edit**.
4. On the **Edit baseline behavior** panel, define your sampling methodology:
* **Head sampling**: Specify the sample rate for head sampling to capture only a
portion of possible traces from originating services.
> [!NOTE]
>
> To specify a sample rate for head sampling in the baseline behavior, you must
> instrument [head sampling](/control/shaping/sample-traces/head-sampling) first.
* **Tail sampling**: Specify the sample rate for each of the facets to drop
low-value traces and keep high-value traces. Enable which facets to include in
your tail sampling strategy, and specify a sampling rate for each facet.
Specific sample rates depend on how your organization configures individual
services. The following recommendations are based on best practices observed
across many organizations:
* **Large traces**: Set the number of spans to sample to `10,000`, and set a
sample rate percentage of `25` or less. Some organizations might set the
number of spans to sample closer to `3,000` and set the sample rate percentage
to `5`.
* **Slow traces**: Set the minimum duration threshold to `5` seconds and set a
sample rate between `80` percent and `100` percent.
* **Failed traces**: Set the sample rate between `80` percent and `100` percent
to ensure that a repository of interesting error information is available for
engineers investigating a problem.
* **Small traces**: Set the number of spans to sample to `2`, and set a sample
rate percentage of `50` or less.
* **Fast traces**: Set the maximum duration threshold to `0.00001` seconds and
set a sample rate percentage of `50` or less.
To move facets between the low-value and high-value sections of the tail
sampling strategy, click the left **** or right
**** arrow for each facet you enable.
* **Default**: Set the sample rate percentage to a mid-range value, such as `50`.
If a trace doesn't match the low or high-value criteria, then the sample rate
specified in the **Default** section applies.
5. Click **Save** to save the changes to your baseline behavior.
### Create custom behaviors
Cortex XCOR provides specific [trace behavior types](#trace-behavior-types) your
organization can use to define your sampling strategy for trace datasets. These
behaviors let you determine which traces to drop and which to keep across assigned
datasets.
As you learn more about your trace data, you can create custom behaviors and set
different tail sampling rates for individual datasets. Custom behaviors let you
modify behaviors for each dataset, ensuring that you're spending the highest portion
of your budget on the most critical and relevant data.
To create a custom behavior, you duplicate the baseline behavior, define the tail
sampling rules to apply, and set a default sampling rate for the behavior. You can
then assign the custom behavior to a dataset.
> [!NOTE]
>
> After creating a custom behavior, you can duplicate that behavior rather than
> duplicating the baseline behavior.
To create a custom behavior:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Trace Optimization**.
2. Click the **Behaviors** tab, and take one of the following actions to display the
**Duplicate behavior** dialog:
* In the **Cortex XCOR managed behaviors** section, in the row for the
**Baseline** behavior, click ** Duplicate**.
* Click the **Baseline** behavior, and then on the **Baseline** page, click
** Duplicate**.
3. On the **Duplicate behavior** panel, enter a name and description for your custom
behavior. Cortex XCOR generates a slug based
on the name you enter. You can modify the slug to any alphanumeric combination,
but special characters aren't supported.
4. Modify the tail sampling attributes to reflect the traces you want to drop or
keep. See [edit the baseline behavior](#edit-the-baseline-behavior) for
recommendations based on best practices observed across many organizations.
5. Set the default sample rate percentage. If a trace doesn't match the low or
high-value tail sampling attributes you defined, then the default sample rate
applies.
6. Click **Save**.
After creating a custom behavior, you can
[assign the behavior](/control/shaping/sample-traces/datasets#assign-behaviors) to a dataset.
### Modify custom behaviors
After [creating a custom behavior](#create-custom-behaviors), you can modify its
attributes. For example, you might want to modify the tail sampling strategy of a
behavior as you learn more about the dataset the behavior is assigned to.
To modify a custom behavior:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Trace Optimization**.
2. Click the **Behaviors** tab, and take one of the following actions to display the
**Edit behavior** dialog:
* In the **Custom behaviors** section, in the row for the behavior you want to
modify, click ** Edit**.
* Click the behavior you want to modify, and then on the selected behavior page,
click ** Edit**.
3. Modify the tail sampling attributes to reflect the traces you want to drop or
keep. See [edit the baseline behavior](#edit-the-baseline-behavior) for
recommendations based on best practices observed across many organizations.
4. Click **Save**.
### Delete custom behaviors
To delete a behavior that's assigned to one or more datasets, you must first assign
all active and scheduled datasets to a different behavior. Cortex XCOR
won't let you delete a behavior that's assigned to a dataset.
To delete a custom behavior:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Trace Optimization**.
2. Click the **Behaviors** tab, and take one of the following actions to display the
**Delete behavior** dialog:
* In the **Custom behaviors** section, in the row for the behavior you want to
delete, click ** Delete**.
* Click the behavior you want to delete, and then on the selected behavior page,
click ** Delete**.
3. On the **Delete behavior** confirmation dialog, click **Delete**.
Cortex XCOR deletes the custom behavior.
# Trace datasets
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/sample-traces/datasets
Use datasets in Palo Alto Networks Cortex XCOR to map sets of traces to named groups relevant to your organization.
Understanding your tracing license consumption helps identify where you're spending
the most money on your tracing data.
Trace *datasets* are a control mechanism that let you map sets of traces to
named groups relevant to your organization, and then track processed and persisted
bytes for those groups over time.
For example, you might create a Shopper dataset based on data like services,
operations, customer IDs, and tags that relate to your shopping app. Viewing that
dataset provides a snapshot of trace data volume associated with the entire business
unit related to your shopping app.
> [!NOTE]
>
> Palo Alto Networks Cortex XCOR recommends creating one dataset per team or per environment.
> Understanding data consumption for individual business units can highlight which
> [sampling rules](/control/shaping/sample-traces) to adjust so you can better control your trace
> data license consumption and remain within defined data limits.
Datasets are part of Trace Optimization, which also includes trace behaviors and
head and tail sampling rules. You need administrative access to use Trace Optimization.
To access trace datasets, in the navigation menu, click
** Go to admin view** and then select
** Optimization > Trace Optimization**.
When [searching traces](/investigate/querying/traces#search-optimizations) in Trace
Explorer, use the **Custom tags** field in the **Query Builder** in Trace Explorer to
search for the `behavior_dataset_slug` tag. This tag identifies traces that were
sampled by a particular dataset's behavior during processing. A trace cam match many
datasets, but will only be sampled by the behaviors on the first dataset it matched.
used to determine the active behavior for sampling purposes.
## View datasets
Select from the following methods to view and filter available trace datasets.
> [tab] Web
>
> To view trace datasets:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Optimization**.
>
> The **Overview** tab displays your total license consumption for the selected
> period, which defaults to the current month to date. This view includes graphs
> that display the daily volume breakdown and the cumulative breakdown over the
> current week.
>
> 2. Take any of the following actions to change the displayed data:
>
> * On either of the **Processed** or **Persisted** graphs, click the
> more icon and select **Open in Metrics
> Explorer** to
> visualize the underlying query.
>
> * Toggle **Show unique volume** to display only the volume of data that doesn't
> overlap with another dataset.
>
> * Toggle **Show dropped volume** to display only the volume of data that's being
> dropped.
>
> 3. Use the search box to search for a specific dataset. The row for each dataset
> displays, the total data volume, the percent of data overlap, and any active
> behaviors.
>
> 4. In the datasets table, select one or more datasets to update the graphs. You can
> click and drag a section of either graph to zoom in on the selected time period.
>
> 5. To view an individual dataset, click the name of the dataset you want to view from
> the list.
>
> The individual dataset page includes a definition of the underlying Trace Explorer
> query and the services at the root of all traces in the dataset. To view the
> underlying queries, in either the **Definition** or **Root services**, click
> **Search in Trace Explorer**.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to return all trace datasets, use the
> `chronoctl datasets list` command:
>
> ```shell theme={null}
> chronoctl datasets list
> ```
>
> To filter for a specific trace dataset, add the `slugs` argument to the command:
>
> ```shell theme={null}
> chronoctl datasets list --slugs SLUG
> ```
>
> Replace *`SLUG`* with the slug of the dataset you want to
> display.
>
> [Use the Code Config tool](/tooling/gitops#use-the-code-config-tool) to view the
> dataset's Chronoctl YAML representation.
> [tab] Terraform
>
> [Use the Code Config tool](/tooling/gitops#use-the-code-config-tool) in Cortex XCOR to
> view a dataset's Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListDatasets`](/tooling/api-info/definition/operations/ListDatasets)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 datasets
To create a dataset, define and test your trace query, and then map that query to the
resource you want to create.
After creating datasets, you can [assign trace behaviors](#assign-behaviors) for your
datasets. Behaviors let you set sampling rates and the shaping order, which
determines the order of priority behaviors to apply when there are overlapping traces
with other datasets.
Use one of the following methods to create a dataset.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Optimization**.
> 2. Click **Create dataset**.
> 3. Enter a display name for your dataset, which is used to generate a default slug.
> If you want the slug to be a different value, edit the **Slug** field directly.
> 4. Enter comments about the dataset, such as the business unit this dataset tracks
> trace data for.
> 5. Define dataset match criteria to outline the query that matches traces you want
> included in the dataset. You can add one or more span filters to additionally
> refine the trace results.
>
> See [Search and filter trace data](/investigate/querying/traces) for
> information about how to define an effective search for trace data.
> 6. Click **View statistics** to open Trace Explorer in a new tab with your defined
> query. Review the results to ensure your query returns the trace data you expect.
> 7. In the **Create dataset** pane, click **Save** to create your dataset.
>
> Cortex XCOR creates your dataset and displays its definition. Next,
> [assign trace behaviors](#assign-behaviors) for your dataset to set sampling rates.
> [tab] Chronoctl
>
> > [!NOTE]
> >
> > If you don't already have a YAML configuration file, use the `scaffold` Chronoctl
> > parameter to generate a template for a specific resource type:
> >
> > ```shell theme={null}
> > chronoctl datasets scaffold
> > ```
> >
> > You can redirect the results (using the redirection operator `>`) to a file for
> > editing.
>
> To create a dataset with [Chronoctl](/tooling/chronoctl):
>
> 1. Define a query in [Trace Explorer](/investigate/querying/traces) that represents
> the data you want included in the dataset. For example, the following query
> returns all traces where at least one span includes a service called
> `payment-svc`, an operation that starts with `checkout`, and a tag named
> `env=prod`:
>
> ```text theme={null}
> service="payment-svc" operation=~"^payment*." tag:env=prod*"
> ```
>
> 2. Create a YAML definition to map the query to a dataset that represents the
> business unit you want to track trace data for.
>
> Use the following command to generate a sample dataset configuration you can use
> as a template:
>
> ```shell theme={null}
> chronoctl datasets scaffold
> ```
>
> In the template, `kind: Dataset` defines an individual dataset.
>
> 3. With a completed definition, submit it with:
>
> ```shell theme={null}
> chronoctl datasets create -f FILE_NAME
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
>
> See the [Chronoctl dataset example](#chronoctl-dataset-example) for a completed
> dataset definition.
>
> After creating your dataset, [assign trace behaviors](#assign-behaviors) for your
> dataset to set sampling rates and the shaping order, which determines the order of
> priority behaviors to apply when there are overlapping traces with other datasets.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create a dataset with [Terraform](/tooling/infrastructure/terraform):
>
> 1. Define a query in [Trace Explorer](/investigate/querying/traces) that represents
> the data you want included in the dataset. For example, the following query
> returns all traces where at least one span includes a service called
> `payment-svc`, an operation that starts with `checkout`, and a tag named
> `env=prod`:
>
> ```text theme={null}
> service="payment-svc" operation=~"^payment*." tag:env=prod*"
> ```
>
> 2. Create a Terraform resource to map the query to a dataset that represents the
> business unit you want to track trace data for.
>
> 3. Add the definition by using the `chronosphere_dataset` type, followed by a name in
> a resource declaration.
>
> 4. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> See the [Terraform dataset example](#terraform-dataset-example) for a completed
> dataset resource.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateDataset`](/tooling/api-info/definition/operations/CreateDataset)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Identify incomplete traces
You can create a dataset specifically for identifying incomplete traces, which are
traces with spans that reference other spans outside of the selected trace.
Incomplete traces can occur if a service is misconfigured and isn't exporting spans
correctly.
Cortex XCOR recommends creating at least one dataset with the Cortex XCOR-supplied
`parent_missing=true` key-value pair to help identify and track changes in incomplete
trace volume or trace instrumentation over time. As you add more trace
instrumentation, fewer traces meet this criteria, which drives down the volume of
traces in this dataset. You can also apply behaviors to this dataset to decrease the
persisted volume of incomplete traces.
Use one of the following examples to create a dataset for identifying incomplete
traces.
> [tab] Chronoctl
>
> ```yaml theme={null}
> name: Partial Traces
> slug: partial-traces
> description: Track data volume for incomplete traces.
> configuration:
> type: TRACES
> trace_dataset:
> match_criteria:
> span:
> - match_type: INCLUDE
> tags:
> - key: parent_missing
> value:
> match: EXACT
> value: true
> ```
> [tab] Terraform
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_dataset" "incomplete_traces" {
> name = "Incomplete traces"
> description = "Track data volume for incomplete traces."
> configuration {
> type = "TRACES"
>
> trace_dataset {
> match_criteria {
> span {
> match_type = "INCLUDE"
> tag {
> key = "parent_missing"
>
> value {
> value = "true"
> match = "EXACT"
> }
> }
> }
> }
> }
> }
> }
> ```
### Chronoctl dataset example
The following YAML definition consists of one dataset named
`Traces payment service US prod`. This dataset includes any spans that include the
`payment` service, the `payment_store` operation, and have a tag where
`deployment.environment=production`.
> [!NOTE]
>
> If you want to specify criteria at the trace level rather than the span level,
> define `trace` instead of `span` in your YAML definition.
```yaml expandable Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: Dataset
spec:
# Required name of the dataset. Can be modified after the dataset is created.
name: Traces payment service US prod
# Unique identifier of the dataset. If not provided, a slug is generated based
# on the name field. Can't be modified after the dataset is created.
slug: traces-payment-service-us-prod
# Optional description for the dataset.
description: Traces for payment service in US production environment
# Defining characteristics of the dataset.
configuration:
# Dataset type, which must be TRACES.
type: TRACES
trace_dataset:
# Trace criteria to match for the dataset.
match_criteria:
# Object that represents the span conditions to match on. All conditions must
# be true in a single span for the span to be considered a match.
span:
# Determines whether in INCLUDE or EXCLUDE all traces that contain at least
# one span matching the filter.
- match_type: INCLUDE
# The service to match on in candidate spans.
service:
# Operator to compare in_values with. Can be one of EXACT, REGEX,
# EXACT_NEGATION, REGEX_NEGATION, IN, NOT_IN.
match: IN
# Values the filter tests against when using IN or NOT_IN match type.
in_values:
- payment
# The operation to match on in candidate spans.
operation:
match: REGEX
# The value the filter compares to the target trace or span field.
value: /payment_store/.*
# The tag to match on in candidate spans.
tags:
# The key of the span tag to match on in the filter.
- key: deployment.environment
value:
match: EXACT
value: production
```
### Terraform dataset example
The following Terraform resource creates a dataset that Terraform refers to by
`prod_payment_us`, and with a human-readable name of `Traces payment service US prod`.
This dataset includes any spans that include the `payment` service, where the parent
service matches either `us-east` or `us-west`, the parent operation begins with
`/payment`, and a tag where `environment` includes `prod`.
> [!NOTE]
>
> If you want to specify criteria at the trace level rather than the span level,
> define `trace` instead of `span` in your YAML definition.
```terraform expandable Terraform example icon="square-terminal" theme={null}
resource "chronosphere_dataset" "prod_payment_us" {
# Required name of the dataset. Can be modified after the dataset is created.
name = "Traces payment service US prod"
# Optional description for the dataset.
description = "Traces passing through the payment service in US production"
# Defining characteristics of the dataset.
configuration {
# Dataset type, which must be TRACES.
type = "TRACES"
trace_dataset {
# Trace criteria to match for the dataset.
match_criteria {
# Object that represents the span conditions to match on. All conditions must
# be true in a single span for the span to be considered a match.
span {
# Matches traces based on the entire duration of the trace.
duration {
max_secs = 99
min_secs = 1
}
# Matches traces based on the top-level error status.
error {
value = true
}
# Determines whether in INCLUDE or EXCLUDE all traces that contain at least
# one span matching the filter.
match_type = "INCLUDE"
# Matches the operation of the candidate span's parent span if it's not a
# root span.
parent_operation {
value = "payments/.*"
match = "REGEX"
}
# Matches the service of the candidate span's parent span if it's not a
# root span.
parent_service {
value = "us-[east|west]"
match = "REGEX"
}
# The service to match on in candidate spans.
service {
match = "IN"
in_values = ["payment"]
}
# Defines the number of spans that must match the criteria defined by
# filter. Defaults to least one span.
span_count {
max = 2
min = 1
}
# The tag to match on in candidate spans.
tag {
key = "environment"
value {
value = "prod.*"
match = "REGEX"
}
}
tag {
key = "client_build"
value {
match = "NOT_IN"
in_values = ["debug", "beta"]
}
}
}
}
}
}
}
```
## Assign behaviors
When viewing an individual dataset, you can assign a
[behavior](/control/shaping/sample-traces/behaviors) to the dataset to set sampling rates on two
levels:
* Assign a *main behavior* to define the primary behavior for a dataset.
* Assign an *override behavior* to temporarily override the main behavior.
> [!NOTE]
>
> You can assign only one main behavior and one override behavior to a dataset.
Both the main and override layers can use any of the
[trace behavior types](/control/shaping/sample-traces/behaviors#trace-behavior-types), which are
baseline, allow, and deny. You can also
[create custom behaviors](/control/shaping/sample-traces/behaviors#create-custom-behaviors) and
assign them to the main or override layers on datasets. When assigning a behavior to
the override layer, you can set the behavior to start immediately, or schedule it to
start at a future time.
When managing assigned behaviors, you can set the shaping order for overlapping trace
datasets. The shaping order determines the priority order to apply behaviors when
traces in one dataset overlap with traces in another dataset. For example, if a trace
belongs to more than one dataset with an assigned behavior, Cortex XCOR
uses the behavior assigned to the dataset that's first in the shaping order.
The shaping order applies only when the selected behavior is active.
> [!NOTE]
>
> Assigning a behavior to a dataset is different than
> [editing the baseline behavior](/control/shaping/sample-traces/behaviors#customize-your-sampling-strategy),
> where you can modify the facets based on the sampling strategy you want to use.
Select from the following methods to assign behaviors to a dataset.
> [tab] Web
>
> To assign behaviors to a dataset:
>
> > [!NOTE]
> >
> > You can also
> > [manage assigned behaviors](/control/shaping/sample-traces/behaviors#manage-assigned-behaviors)
> > from the **Behaviors** tab of Trace Optimization.
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Optimization**.
>
> 2. From the list of datasets, click the dataset you want to manage behaviors for.
>
> 3. In the selected dataset page, in the **Behavior** pane, click **Manage**.
>
> If you already have a behavior assigned to a dataset, you can
> [run a preview](/control/shaping/sample-traces/behaviors#preview-behaviors) of another
> dataset to preview its affects based on a dataset's volume. This capability
> lets you temporarily preview a behavior to understand its impact before assigning
> it.
>
> 4. In the **Main layer** pane, select a main behavior from the dropdown.
>
> 5. Optional: In the **Override layer** pane, select an override behavior and choose
> when the override should start and end, and select a duration for how long the
> override remains active.
>
> 6. Select a shaping order for your main behavior. Shaping order is in decreasing
> priority, so a behavior in position one takes precedence over a behavior in
> position three.
>
> 7. Click **Save** to save the behavior definition for your dataset.
> [tab] Chronoctl
>
> > [!NOTE]
> >
> > If you don't already have a YAML configuration file, use the `scaffold` Chronoctl
> > parameter to generate a template for a specific resource type:
> >
> > ```shell theme={null}
> > chronoctl trace-behavior-config scaffold
> > ```
> >
> > You can redirect the results (using the redirection operator `>`) to a file for
> > editing.
>
> To assign a behavior with [Chronoctl](/tooling/chronoctl):
>
> 1. Run the following command to generate a sample behavior configuration you can use
> as a template:
>
> ```shell theme={null}
> chronoctl trace-behavior-config scaffold
> ```
>
> In the template, `kind: TraceBehaviorConfig` defines an individual dataset.
>
> 2. With a completed definition, submit it with:
>
> ```shell theme={null}
> chronoctl trace-behavior-config create -f FILE_NAME
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
>
> See the [Chronoctl behavior example](#chronoctl-behavior-example) for a completed
> behavior definition.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateTraceBehaviorConfig`](/tooling/api-info/definition/operations/UpdateTraceBehaviorConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Chronoctl behavior example
The following YAML definition consists of one behavior named
`Traces payment service US prod`. This dataset includes any spans that include the
`payment` service, the `payment_store` operation, and have a tag where
`deployment.environment=production`.
```yaml expandable Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: TraceBehaviorConfig
spec:
# List of assignments for the main behavior. The referenced datasets are datasets
# to enroll in behaviors. The referenced behaviors are the active behaviors
# for the dataset when there is no override in place.
# * Only one main behavior can be assigned to a dataset.
# * Only one referenced 'TraceBehavior' with 'type' field set to 'TYPE_BASELINE' can
# be set, which must match the slug referenced by 'baseline_behavior_slug'.
main_behavior_assignments:
- created_at: "2024-08-24T14:15:22Z"
updated_at: "2024-08-24T13:22:21Z"
# The slug reference of a TraceDataset
dataset_slug: "shopper-dataset"
# The slug reference of a TraceBehavior
behavior_slug: "baseline"
# The author or creator of the entry.
created_by: "someone@example.com"
# A description of the entry.
description: "Description of the behavior"
# List of assignments for the override behavior. OverrideBehaviorAssignments are used to
# specify the active behavior for a dataset over a specific time range.
# * Only one override behavior can be assigned to a dataset.
# * Only one referenced 'TraceBehavior' with 'type' field set to 'TYPE_BASELINE' can
# be set, which must match the slug referenced by 'baseline_behavior_slug', and any
# baseline behavior referenced in 'main_behavior_assignments'.
override_behavior_assignments:
- created_at: "2024-08-24T14:15:22Z"
updated_at: "2024-08-24T13:22:21Z"
# The slug reference of a TraceDataset
dataset_slug: "shopper-dataset"
# The slug reference of a TraceBehavior
behavior_slug: "keep-all"
# The starting time of the override.
start_time: "2024-08-26T14:15:22Z"
# The ending time of the override.
end_time: "2024-08-26T15:15:22Z"
# The author or creator of the entry.
created_by: "someone@example.com"
# A description of the entry.
description: "Allow all traces for one hour"
# List of dataset priorities. This list specifies the order in which datasets
# are considered when determining the behavior to follow for a trace. Dataset
# priorities are used to break ties when a trace matches more than one dataset
# with an active behavior.
# * Each entry in this list must refer to the slug of an existing dataset.
# * The order of the list is the order in which the datasets are considered.
# * The list must contain all datasets referenced in either main_behavior_assignments
# and override_behavior_assignments.
# * The list may contain datasets that are not referenced in either of the
# previous references.
dataset_priorities:
- "baseline"
- "keep-all"
# The baseline behavior to use for behavior assignments and base head sampling rates.
# Must reference a TraceBehavior entity with type: TYPE_BASELINE.
baseline_behavior_slug: "baseline"
```
## Edit datasets
When creating or editing a dataset, you can
[use the Code Config tool](/tooling/gitops#use-the-code-config-tool) to view code
representations of a dataset for
[Terraform](/tooling/infrastructure/terraform), [Chronoctl](/tooling/chronoctl), and
the [Cortex XCOR API](/tooling/api-info). The displayed code also responds to
changes you make in the **Visual Editor** tab.
Entities modified by Terraform and Chronoctl are viewable in Cortex XCOR,
but can't be modified.
Select from the following methods to edit trace datasets.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Optimization**.
> 2. From the list of datasets, click the dataset you want to edit.
> 3. On the selected dataset page, click **Edit dataset**.
> 4. Make changes to your dataset, and then click **Save**.
>
> Cortex XCOR saves changes to your dataset.
> [tab] Chronoctl
>
> To edit datasets using [Chronoctl](/tooling/chronoctl):
>
> 1. [View the datasets Chronoctl YAML](#view-datasets).
> 2. Modify its properties and apply the changes with the same process as
> [Creating datasets](#create-datasets).
>
> Chronoctl updates the dataset if it has the same slug.
>
> You can also use the following process if you already have a definition file:
>
> 1. Update the datasets definition file.
> 2. Run the following command to submit the changes:
>
> ```shell theme={null}
> chronoctl datasets update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
>
> You can also [Use the Code Config tool](/tooling/gitops#use-the-code-config-tool) to
> view the dataset's
> Chronoctl YAML representation.
> [tab] Terraform
>
> To edit datasets using [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> You can also [Use the Code Config tool](/tooling/gitops#use-the-code-config-tool) to
> view the dataset's
> Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateDataset`](/tooling/api-info/definition/operations/UpdateDataset) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 datasets
Select from the following methods to delete trace datasets.
> [!NOTE]
>
> Users can modify Terraform-managed resources only by using Terraform.
> [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
> [tab] Web
>
> Complete the following steps before you delete a dataset:
>
> 1. [Remove any assigned behaviors](#assign-behaviors).
> 2. Stop any active [preview behaviors](/control/shaping/sample-traces/behaviors#preview-behaviors).
>
> After removing any assigned behaviors and stopping active preview behaviors, delete
> the dataset:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Optimization**.
> 2. From the list of datasets, click the dataset you want to delete.
> 3. On the selected dataset page, click **Delete dataset**.
> 4. In the confirmation dialog, click **Delete** to delete the dataset.
> [tab] Chronoctl
>
> To delete a dataset with [Chronoctl](/tooling/chronoctl), use the `chronoctl datasets delete`
> command:
>
> ```shell theme={null}
> chronoctl datasets delete SLUG
> ```
>
> Replace *`SLUG`* with the slug of the dataset you want to delete.
>
> For example, to delete a dataset with the slug `infra-example-dataset`:
>
> ```shell theme={null}
> chronoctl datasets delete infra-example-dataset
> ```
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteDataset`](/tooling/api-info/definition/operations/DeleteDataset) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Head sampling
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/sample-traces/head-sampling
Learn how to configure head sampling to capture a portion of your traces from originating services.
You can configure dynamic, remotely configurable
[*head sampling*](https://opentelemetry.io/docs/concepts/sampling/#head-sampling)
to capture only a portion of possible traces from originating services. Use head
sampling rules to limit possible traces to a fraction of all possible traces. You
define sampling strategies to target specific kinds of traces, focus on specific
services, or concentrate on a combination of service and operation.
> [!NOTE]
>
> Head sampling applies only to root services, which are services that appear on the
> root span of a trace. Identifying root services can help identify where the most
> requests to a service originate, and can inform which service to increase sampling
> for to generate additional trace data.
To instrument head sampling, Palo Alto Networks Cortex XCOR supports the
[OpenTelemetry JaegerRemoteSampler](https://opentelemetry.io/docs/specs/otel/trace/sdk/#jaegerremotesampler)
head sampling standard. To use head sampling, you must first
[configure the OpenTelemetry Collector](#configure-the-opentelemetry-collector).
## View head sampling rules
View head sampling rules in Cortex XCOR to understand how each rule
impacts your tracing data, such as the sampling rate, rule criteria, and the impact
the rule is having on your trace data volume.
To return a list of defined head sampling rules without additional information, use
Chronoctl.
> [tab] Web
>
> In Cortex XCOR, each head sampling rule indicates which service or
> combination of service and operation it impacts. A single rule can impact multiple
> operations at different sampling rates for a specific service.
>
> You need administrative access to complete this task.
>
> To view head sampling rules:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Optimization**.
> 2. Click the **Head sampling** tab.
>
> * The **Status** column indicates whether each rule is active or inactive. An
> active status means that a client fetched the head sampling rule within the last
> 30 minutes.
> * The **Traces Kept** column indicates the percentage at which the current rule is
> sampling your traces for the indicated service. Hold the pointer over the bar in
> this column to view a description for each rule.
> 3. Expand each of the configured rules to view the rule criteria and impact on your
> tracing data. You can also view which operations the rule impacts for the selected
> service.
> 4. If a rule impacts multiple operations, use the dropdown menu to select which
> operation to display impact data for.
> 5. Use the search box to locate rules impacting a specific service.
> [tab] Chronoctl
>
> To display a list of all available head sampling rules
> with [Chronoctl](/tooling/chronoctl), use this command:
>
> ```shell theme={null}
> chronoctl trace-jaeger-remote-sampling-strategies list
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListTraceJaegerRemoteSamplingStrategies`](/tooling/api-info/definition/operations/ListTraceJaegerRemoteSamplingStrategies)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Configure head sampling
To instrument head sampling, Cortex XCOR supports the
[OpenTelemetry JaegerRemoteSampler](https://opentelemetry.io/docs/specs/otel/trace/sdk/#jaegerremotesampler)
head sampling standard. Cortex XCOR implements the
[JaegerRemoteSampler configuration API](https://www.jaegertracing.io/docs/1.41/apis/#remote-sampling-configuration-stable),
and serves sampling strategies based on the Terraform resources you define.
Cortex XCOR is compatible with the
[Jaeger Remote Sampling extension](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/jaegerremotesampling)
to enable the OpenTelemetry Collector to act as a proxy between OpenTelemetry agents
and the Cortex XCOR backend.
To configure head sampling:
1. [Configure the OpenTelemetry Collector](#configure-the-opentelemetry-collector).
2. [Configure your app as an OpenTelemetry agent](#configure-your-app-as-an-opentelemetry-agent).
3. [Create head sampling rules](#create-head-sampling-rules).
### Configure the OpenTelemetry Collector
> Requires OpenTelemetry Collector version 0.83 or later.
Before configuring OpenTelemetry agents, you must configure the OpenTelemetry
Collector to export tracing data to Cortex XCOR.
1. [Configure the OpenTelemetry Collector](/ingest/metrics-traces/otel/otel-ingest) to export
tracing data to Cortex XCOR.
2. In the OpenTelemetry Collector `config.yaml` file, apply the following settings to
modify the `extensions` YAML collection. Specify an `endpoint` that points to your
Cortex XCOR tenant, and include the Cortex XCOR API token you created
for the OpenTelemetry Collector.
Cortex XCOR recommends specifying a `reload_interval` to control a local cache of
your sampling strategy for the `remote` source (which is Cortex XCOR).
This interval reduces the number of backend API calls the OpenTelemetry Collector
makes for your instrumented agents, which helps reduce egress costs.
```yaml /TENANT/ /API_TOKEN/ theme={null}
extensions:
zpages:
endpoint: 0.0.0.0:55679
health_check: {}
pprof: {}
jaegerremotesampling:
source:
reload_interval: 30s
remote:
endpoint: TENANT
compression: gzip
headers:
API-Token: ${env:API_TOKEN}
```
* *`TENANT`*: The name of your Cortex XCOR tenant.
* *`API_TOKEN`*: The API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
### Configure your app as an OpenTelemetry agent
Configure your app as an
[OpenTelemetry agent](https://opentelemetry.io/docs/collector/deployment/agent/)
to act as a proxy for the OpenTelemetry Collector, which sends your tracing data to
Cortex XCOR.
Instrument your app with the OpenTelemetry SDK using the
[OpenTelemetry protocol (OTLP)](https://opentelemetry.io/docs/specs/otel/protocol/).
Your app sends spans to the OpenTelemetry Collector, which pulls head sampling rules
from Cortex XCOR. As you update head sampling rules in Cortex XCOR, the OpenTelemetry
Collector pulls the changes and transmits the updated
rules to your app.
```mermaid actions={false} theme={null}
---
title: Span flow with head sampling rules
---
flowchart LR
A["Agent (your app)"
instrumented with OTLP]
A -- spans --> B
A -. sampling rules .-> B
B[OpenTelemetry Collector] --> C[Cortex XCOR]
D[Head sampling rules]
D -.-> C
B -.-> D
```
The implementation depends on the programming language of your app. For example,
the following code from the Go implementation of OpenTelemetry,
[OpenTelemetry-Go](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/samplers/jaegerremote/README.md),
defines how to implement the JaegerRemoteSampler in Go:
```go /SERVICE_NAME/ /HOST_NAME/ theme={null}
jaegerRemoteSampler := jaegerremote.New(
"SERVICE_NAME",
jaegerremote.WithSamplingServerURL("http://HOST_NAME:5778/sampling"),
jaegerremote.WithSamplingRefreshInterval(10*time.Second),
jaegerremote.WithInitialSampler(trace.TraceIDRatioBased(0.5)),
)
tp := trace.NewTracerProvider(
trace.WithSampler(jaegerRemoteSampler),
// ...
)
otel.SetTracerProvider(tp)
```
* *`SERVICE_NAME`*: Name of the service you're sampling, which can map to a
microservice in your architecture.
* *`HOST_NAME`*: Host name where your OpenTelemetry Collector is running.
When configuring the Jaeger remote sampler, you must include all of these properties:
* **Endpoint**: Endpoint where your OpenTelemetry Collector is running, which
includes the Jaeger Remote Sampling extension that points to Cortex XCOR.
* **Polling interval**: Interval at which your OpenTelemetry agents sync strategies
from your OpenTelemetry Collector.
* **Initial sampler**: Policy to implement from your service until the configured
endpoint pulls a strategy.
## Create head sampling rules
After configuring the OpenTelemetry Collector to export traces, configuring head
sampling, and configuring your OpenTelemetry agents, manage your head sampling
strategy using the [Terraform provider](/tooling/infrastructure/terraform) or
[Chronoctl](/tooling/chronoctl). This ability means you can push strategy changes to all of
your OpenTelemetry agents without modifying the JaegerRemoteSampler strategy
directly.
> [!NOTE]
>
> If you don't define a sampling strategy for a service, Cortex XCOR applies
> the default sampling rate of `0.001` (0.1%) to the service.
The `applied_strategy` defines your sampling strategy, and can be one of the
following values:
* `probabilistic_strategy`: Defines a probabilistic strategy, which samples traces
from the identified service based on the `sampling_rate`. This value determines the
probability of sampling any trace, and must be in the range of `0` to `1`.
* `rate_limiting_strategy`: Defines a rate-limited strategy that sets the maximum
number of traces to sample per second.
* `per_operation_strategies`: Defines a probabilistic strategy that sets a default
sampling rate, plus an upper and lower bound.
> [tab] Chronoctl
>
> When creating your head sampling strategy with Chronoctl, consider the following
> behaviors of the `slug` property:
>
> * If you don't provide a `slug`, Chronoctl generates one based on the `name` field.
> * After creating your head sampling strategy, you can modify the `name` but can't
> modify the `slug`.
> * The `service_name` and `slug` must match.
>
> To define your head sampling strategy with [Chronoctl](/tooling/chronoctl):
>
> 1. Create a YAML file and define your head sampling strategy.
>
> > [!NOTE]
> >
> > Use the `chronoctl trace-jaeger-remote-sampling-strategies scaffold` command to
> > generate an example resource for a head sampling rule.
>
> The following head sampling strategy defines a probabilistic strategy that sets a
> default sampling rate for the `inventory-operation`, plus an upper and lower bound:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: TraceJaegerRemoteSamplingStrategy
> spec:
> slug: ordering-service-sampling
> name: Ordering service head sampling strategy
> service_name: ordering-service-sampling
> applied_strategy:
> per_operation_strategies:
> default_sampling_rate: 0.01
> default_lower_bound_traces_per_second: 1
> default_upper_bound_traces_per_second: 1000
> per_operation_strategies:
> - operation: inventory-operation
> probabilistic_sampling_strategy:
> sampling_rate: 0.1
> ```
>
> 2. Apply your head sampling strategy and send it to Cortex XCOR:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl apply -f FILE_NAME.yml
> ```
>
> *`FILE_NAME`* is the name of your head sampling YAML file.
> [tab] Terraform
>
> Create a head sampling rule with Terraform by using the
> `chronosphere_trace_jaeger_remote_sampling_strategy` type in a `resource`
> declaration.
>
> When managing your head sampling strategy with Terraform, Cortex XCOR recommends
> defining one `resource` per microservice in your Terraform file.
>
> If you use the Cortex XCOR-managed JaegerRemoteSampler configuration API, you can
> create and change the sampling strategies of your services by running `terraform
> apply`, without having to redeploy your services or OpenTelemetry Collector.
>
> To define your head sampling strategy:
>
> 1. In your Terraform file, create your head sampling strategy. You must include
> a `name`,`service_name`, and `applied_strategy`. For example:
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_trace_jaeger_remote_sampling_strategy" "billing-service" {
> name = "billing-service Jaeger Remote Sampling strategy"
> service_name = "billing-service"
>
> applied_strategy {
> probabilistic_strategy {
> sampling_rate = 0.01
> }
> }
> }
> ```
>
> Refer to [this example](#terraform-example) for more information.
>
> 2. Apply the changes:
>
> ```terraform icon="square-terminal" theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateTraceJaegerRemoteSamplingStrategy`](/tooling/api-info/definition/operations/CreateTraceJaegerRemoteSamplingStrategy)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Terraform example
The following example provides a `resource` definition for three services and
defines a distinct sampling strategy for each:
* The first resource samples the `billing-service` service at a rate of `0.01`, which
is 1% of traces.
* The second resource samples at most two traces per second, per instance, from the
`cart-service` service. For example, if the `cart-service` service consists of 17
pods, the expected sample of traces per second is somewhere between 0 and 34.
* The third resource samples traces from the `ordering-service` service at a rate of
`0.01`, or 1% of traces. If volumes are low, Cortex XCOR samples traces
at least once per second. If volumes are high, Cortex XCOR stops
sampling traces after reaching 1,000 traces per second.
```terraform expandable Terraform example icon="square-terminal" theme={null}
resource "chronosphere_trace_jaeger_remote_sampling_strategy" "billing-service" {
name = "billing-service Jaeger Remote Sampling strategy"
service_name = "billing-service"
applied_strategy {
probabilistic_strategy {
sampling_rate = 0.01
}
}
}
resource "chronosphere_trace_jaeger_remote_sampling_strategy" "cart-service" {
name = "cart-service Jaeger Remote Sampling strategy"
service_name = "cart-service"
applied_strategy {
rate_limiting_strategy {
max_traces_per_second = 2
}
}
}
resource "chronosphere_trace_jaeger_remote_sampling_strategy" "ordering-service" {
name = "ordering-service Jaeger Remote Sampling strategy"
service_name = "ordering-service"
applied_strategy {
per_operation_strategies {
default_sampling_rate = 0.01
default_lower_bound_traces_per_second = 1
default_upper_bound_traces_per_second = 1000
per_operation_strategies {
operation = "notification-operation"
probabilistic_strategy {
sampling_rate = 0.0
}
}
per_operation_strategies {
operation = "inventory-operation"
probabilistic_strategy {
sampling_rate = 0.1
}
}
per_operation_strategies {
operation = "payment-operation"
probabilistic_strategy {
sampling_rate = 1.0
}
}
}
}
}
```
## Edit head sampling rules
Select from the following methods to edit head sampling rules.
> [tab] Chronoctl
>
> To edit head sampling rules with [Chronoctl](/tooling/chronoctl):
>
> 1. [View the head sampling rules Chronoctl YAML](#view-head-sampling-rules).
> 2. Modify its properties and apply the changes with the same process as
> [creating head sampling rules](#create-head-sampling-rules). Chronoctl updates
> head sampling rules if it has the same slug.
>
> You can also use the following process if you already have a definition file:
>
> 1. Update the head sampling rules definition file.
> 2. Run the following command to submit the changes:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl trace-jaeger-remote-sampling-strategies update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> To edit head sampling rules using [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateTraceJaegerRemoteSamplingStrategy`](/tooling/api-info/definition/operations/UpdateTraceJaegerRemoteSamplingStrategy)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 head sampling rules
Select from the following methods to delete head sampling rules.
> [tab] Chronoctl
>
> To delete a head sampling rule with [Chronoctl](/tooling/chronoctl), use this
> command:
>
> ```shell /SLUG/ theme={null}
> chronoctl trace-jaeger-remote-sampling-strategies delete SLUG
> ```
>
> Replace *`SLUG`* with the slug of the head sampling rule you want to delete.
>
> For example, to delete a head sampling rule with the slug `head-sampling-prod`:
>
> ```shell theme={null}
> chronoctl trace-jaeger-remote-sampling-strategies delete head-sampling-prod
> ```
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteTraceJaegerRemoteSamplingStrategy`](/tooling/api-info/definition/operations/DeleteTraceJaegerRemoteSamplingStrategy)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Tail sampling
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/sample-traces/tail-sampling
Learn about how to configure tail sampling to configure filters on trace data before it's stored.
You can configure *tail sampling* to apply a set of fine-grained rules after any
[head sampling](/control/shaping/sample-traces/head-sampling) decisions. While
head sampling allows probabilistic sampling at the start of a trace, tail sampling
focuses on the result of a trace. You can implement rules to look at the downstream
effects of an operation, and evaluate traces based on outcomes, such as whether an
error occurred or if a trace contributed to higher latency than normal. After
evaluating these rules, you can keep a higher percentage of influential traces while
downsampling baseline traces.
Use tail sampling to configure specific filters on trace data before it's stored, and
then sample your data based on those rules. For example, you might create a rule to
keep all error traces, or continue downsampling all successful traces. These types of
rules help to reduce costs and limit the amount of information you need to triage
when debugging issues.
For more information about tail sampling, see the
[Tail Sampling](https://opentelemetry.io/docs/concepts/sampling/#tail-sampling)
section of the OpenTelemetry Sampling documentation page.
## View tail sampling rules
In Palo Alto Networks Cortex XCOR, you can view the tail sampling rules you
configured in Terraform to understand the impact of each rule on your tracing data.
These impacts can include the sampling rate, the rule's criteria, and the impact of a
rule on your incoming traces.
Cortex XCOR evaluates each trace against each rule's trace filter, in
order of precedence, until a rule matches. If a rule matches, Cortex XCOR
applies the matched rule's sampling rate to the trace.
If a trace doesn't match any rules, Cortex XCOR applies the default sample
rate to the trace. If a default sampling rate isn't specified, Cortex XCOR
keeps all traces.
You need administrative access to complete this task.
> [tab] Web
>
> To view tail sampling rules:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Optimization**.
>
> 2. Select the **Tail sampling** tab. The sample rate for each rule displays in the
> **Traces Kept** column, in addition to the **Created** and **Updated** dates.
>
> Hold the pointer over the bar in the **Traces Kept** column to view a description
> for each rule.
>
> 3. Expand each of the configured rules to view the rule criteria and impact on your
> tracing data.
>
> 4. Use the search box to locate rules impacting a specific service or operation.
> [tab] Chronoctl
>
> To display a list of all available tail sampling rules
> with [Chronoctl](/tooling/chronoctl), use this command:
>
> ```shell theme={null}
> chronoctl trace-tail-sampling-rules read
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ReadTraceTailSamplingRules`](/tooling/api-info/definition/operations/ReadTraceTailSamplingRules)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 tail sampling rules
You can create tail sampling rules using the
[Terraform provider](/tooling/infrastructure/terraform) or
[Chronoctl](/tooling/chronoctl).
You create one set of tail sampling rules as an ordered list. Rules are evaluated in
match order. In your rule definition file, put broader rules at the top, such as a
rule that drops any traces with [health check data](#drop-all-health-check-traces).
For each rule, complete the following tasks:
* Assign a human-readable `name` to identify the tail sampling rule in Cortex XCOR.
* Assign a `system_name`, which provides a unique label name for the metric group
that traces affected by the rule.
* Define a specific filter such as `"error=true"`.
* Specify a sampling rate. The defaults sampling rate is `1`, which means that
Cortex XCOR stores all traces that don't match any sampling rules.
Sampling rates must be a number between `0` and `1`, where a rate of `0` drops all
traces, and a rate of `1` keeps all traces matching the defined filter. A sampling
rate of `.5` drops half of all traces matching the filter, and keeps the other half.
For a complete list of supported fields for tail sampling rules, see the
[CreateTraceTailSamplingRules endpoint](/tooling/api-info/definition/operations/CreateTraceTailSamplingRules).
> [tab] Chronoctl
>
> > Requires [Chronoctl](/tooling/chronoctl) version 1.0.0 or later.
>
> You can use the `trace-tail-sampling-rules scaffold` command to generate an example
> tail sampling rule, and then copy the resource definition:
>
> ```shell theme={null}
> chronoctl trace-tail-sampling-rules scaffold
> ```
>
> To define your tail sampling strategy:
>
> 1. Create a YAML file and define your tail sampling strategy.
>
> The following tail sampling drops all health check traces from an operation named
> `/health`. The `sample_rate` of `0` drops any traces matching the defined rule.
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: TraceTailSamplingRules
> spec:
> rules:
> - sample_rate: 0
> name: Drop all health checks
> system_name: drop-node-health-checks
> filter:
> span:
> - operation:
> value: /health
> match: EXACT
> match_type: INCLUDE
> default_sample_rate:
> enabled: true
> sample_rate: 1
> ```
>
> 2. Apply your tail sampling strategy and send it to Cortex XCOR:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl apply -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of your tail sampling YAML file.
> [tab] Terraform
>
> Use Terraform to create a rule definition for tail sampling:
>
> 1. In your Terraform file, create a tail sampling strategy with a `resource`
> declaration by using the `chronosphere_trace_tail_sampling_rules` type, followed
> by a `default_sample_rate` and your `rules` definition.
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_trace_tail_sampling_rules" "default-sampling-rules" {
> default_sample_rate {
> enabled = true
> sample_rate = 1
> }
> }
> ```
>
> The `default_sample_rate` must be a value between `0` and `1`, inclusive.
>
> Refer to [these examples](#terraform-examples) for more information.
>
> 2. Apply the changes:
>
> ```terraform icon="square-terminal" theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateTraceTailSamplingRules`](/tooling/api-info/definition/operations/CreateTraceTailSamplingRules)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Edit tail sampling rules
Select from the following methods to edit tail sampling rules.
> [tab] Chronoctl
>
> To edit tail sampling rules with [Chronoctl](/tooling/chronoctl):
>
> 1. [View the tail sampling rules Chronoctl YAML](#view-tail-sampling-rules).
> 2. Modify its properties and apply the changes with the same process as
> [creating tail sampling rules](#create-tail-sampling-rules). Chronoctl updates
> tail sampling rules if it has the same slug.
>
> You can also use the following process if you already have a definition file:
>
> 1. Update the tail sampling rules definition file.
> 2. Run the following command to submit the changes:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl trace-tail-sampling-rules update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> To edit tail sampling rules using [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateTraceTailSamplingRules`](/tooling/api-info/definition/operations/UpdateTraceTailSamplingRules)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 tail sampling rules
Select from the following methods to delete tail sampling rules.
> [tab] Chronoctl
>
> To delete a tail sampling rule with [Chronoctl](/tooling/chronoctl), use this
> command:
>
> ```shell /SLUG/ theme={null}
> chronoctl trace-tail-sampling-rules delete SLUG
> ```
>
> Replace *`SLUG`* with the slug of the tail sampling rule you want to delete.
>
> For example, to delete a tail sampling rule with the slug `tail-sampling-prod`:
>
> ```shell theme={null}
> chronoctl trace-tail-sampling-rules delete tail-sampling-prod
> ```
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteTraceTailSamplingRules`](/tooling/api-info/definition/operations/DeleteTraceTailSamplingRules)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Terraform examples
Use the following examples to build your tail sampling strategy in Terraform. Because
the tracing backend evaluates rules in match order, put expansive rules at the top of
your Terraform file, such as rules that always drop or always keep specific traces.
### Default sampling rate
The following example defines a default sample rate of `1`, which keeps all traces. A
sample rate of `0` drops all traces that don't match any other rule.
```terraform Terraform example icon="square-terminal" theme={null}
resource "chronosphere_trace_tail_sampling_rules" "default-sampling-rules" {
default_sample_rate {
enabled = true
sample_rate = 1
}
}
```
### Drop all health check traces
You might have load balancers that ping your backend servers every few seconds, which
can generate a large amount of useless tracing data. In this instance, you can define
a rule to drop all health check traces rather than those from a particular service.
In addition to defining the default sample rate, the following rule drops all
health check traces from an operation named `"/health"`. The `sample_rate` of `0`
drops any traces matching the defined rule.
```terraform Terraform example icon="square-terminal" theme={null}
resource "chronosphere_trace_tail_sampling_rules" "drop-node-health-checks" {
default_sample_rate {
enabled = true
sample_rate = 1
}
rules {
name = "No Health Checks"
system_name = "no_health_checks"
filter {
span {
match_type = "INCLUDE"
operation {
match = "EXACT"
value = "/health"
}
}
}
sample_rate = 0
}
}
```
### Always keep query traces with a minimum duration
Requests to your app can quickly consume your licensed trace capacity. For example,
user-initiated requests to a ride sharing app can amount to huge traces, especially
during peak travel hours. Any time a query executes, it can generate tens or even
hundreds of thousands of spans. You might only want to keep traces that exceed a
specific duration or result in an error state, rather than storing the entirety of
your tracing data.
The following example keeps any trace with a span where the operation is `"/hail-ride"`,
and the overall duration of the trace is greater than five seconds. This rule lets
you store long-running traces and investigate what's causing higher latency.
```terraform Terraform example icon="square-terminal" theme={null}
resource "chronosphere_trace_tail_sampling_rules" "keep-longer-traces" {
default_sample_rate {
enabled = true
sample_rate = 1
}
rules {
name = "Hail Ride High Latency"
system_name = "hail_ride_high_latency"
sample_rate = 1
filter {
span {
match_type = "INCLUDE"
operation {
match = "EXACT"
value = "/hail-ride"
}
}
trace {
duration {
min_secs = 5
}
}
}
}
}
```
You can extend this rule set to also include traces to the `"/hail-ride"` operation
that fail. The following rule matches any trace with at least one call to the
`"/hail-ride"` operation anywhere in the trace, even if there's only one out of 1,000
spans. Cortex XCOR then keeps any traces from the `"/hail-ride"` operation
where the error value is `true`.
```terraform Terraform example icon="square-terminal" theme={null}
resource "chronosphere_trace_tail_sampling_rules" "keep-error-traces" {
default_sample_rate {
enabled = true
sample_rate = 1
}
rules {
name = "Non-200 HTTP status, USA only"
system_name = "non_200_http_status_usa"
sample_rate = 1
filter {
span {
match_type = "INCLUDE"
operation {
match = "EXACT"
value = "/hail-ride"
}
}
trace {
error {
value = true
}
}
}
}
}
```
### Match on services in specific regions
You might want to keep a percentage of traces from particular services that match
certain conditions. For example, always keep a sample of traces from the
`billing-svc` service in the `us-east` or `us-west` regions that have a specific
duration. This ability to hone your sampling rules provides finer control over which
tracing data you keep and pay for.
The following example defines a `resource` definition with specified rules that
matches two tags:
* Matching a tag where the key is `region` and the values are either `us-east` or
`us-west`. The example uses the `REGEX` operator to match either of the specified
values.
* Matching a tag where the key is `http.status_code` and the value doesn't match
`200`. The example uses the `NOT_EQUAL` comparison operator to achieve this
evaluation.
Cortex XCOR applies the `sample_rate` of `0.6` to any traces matching that
key-value pair and the additional specified criteria, such as `duration`, `error`,
`operation`, and `service`.
```terraform expandable Terraform example icon="square-terminal" theme={null}
resource "chronosphere_trace_tail_sampling_rules" "tail-sampling-rules" {
default_sample_rate {
enabled = true
sample_rate = 0.5
}
rules {
name = "Non-200 HTTP status, USA only"
system_name = "non_200_http_status_usa"
filter {
span {
match_type = "INCLUDE"
tag {
key = "region"
value {
match = "REGEX"
value = "(us-east|us-west)"
}
}
tag {
key = "http.status_code"
numeric_value {
comparison = "NOT_EQUAL"
value = "200"
}
}
duration {
max_secs = 16
min_secs = 11
}
error {
value = true
}
operation {
match = "EXACT"
value = "execute-charge"
}
parent_operation {
match = "EXACT"
value = "execute-purchase"
}
parent_service {
match = "EXACT"
value = "purchase-svc"
}
service {
match = "EXACT"
value = "billing-svc"
}
span_count {
min = 2
max = 4
}
}
trace {
duration {
min_secs = 10
max_secs = 15
}
error {
value = false
}
}
}
sample_rate = 0.6
}
}
```
### Nested tail sampling rules
You can nest tail sampling rules by adding multiple `rules` definitions. The
following example includes individual rules that match on different tags:
* The `Reduce prod to 5 percent` rule matches a tag where the key is
`BillingEnvironment` and the value is `production`. The sample rate is `0.05`,
which samples 5% of traces matching this rule.
* The `Exclude API status traces` rule matches a tag where the key is `Operation`
and the value is `/api/status`. The sample rate is `0`, which drops all traces
matching this rule.
If traces match neither of these rules, Cortex XCOR applies the default
rule, which is to keep all traces.
```terraform expandable Terraform example icon="square-terminal" theme={null}
resource "chronosphere_trace_tail_sampling_rules" "two-tail-sampling-rules" {
default_sample_rate {
enabled = true
sample_rate = 1
}
rules {
name = "Reduce prod to 5 percent"
system_name = "reduce_prod_to_5percent"
sample_rate = 0.05
filter {
span {
match_type = "INCLUDE"
tag {
key = "BillingEnvironment"
value {
match = "EXACT"
value = "production"
}
}
}
}
}
rules {
name = "Exclude API status traces"
system_name = "exclude_api_status_operations"
sample_rate = 0
filter {
span {
match_type = "INCLUDE"
tag {
key = "Operation"
value {
match = "EXACT"
value = "/api/status"
}
}
}
}
}
}
```
# Trace Metrics
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/sample-traces/trace-metrics
Learn about how to create and use trace metrics to help address issues.
Use Trace Explorer to identify the root cause of an issue. As you define your query
and determine what caused the problem you're investigating, you can create a
*trace metric* from your query to display that metric in a dashboard for faster
discovery. You can then configure monitors and alerts on that metric to notify other
on-call engineers if that metric identifies anomalies in your trace data.
This ability to navigate from a trace metric to a specific query in Trace Explorer
helps other on-call engineers address problems faster by using predefined queries to
explore issues.
Use the following metric types to help track information for collected traces:
* **Counter metric**: Increments any time a trace that matches a filter gets
collected. This metric also includes a label describing whether or not the trace
contains an error.
* **Histogram metric**: Collects information about the distribution of request
durations for traces that match a filter.
Palo Alto Networks Cortex XCOR provides a default **Trace Metrics** dashboard
with panels that display the requests, errors, and durations of requests associated
with a created trace metric. The dashboard also includes a service map of the
requests.
Cortex XCOR generates any trace metrics you've created before applying
behaviors or [tail sampling rules](/control/shaping/sample-traces/tail-sampling), which determine
whether to persist the trace.
To explore tracing data in Cortex XCOR, you must either install and configure the
[Chronosphere Collector](/ingest/metrics-traces/collector/install/tracing) or the
[OpenTelemetry Collector](/ingest/metrics-traces/otel/otel-ingest) to receive trace data from your
services.
## View existing trace metrics
You can view trace metrics in Cortex XCOR and open the related query in
Trace Explorer.
To return a list of defined trace metrics without additional information, use
Chronoctl.
> [tab] Web
>
> Viewing a trace metric opens the related query in Trace Explorer. Cortex XCOR takes the
> contextual information in metrics from a dashboard and uses it to
> build links to search for traces. Clicking the link opens Trace Explorer and replaces
> the variables with matching criteria defined in the link.
>
> To view your existing trace metrics:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Metrics**.
> 2. In the **Rule Name** column, click the name of a trace metric to view the dashboard
> for that metric.
> 3. From the dashboard, click anywhere in one of the graph panels to pin that
> selection. In the pinned popup, click the and then click the
> three vertical dots icon and choose one of these
> options:
>
> * **Analyze anomaly (DDx)** opens
> [Metrics Differential Diagnosis (DDx)](/investigate/analyze/differential-diagnosis/metrics)
> and identifies labels and values that strongly correlate to the trace metric.
> * **View similar logs** opens Logs Explorer with results filtered to the selected
> trace metric.
> * **View similar traces** opens Trace Explorer with results filtered to the
> selected trace metric.
>
> See [common panel elements](/observe/dashboards/panels#common-panel-elements) for an
> explanation of the other available tools.
> [tab] Chronoctl
>
> To view a list of all available trace metrics using [Chronoctl](/tooling/chronoctl),
> use the `chronoctl trace-metrics-rules list` command:
>
> ```shell theme={null}
> chronoctl trace-metrics-rules list
> ```
>
> A complete list of the available trace metrics displays in your terminal.
>
> To view a single trace metrics rule, use the `chronoctl trace-metrics-rules read`
> command, followed by the slug of the rule you want to view. For example, the
> following command returns a trace metrics rule with the slug `telemetry-sdk`:
>
> ```shell theme={null}
> chronoctl trace-metrics-rules read telemetry-sdk
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListTraceMetricsRules`](/tooling/api-info/definition/operations/ListTraceMetricsRules)
> endpoint.
>
> To view a single trace metrics rule instead of a complete list of rules, use the
> [`ReadTraceMetricsRule`](/tooling/api-info/definition/operations/ReadTraceMetricsRule)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 a trace metric
Cortex XCOR uses trace queries as the basis for trace metrics. You define
a search query in Trace Explorer, and create a trace metric based on the matching
criteria.
You can search for any labels you add to your trace metric in
[Metrics Explorer](/investigate/querying/metrics/explorer) when investigating query
requests and responses.
> [!WARNING]
>
> Creating a trace metric is the same as creating a new metric in your system. Any trace
> metrics you create impact your metrics license consumption, which display in the
> [License Overview](/observe/dashboards/managed-dashboards#licensing-dashboards).
>
> Because of that potential impact, avoid including high cardinality dimensions in your
> trace metric. As a protective measure, trace metrics capture data for only the first
> 1,000 unique series observed.
>
> Selecting a dimension to group by with high cardinality can overflow the 1,000 value
> trace metric cardinality limit, and cause incorrect data to display in your trace
> metric dashboard.
> [tab] Web
>
> To create a trace metric, you must have administrative privileges.
>
> To create a new trace metric:
>
> 1. In the navigation menu select
** Explorers > Trace Explorer**.
>
> 2. Apply one or more filters to
> [define a search](/investigate/querying/traces#define-a-search). Trace
> Explorer applies the filters represented in the query before updating metrics for
> the created trace metric.
>
> You can group your trace query search results by up to
> [three dimensions](/investigate/querying/traces#group-and-narrow-results)
> that can include service, operation, and any other span tag. Dimensions to group
> by are inherited from the defined search query.
>
> > [!NOTE]
> >
> > Trace metrics don't support regular expression operators, such as the match (`=~`)
> > or doesn't match (`!~`) operators.
>
> 3. Click the three vertical dots icon, and then select
> **Create Trace Metric**.
>
> 4. In the **Create trace metric** dialog, enter a display name (the equivalent of
> Prometheus metric `__name__`) and system name (the trace metric **Rule Name**) for
> your trace metric.
>
> 5. In the **Group by labels** section, enter a metric label to display the aggregated
> results of your query grouped by that attribute.
>
> For each dimension in the **Group by labels** field, you must define a metric
> label key. Use the same key as the span tag, or a key that aligns with your
> existing metrics data. Cortex XCOR adds metric label keys to your trace
> metric, and associates the label value with the span tag.
>
> For example, if you group your query by the span tag **Service** and enter
> **container\_service** as the label key, Cortex XCOR adds a label to
> your trace metric where the label values equal the span tag **Service**
> values. You can then query by that label anywhere you search for metric labels,
> such as in Metrics Explorer or Telemetry Usage Analyzer.
>
> 6. Optional: Expand the **Static metric labels** section and enter key-value pairs to
> add static labels to your trace metric. Static labels are like metadata you add to
> your trace metric.
>
> 7. Click **Create**.
>
> After creating the trace metric, the **Trace Metric Created** dialog displays.
>
> It can take several minutes for the dashboard to display data about the trace
> metric.
>
> 8. Click **Go to Trace Metrics** to view the list of available trace metrics. When
> your trace metric is available, you can select it from this list to view a
> dashboard for the trace metric that includes requests, errors, durations, and a
> topology map.
>
> 9. When viewing your trace metric, click a data point in any of the provided graphs
> and then click **Query Traces** to open Trace Explorer with the query you defined
> for your trace metric.
> [tab] Chronoctl
>
> When creating your trace metric with Chronoctl, consider the following behaviors of
> the `slug` property:
>
> * If you don't provide a `slug`, Chronoctl generates one based on the `name` field.
> * You can modify the `name` after creating your trace metric, but can't
> modify the `slug`.
> * The `metric_name` and `slug` must match.
>
> To use [Chronoctl](/tooling/chronoctl) to create a trace metric, use the
> `chronoctl trace-metrics-rules` command:
>
> ```shell theme={null}
> chronoctl trace-metrics-rules scaffold
> ```
>
> 1. Run the following command to generate a sample trace metric configuration you can
> use as a template:
>
> ```shell theme={null}
> chronoctl trace-metrics-rules scaffold
> ```
>
> In the template, `kind: TraceMetricsRule` defines an individual trace metric.
>
> You can redirect the results (using the redirection operator `>`) to a file for
> editing.
>
> 2. With a completed definition, submit it with:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl trace-metrics-rules create -f FILE_NAME
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
>
> See the [Chronoctl example](#chronoctl-trace-metric-example) for a completed trace
> metrics resource.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create a new trace metric with [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file and add the definition by using the
> `chronosphere_trace_metrics_rule` type, followed by a name in a resource
> declaration.
>
> Refer to [Trace metric rule fields](#trace-metric-rule-fields) for a list of all
> supported fields.
>
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> See the [Terraform example](#terraform-trace-metric-example) for a completed trace
> metric resource.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateTraceMetricsRule`](/tooling/api-info/definition/operations/CreateTraceMetricsRule)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Chronoctl trace metric example
The following resource defines a trace metric that matches spans that includes both
the `ordering-svc` and the `POST/submit-order` operation, a tag of `env=production`,
and a duration between two and three seconds. The metric also groups by the
`ordering-svc` key.
Use the `scope_filter` field to add a secondary layer of filtering after the initial
trace metrics filter. This additional filtering is comparable to using the
[span statistics](/investigate/querying/traces/features#span-statistics) feature in
Trace Explorer to return information about specific spans within the specified trace
filter.
```yaml expandable Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: TraceMetricsRule
spec:
name: Ordering service uswest1 error traces
slug: ordering-service-uswest1-error-traces
metric_name: order-svc-uswest1-errors
group_by:
- label: svc
key:
named_key: ordering-svc
type: SERVICE
trace_filter:
span:
- tags:
- key: env
value:
value: production
match: EXACT
operation:
value: POST/submit-order
match: EXACT
service:
value: ordering-svc
match: EXACT
trace:
duration:
min_secs: 2
max_secs: 3
error:
value: true
scope_filter:
span_scopes:
- service:
value: ordering-svc
match: EXACT
match_type: INCLUDE
- operation:
value: /ordering.Ordering/Checkout
match: EXACT
- duration:
min_secs: 2
```
### Terraform trace metric example
The following Terraform resource definition defines a trace metric that matches spans
that include both the `ordering-svc` and the `POST/submit-order` operation, a tag of
`env=production`, and a duration between two and three seconds. The metric also
groups by the `ordering-svc` key.
Use the `scope_filter` field to add a secondary layer of filtering after the initial
trace metrics filter. This additional filtering is comparable to using the
[span statistics](/investigate/querying/traces/features#span-statistics) feature in
Trace Explorer to return information about specific spans within the specified trace
filter.
```terraform expandable Terraform example icon="square-terminal" theme={null}
resource "chronosphere_trace_metrics_rule" "ordering_service_metric" {
name = "Ordering service uswest1 error traces"
metric_name = "order-svc-uswest1-errors"
group_by {
label = "svc"
key {
type = "SERVICE"
named_key = "ordering-svc"
}
}
trace_filter {
span {
tag {
key = "env"
value {
value = "production"
match = "EXACT"
}
}
operation {
value = "POST/submit-order"
match = "EXACT"
}
service {
value = "ordering-svc"
match = "EXACT"
}
}
trace {
duration {
min_secs = 2
max_secs = 3
}
error {
value = true
}
}
scope_filter {
span_scopes {
service {
value = "ordering-svc"
match = "EXACT"
}
match_type = "INCLUDE"
}
}
}
}
```
## Update a trace metric
Select from the following methods to update trace metrics.
> [tab] Web
>
> To update a trace metric, you must have administrative privileges.
>
> To edit or update a trace metric:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Metrics**.
> 2. To the right of the date of the trace metric, click the
> three vertical dots icon, and then click **Edit**.
> 3. In the **Edit trace metric** dialog, edit the query that generates the trace
> metric or make any other needed changes.
> 4. Click **Save** to save your changes.
> [tab] Chronoctl
>
> To update a trace metric using [Chronoctl](/tooling/chronoctl):
>
> 1. Return a list of all available trace metrics:
>
> ```shell theme={null}
> chronoctl trace-metrics-rules list
> ```
>
> 2. Modify the YAML file for the trace metrics you want to update.
>
> 3. Apply your changes:
>
> ```shell theme={null}
> chronoctl apply -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of your trace metric YAML file.
>
> Chronoctl updates the trace metric's properties if it has the same slug.
> [tab] Terraform
>
> To edit a trace metric using [Terraform](/tooling/infrastructure/terraform):
>
> 1. Modify the resource's existing properties.
> 2. Run `terraform apply` to apply the changes.
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateTraceMetricsRule`](/tooling/api-info/definition/operations/UpdateTraceMetricsRule)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 a trace metric
Select from the following methods to delete trace metrics.
> [tab] Web
>
> To delete a trace metric, you must have administrative privileges.
>
> To delete a trace metric:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Trace Metrics**.
> 2. To the right of the date of the trace metric, click the
> three vertical dots icon, and then click **Delete**.
> [tab] Chronoctl
>
> To delete a trace metric using [Chronoctl](/tooling/chronoctl):
>
> 1. Return a list of all available notification policies:
>
> ```shell theme={null}
> chronoctl trace-metrics-rules list
> ```
>
> 2. Run the following command to delete the trace metric:
>
> ```shell theme={null}
> chronoctl trace-metrics-rules delete SLUG
> ```
>
> Replace *`SLUG`* with the slug of the trace metric you want to delete.
>
> Chronoctl deletes the trace metric with the specified slug.
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteTraceMetricsRule`](/tooling/api-info/definition/operations/DeleteTraceMetricsRule)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
Cortex XCOR removes the metric from the **Trace Metrics** page. Deleting a
trace metric also removes access to the metric in the Trace Metrics dashboard.
## Trace metric rule fields
A trace metric rule consists of the following fields, which are properties of the
`trace_metrics_rule` object. Each field is required unless otherwise noted. See
the [CreateTraceMetricsRule](/tooling/api-info/definition/operations/CreateTraceMetricsRule)
API for a complete list of supported fields.
* `group_by`: Labels for grouping and narrowing search results to specific
attributes. See [Group and narrow results](/investigate/querying/traces#group-and-narrow-results)
for more information about grouping related attributes.
* `key`: The key to group by.
* `named_key`: The name of the key to group by.
* `type`: The type of key to group by.
* `label`: The dimension for displaying the aggregated results of your query
grouped by that attribute in resulting trace metrics. Defaults to the selected
service.
* `histogram_buckets_seconds`: Optional: An array of custom buckets measured in
seconds for duration histogram metrics. You can set these if the default buckets
aren't appropriate for your data. The default buckets are `[0.005, 0.01, 0.025,
0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10]`.
* `metric_labels`: Optional: Static labels applied to the metrics, defined as
an object of one or more label name-value pairs.
* `metric_name`: The metric's name as stored in the metrics database. Use this name
to refer to the metric in PromQL queries, such as in dashboards, monitors, and the
Metrics Explorer. The `metric_name` must follow
[Prometheus metric naming rules](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
Although you can modify the `metric_name` after creation, any data points generated
*before* the name change aren't renamed. The new metric name is instead used to
generate new data points starting from that point in time. The old metric name
doesn't add new data, but you can still query it for past data points.
* `name`: The name of the trace metric rule. You can modify this name after creating
the trace metric rule.
* `slug`: Optional: The slug for the trace metric rule. After you create the rule,
the slug is immutable. If omitted, Cortex XCOR generates a `slug` at
creation time that's based on the `name`.
* `trace_filter`: A filter object that evaluates traces against several criteria and
emits metrics for only those that match. The filter's capabilities are similar to
the filter in the [Trace Explorer](/investigate/querying/traces), except it
supports only exact matches on string fields instead of regular expressions. This
object supports additional
[optional object fields](#optional-trace-filter-object-fields).
### Optional trace filter object fields
The required `trace_filter` object supports the following optional fields, and you
can use any combination of them:
> [!NOTE]
>
> Unlike most Terraform resources, several child fields of `trace` and `span` are
> objects with a single field named `value`.
* `trace`: Applies trace-level filtering. You can specify only one trace filter.
* `duration`: Matches traces with a specified duration. You can specify only one
of `min_secs` and `max_secs`.
* `min_secs`: Matches traces with a duration greater than or equal to this
value.
* `max_secs`: Matches traces with a duration less than or equal to this value.
* `error`: Object with a single field named `value`. If specified, matches traces
with an error flag equal to this Boolean value. Refer to
[assign values with `value`](#assign-values-with-value) for more information.
* `span`: Applies span-level filtering. You can specify multiple span filters, but
Cortex XCOR evaluates a trace filter match only if *all* `span` filters match.
* `service`: Object with a single field named `value`. Matches spans with a service
field equal to this value. Refer to
[assign values with `value`](#assign-values-with-value) for more information.
* `operation`: Object with a single field named `value`. Matches spans with an
operation field equal to this value. Refer to
[assign values with `value`](#assign-values-with-value) for more information.
* `parent_service`: Object with a single field named `value`. Matches spans whose
parent span's service field is equal to this value. Refer to
[assign values with `value`](#assign-values-with-value) for more information.
* `parent_operation`: Object with a single field named `value`. Matches spans whose
parent span's operation field is equal to this value. Refer to
[assign values with `value`](#assign-values-with-value) for more information.
* `duration`: Matches spans with a specified duration. You can specify only one of
`min_secs` and `max_secs`.
* `min_secs`: Matches spans with a duration greater than or equal to this
value.
* `max_secs`: Matches spans with a duration less than or equal to this value.
* `error`: Object with a single field named `value`. If specified, matches traces
with an error flag equal to this Boolean value. Refer to
[assign values with `value`](#assign-values-with-value) for more information.
* `tags`: Matches based on a span's tag keys and values. You must specify the `key`, and
you can specify multiple tag filters, but Cortex XCOR evaluates a
span filter match only if *all* `tag` filters match.
* `key`: Matches spans whose tags match the specified key.
* `value`: Object with a single field named `value`. Matches spans when the tag
with a matching key also matches the specified value. If omitted, Cortex XCOR
evaluates *all* spans matching the key as matches. Refer to
[assign values with `value`](#assign-values-with-value) for more information.
* `span_count`: Specifies how many spans can match. You can set only one of `min`
and `max`. By default, Cortex XCOR evaluates a `span` filter as a
match only if at least one span matches.
* `min`: If set, *at least* this number of spans must match the parent span
filter's conditions for Cortex XCOR to evaluate the entire trace
filter as a match.
* `max`: If set, Cortex XCOR evaluates a trace filter match only if
the number of spans matching the parent span filter's conditions is equal to
or less than the `max` value.
* `match_type`: Specifies the span filter's match type. Valid values are
`"include"` and `"exclude"`. The `"include"` match type is the default, and
evaluates a trace filter match if *all* its fields match *any* span, or multiple
spans if you specify a `span_count`. An `"exclude"` match type evaluates a trace
filter match if *no* spans within that trace match *all* of the span filter's
conditions.
### Assign values with `value`
If a child field of a `trace` or `span` are objects with a single field named
`value`, assign the value to the required child `value` field of these
objects, instead of directly assigning the value like a field.
For example, to set the `error` field's value in a `trace` filter, use:
```terraform Terraform example icon="square-terminal" theme={null}
trace {
error {
value = true
}
}
```
Also, the value of a `tag` filter, unlike the key, is also an object with a `value`
field:
```terraform Terraform example icon="square-terminal" theme={null}
span {
tag {
key = "region"
value = {
value = "us-east"
}
}
}
```
Although these objects have only the one `value` field, this structure lets
Cortex XCOR plan future features for these criteria. For more examples of this
structure, see the [filter examples](#filter-examples).
### Filter examples
Matches traces marked as `error` that also took more than five seconds:
```terraform Terraform example icon="square-terminal" theme={null}
trace_filter {
trace {
duration {
min_secs = 5
}
error {
value = true
}
}
}
```
Matches traces with at least one span from the service named `"cupcake-factory"`:
```terraform Terraform example icon="square-terminal" theme={null}
trace_filter {
span {
service {
value = "cupcake-factory"
}
}
}
```
Matches traces with at least one span tagged `region:us-east` *and* at least one
span tagged `region:us-west`:
```terraform Terraform example icon="square-terminal" theme={null}
trace_filter {
span {
tag {
key = "region"
value = {
value = "us-east"
}
}
}
span {
tag {
key = "region"
value = {
value = "us-west"
}
}
}
}
```
Matches traces with at least one span tagged *both* `region:us-east` *and*
`stack:production`:
```terraform Terraform example icon="square-terminal" theme={null}
trace_filter {
span {
tag {
key = "region"
value = {
value = "us-east"
}
}
tag {
key = "stack"
value = {
value = "production"
}
}
}
```
Matches traces with *at least* 10 spans containing the `"db-query"` operation:
```terraform Terraform example icon="square-terminal" theme={null}
trace_filter {
span {
operation {
value = "db-query"
}
span_count {
min = 10
}
}
}
```
# Shape your log data
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-logs
Learn how to use different tools in Palo Alto Networks Cortex XCOR to shape your log data and help control costs.
After creating, monitoring, and adjusting [budgets](/control/consumption/budgeting)
for your log data, you can use tools in Palo Alto Networks Cortex XCOR to
transform, reshape, retain, or exclude data. Managing the data you persist can reduce
your overall consumption, provide predictability in generated log data, and result in
more performant queries when searching through logs.
After sending data to Cortex XCOR, apply logic to parse, normalize,
control, and format your logs before persisting the data to the database. Parsing
logic and field normalization are applied before any optimization rules run.
> [!NOTE]
>
> Prefer a guided lab? Take [Controlling Logs](/academy/courses/controlling-logs) for partitions, control rules, budgets, and
> utilization analysis.
```mermaid actions={false} theme={null}
flowchart LR
Send["Send data"]
subgraph OP["Cortex XCOR"]
Parse[Parse data]
Normalize[Normalize data]
Optimize[Optimize data]
Format[Format data]
Store[Store data]
end
Send --> Parse --> Normalize --> Optimize --> Format --> Store
click Parse "/control/shaping/shape-logs/parse-logs"
click Normalize "/control/shaping/shape-logs/normalize-logs"
click Optimize "/control/shaping/shape-logs/control-logs"
click Format "/control/shaping/shape-logs/lookup-logs/"
classDef stages fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF;
class Parse,Normalize,Optimize,Format stages
```
* **Parse**: To create structured logs from plaintext logs, and parse individual fields to
extract meaningful data without changing your instrumentation, use
[parsing](/control/shaping/shape-logs/parse-logs).
* **Normalize**: To apply custom field mappings to normalize log data, use
[field normalization](/control/shaping/shape-logs/normalize-logs).
* **Optimize**: To drop entire logs, drop individual fields, or sample a percentage of
your log data, create [optimization rules](/control/shaping/shape-logs/control-logs).
* **Format**: To add context and enrich logging queries with static values, use
[lookup tables](/control/shaping/shape-logs/lookup-logs).
# Optimize your log data
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-logs/control-logs
Use log optimization rules to define actions for a subset of your log data that match specific criteria.
Palo Alto Networks Cortex XCOR provides optimization rules that let you manage log
data by transforming, reshaping, retaining, or excluding data before it's stored.
These rules let you control the volume of persisted log data and improve data
quality. By controlling which data you keep or drop, you can reduce noise, better
control costs, and focus on data that matters most to your business.
## Applying optimization rules
Optimization rules run after both [parsers](/control/shaping/shape-logs/parse-logs)
and [field mappings](/control/shaping/shape-logs/normalize-logs) run. Disabled rules
are skipped. [Enable rules](#enable-or-disable-optimization-rules) to have Cortex XCOR
evaluate them.
Cortex XCOR applies optimization rules serially and in order. Each rule operates on
the output of the rule before it. Effects of previous rules apply immediately to the
next rule in the sequence. If a rule matches the same condition as a previous rule,
the subsequent rule operates only on the outcome of the previous rule. For example,
if the first rule samples logs by 50% where `service = "auth"` and the second rule
also includes this condition, the second rule evaluates only the remaining 50% of the
original data volume.
```mermaid actions={false} theme={null}
flowchart LR
Send["Send data"]
subgraph OP["Cortex XCOR"]
Parse[Parse data]
Normalize[Normalize data]
Optimize[Optimize data]
Format[Format data]
Store[Store data]
end
Send --> Parse --> Normalize --> Optimize --> Format --> Store
click Parse "/control/shaping/shape-logs/parse-logs"
click Normalize "/control/shaping/shape-logs/normalize-logs"
click Format "/control/shaping/shape-logs/lookup-logs/"
classDef stages fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF;
class Optimize stages
```
Cortex XCOR includes the following optimization rules:
* **Drop logs** that match a specific filter to remove unnecessary or low-value data.
* **Drop fields** from logs that match specified conditions, which helps reduce the
size of individual logs. If a log contains no data after fields are dropped, you
can choose to drop the entire log.
* **Sample logs** to retain a certain percentage of matching logs and drop the
remainder, which can reduce volume and maintain visibility.
* **Emit metric** converts log data to metric data. Use this optimization rule when you
want to reduce the volume of logs, retain data for a longer period, and increase
the speed of querying and filtering for metrics instead of logs.
* **Replace field** identifies a specified field in your log data and uses a regular
expression to replace any matches based on the selected replacement mode. Use this
optimization rule to truncate long fields and preserve your log structure.
* **Parse field** formats and splits unstructured fields into multiple fields,
conditionally parses logs with similar fields based on a source field, and remaps
fields.
To change the order that optimization rules are applied,
[reorder rules](#reorder-optimization-rules).
## View optimization rules
Select from one of the following methods to view optimization rules.
> [tab] Web
>
> To view optimization rules:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
>
> All defined optimization rules display in the **Optimization rules** section.
>
> 2. To view only optimization rules, from the **View** dropdown, select
> **Optimization rules**.
>
> 3. To view the code definition for all configured optimization rules, click the
> **Code config** tab.
>
> The **Logs optimization rules** section includes all defined optimization rules.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to return all optimization rules, use the
> `chronoctl log-control-config read` command:
>
> ```shell theme={null}
> chronoctl log-control-config read
> ```
> [tab] Terraform
>
> [Use the Code config tool](/tooling/gitops#use-the-code-config-tool) in Cortex XCOR
> to view an optimization rule's Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ReadLogControlConfig`](/tooling/api-info/definition/operations/ReadLogControlConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 optimization rules
Use optimization rules to drop certain logs at ingestion, or fields that you don't
want to persist. For example, dropping log data from a specific cluster, test data in
a development environment, or unnecessary individual fields across your logs.
When creating optimization rules, be sure you understand how Cortex XCOR
[applies optimization rules](#applying-optimization-rules).
Use one of the following methods to create optimization rules for log data:
> [tab] Web
>
> Define optimization rules in Cortex XCOR, and then
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply the rule definition.
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
>
> 2. In the **Optimization rules** section, click **Create**.
>
> 3. In the **Create optimization rule** page, enter a name for the optimization rule.
>
> 4. From the **Action** menu, select the type of rule to create:
>
> * **Drop logs**: Completely drop logs that match the specified filter.
> * **Drop fields**: Remove specific fields from logs that match the specified
> filter.
> * **Sample logs**: Retain a certain percentage of matching logs and drop the
> remainder.
> * **Emit metric**: Convert log data to metric data.
> * **Replace field**: Replace context within a log field using a regular
> expression.
> * **Parse field**: Structure, format, or separate fields out of a source field.
>
> 5. Enter a filter to return log data for the optimization rule, and then press
> `Ctrl+Enter` (`Command+Return` on macOS) to submit the filter.
> This rule applies only to logs that match this filter at the time the log data was
> ingested.
>
> 6. Review the returned data from the preview filter and make changes as necessary.
>
> > [!NOTE]
> >
> > Optimization rules are applied during ingestion, so the preview filter results might
> > differ from a filter submitted in Logs Explorer after ingestion. By default,
> > including a dot (`.`) in a filter indicates nesting within a field.
> >
> > In some instances, fields with a key that uses dot notation within the name,
> > such as `resource.type`, must be surrounded by double quotes and brackets in the
> > optimization rule filter.
> >
> > If a warning message displays indicating that `This filter is applied at
> > ingestion` and the filter returns no results, wrap the key in double quotes
> > ( `"`) and brackets (`[]`). For example, the following filter contains the
> > `resource.type` key, which requires surrounding the field in double quotes and
> > brackets for this particular service:
> >
> > ```text theme={null}
> > service = "nginx" and severity = "INFO" and ["resource.type"] = "k8s_container"
> > ```
>
> 7. Enter additional information for the specified action:
>
> > [tab] Drop logs
> >
> > Review the filter and make changes as needed.
>
> > [tab] Drop fields
> >
> > Define the criteria for the drop rule:
> >
> > * In the **Parent path** field, enter the level of depth in the log to apply the
> > regular expression to. For example, if you wanted to apply the regular
> > expression to fields under `httpRequest`, such as `httpRequest.status`, enter
> > `httpRequest` in the **Parent path** field.
> >
> > For fields with no nesting, leave the **Parent path** field empty.
> >
> > * In the **Field regex** field, enter the regular expression that determines
> > which fields to match on.
>
> > [tab] Sample logs
> >
> > In the **Logs to keep** field, enter a percentage of logs you want to keep. For
> > example, `25` for 25%.
>
> > [tab] Emit metric
> >
> > Define the criteria for the rule to emit metrics from logs:
> >
> > * Enter a unique name for the generated metric.
> > * Select the metric mode for the generated metric:
> > * **Counter**: A metric that counts the number of times a certain event has
> > occurred.
> > * **Gauge**: A metric that tracks a value which changes over time. Choose
> > **Last** (most recent), **Min** (minimum value), or **Max** (maximum value)
> > to define which value to use.
> > * **Exponential Histogram**: A metric that tracks the distribution of values
> > across data groupings with exponentially increasing size.
> > * Enter a name for the log field whose value you want to use as the metric value.
> > Use `field[field]` syntax to indicate nested fields.
> > * Enter labels as key-value pairs to add to the metric.
> > * To drop the original log, select the **Drop original log after emitting metric**
> > checkbox.
>
> > [tab] Replace fields
> >
> > Define the criteria for the replace rule:
> >
> > * Enter the name of the log field to apply the rule to. In the **Match regex**
> > field, enter the regular expression that determines which data to match on in
> > the specified field.
> > * Determine whether to replace the first match only (**Replace first**), or to
> > replace all matches (**Replace all**).
> > * Select the replacement mode:
> > * **Static value**: Replace the matched content with a static string. For
> > example, replace punctuation in a field with an empty string, or truncate the
> > ends of long stack traces.
> > * **Mapped value**: Replace the matched content with specified key-value pairs.
> > For example, reduce log volume by replacing a string error with a specific
> > error code. If none of the key-value pairs match, the provided default value
> > is used.
> >
> > Click **Provide default value** to specify a default value if no matching key
> > is found.
> > * **Hash**: Replace the matched content with a hashed string, which can help
> > reduce the size of large strings. After replacing the original content with a
> > string, there's no way to recover that information.
>
> > [tab] Parse fields
> >
> > Define the criteria to parse logs:
> >
> > * Enter a **Source key** and optional **Destination key**. The source key is the
> > field in the log whose string value you want to parse, such as `message`. The
> > destination key is the field where the parsed output is written back into the
> > log, such as `message.parsed`. If you don't enter a destination key, any parsed
> > fields are pulled into the top level of the log.
> > * Select the parser type to apply to the source key and destination key:
> > > [accordion] Select parser type
> > >
> > > * **JSON**: The parser reads the source field's string value as a JSON object.
> > > Keys and values in the JSON become fields in the output.
> > > * **Regex**: Use a regular expression to match logs. In the **Template** field,
> > > select the regular expression template to apply to your logs. Use a predefined
> > > template such as **Nginx**, or specify a **Custom** template.
> > > * **Grok**: Enter a Grok pattern to match logs. This option lets you enter
> > > pre-built Grok named patterns like `%{IP:client}`, `%{NUMBER:bytes}`,
> > > and `%{WORD:method}`.
> > > * **Key/value**: Use a specified pattern to separate key-value pairs in log data.
> > > Enter the following values:
> > > * **Field delimiter**: Specifies the character used to split the input log
> > > data into key-value pairs. For example, a comma (`,`) if your data is in the
> > > format `key: value, key: value`.
> > > * **Key/value separator**: Specifies the character used to split matching
> > > pairs into its key and value. For example, a colon (`:`) if your data is in
> > > the format `key: value`.
> > > * **Trim characters**: Identifies the leading and trailing characters to trim
> > > from the key-value pairs. For example, a space (`" "`) between key-value pairs
> > > if your data is in the format `key: value, key: value`.
> > * To test the parser, in the **Preview field parser** section, enter a portion
> > of your log payload in the **Input** field. For example:
> >
> > ```text wrap theme={null}
> > 192.168.1.1 - john [10/Oct/2023:13:55:36 -0700] "GET /api/users HTTP/1.1" 200 1234
> > ```
> >
> > * Click **Test parser** to view a preview of the generated output after the parser
> > runs. For example, the following output is generated in the **Output** section from
> > the input string in the previous step:
> >
> > ```json theme={null}
> > {
> > "code": "200",
> > "host": "192.168.1.1",
> > "method": "GET",
> > "path": "/api/users HTTP/1.1",
> > "size": "1234",
> > "time": "10/Oct/2023:13:55:36 -0700",
> > "user": "john"
> > }
> > ```
> >
> > * Click **Save** to save the parser definition.
> >
> > * On the **Logs Ingest** page, click **View code config**.
> >
> > * Click the **Code config** tab and
> > [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> > the definition.
>
> 8. Click **Save** to save the optimization rule definition.
>
> 9. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> the definition.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to create optimization rules, use the
> `chronoctl log-control-config create` command:
>
> ```shell theme={null}
> chronoctl log-control-config create
> ```
>
> 1. Run the following command to generate a sample optimization rule configuration you can
> use as a template:
>
> ```shell theme={null}
> chronoctl log-control-config scaffold
> ```
>
> In the template, `kind: LogControlConfig` defines an individual optimization rule
> configuration.
>
> 2. With a completed definition, submit it with:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl log-control-config create -f FILE_NAME
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
>
> See the [Chronoctl example](#chronoctl-example) for more information.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create an optimization rule with [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create a Terraform resource with the `chronosphere_log_control_config` resource
> type, followed by a resource name.
> 2. Add the definition to a Terraform file.
> 3. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
>
> See the [Terraform example](#terraform-example) for more information.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateLogControlConfig`](/tooling/api-info/definition/operations/CreateLogControlConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Chronoctl example
The following example defines an optimization rules file for Chronoctl, and contains the
following rules:
* The first rule samples 10% of logs that match the defined filter.
* The second rule drops all logs for the `nginx` service of severity `INFO` where the
`http.Request.status` equals `200`.
* The third rule drops all `kubernetes` fields that match the defined filter. The
regular expression indicates that any fields matching `kubernetes.[FIELD]` are
dropped from all logs.
* The fourth rule uses a mapped value to search for the `error_code` field, and
replaces values based on the provided key-value pairs. If the rule matches on
`INTERNAL_SERVER_ERROR`, it replaces that value with `500`. If the rule matches on
`NOT_FOUND`, it replaces the value with `401`.
* The fifth rule emits a counter metric from NGINX error logs. Each matching log
increments `nginx_errors_total` by one. Labels on the metric come from the `service`
and `error_code` log fields.
* The sixth rule parses the `raw_request` field on matching NGINX access logs using a
Grok pattern. The parsed fields are written to the `request` field.
```yaml expandable Chronoctl example icon="square-terminal" wrap lines highlight={6,17,22,35,52,68} theme={null}
api_version: v1/config
kind: LogControlConfig
spec:
# The ordered list of optimization rules.
rules:
# First rule
- name: "Sample billing service with missing user ID"
mode: ENABLED
# Log filter syntax to select logs. Only matching logs will have control action applied.
filter: "cluster_name:'production'\n
AND service='billing-service'\n
AND message = 'missing user ID'"
type: SAMPLE
sample:
# Percentage of matching logs to keep. Must be in the range [0, 1].
rate: 0.10
# Second rule
- name: "Drop NGINX information logs"
mode: ENABLED
filter: "service = 'nginx' and severity = 'INFO' and httpRequest.status = '200'"
type: DROP
# Third rule
- name: 'Drop Kubernetes fields from development environments'
mode: ENABLED
filter: "namespace = 'development' and kubernetes.cluster_name = 'test'"
# The configuration for a drop field action.
type: DROP_FIELD
drop_field:
# Regular expression to match the field names to drop.
field_regex: .*
# Selector to indicate field path. Use 'parent[child]' syntax to
# indicate nesting.
parent_path:
selector: kubernetes
# Fourth rule
- name: error replacement
mode: ENABLED
filter: service = "nginx" and severity = "ERROR"
type: REPLACE_FIELD
replace_field:
field:
selector: error_code
replace_regex: .*
replace_all: true
replace_mode: MAPPED_VALUE
mapped_value:
pairs:
- key: INTERNAL_SERVER_ERROR
value: "500"
- key: NOT_FOUND
value: "401"
# Fifth rule
- name: "Emit counter for NGINX errors"
mode: ENABLED
filter: service = "nginx" and severity = "ERROR"
type: EMIT_METRICS
emit_metrics:
# Prometheus-compatible metric name.
name: nginx_errors_total
mode: COUNTER
labels:
- key: service
value:
selector: service
- key: error_code
value:
selector: error_code
# Sixth rule
- name: "Parse NGINX access log request field"
mode: ENABLED
filter: service = "nginx" and severity = "INFO"
type: PARSE_FIELD
parse_field:
# The source field containing the raw request string to parse.
source:
selector: raw_request
# The destination field where parsed structured data will be written.
destination:
selector: request
parser:
parser_type: GROK
grok_parser:
# Named capture groups become named fields in the extracted log.
pattern: "%{WORD:method} %{URIPATHPARAM:path} HTTP/%{NUMBER:version}"
```
### Terraform example
The following example defines an optimization rules resource for Terraform, and contains
the following rules:
* The first rule samples 10% of logs that match the defined filter.
* The second rule drops all logs for the `nginx` service of severity `INFO` where the
`http.Request.status` equals `200`.
* The third rule drops all `kubernetes` fields that match the defined filter. The
regular expression indicates that any fields matching `kubernetes.[FIELD]` are
dropped from all logs.
* The fourth rule uses a mapped value to search for the `error_code` field, and
replaces values based on the provided key-value pairs. If the rule matches on
`INTERNAL_SERVER_ERROR`, it replaces that value with `500`. If the rule matches on
`NOT_FOUND`, it replaces the value with `401`.
* The fifth rule emits a counter metric from NGINX error logs. Each matching log
increments `nginx_errors_total` by one. Labels on the metric come from the `service`
and `error_code` log fields.
* The sixth rule parses the `raw_request` field on matching NGINX access logs using a
Grok pattern. The parsed fields are written to the `request` field.
```terraform expandable Terraform example icon="square-terminal" wrap lines highlight={4,24,32,51,82,110} theme={null}
resource "chronosphere_log_control_config" "log_control_config" {
# The ordered list of optimization rules.
rules {
# First rule
name = "Sample billing service with missing user ID"
# Log filter syntax to select logs. Only matching logs will have control action applied.
filter = chomp(<<-EOF
cluster_name:"rc"
AND service="billing-service"
AND message = "missing user ID"
EOF
)
mode = "ENABLED"
sample {
# Percentage of matching logs to keep. Must be in the range [0, 1].
rate = 0.01
}
# The configuration for a drop field action.
type = "SAMPLE"
}
rules {
# Second rule
name = "Drop NGINX information logs"
filter = "service = \"nginx\" and severity = \"INFO\" and httpRequest.status = \"200\""
mode = "ENABLED"
type = "DROP"
}
rules {
# Third rule
name = "Drop Kubernetes fields from development environments"
drop_field {
# Regular expression to match the field names to drop.
field_regex = ".*"
# Selector to indicate field path. Use 'parent[child]' syntax to
# indicate nesting.
parent_path {
selector = "kubernetes"
}
}
filter = "chronosphere_namespace = \"rc-logging\" and kubernetes.cluster_name = \"rc-b\""
mode = "ENABLED"
type = "DROP_FIELD"
}
rules {
# Fourth rule
name = "error replacement"
filter = "service = \"nginx\" and severity = \"ERROR\""
mode = "ENABLED"
replace_field {
field {
selector = "error_code"
}
mapped_value {
pairs {
key = "INTERNAL_SERVER_ERROR"
value = "500"
}
pairs {
key = "NOT_FOUND"
value = "401"
}
}
replace_all = true
replace_mode = "MAPPED_VALUE"
replace_regex = ".*"
}
type = "REPLACE_FIELD"
}
rules {
# Fifth rule
name = "Emit counter for NGINX errors"
filter = "service = \"nginx\" and severity = \"ERROR\""
mode = "ENABLED"
type = "EMIT_METRICS"
emit_metrics {
# Prometheus-compatible metric name.
name = "nginx_errors_total"
mode = "COUNTER"
labels {
key = "service"
value {
selector = "service"
}
}
labels {
key = "error_code"
value {
selector = "error_code"
}
}
}
}
rules {
# Sixth rule
name = "Parse NGINX access log request field"
filter = "service = \"nginx\" and severity = \"INFO\""
mode = "ENABLED"
type = "PARSE_FIELD"
parse_field {
# The source field containing the raw request string to parse.
source {
selector = "raw_request"
}
# The destination field where parsed structured data will be written.
destination {
selector = "request"
}
parser {
parser_type = "GROK"
grok_parser {
# Named capture groups become named fields in the extracted log.
pattern = "%%{WORD:method} %%{URIPATHPARAM:path} HTTP/%%{NUMBER:version}"
}
}
}
}
}
```
## Edit optimization rules
When creating or editing optimization rules, you can
[use the Code config tool](/tooling/gitops#use-the-code-config-tool)
to view code representations of the rules. The displayed code also responds to
changes you make in the **Visual editor** tab.
Select from the following methods to edit optimization rules.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
> 2. In the row of the optimization rule you want to edit, click the
> three vertical dots icon and then click **Edit optimization rule**.
> 3. In the **Edit optimization rule** drawer, make changes to your optimization rule, and then
> click **Save**.
> 4. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> the definition.
>
> Cortex XCOR saves changes to your optimization rule.
> [tab] Chronoctl
>
> To update optimization rules with [Chronoctl](/tooling/chronoctl), use the
> `log-control-config update` command:
>
> ```shell theme={null}
> chronoctl log-control-config update
> ```
>
> 1. Update the optimization rule definition file.
> 2. Run the following command to submit the changes:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl log-control-config update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To edit optimization rules using [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> You can also [Use the Code config tool](/tooling/gitops#use-the-code-config-tool) to
> view the optimization rule's Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateLogControlConfig`](/tooling/api-info/definition/operations/UpdateLogControlConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Reorder optimization rules
Optimization rules are applied in descending order. To change the order optimization rules are
applied, reorder rules. Disabled rules are skipped.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
> 2. In the **Optimization rules** section, click **Re-order rules**.
> 3. In the **Edit optimization rules** drawer, in the row of the optimization rule you want to
> move, click the drag indicator icon and move the
> optimization rule to a different order position.
> 4. Click **Save**.
> 5. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> the definition.
>
> Cortex XCOR saves changes to your optimization rules.
> [tab] Chronoctl
>
> To reorder optimization rules with [Chronoctl](/tooling/chronoctl), use the
> `log-control-config update` command:
>
> ```shell theme={null}
> chronoctl log-control-config update
> ```
>
> 1. Update the optimization rule definition file.
> 2. Run the following command to submit the changes:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl log-control-config update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To reorder optimization rules using [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> You can also [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to
> view the optimization rule's Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateLogControlConfig`](/tooling/api-info/definition/operations/UpdateLogControlConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Enable or disable optimization rules
Each rule has a mode, which can be enabled or disabled. By default, any created rule
is enabled. Any rule that's enabled is applied. Disabled rules are skipped.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
> 2. In the row of the optimization rule you want to enable or disable, click the
> toggle in the **Enabled** column.
> 3. Click **Save**.
> 4. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> the definition.
>
> Cortex XCOR saves changes to your optimization rules.
> [tab] Chronoctl
>
> To enable or disable optimization rules with [Chronoctl](/tooling/chronoctl), use the
> `log-control-config update` command:
>
> ```shell theme={null}
> chronoctl log-control-config update
> ```
>
> 1. In the optimization rule definition file, for the rule you want to modify, change the
> current `mode`. For example, to disable a rule, change `mode: ENABLED` to
> `mode: DISABLED`.
> 2. Run the following command to submit the changes:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl log-control-config update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To enable or disable optimization rules using [Terraform](/tooling/infrastructure/terraform):
>
> 1. In the optimization rule Terraform file, change the current `mode` for the rule you
> want to modify. For example, to disable a rule, change its `mode = ENABLED` to
> `mode = DISABLED`.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> You can also [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to
> view the optimization rule's Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateLogControlConfig`](/tooling/api-info/definition/operations/UpdateLogControlConfig)
> endpoint.
>
> In the optimization rule definition, change the current `"mode"` for the rule you want
> to modify. For example, to disable a rule, change its `"mode": "ENABLED"` to
> `"mode": "DISABLED"`.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 optimization rules
Select from the following methods to delete optimization rules.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
> 2. In the row of the optimization rule you want to delete, click the
> three vertical dots icon and then click
> **Delete optimization rule**.
> 3. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply
> the definition.
>
> Cortex XCOR deletes your optimization rule.
> [tab] Chronoctl
>
> To delete an optimization rule with [Chronoctl](/tooling/chronoctl), use the
> `chronoctl log-control-config delete` command:
>
> ```shell theme={null}
> chronoctl log-control-config delete
> ```
> [tab] Terraform
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteLogControlConfig`](/tooling/api-info/definition/operations/DeleteLogControlConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 lookup tables for log data
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-logs/lookup-logs
Learn how to create and modify lookup tables for log data in Palo Alto Networks Cortex XCOR.
When [filtering log data](/investigate/querying/query-logs), you want to quickly
retrieve results, especially when debugging an issue or responding to an incident. To
help provide more meaningful results, create lookup tables in a spreadsheet (in
CSV format) and upload them to Palo Alto Networks Cortex XCOR. Lookup tables
store pre-calculated results or mappings between values, allowing for faster data
retrieval.
Use lookup tables to add context, normalize values, and enrich log data for improved
filtering. For example, you can enrich severity fields with explanations, map keys
like error codes to human-readable descriptions, and standardize inconsistent data.
Lookup tables help you apply consistent mappings and enrichments within queries,
without hard-coding large or repetitive mapping logic inline.
```mermaid actions={false} theme={null}
flowchart LR
Send["Send data"]
subgraph OP["Cortex XCOR"]
Parse[Parse data]
Normalize[Normalize data]
Optimize[Optimize data]
Format[Format data]
Store[Store data]
end
Send --> Parse --> Normalize --> Optimize --> Format --> Store
click Parse "/control/shaping/shape-logs/parse-logs"
click Normalize "/control/shaping/shape-logs/normalize-logs"
click Optimize "/control/shaping/shape-logs/control-logs"
classDef stages fill:#007A3D,stroke:#007A3D,stroke-width:2px,color:#FFFFFF;
class Format stages
```
After uploading lookup tables, users can reference them in log
queries using the
[`lookup` function](/investigate/querying/query-logs/query-syntax#lookup).
## View lookup tables
To view lookup tables:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Logs Lookup Tables**.
All lookup tables are displayed.
2. To view a lookup table, click it in the list.
## Upload lookup tables
To upload a lookup table in Cortex XCOR, first create a spreadsheet in
CSV format. Each lookup table must be less than or equal to 10 MB. You can
add up to 1,000 lookup tables. To upload lookup tables that exceed 10 MB,
contact [Cortex XCOR Support](/support).
To upload lookup tables:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Logs Lookup Tables**.
2. Click **Upload lookup table**.
3. In the **Upload lookup table** page, enter a name and description for your lookup
table. Lookup table names must be unique.
4. Click **Upload CSV**, and then select the CSV file you want to upload from your
local machine.
5. Click **Save** to upload your lookup table.
Your lookup table displays in the list of lookup tables, and can be referenced in log
queries using the
[`lookup` function](/investigate/querying/query-logs/query-syntax#lookup).
## Edit lookup tables
You can replace existing lookup tables by uploading a new lookup table. Replacing a
lookup table overwrites the existing table.
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Logs Lookup Tables**.
2. Click the lookup table you want to replace.
3. In the **Edit lookup table** page, click **Replace lookup table**.
4. On your local machine, select the CSV file you want to upload.
5. Click **Save** to upload your lookup table.
The lookup table is replaced with the one you selected.
## Delete lookup tables
To delete lookup tables:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Logs Lookup Tables**.
2. Click the lookup table you want to delete.
3. In the **Edit lookup table** page, click **Delete lookup table**.
4. In the confirmation window, click **Delete** to delete the lookup table.
The lookup table is deleted from the list of lookup tables.
# Normalize your log data
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-logs/normalize-logs
Learn how to use field mapping in Palo Alto Networks Cortex XCOR to normalize your log data at ingest time.
During the ingestion phase, after parsing your data, Palo Alto Networks Cortex XCOR
applies your preferred
field normalization rules to populate predefined keys
such as `service`, `severity`, and `timestamp`.
```mermaid actions={false} theme={null}
flowchart LR
Send["Send data"]
subgraph OP["Cortex XCOR"]
Parse[Parse data]
Normalize[Normalize data]
Optimize[Optimize data]
Format[Format data]
Store[Store data]
end
Send --> Parse --> Normalize --> Optimize --> Format --> Store
click Parse "/control/shaping/shape-logs/parse-logs"
click Optimize "/control/shaping/shape-logs/control-logs"
click Format "/control/shaping/shape-logs/lookup-logs/"
classDef stages fill:#007A3D,stroke:#007A3D,stroke-width:2px,color:#FFFFFF;
class Normalize stages
```
This mapping provides consistency in your data, and optimizes querying in Logs
Explorer. After applying these mappings, Cortex XCOR applies
[optimization rules](/control/shaping/shape-logs/control-logs), and then stores your
log data.
In addition to these mappings, you can apply custom field mappings to normalize log
data, such as normalizing values from several fields that all relate to different
environments. See [Examples](#examples) for examples of how you can use custom field
mappings.
Custom field mappings are applied after log data is ingested, but before
Cortex XCOR stores it.
To indicate nesting within a source field, use a dot (`.`). For example, if your logs
are in a format like `{"resource": {"labels": {"project_id": "..."}}}`, then enter
`resource.labels.project_id`.
If your logs already use dot notation, such as `{"resource.labels.project_id": "..."}`,
enclose the selector in double quotes and brackets like
`["resource.labels.project_id"]`. See
[target nested or flat fields with dot notation](#target-nested-or-flat-fields-with-dot-notation)
for additional examples.
## View custom field mappings
Select from the following methods to view custom field mappings.
> [tab] Web
>
> To view custom field mappings:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
>
> All field mappings display in the **Field normalization** section, including both
> predefined and custom field mappings.
>
> 2. Choose which custom field mappings to view:
> * To view an individual custom field mapping, click it in the list to open the
> configuration in the **Edit field mapping** drawer.
> * To view the code definition for all configured custom field mappings, click the
> **Code config** tab.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to return all custom field mappings, use this
> command:
>
> ```shell theme={null}
> chronoctl log-ingest-config read
> ```
> [tab] Terraform
>
> [Use the Code config tool](/tooling/gitops#use-the-code-config-tool) in Cortex XCOR to
> view a custom field mappings's Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ReadLogIngestConfig`](/tooling/api-info/definition/operations/ReadLogIngestConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 custom field mappings
Use one of the following methods to create custom field mappings.
> [tab] Web
>
> Define the custom field mapping definition in Cortex XCOR, and then
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply the definition.
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
>
> 2. In the **Field normalization** section, click **Create**.
>
> 3. In the **Custom field name** field, enter the custom field name to map data to,
> such as `environment`, `region`, or `userID`.
>
> 4. In the **Mapped fields** section, in the **Source field name** field, enter a
> source field name from your log data to map to the custom field you're creating.
> Fields are matched in priority order.
>
> To add more fields, click **Add field mapping** and then enter another source
> field.
>
> > [!NOTE]
> >
> > Use a dot (`.`) to indicate nesting within a field. For example, if your logs are
> > in a format like `{"resource": {"labels": {"project_id": "..."}}}`, then enter
> > `resource.labels.project_id`.
> >
> > If your logs already use dot notation, such as `{"resource.labels.project_id"}`,
> > enclose the selector in double quotes and brackets like
> > `["resource.labels.project_id"]`.
>
> 5. Optional: In the **Default value** field, enter a default value as the mapping if
> the custom field contains no values.
>
> 6. Optional: Select either **Regex** or **Value map** as the normalization mode.
>
> * **Regex**: Enter a regular expression pattern to extract and normalize values,
> such as for removing extraneous data. For example, use the following regular
> expression to remove prefixes and suffixes from any environments including
> `production` in the name:
>
> ```shell theme={null}
> ^.*?(production).*?$
> ```
>
> * **Value map**: Enter key:value pairs to map additional metadata within your
> custom field. For example, map `"warn"` to `"Warning"` and `"err"` to `"Error"`
> for different severity types.
>
> To add more value mappings, click **Add value mapping** and then define the
> value mapping.
>
> 7. Click **Save** to save the custom field mapping definition.
>
> 8. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply your
> changes.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to create custom field mappings, use this
> command:
>
> ```shell theme={null}
> chronoctl log-ingest-config create
> ```
>
> 1. Run the following command to generate a sample configuration you can use as a
> template:
>
> ```shell theme={null}
> chronoctl log-ingest-config scaffold
> ```
>
> In the template, `kind: LogIngestConfig` defines an individual log ingest
> configuration.
>
> 2. Use the `custom_field_normalization` object to define the plain text parser to run
> on your log data.
>
> 3. With a completed definition, submit it with:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl log-ingest-config create -f FILE_NAME
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create a custom field mapping with [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create a Terraform resource with the `chronosphere_log_ingest_config` resource
> type, followed by a resource name.
> 2. Use the `custom_field_normalization` object to define the custom field mapping to
> run on your log data.
> 3. Add the definition to a Terraform file.
> 4. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateLogIngestConfig`](/tooling/api-info/definition/operations/CreateLogIngestConfig)
> endpoint.
>
> Use the `"custom_field_normalization"` object to define the custom field mapping to
> run on your log data.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Edit custom field mappings
When creating or editing a custom field mapping, you can
[use the Code config tool](/tooling/gitops#use-the-code-config-tool)
to view code representations of a field mapping. The displayed code also responds to
changes you make in the **Visual editor** tab.
Select from the following methods to edit custom field mappings. After selecting a
field mapping to edit, you can change the field mappings order. Fields are matched in
priority order, so an order of `1` has higher precedence over an order of `6`.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
> 2. In the **Field normalization** section, click the custom field mapping you want to
> edit.
> 3. In the **Edit field mapping** drawer, change your custom field mapping.
> 4. To reorder field mappings, drag and drop them to change the order.
> 5. Click **Save**. Cortex XCOR saves changes to your custom field mapping.
> 6. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply your
> changes.
> [tab] Chronoctl
>
> To update custom field mappings with [Chronoctl](/tooling/chronoctl), use this
> command:
>
> ```shell theme={null}
> chronoctl log-ingest-config update
> ```
>
> 1. Update the custom field mapping definition file.
> 2. Run the following command to submit the changes:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl log-ingest-config update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To edit custom field mappings using [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> You can also [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to
> view the custom field mapping's Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateLogIngestConfig`](/tooling/api-info/definition/operations/UpdateLogIngestConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 custom field mappings
Select from one of the following methods to delete custom field mappings.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
> 2. In the **Edit field mapping** drawer, in the row of the field mapping you want to
> delete, click the \*\*\*\* trash can icon.
> 3. Click **Save** to save your changes.
> 4. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply your
> changes.
>
> Cortex XCOR deletes your custom field mapping.
> [tab] Chronoctl
>
> To delete a custom field mapping with [Chronoctl](/tooling/chronoctl), use this
> command:
>
> ```shell theme={null}
> chronoctl log-ingest-config delete
> ```
> [tab] Terraform
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteLogIngestConfig`](/tooling/api-info/definition/operations/DeleteLogIngestConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Target nested or flat fields with dot notation
The `source` selectors for custom field mappings support dot notation to read values
from fields inside nested structures. How Cortex XCOR interprets a selector
depends on whether you enclose the segments in brackets in double quotes:
* An unbracketed dot splits the selector into path segments, which traverses nested
fields. A source of `metadata.code` reads a `code` field nested inside a `metadata`
object.
* A bracket-quoted segment such as `["metadata.code"]` treats the quoted string as a
single, literal field name that contains a dot. This reads a flat field named
`metadata.code` instead of a nested structure.
Consider a custom field mapping that populates a `status_code` target from a source
field.
To read from a nested field, set the source selector to `metadata.code`:
```json theme={null}
{
"target": "status_code",
"normalization": {
"source": [
{ "selector": "metadata.code" }
]
}
}
```
This selector reads the value from the nested `code` field:
```json theme={null}
{
"metadata": {
"code": "500"
}
}
```
To read from a single flat field whose name contains a dot, enclose the source
selector in double quotes and brackets:
```json theme={null}
{
"target": "status_code",
"normalization": {
"source": [
{ "selector": "[\"metadata.code\"]" }
]
}
}
```
This selector reads the value from one literal field name:
```json theme={null}
{
"metadata.code": "500"
}
```
## Examples
The following examples show common `custom_field_normalization` patterns. Each object
is an element of the `custom_field_normalization` array.
### Standardize and enrich data
Normalize values from several fields that all relate to different environments, such
as `environment` and `region`. You can then add optional mappings for individual
environments, such as mapping `dev` to `development`.
```json theme={null}
{
"target": "environment",
"normalization": {
"source": [
{
"selector": "env"
},
{
"selector": "region"
}
],
"default_value": "production",
"value_map": {
"dev": "development",
"prod": "production",
"stg": "staging"
}
}
}
```
### Consolidate values from multiple fields
Map a single `region` field from whichever source field is present, checking `region`
first and then `datacenter`. If neither contains a value, apply a default value.
```json theme={null}
{
"target": "region",
"normalization": {
"source": [
{ "selector": "region" },
{ "selector": "datacenter" }
],
"default_value": "us-east-1"
}
}
```
### Standardize values with a value map
Normalize inconsistent HTTP status codes into a smaller set of status classes, and
label anything unmatched as `unknown`.
```json theme={null}
{
"target": "status_class",
"normalization": {
"source": [
{ "selector": "http.status_code" }
],
"value_map": {
"200": "success",
"201": "success",
"400": "client_error",
"404": "client_error",
"500": "server_error",
"503": "server_error"
},
"default_value": "unknown"
}
}
```
### Extract a value with a regular expression
Use `sanitize_patterns` to extract a substring from a larger field. Each pattern must
contain exactly one capturing group, and Cortex XCOR uses that group as the
result. This example extracts an uppercase log level from a free-form `message` field.
```json theme={null}
{
"target": "log_level",
"normalization": {
"source": [
{ "selector": "message" }
],
"sanitize_patterns": ["^.*level=([A-Z]+).*$"],
"default_value": "INFO"
}
}
```
### Map a value from a nested field
Use dot notation to read a value from a nested structure, such as `user.id` inside
`{"user": {"id": "..."}}`. Sources are still matched in priority order.
```json theme={null}
{
"target": "userID",
"normalization": {
"source": [
{ "selector": "user.id" },
{ "selector": "actor.userId" }
]
}
}
```
### Map a value from a flat field that contains dots
If a source field name already contains dots, bracket-quote the selector so
Cortex XCOR treats it as one literal field name instead of a nested path.
```json theme={null}
{
"target": "team",
"normalization": {
"source": [
{ "selector": "[\"kubernetes.labels.team\"]" }
],
"default_value": "unassigned"
}
}
```
# Parse your log data
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-logs/parse-logs
Learn how to use parsers in Palo Alto Networks Cortex XCOR to shape your log data at ingest time.
Your log data can be formatted differently depending on which service generates that
data. Some data is structured, such as valid JSON. Other data might be somewhat
structured, or not have any structure at all. In these instances, you can create
parsers to create structured logs from plain text logs, and parse individual fields to
extract meaningful data without changing your instrumentation.
For example, if your instrumentation emits unstructured plain-text logs, create a
[plain text parser](#create-plain-text-parsers) to provide structure by separating the
individual fields.
If your logs contain JSON or key-value pairs buried contained in a single string field,
create a [field parser](#create-field-parsers) to extract the values. The extracted
fields can then be queried in [Logs Explorer](/investigate/querying/query-logs)
and used in aggregations and transformations.
Parsers run after ingestion, but before applying normalization rules and control
rules. If you want to additionally parse log data after initial parsing
and normalization complete,
[create an optimization rule](/control/shaping/shape-logs/control-logs#create-optimization-rules)
to parse fields.
```mermaid actions={false} theme={null}
flowchart LR
Send["Send data"]
subgraph OP["Cortex XCOR"]
Parse[Parse data]
Normalize[Normalize data]
Optimize[Optimize data]
Format[Format data]
Store[Store data]
end
Send --> Parse --> Normalize --> Optimize --> Format --> Store
click Normalize "/control/shaping/shape-logs/normalize-logs"
click Optimize "/control/shaping/shape-logs/control-logs"
click Format "/control/shaping/shape-logs/lookup-logs/"
classDef stages fill:#007A3D,stroke:#007A3D,stroke-width:2px,color:#FFFFFF;
class Parse stages
```
## View parsers
Select from the following methods to view and order available parsers. Parsers
display in match order.
> [tab] Web
>
> To view parsers:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
>
> All parsers display, including plain-text and field parsers.
>
> 2. To view only plain-text parsers or field parsers, from the **View** dropdown,
> select **Plaintext parsers** or **Field parsers**.
>
> 3. To view the code definition for all configured parsers, click the **Code config**
> tab.
>
> The **Logs parsing and mapping** section includes all defined parsers.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to return all parsers, use the
> `chronoctl log-ingest-config read` command:
>
> ```shell theme={null}
> chronoctl log-ingest-config read
> ```
> [tab] Terraform
>
> [Use the Code config tool](/tooling/gitops#use-the-code-config-tool) in Palo Alto Networks
> Cortex XCOR to
> view a parser's Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ReadLogIngestConfig`](/tooling/api-info/definition/operations/ReadLogIngestConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 parsers
Parsers operate on both [plain-text logs](#create-plain-text-parsers) and
[individual fields](#create-field-parsers). All configured parsers are included in a
single definition, and evaluated in match order. Cortex XCOR applies the
first parser in the definition that matches a log, and ignores any subsequent
parsers.
Although you can define parsers in the Cortex XCOR web interface, you must
[use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply the definition.
### Create plain-text parsers
Plain text parsers run against all ingested logs with the `plaintext` mimetype, and
apply parsing logic to modify the original record. These parsers affect the entire
log. Use field parsers to operate on individual fields within a log.
Select either a regular expression or a key-value matching pattern to parse logs.
When using a key-value pattern, you can extract any number of key value pairs from a
plain text log. Plain text parsers also have an option to keep the original log after
applying parsing logic.
Plain text parsers apply only when the media type is set to `plaintext` for logs.
Regular expressions for the matching type use
[RE2 syntax](https://github.com/google/re2/wiki/Syntax) and named capture
groups. Each named capture group becomes the key name in the structured log.
Cortex XCOR requires at least one named capture group in the regular
expression.
Use one of the following methods to create plain text parsers.
> [tab] Web
>
> Define the plain text parser definition in Cortex XCOR, and then
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply the definition.
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
>
> 2. In the **Plaintext parsers** section, click **Create**.
>
> 3. Enter a name for the parser.
>
> 4. Select the matching type for the parser:
>
> * **Regex**: Use a regular expression to match logs. In the **Template** field,
> select the regular expression template to apply to your logs. Use a predefined
> template such as **Nginx**, or specify a **Custom** template. For example, this
> regular expression is used in subsequent steps for previewing changes:
>
> ```text wrap theme={null}
> ^(?P[^ ]*) [^ ]* (?P[^ ]*) \[(?P[^\]]*)\] "(?P\S+) (?P[^"]*)" (?P[^ ]*) (?P[^ ]*)$
> ```
>
> * **Key/value**: Use a specified pattern to separate key-value pairs in log data.
> Enter the following values:
> * **Field delimiter**: Specifies the character used to split the input log data into
> key-value pairs. For example, a comma (`,`) if your data is in the format
> `key: value, key: value`.
> * **Key/value separator**: Specifies the character used to split matching pairs into
> its key and value. For example, a colon (`:`) if your data is in the format
> `key: value`.
> * **Trim characters**: Identifies the leading and trailing characters to trim from the
> key-value pairs. For example, a space (`" "`) between key-value pairs if your
> data is in the format `key: value, key: value`.
>
> 5. If you want to keep the original log after parsing, select the corresponding
> toggle.
>
> 6. To test the parser, in the **Preview log parser** section, enter a portion of your
> log payload in the **Input** field. For example:
>
> ```text theme={null}
> 192.168.1.1 - john [10/Oct/2023:13:55:36 -0700] "GET /api/users HTTP/1.1" 200 1234
> ```
>
> 7. Click **Test parser** to view a preview of the generated output after the parser
> runs. For example, the following output is generated in the **Output** section from
> the input string in the previous step:
>
> ```json theme={null}
> {
> "code": "200",
> "host": "192.168.1.1",
> "method": "GET",
> "path": "/api/users HTTP/1.1",
> "size": "1234",
> "time": "10/Oct/2023:13:55:36 -0700",
> "user": "john"
> }
> ```
>
> 8. Click **Save** to save the parser definition.
>
> 9. On the **Logs Ingest** page, click **View code config**.
>
> 10. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply the
> definition.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to create plain text parsers, use the
> `chronoctl log-ingest-config create` command:
>
> ```shell theme={null}
> chronoctl log-ingest-config create
> ```
>
> 1. Run the following command to generate a sample parser configuration you can use as
> a template:
>
> ```shell theme={null}
> chronoctl log-ingest-config scaffold
> ```
>
> In the template, `kind: LogIngestConfig` defines an individual parser configuration.
>
> 2. Use the `plaintext_parsers` object to define the plain text parser to run on your
> log data.
>
> 3. With a completed definition, submit it with:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl log-ingest-config create -f FILE_NAME
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create a plain text parser with [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create a Terraform resource with the `chronosphere_log_ingest_config` resource
> type, followed by a resource name.
> 2. Use the `plaintext_parser` object to define the plain text parser to run on your
> log data.
> 3. Add the definition to a Terraform file.
> 4. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateLogIngestConfig`](/tooling/api-info/definition/operations/CreateLogIngestConfig)
> endpoint.
>
> Use the `plaintext_parsers` object to define the plain text parser to run against
> your log data.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 field parsers
Field parsers operate on an individual field within a log, and run on all ingested
logs, including JSON and plain text logs. Field parsers run after plain text parsers.
When defining a field parser, choose which matching pattern to apply and specify the
destination of the parsed field.
> [tab] Web
>
> Define the field parser definition in Cortex XCOR, and then
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply the
> definition.
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
>
> 2. In the **Field Parsers** section, click **Create**.
>
> 3. Enter a source field for the parser to operate on, such as `message`.
>
> 4. Enter a destination for the parsed data, which can be one of these locations:
>
> * Use the same field name, which overwrites the existing field data with the
> parsed data.
> * Specify a new field name to contain the parsed data.
> * Leave the destination field empty, which populates the parsed data to the top
> level of your logs.
>
> 5. Select the matching type for the parser.
> * **JSON** matches on valid JSON logs.
>
> * **REGEX** uses a regular expression to match logs. In the **Template** field,
> select the regular expression template to apply to your logs. Use a predefined
> template such as **Nginx**, or specify a **Custom** template. For example, this
> regular expression is used in subsequent steps for previewing changes:
>
> ```text theme={null}
> user=(?P\w+) action=(?P\w+)
> ```
>
> * **Key/value** uses a specified pattern to separate key-value pairs in log data.
> Enter the following values:
> * **Pair separator** is the character used to split matching pairs into its key
> and value. For example, a colon (`:`) if your data is in the format `key:value`.
> * **Delimiter** is the character used to split the input log data into key-value
> pairs. For example, a comma (`,`) if your data is in the format
> `key: value, key: value`.
> * **Trim set** identifies the leading and trailing characters to trim from the
> key-value pairs. For example, a space (`" "`) between key-value pairs if your
> data is in the format `key: value, key: value`.
>
> 6. To test the parser, in the **Preview log parser** section, enter a portion of your
> log payload. For example:
>
> ```json theme={null}
> {"message": "user=john action=login timestamp=12345"}
> ```
>
> 7. Click **Test parser** to view a preview of the generated output after the parser
> runs. For example, the following output is generated by the input from the
> previous step:
>
> ```json theme={null}
> {
> "message": "user=john action=login timestamp=12345",
> "parsed_message": {
> "action": "login",
> "user": "john"
> }
> }
> ```
>
> 8. Click **Save** to save the parser definition.
>
> 9. On the **Logs Ingest** page, click **View code config**.
>
> 10. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply the
> definition.
> [tab] Chronoctl
>
> To use [Chronoctl](/tooling/chronoctl) to create field parsers, use the
> `chronoctl log-ingest-config create` command:
>
> ```shell theme={null}
> chronoctl log-ingest-config create
> ```
>
> 1. Run the following command to generate a sample parser configuration you can use as
> a template:
>
> ```shell theme={null}
> chronoctl log-ingest-config scaffold
> ```
>
> In the template, `kind: LogIngestConfig` defines an individual parser configuration.
>
> 2. Use the `field_parsers` object to define the plain text parser to run on your
> log data.
>
> 3. With a completed definition, submit it with:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl log-ingest-config create -f FILE_NAME
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create a plain text parser with [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create a Terraform resource with the `chronosphere_log_ingest_config` resource
> type, followed by a resource name.
> 2. Use the `field_parser` object to define the field parser to run on your log data.
> 3. Add the definition to a Terraform file.
> 4. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateLogIngestConfig`](/tooling/api-info/definition/operations/CreateLogIngestConfig)
> endpoint.
>
> Use the `field_parsers` object to define the field parser to run against your log data.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Edit parsers
When creating or editing a parser, you can
[use the Code config tool](/tooling/gitops#use-the-code-config-tool)
to view code representations of a parser. The displayed code also responds to changes
you make in the **Visual editor** tab.
Select from the following methods to edit parsers.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
>
> 2. In the row of the parser you want to edit, click the
> three vertical dots icon and then click **Edit parser**.
>
> 3. In the **Edit parser** drawer, make changes to your parser, and then click
> **Save**.
>
> Cortex XCOR saves changes to your parser.
>
> 4. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply your
> changes.
> [tab] Chronoctl
>
> To update parsers with [Chronoctl](/tooling/chronoctl), use the
> `log-ingest-config update` command:
>
> ```shell theme={null}
> chronoctl log-ingest-config update
> ```
>
> 1. Update the parser definition file.
> 2. Run the following command to submit the changes:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl log-ingest-config update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To edit parsers using [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> You can also [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to
> view the parser's Terraform representation.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateLogIngestConfig`](/tooling/api-info/definition/operations/UpdateLogIngestConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 parsers
Select from the following methods to delete parsers.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Logs Ingest**.
> 2. In the row of the parser you want to edit, click the
> three vertical dots icon and then click **Delete parser**.
> 3. Click the **Code config** tab and
> [use the Code config tool](/tooling/gitops#use-the-code-config-tool) to apply your
> changes.
>
> Cortex XCOR deletes your parser.
> [tab] Chronoctl
>
> To delete a parser with [Chronoctl](/tooling/chronoctl), use the
> `chronoctl log-ingest-config delete` command:
>
> ```shell theme={null}
> chronoctl log-ingest-config delete
> ```
> [tab] Terraform
>
> > [!NOTE]
> >
> > Users can modify Terraform-managed resources only by using Terraform.
> > [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteLogIngestConfig`](/tooling/api-info/definition/operations/DeleteLogIngestConfig)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Examples
The following example shows how to apply both plain text and field parsers to create
structured output from an unstructured log record.
Consider the following input log data. The record is a single string that contains multiple
key-value pairs in a single `message` field. In this state, querying the data is
difficult, and you can't complete aggregations or transformations.
```text theme={null}
2025-09-22 09:15:45.101 2025/09/22 13:15:45 [info] 34567#34567: *9876543210 a new
user session was started, client: 203.0.113.55, service: app.example.net, activity:
"GET /data/dashboard/overview?appVersion=1.2.3 HTTP/1.1", host: "app.example.net",
source: "https://app.example.net/home"
```
By applying a plain text parser and a field parser, you can separate the fixed fields
and extract the key-value pairs into a new field that you can operate on in Logs
Explorer.
First, create a [plain text parser](#create-plain-text-parsers) that uses a regular
expression to extract the key-value pairs. Next, add a [field parser](#create-field-parsers)
to parse out the values. The following Terraform definition includes both parsers and
their definitions:
```terraform expandable Terraform example icon="square-terminal" wrap theme={null}
resource "chronosphere_log_ingest_config" "log_ingest_config" {
plaintext_parser {
name = "metadata"
mode = "ENABLED"
parser {
parser_type = "REGEX"
regex_parser {
regex = "^(?P\\S+ \\S+)\\s+(?P\\S+ \\S+) \\[(?P\\w+)\\] (?P\\d+)#(?P\\d+): \\*(?P\\d+) (?P.*?), (?P.+)$"
}
}
}
field_parser {
destination {
selector = "metadata"
}
mode = "ENABLED"
parser {
parser_type = "KEY_VALUE"
key_value_parser {
delimiter = ","
pair_separator = ":"
trim_set = " "
}
}
source {
selector = "metadata"
}
}
}
```
After applying both parsers, the generated data is output to a new `metadata` field, and
is structured as shown in the following example. The new field includes key-value
pairs that can be queried in [Logs Explorer](/investigate/querying/query-logs) and
used in aggregations and transformations.
```json theme={null}
{
"timestamp": "2025-08-22 13:36:18.648",
"log_time": "2025/08/22 17:36:18",
"log_level": "info",
"pid": "34567",
"tid": "34567",
"connection_id": "9876543210",
"message": "a new user session was started",
"metadata": {
"client": " 203.0.113.55",
"service": " app.example.net",
"activity": " \"GET /data/dashboard/overview?appVersion=1.2.3\"",
"host": " \"app.example.net\"",
"source": " \"https://app.example.net/home\""
}
}
```
# Shape metric data
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics
Learn how metric shaping rules and downsampling control cardinality, license consumption, and query performance.
Managing the cardinality of persisted data can be challenging when determining which
metrics to send to Palo Alto Networks Cortex XCOR. *Metric cardinality* is the
number of unique time series produced by a combination of metric names and their
associated labels. Cardinality is the total number of these combinations. The more
combinations there are, the greater a metric's cardinality is, and the more data
Cortex XCOR persists. This can affect
[your license](/administer/limits-licensing/concepts/capacity-licensing#persisted-cardinality).
> [!NOTE]
>
> Prefer a guided lab? Take [Controlling Metrics](/academy/courses/controlling-metrics) for
> shaping and usage, or take [Query Optimization for
> Metrics](/academy/courses/query-optimization-for-metrics) for recording rules and
> derived telemetry.
> [!NOTE]
>
> Learn about strategies and tools you can use to
> [reduce cardinality](/control/shaping/shape-metrics/reduce-cardinality).
Cortex XCOR includes various
[*shaping rules*](/control/shaping/shape-metrics/rules) to manipulate the data you
send to Cortex XCOR. Use metric shaping rules to reduce the metrics you
store in Cortex XCOR, optimize query performance, and create aliases for
expressions.
## Downsample data
[Collectors](/ingest) ingest metrics at specific intervals, based on system
configuration. This granularity of metric data can be helpful in diagnostic efforts,
but certain issues might not be served by such granularity. If you can diagnose
production issues by using a coarser granularity of metric data, *downsampling* the
data reduces the amount of data persisted to the Cortex XCOR database.
Downsample incoming data in Cortex XCOR using these methods:
* Change the Chronosphere Collector configuration by
[changing the rate](/ingest/metrics-traces/collector/discover/scrape-configuration#global-scrape-configuration)
at which the Chronosphere Collector publishes metrics to the server.
* Use [mapping rules](/control/shaping/shape-metrics/rules/mapping) to downsample metrics
that aren't aggregated.
* Use [rollup rules](/control/shaping/shape-metrics/rules/rollup) to downsample aggregated
metrics.
Over time, persisted data uses significant storage capacity. Cortex XCOR
performs [long-term downsampling](/control/shaping/shape-metrics/downsampling) to control data
storage costs while retaining important statistics.
Be aware that [late-arriving data](/administer/limits-licensing/limits/metric-limits#late-arriving-metrics)
can affect downsampling.
# Long-term downsampling
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/downsampling
Learn how long-term downsampling compacts persisted metrics and its effect on each metric type.
After approximately five days, each persisted metric, including both raw and
aggregated metrics, undergoes a process called *long-term downsampling*. This
process temporally downsamples data into a more compact form, and then deletes the
non-downsampled data permanently.
To maintain an accurate representation of the data, Palo Alto Networks Cortex XCOR uses different
downsampling methodologies, depending on the metric type.
> [!NOTE]
>
> These behaviors are important to note beforehand, since any unexpected results of
> long-term downsampling will be noticed only approximately five days after ingestion.
By default, Cortex XCOR downsamples long term data at a five-minute
granularity, where all data points within each five-minute window compress into a
single data point. This five-minute window is termed the *downsample window*.
## Effects on metric types
Downsampling effects differ based on the [metric type](/control/shaping/shape-metrics/types).
* **Cumulative counter**:
[Cumulative counters](/control/shaping/shape-metrics/types#cumulative-counter) downsample by
preserving the overall increase (respecting resets) between the start and end of
the downsample window. This reduces the temporal granularity by observing only
one increase every five minutes, while keeping the running count accurate.
* **Delta counters**: [Delta counters](/control/shaping/shape-metrics/types#delta-counter)
downsample by preserving the overall increase between the start
and end of the downsample window. The `sum_over_time()` should remain the same,
but at a reduced granularity, such as every five minutes.
* **Gauge**: Downsampling of [gauges](/control/shaping/shape-metrics/types#gauge) differs,
depending on how the gauge was ingested or if the gauge originated from a rollup rule.
By default, gauges downsample by preserving only the last data point in every
downsample window. Any changes to the gauge prior to the end of the downsample window
aren't retained.
If the gauge is an output of a
[`MIN/MAX` aggregation](/control/shaping/shape-metrics/rules/rollup#gauge), the gauge is
downsampled by preserving the `MIN/MAX` data point in every downsample window,
respectively.
Gauges ingested with StatsD downsample using a Largest-Triangle-Three-Buckets
(LTTB) downsampling algorithm for consistency with the Graphite query engine.
Graphite statistics use a sum downsampling for counters, and LTTB for timers and gauges.
* **Histograms**: Cumulative exponential histograms are downsampled by preserving the
overall increase (respecting resets) of each bucket count between the start and
end of the downsample window. Delta exponential histograms are downsampled by
summing the data points in the downsampling window.
Due to the reduced temporal granularity, you'll see changes no more frequently
than every 5 minutes, while the running bucket counts remain accurate.
If the histogram exceeds the 160-bucket limit, Cortex XCOR decreases
its scale until the bucket count is within the limit. Downscaling reduces the
histogram's resolution.
Classic Prometheus histograms are cumulative counters and have the same downsampling
effects.
## Querying downsampled data
Querying downsampled data can produce different results, especially between higher
and lower resolution data. Some queries can be sensitive to data resolution. Although
a query might work well with raw data, it could return no data, or data that doesn't
make sense after downsampling.
For example, `rate(some_metric[2m])` with a raw resolution of `30s` returns
results. If you increase the query time range, the query requests downsampled data.
The results are empty, because the query requested multiple data points in the `2m`
window, but downsampling reduces available data to one data point every
[five minutes](/administer/limits-licensing/licensing#contract-details).
To prevent empty graphs when changing the query time range, Cortex XCOR
enforces a minimum range selector on queries that read downsampled data. The minimum
is three times the resolution of the downsampled data, which is `15m` at the default
`5m` resolution. Cortex XCOR rewrites any range selector shorter than the
minimum to the minimum, and leaves longer range selectors unchanged.
A range selector that equals or doubles the resolution is still rewritten, because
both remain shorter than three times the resolution. The following table shows how
Cortex XCOR rewrites the previous example at a `5m` resolution:
| Original query | Query that runs | Reason |
| - | - | - |
| `rate(some_metric[2m])` | `rate(some_metric[15m])` | `2m` is shorter than the `15m` minimum. |
| `rate(some_metric[5m])` | `rate(some_metric[15m])` | `5m` matches the resolution, but is shorter than the minimum. |
| `rate(some_metric[10m])` | `rate(some_metric[15m])` | `10m` is twice the resolution, but shorter than the minimum. |
| `rate(some_metric[15m])` | `rate(some_metric[15m])` | `15m` equals the minimum, so no rewrite occurs. |
| `rate(some_metric[30m])` | `rate(some_metric[30m])` | `30m` exceeds the minimum, so no rewrite occurs. |
Querying lower resolution data might also affect some of the function output,
including:
* The `increase()` function can return very different numbers after switching to
downsampled data.
* The `rate()` function smooths out peaks for graphs with many peaks with raw data.
* Any `resets()` are dropped when downsampling data.
# Understand metric quotas and pools
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/quotas
Learn about metric quotas and pools, and how to give each pool a specific quota of your total persisted writes license.
> [!NOTE]
>
> Metric quotas and pools only apply to capacity pricing. If your organization uses the
> consumption model, see [Manage consumption](/control/consumption).
Metric quotas assign specific percentages of your total persisted writes limit to
*pools* of metrics. A pool might translate to teams or other logical groupings within
your organization.
Use metric quotas to give each pool a specific quota of your total persisted writes
license, expressed either as a percentage or a value in Data Points Per Second
(DPPS).
> [!NOTE]
>
> Palo Alto Networks Cortex XCOR recommends using the fewest number of pools possible for
> administrative ease. For most use cases, 10 or fewer pools is adequate.
Before adding pools, review concepts about
[defining pools](/control/shaping/shape-metrics/quotas/define-pools) to understand how to apply
pool allocations, priorities, and thresholds.
## Exceeding limits
If a metric, single service, pod, or environment begins to emit a high volume of data
that pushes the system over its persisted writes limit, a penalty applies to the pool
containing the emitted metric. Pools that haven't exceeded their quota aren't
penalized.
Individual pool quotas must sum to less than or equal to the
[capacity limit](/administer/limits-licensing/concepts/capacity-licensing#capacity-limits). Metrics
ingestion for individual pools is guaranteed up to the limit defined for the pool. If
your entire Cortex XCOR tenant is under the capacity limit,
an individual pool can exceed its defined quota without incurring a penalty, and
Cortex XCOR allocates the remaining capacity to the **Default Pool**.
When a tenant exceeds the overall capacity limit, enforcement rules take effect. How
enforcement occurs differs between licenses:
* **Persisted and matched writes**: When capacity limits are exceeded for persisted
and matched writes, writes are rate limited based on the defined pools and
[priority](/control/shaping/shape-metrics/quotas/define-pools#configure-priority). Only pools
that exceed their allocation are penalized. In a penalty state, data is dropped in
priority order, starting with low-priority data first.
* **Persisted cardinality**: When capacity limits are exceeded for persisted
cardinality, data is dropped indiscriminately across all pools and priorities until
the tenant is under the capacity limit.
To control the data that's dropped across pools and priorities for persisted
cardinality, you must configure
[pool thresholds](/control/shaping/shape-metrics/quotas/define-pools#pool-thresholds). Thresholds
proactively limit dropped data to specific pools and priorities before overall
capacity is reached. Defining thresholds avoids randomly dropping data, and isolates
penalties so you don't impact pools that aren't exceeding their allocation.
Configuring pool allocations alone doesn't provide protections for persisted
cardinality.
Thresholds define limits that prevent series from consuming portions of the overall
cardinality budget and inadvertently affecting pools that haven't exceeded their
allocation. Defining thresholds means that drops can occur, even if your pool
allocation or overall license aren't exceeded.
Threshold enforcement takes effect after consumption if the relevant pool exceeds
the defined threshold value. This means that if low priority data exceeds the low
priority threshold, Cortex XCOR starts dropping data. The exact point
at which enforcement occurs beyond that value can vary. The smaller the threshold is
relative to overall capacity, the greater the chance for delay when enforcement takes
effect.
## View and manage pools
View [existing metric pools](/control/shaping/shape-metrics/quotas/quotas-ui) in
Cortex XCOR on the Metrics Quotas page. If you haven't configured any
metric pools, Cortex XCOR shows a single **Default Pool**.
You can also use the [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer)
to view the metrics that each pool contains, and filter by priority.
You can then [manage pools](/control/shaping/shape-metrics/quotas/manage-pools) to
shape and plan your pool sizes, and plan for future usage.
# Define a metric pool
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/quotas/define-pools
Learn about metric pool concepts and how to apply them to help shape defining a metric pool.
Before [adding a metric pool](/control/shaping/shape-metrics/quotas/manage-pools#add-a-metric-pool),
review these concepts and how you apply them to help shape defining a pool. A metric
*pool* groups assigned metrics, which are organized by allocations, priorities, and
thresholds:
* [Pool allocations](#pool-allocations) define how much of your total persisted
writes license you want allocated to each pool. You can define allocations for each
of your licenses individually, or have the same allocations across all pools.
* [Pool priorities](#configure-priority) let you selectively decide which metrics
within a given pool to drop first during a penalty scenario. You can set priorities
at a global level (for all pools), or individually.
* [Pool thresholds](#pool-thresholds) are a capability that provide more strict
control on persisted cardinality on individual pools. Configure thresholds as a
proactive measure to strictly enforce dropping data, even when the overall capacity
limit hasn't been exceeded.
* [Match rules](#match-rules) are the set of rules that determine which metrics
belong to the pool. A metric has to match only one of the rules to belong to the
pool.
## License impact
Any applied quota configuration displays in the
[Metrics Quotas](/control/shaping/shape-metrics/quotas/quotas-ui) page, which shows how the pool's
traffic interacts with the pool's quota, without penalizing that pool if the system
goes over its limit.
* To understand matched writes quotas and how they applies to individual pools, see
the [Matched Writes Quotas dashboard](/observe/dashboards/managed-dashboards#matched-writes-quotas).
* To understand persisted cardinality and how it applies to individual pools, see the
[Persisted Cardinality Quotas dashboard](/observe/dashboards/managed-dashboards#persisted-cardinality-quotas).
You can also access these dashboards from the
[License Overview](/observe/dashboards/managed-dashboards#licensing-dashboards)
by clicking the three dots icon in the dashboard panel
relating to the license type, and then clicking the dashboard.
When defining pool allocations, you can specify `fixed_values` for a license, you can
specify any of the supported license types, which include persisted writes, persisted
cardinality, and matched writes. When specifying `priority_thresholds`, you can
specify only persisted cardinality license dimensions, defined by
`PERSISTED_CARDINALITY_STANDARD` and `PERSISTED_CARDINALITY_HISTOGRAM`.
See the
[CreateResourcePools endpoint](/tooling/api-info/definition/operations/CreateResourcePools)
for more information.
## Pool allocations
You can define pool allocations either as a percentage `(percent_of_license)` that
applies to all pools for all licenses, or as a fixed value `(fixed_values)` in data
points per second (DPPS) for individual licenses. Any remaining capacity within each
license is allocated to the default pool, after subtracting the sum of allocations
across pools for that license.
The default pool allocation is calculated based on remaining capacity.
To calculate the data allocation for the default pool, subtract the sum of
allocations across pools for persisted writes, minus the overall
[capacity limit](/administer/limits-licensing/concepts/capacity-licensing#capacity-limits):
```text theme={null}
Capacity limit - allocations across pools = default pool allocation
```
The remainder is assigned to the default pool.
You can specify any combination of `percent_of_license` and `fixed_values` for each
license dimension. However, all pools within a license dimension must use the same
units. For example, if matched writes uses `percent_of_license`, all pools must use
that unit for matched writes. Similarly, if persisted writes uses `fixed_values`, all
pools must use fixed value for persisted writes.
* `percent_of_license`: Specify the percentage of the license to allocate to a pool.
This value applies to any license dimensions without `fixed_values` defined. For
example, consider that you allocate 10% of your persisted cardinality license to a
pool, and your total persisted cardinality license is `5.0M` (million). The
allocation for this pool is `5.0M` of persisted cardinality (.10\*50), so any
consumption beyond that value causes metrics to be dropped.
* `fixed_values`: Specify a fixed value for a license dimension in DPPS. You can set
a single fixed value per license dimension. Any `fixed_values` take precedence over
`percent_of_license` for a given license.
If you set any `fixed_values`, you can specify allocations for both matched writes
license and persisted writes. These allocations are available for both standard and
histogram metrics. See the
[CreateResourcePools endpoint](/tooling/api-info/definition/operations/CreateResourcePools)
for more information.
> [!WARNING]
>
> The sum of fixed values across all defined pools must be less than or equal to the
> total allotted capacity, defined by the
> [capacity limit](/administer/limits-licensing/concepts/capacity-licensing#capacity-limits).
> If your
> organization exceeds the capacity limit, where the sum of fixed values exceeds
> total capacity, a penalty is applied to all pools proportional to fixed
> allocations. A validation in Terraform penalizes any pool that exceeds its allotted
> quota.
>
> In this penalty state, the default pool receives no allocation, and other pools are
> adjusted down proportionally so that the sum of fixed values is equal to the
> capacity limit.
## Configure priority
If you configured metrics quotas and your system exceeds its license limit,
Palo Alto Networks Cortex XCOR drops metrics from pools that exceed their respective quotas
until all pools meet their quotas. Cortex XCOR penalizes only pools that
exceed their persisted writes quota.
To more selectively decide which metrics within a given pool to drop first during a
penalty scenario, specify priorities for each pool:
* **High**: Metrics dropped last.
* **Low**: Metrics dropped first.
* **Default**: Metrics dropped after low priority metrics, but before high priority
metrics.
For persisted writes and matched writes, Cortex XCOR uses these priorities
to determine the order of drops if your organization exceeds their capacity limit.
These priorities are also used in conjunction with [setting thresholds](#pool-thresholds).
Cortex XCOR recommends creating a pool for each team in your organization so they
can manage their own budgets. For example, the Ordering Team who's responsible for
the ordering service can manage their own budget with a pool that's specific to their
team. If the ordering service is allotted 20% of the overall budget, the Ordering
Team can configure priorities within that pool and follow the
[best practices](/control/shaping/shape-metrics/quotas/manage-pools#best-practices) to proactively
manage their budget.
### Configure global priority
You can change global pool quota configurations by metric label. Any changes to quota
configuration labels require updates to all pools.
1. On the **Metrics Quotas** page, click **Configure Quotas**.
2. Click **Edit Global Settings**.
3. In the **Edit Global Pool Settings** dialog, select a label from the
**Quota Configuration Label** dropdown. This label is the label key that defines
which keys can be used to create a pool.
4. Select **Configure Globally** to apply the pool filtering globally, and complete
the following fields:
* **Prioritization label**: Select a label to change its priority.
* **High priority values**: Add a label value, such as `production*` to ensure
metrics with that label value are retained.
* **Low priority values**: Add a label value, such as `test*` to drop metrics of
lower importance first.
5. Click **Done** when finished.
6. Click the **Code config** tab.
7. Click ** Copy** to copy the file, or
** Download** to download the file to your computer.
8. Add the definition to a Terraform file, or create a new Terraform file.
9. Run this command to apply the resource:
```shell theme={null}
terraform apply
```
### Configure priority per pool
You can configure priority for each pool instead of
[configuring priority globally](#configure-global-priority). Complete the following
steps to configure priority for each pool individually.
1. On the **Metrics Quotas** page, click **Configure Quotas**.
2. Click **Edit Global Settings**.
3. In the **Edit Global Pool Settings** dialog, select a label from the
**Quota Configuration Label** dropdown. This label is the label key that defines
which keys can be used to create a pool.
4. Select **Configure per pool** to set priority independently for each pool.
5. Click **Done** when finished.
6. [Edit each pool](/control/shaping/shape-metrics/quotas/manage-pools#edit-a-pool)
to set priorities.
## Pool thresholds
After configuring [pool priorities](#configure-priority), administrative users should
configure thresholds on individual pools to manage persisted cardinality. You must
configure pool thresholds to set strict limits for when to drop new consumption of
the persisted cardinality license for a pool.
Thresholds let you strictly enforce certain pools at configured values, even if the
overall capacity limit wasn't exceeded. By proactively limiting series in strictly
enforced pools, thresholds prevents those series from consuming portions of the
overall cardinality budget and inadvertently affecting pools that haven't exceeded
their allocation.
> [!WARNING]
>
> If you don't configure pool thresholds, when a pool exceeds its defined allocation,
> drops occur randomly across all pools. You must configure pool thresholds to enforce
> limits on individual pools. Configuring pool allocations alone doesn't provide
> protections for persisted cardinality.
Administrative users can configure the following thresholds to take a more proactive
approach to budget optimization, enabling them to implement incremental steps to
prevent an overage before it occurs.
### All priorities threshold
To help solve the "noisy neighbor" problem and isolate the impact of changes to
individual teams, strictly enforce the all priorities
(`all_priorities.percent_of_pool_allocation`) threshold. This threshold stops
accepting data of any priority if consumption for the pool exceeds the specified
threshold value. This threshold limits churn in a pool from exceeding the defined
threshold and inadvertently affecting other pools.
> [!WARNING]
>
> If you don't set the threshold for all priorities, an overage could result in drops
> across other pools. Medium and high priority data can continue to consume capacity
> until the entire pool allocation is exhausted. Setting the threshold for all
> priorities helps ensure that a pool's consumption doesn't impact other high priority
> metrics for other pools.
When configuring the all priorities threshold, consider the following best practices:
* The value of this threshold should be greater than or equal to the pool allocation.
For example, if the pool allocation is 50%, then the threshold should be 50% or
greater. If the threshold value is less than the pool allocation, consider changing
the pool allocation instead.
> [!WARNING]
>
> Setting the threshold to a value that exceeds 100% of the pool allocation can cause
> multiple pools to exceed their allocation, which can cause your system to hit the
> [cardinality limit](/administer/limits-licensing/concepts/capacity-licensing#how-persisted-cardinality-limits-work)
> and arbitrarily drop data.
* Use a percentage for this value rather than a fixed value in DPPS, especially if
you want the threshold value to match the pool allocation. If the threshold is a
fixed value, then you must update that value any time the pool allocation or
license capacity changes.
* You can set this threshold to a value that exceeds 100% of the pool allocation,
which provides a buffer before the threshold limit causes the pool to drop data.
This configuration accommodates occasional spikes, or situations when you're
migrating data from one pool to another over a longer period.
### Low and medium priority thresholds
To proactively limit churn for low and medium-priority series, configure low and
medium priority thresholds to ensure there's room in your license for high-priority
series.
The low priority threshold (`low_priority`) stops accepting low-priority data only if
the data exceeds the threshold value. This
threshold limits churn in low-priority series that exceed the threshold.
The low and medium priority threshold (`default_and_low_priority`) stops accepting
low and medium priority data if low- and medium-priority data combine to exceed the
threshold value. This threshold limits churn in low- and
medium-priority series that exceed the threshold.
### Configure pool thresholds
> [!NOTE]
>
> Configuring pool thresholds is supported only in Terraform and the
> [`CreateResourcePools`](/tooling/api-info/definition/operations/CreateResourcePools)
> endpoint of the [Cortex XCOR API](/tooling/api-info).
To determine the threshold values for each pool, use the
[Persisted Cardinality Quotas dashboard](/observe/dashboards/managed-dashboards#persisted-cardinality-quotas)
to identify usage trends. The data in this dashboard can help inform recommended
thresholds for low, medium, and high priority series in each pool. For example,
* If the control team consistently uses approximately 95% of its pool, and you want
to prevent an overage from resulting in drops in other pools, set a strict
threshold (`all_priorities`) to 100%.
* If the control team contains data for your most important pool, and you'd rather
drop data from all other pools except this one, set strict thresholds for all other
pools except the control team pool.
* If the control team often experiments with new series in its development and
staging environments, set proactive thresholds to 10% for low priority and 20% for
combined low and medium priority data to preserve space for high-priority series.
Complete the following steps to set pool thresholds. See the
[example](#pool-thresholds-example) for how to configure thresholds within a pool.
1. Add the `priority_thresholds` object to your existing metric pools definition with
either Terraform or the
[`CreateResourcePools`](/tooling/api-info/definition/operations/CreateResourcePools)
endpoint.
2. Define the license you want the threshold to operate on. Thresholds support these
licenses:
* `PERSISTED_CARDINALITY_STANDARD`: Refers to the
[standard metric license](/administer/limits-licensing/concepts/capacity-licensing#standard-metrics-license),
which measures the current consumption rates across persisted writes, matched
writes, and persisted cardinality license dimensions measured against the
capacity limit.
* `PERSISTED_CARDINALITY_HISTOGRAM`: Refers to the
[histogram metrics license](/administer/limits-licensing/concepts/capacity-licensing#histogram-metrics-license),
which measures the current consumption rate across all histogram metrics license
dimensions measured against the capacity limit.
3. Define the thresholds you want to configure, which can be one of the following
values:
* `all_priorities`: Stop accepting any data (low, medium, and high) at the
specified threshold if consumption for the pool exceeds threshold value.
* `default_and_low_priority`: Stop accepting low and medium priority data at the
specified threshold if low and medium priority data combined exceed threshold
value.
* `low_priority`: Stop accepting only low priority data at the specified threshold
if low priority data exceeds threshold value.
4. Save and apply your metric pools definition.
After making changes, use the
[Persisted Cardinality Quotas dashboard](/observe/dashboards/managed-dashboards#persisted-cardinality-quotas)
to track which pools are approaching or exceeding defined thresholds, identify where
drops are occurring, and view which priority levels are affected.
> [!NOTE]
>
> After updating definitions for priorities or pools, only new inbound time series
> adhere to the new rules immediately. Any existing, inactive series that were already
> attributed to a changed pool might continue to count towards your cardinality limit
> until they naturally expire in the 150 minute rolling window. This means that it
> might take 150 minutes for cardinality per pool and per priority to accurately
> reflect counts.
#### Pool thresholds example
In the following example, priority thresholds are set for
`PERSISTED_CARDINALITY_HISTOGRAM` for `all_priorities` and `low_priorities`:
```terraform expandable Terraform example icon="square-terminal" theme={null}
pool {
name = "Control Services"
allocation {
percent_of_license = 16
priority_thresholds {
license = "PERSISTED_CARDINALITY_STANDARD"
all_priorities {
percent_of_pool_allocation = 100
}
default_and_low_priority {
percent_of_pool_allocation = 50
}
low_priority {
percent_of_pool_allocation = 25
}
}
priority_thresholds {
license = "PERSISTED_CARDINALITY_HISTOGRAM"
all_priorities {
percent_of_pool_allocation = 100
}
low_priority {
percent_of_pool_allocation = 25
}
}
}
match_rules = ["service:{${join(",", control_services)}}"]
priorities {
high_priority_match_rules = ["cluster:production*"]
low_priority_match_rules = ["cluster:test*"]
}
}
```
## Match rules
Match rules are filters that define which metrics are high or low priority. Any
metric that matches at least one filter is considered high or low priority, depending
on the defined priority.
High priority match rules take precedence over low priority ones. If a metric matches
both a high and low priority rule, it's considered a high priority metric. When the
license limit is exceeded, high priority metrics are dropped last, and low priority
metrics are dropped first.
> [!NOTE]
>
> This behavior applies to only persisted writes and matched
> writes, but doesn't apply to persisted cardinality.
Match rules support [glob syntax](/investigate/querying/glob-syntax). See the
`match_rules` defined in the [pool thresholds example](#pool-thresholds-example)
and the [Terraform pool example](/control/shaping/shape-metrics/quotas/manage-pools#terraform-pool-example)
to understand the rule syntax.
# Manage metric pools
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/quotas/manage-pools
Add, edit, and preview metric pool quota allocations on the Metrics Quotas page in Palo Alto Networks Cortex XCOR.
On the [Metrics Quotas](/control/shaping/shape-metrics/quotas/quotas-ui) page in
Palo Alto Networks Cortex XCOR, review current quota allocations and preview
potential changes by pool. Use this feature to plan pool sizes and future usage.
To get started with pools, learn about how to
[define a pool](/control/shaping/shape-metrics/quotas/define-pools).
## Add a metric pool
Select from the following methods to add a metric pool. Changes made in the web
interface are previews that you apply using the generated configuration.
> [!NOTE]
>
> You can define up to 20 custom metric pools.
> [tab] Web
>
> Although actual management of pools is handled using
> [Terraform](/tooling/infrastructure/terraform), this interface helps you
> understand what changes to make to reduce guesswork and repeated updates to your
> system.
>
> To create quota pools, you must have administrative privileges:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Metrics Quotas**.
>
> 2. Click **Configure Quotas**.
>
> 3. Click **+ Add Pool**.
>
> 4. The following fields display on the page. Update editable fields to modify your
> pool configuration:
> * **Pool name:** (Editable) Change the pool name.
> * **Data matching:** The values the selected pool uses to match data.
> * **Quota configuration label:** The label matching this pool.
> * **Data matching values:** (Editable) The specific values for the label, which
> match this pool. Add a value and press `Enter` or Space to add it to the list.
> The value supports [glob syntax](/investigate/querying/glob-syntax).
> * **Observed label consumption:** Displays estimated Standard Metrics consumption
> for the matching label values, broken down by label value. The estimate isn't
> restricted to data currently assigned to the pool.
> * **Quota allocation:** (Editable) Set a quota percentage for the selected pool.
> The drawer displays the equivalent persisted writes Standard Metrics value in
> data points per second (DPPS). To enter a DPPS value, use the **DPPS** mode in
> the **Pools** table.
> * **Prioritization:** (Conditionally editable) Add the **Priority Label** and high or
> low priority values.
>
> > [!NOTE]
> >
> > Pools using a global priority setting can't change their priorities for an
> > individual pool.
>
> 5. In the **Quota Allocation** chart, select or clear pool names in the legend to
> include or remove their segments from the **Allocation** and
> **Current Consumption** stacked bars.
>
> 6. Click **Done** after completing your changes.
>
> 7. Click the **Code config** tab.
>
> 8. Click ** Copy** to copy the file, or
** Download** to download the file to your computer.
>
> 9. Review the generated configuration. Percentage changes apply to licenses that
> don't have fixed-value overrides. Changes entered in **DPPS** mode update only the
> `PERSISTED_WRITES_STANDARD` fixed value. The generated configuration preserves
> existing fixed values and thresholds for other licenses.
>
> 10. Add the definition to a Terraform file, or create a new Terraform file.
>
> 11. Run this command to apply the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] Chronoctl
>
> To create a pool using [Chronoctl](/tooling/chronoctl):
>
> 1. Run the following command to generate a sample pool configuration you can use as a
> template:
>
> ```shell theme={null}
> chronoctl resource-pools scaffold
> ```
>
> In the template, `kind: ResourcePools` defines the complete pool configuration.
>
> The `ResourcePools` resource is a singleton that contains the default pool and all
> named pools. If a `ResourcePools` resource already exists, follow the
> [Chronoctl edit procedure](#edit-a-pool) instead of creating another resource.
>
> 2. With a completed definition, submit it with:
>
> ```shell theme={null}
> chronoctl resource-pools create -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create a pool with [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file and add the definition by using the
> `chronosphere_resource_pools_config` type, followed by a name in a resource
> declaration.
>
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> See the [Terraform pool example](#terraform-pool-example) for a completed
> pool resource.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateResourcePools`](/tooling/api-info/definition/operations/CreateResourcePools)
> endpoint.
>
> The endpoint creates the complete `ResourcePools` singleton. If the resource already
> exists, use the
> [`UpdateResourcePools`](/tooling/api-info/definition/operations/UpdateResourcePools)
> endpoint to add a named pool.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Chronoctl pool example
The following code is an example of a Chronoctl resource used to create quotas and
priorities.
The example creates two pools: one for `team_a` and one for `team_b`. Each pool
defines license values for persisted writes and matched writes, along with
[thresholds](/control/shaping/shape-metrics/quotas/define-pools#pool-thresholds) to
manage persisted cardinality.
```yaml expandable Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: ResourcePools
spec:
pools:
- name: team_a
allocation:
fixed_values:
- license: PERSISTED_WRITES_STANDARD
value: "70000"
- license: MATCHED_WRITES_STANDARD
value: "30000"
priority_thresholds:
- license: PERSISTED_CARDINALITY_STANDARD
all_priorities:
fixed_value: "6000000"
low_priority:
fixed_value: "2000000"
filters:
- name: team
value_glob: 'a'
priorities:
high_priority_filters:
- name: env
value_glob: '*prod*'
low_priority_filters:
- name: env
value_glob: '*dev*'
- name: team_b
allocation:
fixed_values:
- license: PERSISTED_WRITES_STANDARD
value: "16000"
- license: MATCHED_WRITES_STANDARD
value: "15000"
priority_thresholds:
- license: PERSISTED_CARDINALITY_STANDARD
all_priorities:
fixed_value: "1750000"
low_priority:
fixed_value: "750000"
filters:
- name: team
value_glob: 'b'
priorities:
high_priority_filters:
- name: env
value_glob: '*prod*'
low_priority_filters:
- name: env
value_glob: '*dev*'
```
### Terraform pool example
The following code is an example of a Terraform file used to create pools and
priorities.
This code is an example and shouldn't be used directly. This example uses the
following variables in place of a specific name:
* *`RESOURCE_NAME`* is a resource in your system.
* *`SERVICE_NAME`* is the name of a service in your system.
```terraform expandable Terraform example icon="square-terminal" theme={null}
resource "RESOURCE_NAME_resource_pools_config" "resource_pools" {
default_pool {
priorities {
high_priority_match_rules = ["RESOURCE_NAME_k8s_cluster:production*"]
low_priority_match_rules = ["RESOURCE_NAME_k8s_cluster:rc*"]
}
}
pool {
name = "Tracing Services"
allocation {
# Applies to each license that doesn't have a fixed-value override.
percent_of_license = 10
}
match_rules = ["service:{spanhandler,traceingester}"]
priorities {
# Optional. Match rules are filters that define which metrics are high or
# low priority. Any metric that matches at least one filter is considered
# high or low priority, depending on the defined priority. High priority
# match rules take precedence over low priority ones. If a metric
# matches both a high and low priority rule, it's considered a high
# priority metric. When the license limit is exceeded, high priority
# metrics are dropped last, and low priority metrics are dropped first.
# This behavior applies to only persisted writes and matched writes, but
# doesn't apply to persisted cardinality.
high_priority_match_rules = ["RESOURCE_NAME_k8s_cluster:production*"]
low_priority_match_rules = ["RESOURCE_NAME_k8s_cluster:rc*"]
}
}
pool {
name = "Collector service"
allocation {
percent_of_license = 8
# Optional. For supported licenses, defines thresholds with strict limits
# for when to drop new consumption of the license for a pool. Currently, only
# `PERSISTED_CARDINALITY_STANDARD` and `PERSISTED_CARDINALITY_HISTOGRAM` are
# supported.
priority_thresholds {
license = "PERSISTED_CARDINALITY_STANDARD"
# Threshold limit that defines when to drop new metrics in the pool. This
# threshold applies to all priorities of metrics: high, default, and low.
# This field must be set, and have a value equal to or greater than other
# priority fields.
all_priorities {
percent_of_pool_allocation = 100
}
}
priority_thresholds {
license = "PERSISTED_CARDINALITY_HISTOGRAM"
all_priorities {
percent_of_pool_allocation = 100
}
}
}
match_rules = ["service:{${join(",", local.collector_services)}}"]
priorities {
high_priority_match_rules = ["chronosphere_k8s_cluster:prod*"]
low_priority_match_rules = ["chronosphere_k8s_cluster:rc*"]
}
}
pool {
name = "SERVICE_NAME Services"
allocation {
percent_of_license = 25
}
match_rules = ["service:SERVICE_NAME*"]
priorities {
high_priority_match_rules = ["RESOURCE_NAME_k8s_cluster:production*"]
low_priority_match_rules = ["RESOURCE_NAME_k8s_cluster:rc*"]
}
}
pool {
name = "Gateway Services"
allocation {
percent_of_license = 4
}
match_rules = ["service:gateway*"]
priorities {
high_priority_match_rules = ["RESOURCE_NAME_k8s_cluster:production*"]
low_priority_match_rules = ["RESOURCE_NAME_k8s_cluster:rc*"]
}
}
}
```
## Edit a pool
Select from the following methods to edit pools. You can also
[configure global priorities](/control/shaping/shape-metrics/quotas/define-pools#configure-global-priority)
to change global pool quota configurations by metric label.
> [!NOTE]
>
> The visual editor requires one quota configuration label across all pools and one
> prioritization label within each pool. Edit configurations that use multiple matching
> or prioritization labels directly in Terraform.
> [tab] Web
>
> To edit an existing pool:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Metrics Quotas**.
>
> 2. Click **Configure Quotas**.
>
> 3. Click any row in the **Pools** table to open the **Edit Pool** drawer.
>
> The **Edit Pool** drawer contains information specific to the selected pool. These
> fields match the **Add Pool** screen, and some values can be edited.
>
> 4. Make any necessary changes, and then click **Done** after completing your changes.
>
> 5. Click the **Code config** tab.
>
> 6. Click ** Copy** to copy the file, or
** Download** to download the file to your computer.
>
> 7. Review the generated configuration to confirm that existing fixed values and
> priority thresholds are preserved.
>
> 8. Add the definition to a Terraform file, or create a new Terraform file.
>
> 9. Run this command to apply the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] Chronoctl
>
> To edit a pool using [Chronoctl](/tooling/chronoctl):
>
> 1. View your existing metrics pools YAML definition with the
> `chronoctl resource-pools read` command:
>
> ```shell theme={null}
> chronoctl resource-pools read
> ```
>
> 2. Copy the YAML definition and save it to a new file ending in `.yaml`.
>
> 3. Modify the YAML definition properties and apply the changes:
>
> ```shell theme={null}
> chronoctl resource-pools update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
> [tab] Terraform
>
> To edit a pool using [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file that updates the resource's existing properties.
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> You can also use the Code config tool to view and edit the resource pool Terraform
> representation:
>
> 1. Click the **Code config** tab.
> 2. Make changes to the resource pool definition.
> 3. Click ** Copy** to copy the file, or
** Download** to download the file to your computer.
> 4. Add the definition to a Terraform file, or create a new Terraform file.
> 5. Run this command to apply the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateResourcePools`](/tooling/api-info/definition/operations/UpdateResourcePools) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Understanding pool usage
The **Pools** section of the **Configure Quotas** page describes what pools you have,
and how they're configured. This includes:
* **Pool name:** The display name of the pool.
* **Data matching:** The label values the pool matches.
* **Allocation:** The percentage or DPPS of total traffic guaranteed to the pool
before it might be penalized.
* **Consumption:** The percentage or DPPS of total traffic the pool is consuming over
the selected [time range](/navigate/time-ranges).
> [!NOTE]
>
> Allocation and consumption DPPS values describe
> [Standard Metrics License](/administer/limits-licensing/concepts/capacity-licensing#standard-metrics-license)
> allocation and consumption.
> Histogram Metrics License allocation and consumption aren't included in the pool's
> reported DPPS.
#### Quota allocations and consumption
The **Quota Allocations vs Current Consumption** graph compares two stacked bars.
The **Allocation** bar segments the current quota allocation by pool. The
**Current Consumption** bar segments current consumption by pool. Select pool names
in the legend to filter both bars.
#### Quota consumption by pools (per second)
The **Quota Consumption by pools** graph compares each pool's displayed consumption
with its current quota limit. Changing an allocation adds the
**New Quota Limit** series.
#### Understand quota consumption trends
The **Quota Consumption** graph plots each pool's consumption over time. Point to a
data point to display its value. Drag across the graph to focus on a time period.
#### Preview quota allocations
The **Pools** include a group of text fields corresponding to each created pool. These
boxes contain values with the assigned percentage (**%**) or DPPS for each pool.
Use these to set your general pool allocations.
To preview a new quota allocation, change a number in the box for the pool to be
updated. Click outside the boxes to update the total.
Quota settings must meet the following criteria:
* In the web interface, changing a named pool's quota adjusts the default pool so
that all allocations total 100%.
* The **Add Pool** and **Edit Pool** drawers support values greater than or equal to
0.01%. Allocation fields in the **Pools** table support positive values with up to
three decimal places.
* The API supports values from 0% through 100% with up to three decimal places. If
the default pool allocation is omitted, named pool allocations can total less than
100%, and the default pool receives the remainder.
Changing an assigned quota displays a third bar in the **Quota consumption by pools**
chart. Use the new bar to determine if new quota assignments meet the needs of each
of your pools.
If one pool is consistently over quota and the other pools aren't, use the preview to
adjust assigned quotas to better meet the needs of each pool.
Click the ** Reset quotas** icon to restore existing allocation
values. This action doesn't undo changes to names, data matching, priorities, added
pools, or removed pools.
## Delete a pool
Select from the following methods to delete pools.
> [tab] Web
>
> To delete an existing pool:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Metrics Quotas**.
>
> 2. Click **Configure Quotas**.
>
> 3. Click a non-default pool's row in the **Pools** table to open the
> **Edit Pool** drawer.
>
> 4. At the bottom of the **Edit Pool** drawer, click **Remove Pool**.
>
> The pool is removed from the preview and the resource definition in the
> **Code config** tab.
>
> 5. Click the **Code config** tab.
>
> 6. Click ** Copy** to copy the file, or
** Download** to download the file to your computer.
>
> 7. Update your Terraform file with the generated definition.
>
> 8. Run this command to apply the change:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] Chronoctl
>
> To delete a pool using [Chronoctl](/tooling/chronoctl):
>
> 1. View your existing metrics pools YAML definition with the
> `chronoctl resource-pools read` command:
>
> ```shell theme={null}
> chronoctl resource-pools read
> ```
>
> 2. Copy the YAML definition and save it to a new file ending in `.yaml`.
>
> 3. Remove the pool you want to delete from the YAML definition and save the updated
> file.
>
> 4. Apply the changes:
>
> ```shell theme={null}
> chronoctl resource-pools update -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
>
> To delete the *entire* `ResourcePools` definition, use the
> `chronoctl resource-pools delete` command:
>
> ```shell theme={null}
> chronoctl resource-pools delete
> ```
>
> > [!WARNING]
> >
> > This command deletes the *entire* `ResourcePools` definition.
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
>
> You can also use the Code config tool to view and edit the resource pool Terraform
> representation:
>
> 1. Click the **Code config** tab.
> 2. Make changes to the resource pool definition.
> 3. Click ** Copy** to copy the file, or
** Download** to download the file to your computer.
> 4. Add the definition to a Terraform file, or create a new Terraform file.
> 5. Run this command to apply the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteResourcePools`](/tooling/api-info/definition/operations/DeleteResourcePools)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
>
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
>
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
>
> > [!WARNING]
> >
> > This action deletes the *entire* `ResourcePools` definition.
## Best practices
To keep penalty behavior and cost accounting transparent and predictable, pools
should be hard partitions of your system, with no one time series matching
more than one pool. The following processes help ensure pools have the correct data:
* Cortex XCOR recommends selecting a single usage tag as the pool assignment
mechanism. Picking a single tag reduces the possibility where one pool matches
`serviceX`, and a second pool matches `environmentY`, where time series might match
either or both definitions.
* Use exact match values for the selected label. The Cortex XCOR API rejects an exact label value
that's already assigned to another pool.
* Cortex XCOR uses match ordering for valid glob patterns that overlap. If
a time series matches more than one pool, it becomes part of the first matching pool
in the list.
* If you see a pool that doesn't match the expected penalty behavior, open the pool
in the profiler and compare it with the Terraform configuration file. A match rule
value might be incorrect.
## Create an alert for a pool in penalty
When a pool is in a penalty state, it might drop metrics to reduce usage. For higher
priority pools, this can result in the loss of important data. To reduce or prevent
data loss, create a [monitor](/investigate/alerts/monitors) to alert on pool usage and
[send notifications](/investigate/alerts/notifications) to the appropriate team.
1. [Create a notifier](/investigate/alerts/notifications/notifiers) and align with
your internal alerting policies to route the alerts to the right team.
2. Create a [notification policy](/investigate/alerts/notifications/policies) that
connects the notifier to a monitor.
3. [Create a monitor](/investigate/alerts/monitors#create-a-monitor).
4. In the monitor query, add the query to return each pool's percent utilization. For
example, the following query calculates persisted writes standard metrics
utilization and excludes pools with zero allocation:
```text wrap theme={null}
(
100 *
sum by (pool_name) (
chrono_metrics_persisted_writes_license_dpps_consumed{datapoint_type="standard"}
)
/
sum by (pool_name) (
chrono_metrics_persisted_writes_license_dpps_capacity{datapoint_type="standard"}
)
)
and on (pool_name)
(
sum by (pool_name) (
chrono_metrics_persisted_writes_license_dpps_capacity{datapoint_type="standard"}
) > 0
)
```
5. In the **Signals** section, select **Per time series (many alerts)** as the
[signal](/investigate/alerts/notifications/signals#per-time-series).
6. Define the warning condition as greater than 90 and set the sustain period to
5 minutes.
7. Click **Save** to save the monitor.
# View allocated pools
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/quotas/quotas-ui
View the persisted writes quota allocated to and consumed by each metrics pool to find pools at risk of being limited.
The **Metrics Quotas** page displays existing metrics pools, the
persisted writes quota allocated to each pool, and the amount of persisted writes
quota consumed by each pool.
Teams can use this information to:
* Understand which pools are consuming quota and how much.
* Identify which pools are at risk of being limited.
* Determine how each pool has prioritized its traffic to ensure that only lower
priority data drops if the system exceeds its limit while a pool is over its quota.
Select from the following methods to view your metrics pools.
> [tab] Web
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Metrics Quotas**.
> 2. Use the **Sort by** menu to change the display order. A summary of **All Pools**
> always display at the top of the list.
> 3. Use the **Search** box to find a specific pool.
> 4. Select a **Time Range** to display.
> 5. Select a pool name to view data specific to that pool. The **Default Pool** is the
> pool containing all otherwise unassigned metrics.
>
> Hold the pointer over any sparkline chart to display a dialog with data specific to
> that day and time. Click the dialog to pin it.
> [tab] Chronoctl
>
> To list your existing metrics pools using [Chronoctl](/tooling/chronoctl), use the
> `chronoctl resource-pools read` command:
>
> ```shell theme={null}
> chronoctl resource-pools read
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ReadResourcePools`](/tooling/api-info/definition/operations/ReadResourcePools) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## All Pools
When viewing **All Pools**, you can see system-wide persisted writes quota
consumption and the pools consuming the highest percentage of their assigned quotas.
The upper portion of this page displays persisted writes statistics across all pools:
* **Limit** total for persisted writes, in data points per second (DPPS).
* **Average** persisted writes in DPPS.
* **Current** percentage of usage versus your limit.
* **Total over time** is a graph of the change over time in the overall consumption
of quota, as a percentage of total quota.
The **All Pools** page includes additional charts and statistics:
* **Overall limit and consumption by pool** is a stacked-area sparkline chart of
individual pools and how much quota they're consuming. Use this chart to compare
pools and better understand which of them are using the most resources. Hold the
pointer over the chart to view the number of data points contributed by each pool
at that time.
* **Quota consumption by pool** graphs detail the assigned limits and current
consumption of that limit for each pool. If one of your pools exceeds its limit,
but the overall quota consumption is still 100%, the pool exceeding the limit
continues to collect data normally. Hold the pointer over a graph to see incoming
data points and the quota limit.
When the system exceeds the persisted writes limit, Palo Alto Networks Cortex XCOR
enforces the limit by
dropping data from pools over their quota.
* **License overage state** shows the volume of metrics dropped for each pool that's
in a penalty state. Any pool that exceeds the persisted writes license capacity
displays in this chart.
## Select a pool
Click a pool name to view data specific to that pool. The pool's page includes the
percentage of persisted writes the selected pool consumes, and overall quota
consumption against the total persisted writes limit.
Each pool page also includes the following details about the pool's quota usage:
* **Top persisted writes by service** can help determine which services configured in
this pool generate the most writes.
* **Persisted writes trends by service** displays the current percentage of total
quota this pool is using, and a graph tracking the usage of the time range.
* **Quota consumption** tracks the consumption of quota in DPPS, against the limit.
* **Traffic priority**: Displays traffic priority in a box chart that shows which
priorities have the most traffic, based on
[priority definitions](/control/shaping/shape-metrics/quotas/manage-pools).
In addition to any named metric pools you define, all instances have a
**Default pool**. You can set the quota for the default pool, but not the name or
match criteria. The default pool matches any metric that isn't matched by another
pool. New metrics that don't match defined pools get assigned to the
**Default pool**.
### License overage dropped metrics
If the aggregate usage exceeds the
[Persisted Writes Capacity limit](/administer/limits-licensing/concepts/capacity-licensing#persisted-writes),
the pools
exceeding their defined quotas are penalized. In this penalty state, Cortex XCOR can
start dropping data points.
During a penalty period, the **License overage dropped metrics** pane displays the
total volume of dropped metrics for each pool, and the associated priority of high,
medium, and low. Use these graphs to identify when Cortex XCOR started
dropping metrics. You can then create [drop rules](/control/shaping/shape-metrics/rules/drop-rules)
to drop incoming metrics and create
[aggregation rules](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules)
to reduce persisted writes.
### Quota Configuration Values
This table lists all the label **Values** matching the pool configuration. and how
much DPPS each contributes to the pool quota. In the **Default pool**, new metrics
have the **New** indicator.
### Quotas for the Histogram Metrics License
Cortex XCOR offers limited support of metric quotas for metrics that
consume
[Histogram Metrics License](/administer/limits-licensing/concepts/capacity-licensing#histogram-metrics-license)
capacity. The percentage
quota defined for a pool applies to both Standard and Histogram Metrics.
For example, when you allocate a 30% quota to a pool, the pool's quota is 30% of your
Standard Metrics License's persisted writes and 30% of your Histogram Metrics
License's persisted writes. However, the Metrics Quotas UI doesn't provide usage
information for the Histogram Metrics License's persisted writes.
# Reduce cardinality
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/reduce-cardinality
Learn how to use the tools provided by Palo Alto Networks Cortex XCOR to identify and reduce metric cardinality.
When you're first using Palo Alto Networks Cortex XCOR, or a new app or service
comes online, you might see cardinality spikes. Cardinality spikes can occur when:
* A metric or group of metrics has unexpectedly large numbers of labels.
* A process or service creates many similarly named metrics.
> [!TIP]
>
> For more information about cardinality, see
> [What is high cardinality in observability?](https://www.paloaltonetworks.com/cyberpedia/what-is-high-cardinality/)
> on the Palo Alto Networks blog.
Cardinality spikes can cause storage and licensing issues. To reduce cardinality, or
data storage for less important metrics:
1. Find a problematic metric or label.
2. Review that metric or label's usage.
3. Decide what to do with it (drop, rollup).
## Find a metric and inspect the associated labels
Cortex XCOR provides the following tools to help you understand the impact of
metric growth, identify problematic metrics and labels, and assess the impact of
existing aggregation rules:
* The [Metric Growth dashboard](/observe/dashboards/managed-dashboards#metric-growth)
can includes metrics and labels that have recently increased in cardinality.
* The [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer) provides real-time
insight into current incoming metrics. Sort metrics by **Unique value** to find
potential high cardinality.
* The [Aggregation Rules UI](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules)
visualizes existing shaping rules and how they affect your environment. Review
these rules to understand their impact.
If you want to reduce the cardinality of a metric, you must first understand the
targeted metric and its associated labels.
If you have administrative privileges:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Live Telemetry**.
2. The analyzer defaults to `_name_`. Sort **Label values** by name, or add a
**label filter**.
3. In the **Labels** section, inspect the incoming label keys. The **Unique Values**
column shows how many distinct values are incoming for a given label
(cardinality), and **Appears In** shows how frequently that label is attached to
the metric.
When the number of unique values for a metric is high, that label contributes
significantly to the cardinality for the metric.
## Review metric and label usage
After identifying a high-cardinality label, you need to understand whether this
label is meaningful, or if it can be safely removed.
To verify dropping a label is safe, use the
[Telemetry Usage Analyzer](/investigate/analyze/usage#high-volume-low-utility-metrics)
to review each label's **Utility score**. This score provides insight into which
labels users [find important](/investigate/analyze/usage#usage-patterns).
## Remove the identified label
If you identify a label that isn't used in any dashboards or alerts, consider
reducing or removing the label using these methods:
* Create [drop, mapping, or rollup rules](/control/shaping/shape-metrics/rules#reduce-stored-metrics)
to reduce stored metrics by aggregating, downsampling, or dropping unneeded metric
data.
* Use the [Recommendations](/control/shaping/shape-metrics/reduce-cardinality/recommendations) page
to identify metrics and labels with no usage or utility over the past 30 days.
Apply the suggested recommendations to reduce the impact on persisted writes and
persisted cardinality.
* When ingesting Google Cloud metrics, use
[filters and aggregations](/ingest/xcor/integrations/server/gcp#control-incoming-metrics).
### Validation
For rollup rules, preview the
[shaping impact](/control/shaping/shape-metrics/reduce-cardinality/shaping-impact) to
review and confirm your changes before deleting metrics and labels that still matter.
## Post validation tasks
Return to the Live Telemetry Analyzer and search for your metric. If you've used a
rollup rule, it can take some time before your rolled up metric appears.
For rolled up metrics, it often makes sense to drop raw data if that data isn't
needed. This reduces cardinality and data storage requirements.
After you've validated your rule, apply the rule using your selected method.
# Review aggregation rules
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules
Use the Aggregation Rules page to review your aggregation rules.
The Aggregation Rules page is a centralized location in Palo Alto Networks Cortex XCOR
to review all of your [rollup](/control/shaping/shape-metrics/rules/rollup) and
[mapping](/control/shaping/shape-metrics/rules/mapping) rules.
To open the page, click ** Go to admin view**. In the
navigation menu, select **
Optimization > Aggregation Rules**.
The page lists each rule type on its own tab:
* **Rollup rules:** Lists your rollup rules, with shaping impact data for each rule.
This tab is selected by default.
* **Mapping rules:** Lists your mapping rules. This tab appears only when your tenant
has at least one mapping rule. You can't create mapping rules from this page.
## Search and filter rules
Use the **Search rules** field to find a particular rule or group of rules. The search
matches each rule's name, slug, filters, status, policy and labels, output metric name, and last-modified date.
Dates match the format shown in the **Last modified** column.
Searches aren't case-sensitive. Separate multiple terms with spaces to return only
rules that match every term. For example, `kubelet discard` returns rules that contain
both `kubelet` and `discard`.
On the **Rollup rules** tab, use the **Status** menu to show **All** rules, or only
rules in **Preview** or **Enabled** mode.
## Rollup rules table
The **Rollup rules** table includes the following columns. To display a description
of a column, hold the pointer over the information icon in the
column header.
* **Status:** The mode the rule is in, either **Preview** or **Enabled**. To learn
about preview mode, see
[Preview aggregation rule impact](/control/shaping/shape-metrics/reduce-cardinality/shaping-impact).
* **Name:** The rule name.
* **Filter:** The names of the metrics or labels the rule matches. Filters can include
both Prometheus and Graphite metrics.
* **Policy:** The rule's label policy. **Keep labels** indicates the rule preserves
the listed labels and discards all others. **Discard labels** indicates the rule
removes the listed labels and keeps all others. **Drop raw** indicates the rule
deletes the raw metrics it matches.
* **Metric name:** The name of the output metric that the rule creates and persists
to the database. In the output name, `{{ .MetricName }}` represents the name of the
input metric.
* **Matched writes**, **Persisted impact**, **Efficiency**, and **Utility score:**
The columns that make up the rule's [shaping impact](#shaping-impact).
* **Last modified:** The last time the rule was updated.
For more detail, see
[Rollup rule attributes](/control/shaping/shape-metrics/rules/rollup#rollup-rule-attributes).
### Shaping impact
*Shaping impact* data shows the individual effect of each existing rule on your
metrics traffic, which helps you manage your traffic shape.
The following columns describe the shaping impact of a rule:
* **Matched writes:** The raw number of incoming data points per second matching the
rule. If your organization uses
[consumption-based pricing](/administer/limits-licensing/licensing#metrics-consumption),
this column is named **Matched datapoints**.
* **Persisted impact:** The change in total persisted data points per second as a
result of the rule. This column doesn't appear if your organization uses
consumption-based pricing.
* **Efficiency:** A measure of how effective the rule is in aggregating incoming
data points, expressed as a percentage reduction in data points per second from
incoming to aggregated data.
* **Utility score:** An aggregate number that indicates the relative usefulness of
the output metric, determined by the number of references, executions, and unique
users. A higher score means users include the output metric in their workflows. To
learn more, see [Telemetry Usage Analyzer](/investigate/analyze/usage).
Use shaping impact data for tasks like these:
* To reduce persisted data, look for rules that have low utility but add persisted
data. Use the **Least Valuable (by Persisted Impact)** sort to find them. This sort
isn't available if your organization uses consumption-based pricing.
* To clean up ineffective rules, look for rules that aren't aggregating data, or
don't match incoming data points effectively. Use the **Least Effective** sort to
find them.
### Sort your data
On the **Rollup rules** tab, use the sorting menu to order rules by their shaping
impact. The menu is set to **Custom** by default, and includes these options:
* **Least Effective:** Lists rules with the lowest rule efficiency first.
* **Most Effective:** Lists rules with the highest rule efficiency first.
* **Custom:** Sorts by the column you select in the table header.
To sort by a single column, click the column name. The **Filter** and **Policy**
columns don't support sorting. Clicking a column name sets the sorting menu to
**Custom**, and selecting any other sorting menu option clears the column sort.
If your organization doesn't use consumption-based pricing, the menu also includes
options that compare a rule's output metric utility to its cost:
* **Least Valuable (by Matched Impact):** Lists rules with the lowest output metric
utility relative to their matched writes first.
* **Most Valuable (by Matched Impact):** Lists rules with the highest output metric
utility relative to their matched writes first.
* **Least Valuable (by Persisted Impact):** Lists rules that add persisted data and
have low output metric utility first.
* **Most Valuable (by Persisted Impact):** Lists rules that conserve persisted data
and have high output metric utility first.
## Mapping rules table
The **Mapping rules** tab includes a table with the following columns:
* **Name:** The rule name.
* **Filter:** The names of the metrics or labels the rule matches.
* **Policy:** The resolution at which the rule stores matched metrics, shown as
`sample `. **Drop raw** indicates the rule deletes the raw metrics it
matches.
* **Last modified:** The last time the rule was updated.
Click a column name to sort the table by that column. The **Filter** and **Policy**
columns don't support sorting.
## Add aggregation rules
On the **Rollup rules** tab, click **Create rule** to open the
**Create Aggregation Rule** drawer. Use the
[rollup rule creation procedure](/control/shaping/shape-metrics/rules/rollup#create-a-rollup-rule)
to define the rule.
Cortex XCOR doesn't save rules you define in the drawer. Define the rule on the
**Visual editor** tab, and then select the **Code config** tab to copy the
configuration and apply it with [Terraform](/tooling/infrastructure/terraform) or
[Chronoctl](/tooling/chronoctl).
## Rule details
Click any rule in a table to open its details drawer. Click **Previous** or **Next**
to move between rules of the same type without closing the drawer.
The drawer header contains the following controls:
* **Add comment** or **View comments:** Opens the comments for the rule. When the rule
has comments, the button label includes the number of comments.
* **View incoming metrics:** Opens the Live Telemetry Analyzer to
[analyze the rule's incoming data](#analyze-incoming-metrics-or-labels).
* **Edit:** For rollup rules, [opens the rule in the editor](#edit-aggregation-rules).
* **View Configuration:** For mapping rules, displays the rule's code configuration.
### Rule configuration
The **Rule configuration** section lists the rule's settings, including its status,
last update time, filters, and whether it drops raw data. For rollup rules, the
section also lists the slug, label policy, output metric name, metric type,
aggregation, and interval.
To view the code configuration for a rule:
* For rollup rules, click **Edit**, and then select the **Code config** tab.
* For mapping rules, click **View Configuration**.
In the code configuration, select **API**, **Chronoctl**, or **Terraform** to set the
format of the definition. Copy the definition to your clipboard to create or update a
rule using supported creation methods.
### Shaping impact graphs
For rollup rules, the **Shaping impact** section displays a current value and a
historical graph for each of the following measures:
* **Matched writes:** The raw number of incoming data points per second (DPPS)
matching the rule. If your organization uses consumption-based pricing, this
measure is named **Matched datapoints**.
* **Persisted impact:** The change in total persisted data points per second as a
result of the rule, as a percentage. The current value also displays the number of
**DPPS added** or **DPPS conserved**. This measure doesn't appear if your
organization uses consumption-based pricing.
* **Rule efficiency:** The percentage reduction in data points per second from
incoming to aggregated data.
* **Utility score:** The output metric utility score over time.
The graphs display the last day of data by default. Use the time range selector to
change the period that the graphs display.
### Analyze incoming metrics or labels
To analyze the incoming data that a rule matches, open the rule's details drawer, and
then click **View incoming metrics**. The
[Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer) opens and actively
profiles the metrics that match the rule's filters.
### Edit aggregation rules
For rollup rules, click **Edit** to open the rule in the editor, which contains the
rule's current settings. Make changes on the **Visual editor** tab, and then copy the
new configuration from the **Code config** tab. To update the rule, apply the new
configuration using Terraform or Chronoctl.
# Apply rule recommendations
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/reduce-cardinality/recommendations
Use the Recommendations page to identify and reduce metrics and labels with no usage or utility over the past 30 days.
Palo Alto Networks Cortex XCOR includes a **Recommendations** page as part of
the Control Plane to help identify metrics and labels with no usage or utility over
the past 30 days. The utility score is calculated based on the number of
configuration references to the metric, such as dashboards or monitors, and direct query
executions, such as in Metrics Explorer.
Use this page to understand the impact on persisted writes and persisted cardinality
when applying the recommended data optimizations. After applying optimizations,
it might take up to 150 minutes to see impacts to cardinality. Impacts to persisted
writes are immediate. The aggregation rules on this page incorporate labels that
appear together in the total cardinality calculation.
## Drop rule recommendations
To apply drop rule recommendations:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization >
Recommendations**.
2. In the left navigation under **Data optimizations**, click the drop rule
recommendations.
3. Select one or more metrics to calculate the estimated impact on reducing persisted
writes and persisted cardinality. All metrics are selected by default.
4. Click **Create Drop Rule** to create a drop rule definition that contains the
selected metrics.
5. In the **Add Drop Rule** drawer, choose whether the rule drops data with any
value, or if it meets a particular value.
6. Click **Review** to review your changes.
7. Select the checkbox to indicate that you've reviewed the rule, and then click
**Save Rule**.
The drop rule is created and displays in the
[Drop Rules](/control/shaping/shape-metrics/rules/drop-rules) page.
## Rollup rule recommendations
To apply rollup rule recommendations:
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization >
Recommendations**.
2. In the left navigation under **Data optimizations**, click the rollup rule
recommendations.
3. Select a single metrics to calculate the estimated impact on reducing persisted
writes and persisted cardinality.
4. Click **Create Rollup Rule** to create a rollup rule definition that contains the
selected metric.
5. Complete the steps to
[create a rollup rule](/control/shaping/shape-metrics/rules/rollup#create-a-rollup-rule).
# Preview aggregation rule impact
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/reduce-cardinality/shaping-impact
Use the Shaping Impact Preview to preview the impact of aggregation rules on your system before applying them.
Shaping Impact Preview lets you create
[rollup](/control/shaping/shape-metrics/rules/rollup) or
[mapping](/control/shaping/shape-metrics/rules/mapping) aggregation rules in preview
mode. A preview rule doesn't change your incoming data or stored time series, but
Palo Alto Networks Cortex XCOR records the shaping impact the rule would have if it
were enabled. Use preview mode to confirm that a rule works as expected and to catch
breaking changes before the rule affects your data.
## Preview a rule's shaping impact
Preview rules appear on the
[Aggregation Rules page](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules)
alongside rules already in use. On the **Rollup rules** tab, the **Status** column
shows **Preview** for rules in preview mode. To list only preview rules, select
**Preview** in the **Status** menu.
The **Rollup rules** tab displays the
[shaping impact](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules#shaping-impact)
of each preview rule in the **Matched writes**, **Persisted impact**, and
**Efficiency** columns. If your organization uses consumption-based pricing, the
**Persisted impact** column doesn't appear.
Shaping impact values for a new preview rule can take a few minutes to appear. Until
then, the **Matched writes** and **Efficiency** columns show zero, and the
**Persisted impact** column shows `-`. Reload the page to display updated values.
Preview rules show a **Utility score** of zero, because Cortex XCOR doesn't store
the output metric until the rule is enabled.
The Aggregation Rules page doesn't display shaping impact data for mapping rules. To
view the mode of a mapping rule, open the rule's details drawer from the
**Mapping rules** tab.
## Create a preview rule
To create a preview rollup or mapping rule, set the `mode` field in the rule
definition. The `mode` field accepts these values:
* `PREVIEW`: The rule is in preview mode, and doesn't affect data being mapped,
rolled up, or added to storage.
* `ENABLED`: The rule is active and affects incoming data.
If `mode` isn't present, the rule defaults to `ENABLED`.
To generate a preview definition for a rollup rule on the Aggregation Rules page,
open the **Create Aggregation Rule** drawer, select **Rule preview** under
**Status**, and then copy the definition from the **Code config** tab.
For mapping or rollup rules created with [Chronoctl](/tooling/chronoctl), define
`mode` in the `spec` section of the rule definition file:
```yaml theme={null}
spec:
mode: PREVIEW
```
For mapping or rollup rules created with the
[Terraform provider](/tooling/infrastructure/terraform), add `mode` to the resource:
```terraform theme={null}
# The operational mode for this rule.
mode = "PREVIEW"
```
## Change a rule from preview to enabled
Preview rules use the same definition files as active rules. To change a rule from
preview to enabled:
1. In the definition file, change the value of `mode` from `PREVIEW` to `ENABLED`.
2. Save the file.
3. Apply the updated definition.
The rule begins affecting data, and the **Status** column on the Aggregation Rules
page shows **Enabled**.
# Metric shaping rules
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/rules
Learn about the ways to use rules in Palo Alto Networks Cortex XCOR to shape metric data.
Palo Alto Networks Cortex XCOR applies shaping rules at different phases along the data
journey. Drop rules are applied at ingestion time. After metrics are sent but before
they're stored, rollup rules and mapping rules are applied. Derived metrics and
recording rules are then applied at query time.
```mermaid actions={false} theme={null}
flowchart TB
subgraph OP["Cortex XCOR"]
subgraph Ingest["Ingestion"]
Drop["Drop rules"]
end
subgraph Aggregate["Aggregation"]
Rollup["Rollup rules"]
Mapping["Mapping rules"]
end
subgraph Query["Querying"]
Derived["Derived metrics"]
Record["Recording rules"]
end
end
Ingest --> Aggregate --> Query
click Drop "/control/shaping/shape-metrics/rules/drop-rules"
click Rollup "/control/shaping/shape-metrics/rules/rollup"
click Mapping "/control/shaping/shape-metrics/rules/mapping"
click Derived "/investigate/querying/metrics/derived-telemetry/derived-metrics"
click Record "/control/shaping/shape-metrics/rules/recording"
classDef rules fill:#007A3D,stroke:#007A3D,stroke-width:2px,color:#FFFFFF,font-weight:underline;
class Drop,Rollup,Mapping,Derived,Record rules
```
## Reduce stored metrics
Cortex XCOR [ingests](/ingest) metrics from many sources.
These sources can supply multiple [metric types](/control/shaping/shape-metrics/types), which are
generally ingested as raw data.
Although raw data might provide detailed information about a specific point in time,
that data grows rapidly and is expensive to store. Use the following shaping rules to
control costs by aggregating, downsampling, or dropping unneeded metric data:
* [Drop rules](/control/shaping/shape-metrics/rules/drop-rules) reduce incoming data or cardinality
to pare down your stored metrics across both time and labels. Use drop rules to omit
incoming metrics based on labels, and only retain
the metrics you need. These rules help reduce persisted data, and you can
implement them quickly.
* [Rollup rules](/control/shaping/shape-metrics/rules/rollup) downsample and aggregate metrics
after they're sent by the client but before they're stored. Use rollup rules to
reduce cardinality, downsample data, and perform basic aggregations across both
time and labels. These rules are scalable, can drop raw data, and handle
late-arriving data.
* [Mapping rules](/control/shaping/shape-metrics/rules/mapping) downsample in-memory metric data on
the streaming ingest path and then store any results in the database, which happens
before metric aggregation. Use mapping rules to reduce stored metrics across time
only.
* [Recommendations](/control/shaping/shape-metrics/reduce-cardinality/recommendations) identify
metrics and labels with no usage or utility over the past 30 days. Apply the
suggested recommendations to reduce the impact on persisted writes and persisted
cardinality.
When ingesting Google Cloud metrics, use
[filters and aggregations](/ingest/xcor/integrations/server/gcp#control-incoming-metrics) to
reduce incoming metrics.
Review your metrics to determine if they're actionable because they have
[*references*](/investigate/analyze/usage#summary), or because some of their labels
have high utility (*dimensions*).
See [Reducing cardinality](/control/shaping/shape-metrics/reduce-cardinality) for more information
about this process.
```mermaid actions={false} theme={null}
graph LR
accTitle: What kind of rule should I use?
accDescr: A flowchart to help with the process of finding metrics to remove.
Profile[Profile metrics to triage]-->Ref@{shape: diamond, label: "Are there references?"}
Ref -->|Yes| Unused@{shape: diamond, label: "Are there unused dimensions?"}
Ref -->|No| Drop[Drop the metric]
Unused -->|Yes| Rollup[Use rollup rules to drop dimensions]
Unused -->|No| Value@{shape: diamond, label: "Do the dimensions provide value?"}
Value --> |Yes| Next[Find next metric]
Value -->|No| Rollup
click Profile "/investigate/analyze/telemetry-analyzer"
click Drop "/control/shaping/shape-metrics/rules/drop-rules"
click Rollup "/control/shaping/shape-metrics/rules/rollup"
classDef rules fill:#007A3D,stroke:#007A3D,stroke-width:2px,color:#FFFFFF,font-weight:bold;
class Profile,Drop,Rollup rules
```
## Optimize query performance
> [!NOTE]
>
> Although Cortex XCOR provides recording rules to optimize query performance,
> Cortex XCOR recommends using [rollup rules](/control/shaping/shape-metrics/rules/rollup) in most
> cases because they can reduce both cardinality and the volume of the data you persist.
[Recording rules](/control/shaping/shape-metrics/rules/recording) primarily improve query
performance. You can execute any PromQL query and add labels, which make queries more
efficient. However, recording rules impact your persisted data. If you want to change
how data is presented to make it easier for users to query, consider using [alias
expressions](#alias-expressions), which don't impact persisted data.
If you experience issues with [late-arriving data](/control/storage), consider using
[rollup rules](/control/shaping/shape-metrics/rules/rollup) instead, since recording rules might
impact short-term query results.
You can also use rollup rules and drop rules to
[fix slow queries](/investigate/querying/metrics/fixing) by reducing the number of
time series those queries return.
## Alias expressions
[Derived metrics](/investigate/querying/metrics/derived-telemetry/derived-metrics) and
[derived labels](/investigate/querying/metrics/derived-telemetry/derived-labels) provide frequently
used aliases for queries without impacting persisted data limits.
Derived metrics help reduce alert and dashboard complexity, replace
[recording rules](/control/shaping/shape-metrics/rules/recording), and provide frequently used
aliases for queries.
Derived labels are non-destructive, and are specifically designed for efficient
operations on time series at scale. Unlike Prometheus relabel rules, which overwrite
existing data, derived labels standardize your label names without overwriting them
permanently.
# Drop rules
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/rules/drop-rules
Use drop rules to omit metrics you don't need and persist only the metrics that matter.
Based on your amount of available storage and rate limits, you might want to reduce
the amount of metrics that you continue to store so that you're keeping only those
metrics you need. For example, using [Telemetry Usage Analyzer](/investigate/analyze/usage),
you might find a metric has a low utilization score. Metrics with
[high volume and low utilization](/investigate/analyze/usage#high-volume-low-utility-metrics)
are candidates for dropping.
Use *drop rules* to omit incoming metrics based on labels, and have
Palo Alto Networks Cortex XCOR persist only those metrics you need. Define filters to specify
the metric or label names you want to drop. You can also drop metrics based on a
data point value.
The Chronosphere Collector scrapes data from an app, and sends the data to Cortex XCOR where you
can apply drop rules. Any metrics that weren't impacted by drop rules are then
aggregated in Cortex XCOR.
```mermaid actions={false} theme={null}
graph LR
accTitle: Drop rules data flowchart
accDescr: Where drop rules take effect in the flow of data into Cortex XCOR.
col(Collector) -- Scrapes --> app(Application)
col -- Sends --> Drop("Drop rules")
subgraph OP["Cortex XCOR"]
Drop -- Metrics not dropped --> ca(Aggregate metrics)
end
```
Drop rules affect data from the point of rule creation onward. When you query for the
metric:
* Data can display in autocomplete searches for a period of approximately two hours.
* Queries covering the time period before the drop rule took effect display the
metric until the [retention period](/administer/limits-licensing/licensing#contract-details)
expires.
## View and filter created drop rules
To view the drop rules defined on your instance, you must have administrative
privileges.
Select from the following methods to view your available drop rules.
> [tab] Web
>
> To view drop rules:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Drop Rules**.
> 2. Use the **Search rules** text box to find a specific rule. This search looks for
> any text in any rule.
> 3. Select a value from the **Mode** menu to filter for rules matching the selected
> mode.
> 4. Select a drop rule from the list that you want to view.
> 5. Optional: To annotate a drop rule with additional context, on the **Edit Drop Rule**
> panel click the **Comments** tab to [add a comment](/navigate/comments).
>
> For information about viewing, copying, or downloading rule configurations, see
> [Rule configuration](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules#rule-configuration).
> [tab] Chronoctl
>
> To list drop rules on the command line with [Chronoctl](/tooling/chronoctl), use this
> command:
>
> ```shell theme={null}
> chronoctl drop-rules list
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListDropRules`](/tooling/api-info/definition/operations/ListDropRules) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Find drop rules that apply to a metric
If you know a metric name but not which drop rules apply to it, search for rules whose
filters accept that metric.
> [tab] Chronoctl
>
> > Requires [Chronoctl](/tooling/chronoctl) version 1.36.0 or later.
>
> Use the `--matches-series` flag to return drop rules that might apply to the
> `container_memory_failcnt` metric:
>
> ```shell theme={null}
> chronoctl drop-rules list --matches-series '__name__=container_memory_failcnt'
> ```
>
> Combine `--matches-series` with `--slugs` or `--names` to further restrict the
> results.
> [tab] API
>
> Use the `matches_series` parameter of the
> [`ListDropRules`](/tooling/api-info/definition/operations/ListDropRules) endpoint.
> Combine `matches_series` with `slugs` or `names` to further restrict the results.
>
> After [creating an API token](/tooling/api-info#create-an-api-token), run the following
> request to return drop rules that might apply to the `container_memory_failcnt`
> metric:
>
> ```shell theme={null}
> curl -sS -G "https://${XCOR_DOMAIN}/api/v1/config/drop-rules" \
> -H "API-Token: ${XCOR_API_TOKEN}" \
> --data-urlencode 'matches_series=__name__=container_memory_failcnt'
> ```
Matching returns rules whose filters accept the metric name you provide. Cortex XCOR
evaluates each rule's glob filters in the same way as it does during ingestion, so
the results include rules that match the metric name through a wildcard.
For example, searching for `__name__=http_requests_total` produces the following
results:
| Rule filter | Result |
| - | - |
| `__name__` is `http_requests_total` | Returned |
| `__name__` is `http_requests_*` | Returned |
| `__name__` is `{http_requests_total,grpc_requests_total}` | Returned |
| `__name__` is `http_requests_total` and `env` is `prod` | Returned |
| The rule has no `__name__` filter | Returned |
| `__name__` is `grpc_requests_total` | Not returned |
| `__name__` is `grpc_*` | Not returned |
The search evaluates only the labels you provide. A returned rule might apply to only
some time series for the metric, such as time series where `env` is `prod`.
The following limitations apply:
* Provide exactly one entry in the form `__name__=METRIC_NAME`. Other labels aren't
supported.
* Provide a complete metric name. Values that contain glob characters such as `*`,
`?`, `[]`, or `{}` or that start with `!` return an error.
For details about rule filter syntax, see
[Matching with glob syntax](#matching-with-glob-syntax).
## Create a drop rule
Use drop rules to drop the ingestion of certain metrics that you don't need to
persist. For example, dropping metrics from a specific cluster, or test data.
Drop rules can have multiple filter conditions on different labels, making it
possible to drop a subset of the series matching a particular metric name. Use
multiple filters for cases where only a subset of a metric's data is used. For
example, if a metric is used in an alert but examines only series related to error
statuses, you can drop non-error status series.
You can use [glob syntax](#matching-with-glob-syntax) in your drop rule to match
specific values. Use the `value_based_drop` object to define a
[value-based drop rule](#define-a-value-based-drop-rule) that drops metrics based on
a target data point value.
Drop rules have these definition limitations:
* The rule can't be longer than 8,192 characters.
* A drop rule `slug` must contain only alphanumeric
characters, dashes, or underscores.
The allowed regular expression for matching is `[a-zA-Z0-9-_]`. Spaces aren't
allowed.
* Each rule `name` must be unique.
> [!NOTE]
>
> After creating a drop rule, it takes roughly one minute for the rule to take effect.
> Wait at least one minute after creating a drop rule before making updates to it.
A metric that matches any drop rule is dropped, regardless of overlap with drop rules
created using other methods. For example, if a metric matches a drop rule created
with Terraform that also matches a subset of a drop rule created with the
[`CreateDropRule`](/tooling/api-info/definition/operations/CreateDropRule) endpoint,
the metric is dropped.
A drop rule containing `kubernetes_cluster:dev` matches and drops lower value metrics
containing this key-value pair. To exclude specific values that also match this rule,
use a single `filter` with an `AND` logical operator to specify a "does not equal"
match. The following drop rule matches any metric containing
`kubernetes_cluster:dev`, but not metrics that also contain the specified
`container_name` values:
```text theme={null}
"kubernetes_cluster:dev AND container_name:!{log_service|data_service}"
```
Select from the following methods to create a drop rule.
> [!NOTE]
>
> Users can modify Terraform-managed resources only by using Terraform.
> [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
> [tab] Web
>
> To create a drop rule, you must have administrative privileges:
>
> 1. In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Drop Rules**.
>
> 2. Click **Create drop rule**.
>
> 3. In the **Create drop rule** drawer, select a **Mode** for the drop rule, which
> can be one of the following values:
>
> * **Enabled**: Create the rule and make it active immediately.
> * **Preview**: Create the rule and evaluate it, but don't drop data.
> * **Disabled**: Create the rule, but don't evaluate it to drop data.
>
> 4. Enter a **Name** for the rule.
>
> 5. Enter one or more **Matchers**, which are labels with or without a specific value.
> You can use [glob syntax](/investigate/querying/glob-syntax) in the **Value**
> field.
>
> To specify multiple values, separate values with a comma and surround them with
> curly braces (`{}`). For example, `key={value1,value2,value3}`.
>
> To match values containing a comma, specify the values without braces. For
> example, `key=value,continue`.
>
> When allowing only particular metrics, you might need a double negation, which
> requires specific logical filtering:
>
> ```text theme={null}
> keep: a==A && b==B
> drop: !(a==A && b==B)
> ```
>
> In combination, this logic leads to a drop rule where `!a==A || !b==B --> a!=A || b!=B`.
>
> > [!NOTE]
> >
> > Comma-separated lists can't include spaces after commas. Rules with a space after
> > a comma don't evaluate.
>
> 6. To define a [value-based drop rule](/control/shaping/shape-metrics/rules/drop-rules#define-a-value-based-drop-rule),
> choose **0** or **1** in the **Select drop value** menu.
>
> 7. Click **Review**.
>
> 8. Review the rule to ensure it's correct.
>
> 9. Select the checkbox for **I have reviewed the proposed changes and they look correct**.
>
> 10. Click **Save rule** to save the rule, or click **Back** to change the rule.
> [tab] Chronoctl
>
> To create a drop rule with [Chronoctl](/tooling/chronoctl):
>
> 1. Run the following command to generate a sample drop rule configuration you can use
> as a template:
>
> ```shell theme={null}
> chronoctl drop-rules scaffold
> ```
>
> You can redirect this output to a file for editing:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl drop-rules scaffold > FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML definition file you want to use.
>
> 2. Configure the rule's properties in the YAML resource definition. See the
> [Chronoctl example](#chronoctl-example) for a completed definition.
>
> 3. With a completed definition, submit it with:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl apply -f FILE_NAME.yaml
> ```
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> To create a drop rule with [Terraform](/tooling/infrastructure/terraform):
>
> 1. Create or edit a Terraform file and add the definition by using the
> `chronosphere_drop_rule` type, followed by a name in a resource declaration.
>
> 2. Run this command to apply the changes:
>
> ```shell theme={null}
> terraform apply
> ```
>
> See the [Terraform example](#terraform-example) for a completed drop rule resource.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateDropRule`](/tooling/api-info/definition/operations/CreateDropRule) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Chronoctl example
The following resource defines a drop rule named `Drop node exporter` in `PREVIEW`
mode, with the slug `drop-node-exporter-metrics`:
```yaml Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: DropRule
spec:
name: "Drop node exporter"
# Unique identifier for rule
slug: "drop-node-exporter-metrics"
filters:
- name: job
value_glob: node_exporter
# Boolean to determine if rule is currently active
mode: PREVIEW
value_based_drop:
enabled: true
# Configuration of which metric values to drop; must be 0 or 1
target_drop_value: 0
# Boolean to determine whether to drop data points that are NaN.
drop_nan_value: true
```
### Terraform example
The following definition creates a drop rule that Terraform refers to as
`drop-node-exporter`, with the name `Drop node exporter`. The rule drops all metrics
from the `node_exporter` job.
```terraform Terraform example icon="square-terminal" theme={null}
resource "chronosphere_drop_rule" "drop-node-exporter" {
# Name for the rule
name = "Drop node exporter"
# Unique identifier for rule; generated automatically if left blank
slug = "drop-node-exporter-metrics"
# Label matcher to match metrics that should be dropped; all labels must match
query = [
"job=node_exporter",
]
# Whether the rule is enabled; one of ENABLED, DISABLED, or PREVIEW
mode = "ENABLED"
# Boolean to determine whether to drop data points that are NaN.
drop_nan_value = true
}
```
This rule is an example of a drop rule based on the value of the incoming data point:
```terraform Terraform example icon="square-terminal" theme={null}
resource "chronosphere_drop_rule" "value-based-drop-rule" {
# Name for the rule
name = "Drop Rule"
# Label matcher to match metrics that should be dropped; all labels must match
query = [
"ab=123",
]
# Whether the rule is enabled; one of ENABLED, DISABLED, or PREVIEW
mode = "ENABLED"
# Configuration of which metric values to drop; must be 0 or 1
value_based_drop {
target_drop_value = 1
}
# Boolean to determine whether to drop data points if the values are NaN
drop_nan_value = true
}
```
### Matching with glob syntax
Drop rules support glob syntax, but don't support PromQL operators in the
`value_glob` field to indicate negation. The following glob syntax applies to drop
rules:
* To match on any value, include an asterisk (`*`) in the `value_glob` field. For
example, the following rule matches values that start with `envoy_cluster_grpc` for
the `__name__` metric
```yaml theme={null}
filters:
- name: __name__
value_glob: envoy_cluster_grpc*
```
* To not match on a value for a metric label, include an exclamation mark (`!`) in
the `name` field. For example, the following rules match any metrics that don't
have a `container` label with a value of `database-backup` or `database-restore`:
```yaml theme={null}
filters:
- name: container!
value_glob: database-{backup,restore}
```
Verify your [glob syntax](/investigate/querying/glob-syntax) with
[Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer) to ensure your query
matches the correct metrics.
You can also [create drop rules](/control/shaping/shape-metrics/rules/drop-rules#create-a-drop-rule)
in preview mode to evaluate a rule without dropping data. This capability lets you
test a rule without impacting your persisted data.
#### Glob syntax examples
The following definition for a drop rule in Chronoctl includes a few different rules
that include matching on any value (`*`) and negation syntax (`!`):
* Drops any metric that doesn't have an `id` field with a forward slash (`/`) as a
value.
* Drops any metric that includes the `pod` key, with any value.
* Drops any metric that doesn't have the `container` field, with any value.
```json theme={null}
{
"drop_rule": {
"slug": "cAdvisor-pause-containers",
"name": "cAdvisor pause containers",
"mode": "ENABLED",
"filters": [
{
"name": "job",
"value_glob": "k8s-cadvisor"
},
{
"name": "id!",
"value_glob": "/"
},
{
"name": "pod",
"value_glob": "*"
},
{
"name": "container!",
"value_glob": "*"
}
]
}
}
```
The following drop rule for the
[CreateDropRule API](/tooling/api-info/definition/operations/CreateDropRule) drops any
metric containing the `service` label with a value of `api` that also has a `cluster`
label that begins with `dev`.
```json theme={null}
{
"drop_rule": {
"slug": "api-drop-rule",
"name": "api drop rule",
"mode": "ENABLED",
"filters": [
{
"name": "service",
"value_glob": "api"
},
{
"name": "cluster",
"value_glob": "dev*"
}
]
}
}
```
To keep only metrics with a specific label value, use glob syntax to specify a "does
not equals" match with an exclamation mark `!` in the `name` field to match specified
values.
For example, the following drop rule drops any metric containing the
`service` label with a value of `api`, that doesn't also have an `env` label with a
value of `production`. This drop rule also applies if the `env` label isn't set.
```json theme={null}
{
"drop_rule": {
"slug": "api-drop-rule",
"name": "api drop rule",
"mode": "ENABLED",
"filters": [
{
"name": "service",
"value_glob": "api"
},
{
"name": "env!",
"value_glob": "production"
}
]
}
}
```
> [!NOTE]
>
> A label with an empty value is the same as a label that isn't present.
Use an asterisk `*` in the `value_glob` field to match metrics with a particular
label, regardless of the value. Conversely, to drop only metrics that don't have a
particular label, use an exclamation mark `!` in the `name` field to specify a "does
not equal" match, in conjunction with an asterisk `*` to match all values.
For example, the following drop rule drops any metric containing the `service` label
with a value of `api` that doesn't also have an `env` label.
```json theme={null}
{
"drop_rule": {
"slug": "api-drop-rule",
"name": "api drop rule",
"mode": "ENABLED",
"filters": [
{
"name": "service",
"value_glob": "api"
},
{
"name": "env!",
"value_glob": "*"
}
]
}
}
```
> [!NOTE]
>
> Cortex XCOR glob syntax doesn't support using two asterisks where one of
> them is in the middle of a string. For example, `*k8s*staging` isn't valid.
### Define a value-based drop rule
Use the `value_based_drop` object to define a value-based drop rule. The
`target_drop_value` parameter specifies the target data point value at which to drop
metrics.
> [!WARNING]
>
> The `value_based_drop` parameter drops time series based on data point values of `0`
> or `1`. This type of drop rule can significantly reduce data points per second, but
> changes metrics from continuous series to sparse metrics. Adding a rule of this type
> can change the behavior of existing monitors or dashboards that use the target
> metric.
You can include the `drop_nan_value` parameter to drop data point values that are Not
a Number (NaN). If set to `true`, Cortex XCOR drops NaN data points, along with any
published
[staleness markers](/ingest/metrics-traces/collector/configure/optimizations#enable-staleness-markers).
If you set the `drop_nan_value` parameter to `true` in conjunction with the
`value_based_drop` parameter, Cortex XCOR drops data points matching the
value *or* any NaN values.
If you want to drop *only* NaN values, set `drop_nan_value` to `true` without a
corresponding `value_based_drop` parameter. When no value is set for
`drop_nan_value`, all values are dropped, including NaN values.
## View drop rule impact
After [creating a drop rule](#create-a-drop-rule), query the
[`chrono_metrics_drop_rule_dpps_matched`](/overview/concepts/dictionary#impact-statistics)
metric to understand the impact of your drop rule. Use the labels this metric
provides to answer these questions:
* Which data points were dropped by active drop rules?
* Which active rules overlap or duplicate other drop rules?
* What are the total matches across all rules?
To understand the impact of a drop rule:
1. In the navigation menu select
** Explorers > Metrics Explorer**.
2. In the **Metrics Explorer** page, click **Builder** and then in the **Metric**
field, enter the following metric name:
```text theme={null}
chrono_metrics_drop_rule_dpps_matched
```
3. Click **Run** to run the query.
The results include all drop rules.
4. Click the **Filters** field. In the **Labels** subfield, select `slug` as the
label to match on, and then click the **Value** subfield to search for the name
of your drop rule.
5. Click **Run** to run the updated query and narrow the results.
6. In the **Aggregation** field, select **Sum** as the aggregation, and then select
**applied** and **mode** as the values to aggregate by.
7. Click **Run** to run the updated query.
You can add filters to narrow the results to answer specific questions. The following
examples provide some common questions, and include the query to run in Metrics
Explorer to answer each question:
* **How can I preview how much data a given drop rule will drop?**
```text /SLUG/ theme={null}
sum(chrono_metrics_drop_rule_dpps_matched{mode="preview", slug="SLUG"})
```
Replace `SLUG` with the slug of your drop rule. This metric creates the drop rule
in `preview` mode. You can then use the following metric to enable the drop rule
and apply it.
* **How much data does an existing, enabled rule drop?**
```text wrap /SLUG/ theme={null}
sum(chrono_metrics_drop_rule_dpps_matched{mode="enabled", applied="true", slug="SLUG"})
```
Replace `SLUG` with the slug of your drop rule.
* **How much data am I actually dropping across my existing drop rules?**
```text wrap /SLUG/ theme={null}
sum by (slug) (chrono_metrics_drop_rule_dpps_matched{mode="enabled", applied="true"})
```
* **What's the overall combined number of data points dropped as a result of my
enabled and preview rules?**
```text /SLUG theme={null}
sum(chrono_metrics_drop_rule_dpps_matched{applied="true"})
```
* **Which rules aren't effective because they're duplicates of existing rules that
are dropping data?**
```text wrap /SLUG/ theme={null}
sum by (slug) (chrono_metrics_drop_rule_dpps_matched{mode="enabled", applied="false"})
```
## Disable a drop rule
Select from the following methods to disable a drop rule.
> [!NOTE]
>
> Users can modify Terraform-managed resources only by using Terraform.
> [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
> [tab] Web
>
> To disable an existing drop rule in Cortex XCOR, you must have
> administrative privileges:
>
> 1. In the navigation menu click ** Go to admin view**
> and then select
** Optimization > Drop Rules**.
> 2. Select the rule you want to disable from the list.
> 3. Toggle the rule to the **Disabled** state.
> 4. Click **Save**.
>
> To re-enable the rule, use the previous steps and instead toggle **Always Active**.
> [tab] Chronoctl
>
> To disable a drop rule with [Chronoctl](/tooling/chronoctl):
>
> 1. In the drop rule specification, set `mode` to `DISABLED`.
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: DropRule
> spec:
> name: "Drop node exporter"
> # Unique identifier for the rule
> slug: "drop-node-exporter-metrics"
> filters:
> - name: job
> value_glob: node_exporter
> # Boolean to determine if rule is currently active
> mode: DISABLED
> value_based_drop:
> enabled: true
> target_drop_value: 0
> ```
>
> 2. Submit the disabled drop rule definition to Cortex XCOR:
>
> ```shell theme={null}
> chronoctl apply -f FILE.yaml
> ```
> [tab] Terraform
>
> To disable a drop rule with [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit the drop rule's definition in a Terraform file to set `active` to `false`.
> 2. Run the following command:
>
> ```shell theme={null}
> terraform apply
> ```
>
> For example, the following definition disables an always active drop rule that
> Terraform refers to as `drop-node-exporter`, with a human-readable name
> of `Drop node exporter`.
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_drop_rule" "drop-node-exporter" {
>
> # Name for the rule
> name = "Drop node exporter"
>
> # Unique identifier for the rule
> slug = "drop-node-exporter"
>
> # Label matcher to match metrics that should be dropped; all labels must match
> query = [
> "job=node_exporter"
> ]
>
> # Set to DISABLED to stop the rule from dropping metrics
> mode = "DISABLED"
> }
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`UpdateDropRule`](/tooling/api-info/definition/operations/UpdateDropRule) endpoint and update
> the `mode` key to `DISABLED`.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 a drop rule
Select from the following methods to delete a drop rule.
> [tab] Web
>
> 1. In the navigation menu, select
> **Optimization > Drop Rules**.
>
> 2. Select the rule you want to delete from the list.
>
> 1) Click the delete icon to delete the rule.
> [tab] Chronoctl
>
> To delete a drop rule using [Chronoctl](/tooling/chronoctl), pass the rule's
> slug to the `drop-rules delete` command:
>
> ```shell theme={null}
> chronoctl drop-rules delete SLUG
> ```
>
> Replace *`SLUG`* with the slug of the rule you want to delete.
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteDropRule`](/tooling/api-info/definition/operations/DeleteDropRule) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Find and fix rule and monitor evaluation failures
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/rules/evaluation-failures
View and fix recording rule and monitor evaluation failures.
[Recording rules](/control/shaping/shape-metrics/rules/recording) and [monitors](/investigate/alerts/monitors)
might not evaluate properly, leaving you with missing data or errors that weren't
caught.
## View recording rules and monitor failures
Select from the following methods to view your recording rule or monitor failures.
> [tab] Web
>
> In the navigation menu, click ** Go to admin view**
> and then select
> **Platform > Rule Status**.
>
> The **Rule Status** page displays. Select **Monitors** or **Recording Rules** to
> focus on a set of errors. Each type's display includes the:
>
> * **Time Frame**: The amount of time data aggregated. Permanently set to
> **last 5 minutes**.
> * **Total Monitors** or **Total Recording Rules**: The number of this type of
> definition.
> * **Failing Monitors** or **Failing Recording Rules**: The number of monitors or
> rules currently failing to execute.
> * **Go To Recording Rules**: On the **Recording Rules** tab, this link goes to the
> recording rules page.
>
> The page provides a table with the following information:
>
> * **Execution Status** of the rule in the **Time Frame**.
> * **Monitor** or **Recording Rule** name.
> * **Interval** the rule evaluates at.
> * **#Errors** shows the number of failed evaluations in the **Time Frame**.
> * **Error** text explaining the failure.
>
> At the end of the line, click the three vertical dots
> icon and then a menu option to:
>
> * **View Full Error Text**: Review the error text in a dialog box.
> * **Copy Error Text**: Copy the text of the error message.
> * **Go to Monitor**: For monitor failures, go to the failed monitor.
> [tab] Chronoctl
>
> To view rule evaluation failures with [Chronoctl](/tooling/chronoctl), use the
> `rule-evaluations list` command:
>
> ```shell theme={null}
> chronoctl rule-evaluations list
> ```
>
> The output contains all the rule evaluation failures that occurred within the last
> five minutes, including the following information:
>
> * `rule_slug`
> * `rule_type`: What type of rule (or monitor) this error is for.
> * `detected_at`: Rule evaluation issues aggregated over the last five minutes,
> leading up to this timestamp.
> * `count`: How many failures occurred in the time period.
> * `message`: The error message, as explained in
> [common failures and solutions](#common-failures-and-solutions).
>
> For example:
>
> ```shell theme={null}
> chronoctl rule-evaluations list
> ```
>
> The output looks similar to the following:
>
> ```text theme={null}
> rule_slug: bad-rule
> rule_type: MONITOR
> detected_at: 2023-02-27T22:44:39.884Z
> count: 20
> message: vector contains metrics with the same labelset after applying alert labels
> ---
> rule_slug: bad-rule-2
> rule_type: RECORDING
> detected_at: 2023-02-27T22:44:39.884Z
> count: 5
> message: An internal error occurred.
> ```
>
> See the [List Rule Evaluation](/tooling/api-info/state_definition/operations/ListRuleEvaluations)
> API documentation to learn more about these individual fields.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListRuleEvaluations`](/tooling/api-info/state_definition/operations/ListRuleEvaluations)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 low value rules
Use the [Telemetry Usage Analyzer](/investigate/analyze/usage) to review metrics used in
failing rules or monitors. If the metric is low value, deleting the failing rule or
monitor might make more sense than fixing it.
## Common failures and solutions
The following list provides some common errors and solutions to help you fix failing
rules and monitors.
### Vector contains metrics with the same label set after applying labels
Prometheus requires all time series returned from a monitor query or a reporting rule
be fully unique, meaning the entire set of `label:value` pairs must differ across a
time series. If metrics have the same labels after applying alert or rule labels, a
collision occurs.
Similar to Prometheus, Palo Alto Networks Cortex XCOR takes monitor or recording rule labels
and overrides the label pairs from all returned time series.
The following error message indicates a monitor or recording rule `label:value`
collision:
```text theme={null}
Vector contains metrics with the same label set after applying alert (or rule) labels`
```
For example:
* Monitor or Recording Rule labels: `{"service": "gateway"}`
* Fetched time series labels: `{"action": "http_get", "service": "ui-console"}`
* Resulting time series: `{"action": "http_get", "service": "gateway"}`
In this instance, the `ui-console` label is overridden to `gateway` after the
monitor or recording rule labels apply. The error occurs in a situation where
collected values look like:
* Monitor or Recording Rule labels: `{"service": "gateway"}`
* Fetched time series 1: `{"action": "http_get", "service": "ui-console"}`
* Fetched time series 2: `{"action": "http_get", "service": "backend-server"}`
Processing rewrites these time series to:
* Resulting time series 1: `{"action": "http_get", "service": "gateway"}`
* Resulting time series 2: `{"action": "http_get", "service": "gateway"}`
After applying the monitor or recording rule override `{"service": "gateway"}`, the
resulting time series are an exact match, which causes an error.
Use one of the following methods to resolve the error:
* Use the Prometheus [`label_replace`](https://prometheus.io/docs/prometheus/latest/querying/functions/#label_replace)
operator to change the underlying label name being overwritten.
* Remove the monitor or recording rule label.
### Found duplicate time series
The error message `Found duplicate series for the match group` indicates two
time series being joined together, but the series don't have the same labels. For
example, one time series might have a
[host or instance label](/ingest/metrics-traces/collector/mappings/prometheus/prometheus-recommendations#label-names-and-values),
while the other doesn't.
Review the error message and identify the problematic labels.
Use one of the following methods to address this issue:
* Remove the labels from the offending metric. If the labels aren't used in
dashboards, monitors, recording rules, or queries, you can create a rollup rule to
remove the labels from the metric.
* Update the query to exclude the problematic labels. If other resources use the
label, or you want to keep the labels for any other reason, update the query using
PromQL functions, such as `group`, `sum`, or `max`, and use the `without` option
to exclude the labels. For example, `group(test1) without (host, instance)`. Refer
to the
[PromQL documentation](https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators)
for the behavior of each function.
### Template errors
Invalid Prometheus query templates display errors like `undefined variable
`"\$labels"\`.
Cortex XCOR attempts to parse your queries using
[go template syntax](https://pkg.go.dev/text/template). This error
typically means you have a block that looks like `{{ }}` somewhere
in the raw query. Remove those blocks to fix this issue.
### The query exceeded the allowable resource limit
Resource exhaustion occurs when a query has requested more time series than system
resources can support. For example, a query that returns millions of results exceeds
the [query scale protections](/administer/limits-licensing/limits/query-limits#query-scale-protections)
defined by limits the system can process.
Use one of the following methods to address this issue:
* Reduce the number of time series returned by the query by adding more label
filters. This might not return all of the results you need, so you might need to write
multiple recording rules and then update your dashboards and monitors to use the
appropriate metric.
* Cortex XCOR provides [rollup rules](/control/shaping/shape-metrics/rules/rollup) you
can use to remove labels from metrics and aggregate values together, reducing
cardinality. Rollup rules can dramatically reduce the number of time series for a
particular metric, which might let your query complete.
### Context deadline exceeded
This error is functionally similar to
[queries exceeding the allowable resource limit](#the-query-exceeded-the-allowable-resource-limit).
Correct these errors with the same solutions.
### Internal error occurred
It's possible that when [viewing recording rules](#view-recording-rules-and-monitor-failures)
in Cortex XCOR, the following error could display:
```text theme={null}
An internal error occurred.
```
This error can indicate that a metric that's impacted by a recording rule can't be
written to the database. A likely cause is that a tenant is experiencing license
penalization. Review the [License Overview](/administer/limits-licensing/licensing)
to track your telemetry usage against license quotas and determine which license is
exceeding its capacity.
# Mapping rules
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/rules/mapping
Learn about how and when to use mapping rules before storing any results in the database.
Mapping [aggregation rules](/control/shaping/shape-metrics/rules) downsample in-memory metric data
on the streaming ingest path before storing any results in the database, which is
before metric aggregation.
Downsampling requires the creation of two mapping rules:
* A rule which performs the downsampling
* A rule that deletes the raw metric
If you don't create a mapping rule to drop the raw metric, two metrics
persist; one with the original resolution and one with the new resolution.
Mapping rules drop a given set of metrics by using the `drop: true` key-value pair.
This tactic is often paired with rollup rules, because often the goal of a rollup
rule is to remove the original raw metrics after aggregation. This is unlike
[drop rules](/control/shaping/shape-metrics/rules/drop-rules), which drop the metric
before any aggregation takes place. This achieves the same result as setting the
`drop_raw: true` flag on the rollup rule; if this flag is set, it's not necessary to
add a matching mapping rule with `drop: true`.
Mapping rules support both Prometheus and Graphite metrics.
## When to use mapping rules
Palo Alto Networks Cortex XCOR recommends using mapping rules instead of rollup rules in scenarios
where you're ingesting data points for a time series at a sporadic rate,
and that exceeds the standard `15s`, `30s`, and `60s`
[resolutions](#define-a-metrics-resolution). These denser time series consume
more query resources, which means they use more data points per second (DPPS) compared to
the amount of cardinality you're storing.
Both mapping rules and rollup rules get applied in the same aggregation phase, which
means that mapping rules consume matched writes.
## View mapping rules
Select from the following methods to view your mapping rules.
> [tab] Chronoctl
>
> To list your existing mapping rules using [Chronoctl](/tooling/chronoctl), use the
> `chronoctl mapping-rules list` command:
>
> ```shell theme={null}
> chronoctl mapping-rules list
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListMappingRules`](/tooling/api-info/definition/operations/ListMappingRules) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 a mapping rule
Select from the following methods to create a mapping rule.
> [tab] Chronoctl
>
> To create a mapping rule with [Chronoctl](/tooling/chronoctl), define the rule in a
> YAML file and apply it.
>
> > [!NOTE]
> >
> > If you don't already have a YAML configuration file, use the `scaffold` Chronoctl
> > parameter to generate a template for a specific resource type:
> >
> > ```shell theme={null}
> > chronoctl mapping-rules scaffold
> > ```
> >
> > You can redirect the results (using the redirection operator `>`) to a file for
> > editing.
>
> 1. Create or edit a YAML configuration file to configure the mapping rule.
>
> 2. Apply the mapping rule:
>
> ```shell theme={null}
> chronoctl apply -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML configuration file.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> Create a mapping rule with Terraform by using the `chronosphere_mapping_rule` type,
> followed by a name in a resource declaration.
>
> The following mapping rule defines a metric retention interval for a Kubernetes pod:
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_mapping_rule" "http_request_duration" {
> name = "http request duration"
> filter = "__name__:http_request_duration k8s_pod:*"
>
> aggregations = [
> "LAST",
> ]
>
> storage_policy {
> resolution = "30s"
> retention = "120h"
> }
>
> mode = "ENABLED"
> }
> ```
>
> 1. Add the definition to a Terraform file.
> 2. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateMappingRule`](/tooling/api-info/definition/operations/CreateMappingRule) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
Mapping rules take effect immediately but might require a full recording interval
to show a change.
Here are some example mapping rules.
### Define a metric's resolution
Although you can adjust the resolution for a mapping rule and configure the interval
between aggregated data points, Cortex XCOR doesn't recommend this approach for the
sole purpose of reducing resolution. Instead, adjust the scrape or push interval in
the [Chronosphere Collector](/ingest/metrics-traces/collector/discover/scrape-configuration)
or the [OpenTelemetry Collector](/ingest/metrics-traces/otel/otel-ingest#send-operational-metrics-about-the-opentelemetry-collector),
depending on how you send metrics to Cortex XCOR.
The following example uses these keys:
* `aggregation_policy`: Specifies the policy applied to aggregate the metric for
a given resolution window.
* `aggregation`: For example, setting this property to `LAST` takes the last
element as the aggregated metric. See
[Supported aggregation operations](/control/shaping/shape-metrics/rules/rollup#aggregation-operations)
for a complete list.
* `interval`: Specifies the time between aggregated data points. Intervals are
based on your
[retention policy](/administer/limits-licensing/licensing#contract-details).
* `filters`: Specifies that the rule catches metrics of name
`http_request_duration` with the label `k8s_pod`.
Label filters can include multiple labels. Metrics must match each label for
the filter to apply. Label values support
[glob syntax](/investigate/querying/glob-syntax), including matching
multiple patterns with an OR, such as `pattern1,pattern2`.
> [tab] Chronoctl
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: MappingRule
> spec:
> name: http request duration
> slug: http_request_duration
> aggregation_policy:
> aggregation: LAST
> interval: 30s
> filters:
> - name: "__name__"
> value_glob: "http_request_duration"
> - name: "k8s_pod"
> value_glob: "*"
> ```
> [tab] Terraform
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_mapping_rule" "http_request_duration" {
> name = "http request duration"
> filter = "__name__:http_request_duration k8s_pod:*"
>
> aggregations = [
> "LAST",
> ]
>
> storage_policy {
> resolution = "30s"
> retention = "120h"
> }
>
> mode = "ENABLED"
> }
> ```
### Drop a metric
You don't need to specify an aggregation operation or interval to drop a metric.
> [tab] Chronoctl
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: MappingRule
> spec:
> filters:
> - name: "__name__"
> value_glob: http_request_bucket
> - name: k8s_pod
> value_glob: "*"
> - name: le
> value_glob: "*"
> - name: git_sha
> value_glob: "*"
> - name: route
> value_glob: "*"
> name: drop raw http_request_bucket
> slug: http_request_bucket
> drop: true
> ```
> [tab] Terraform
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_mapping_rule" "http_request_bucket" {
> name = "drop raw http_request_bucket"
> filter = "__name__:http_request_bucket k8s_pod:* le:* git_sha:* route:*"
>
> aggregations = [
> "LAST",
> ]
>
> drop = true
>
> mode = "ENABLED"
> }
> ```
## Delete a mapping rule
Select from the following methods to delete a mapping rule.
> [tab] Chronoctl
>
> To delete a mapping rule using [Chronoctl](/tooling/chronoctl), use the
> `chronoctl mapping-rules delete` command:
>
> ```shell theme={null}
> chronoctl mapping-rules delete SLUG
> ```
>
> Replace *`SLUG`* with the slug of the rule you want to
> delete.
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteMappingRule`](/tooling/api-info/definition/operations/DeleteMappingRule) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Recording rules
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/rules/recording
Learn about recording rules and when to use them, along with their limitations.
Recording rules are a type of [aggregation rule](/control/shaping/shape-metrics/rules) used
primarily to improve the performance of frequent queries. Recording rules let you
compute frequently used or expensive queries ahead of time, and save the results as a
new set of time series. Instead of running the expensive or complex query,
Palo Alto Networks Cortex XCOR queries for the time series generated by the
recording rule.
This concept is similar to using a precomputed lookup table to avoid complex
calculations and find data faster. Recording rules let you alias repeated expressions
used in dashboards, and also alias other recording rules. For example, a recording
rule might compute the total usage percentage for a resource, which can be referenced
in other recording rules and dashboards.
Recording rules run based on a fixed interval. They ingest raw metric data into the
database before reading it, save the results in a new time series, generate the
aggregated and downsampled metric data, and store the data in the database.
## Limitations
Although recording rules are powerful, they have the following limitations:
* Recording rules might be delayed because they run in a batch format.
* Recording rules apply only to individual metrics, not broad aggregations.
* Recording rules don't have the ability to discard raw data after aggregation.
* Recording rules don't capture
[late-arriving data](/administer/limits-licensing/limits/metric-limits#late-arriving-metrics).
* If a recording rule fails to run, there's no way to backfill the data.
To avoid these limitations, use [rollup rules](/control/shaping/shape-metrics/rules/rollup) or
[derived telemetry](/investigate/querying/metrics/derived-telemetry) instead. For
example, if you have issues with late-arriving data, consider using rollup rules
instead of recording rules.
## Attributes
> [!WARNING]
>
> Recording rules support only Prometheus metrics.
Configure a recording rule with a PromQL statement executed against the metrics data
with the result stored in a new time series with a unique metric name. PromQL
statements in recording rules can include any PromQL function.
See the [Recording rule API](/tooling/api-info/definition/operations/CreateRecordingRule)
for a full definition and list of attributes.
## Best practices
Recording rules support adding labels to the resultant aggregated metrics, which
rollup rules don't support. Rollup rules also require using either a Prometheus
relabel rule, or a derived metric with a `label_replace` function in conjunction with
the rollup rule, to accomplish the same goal.
Due to architectural differences between Cortex XCOR and Prometheus,
defining recording rules is sometimes different, especially for expensive recording
rules that span many metrics. For example, recording rules in Cortex XCOR
are part of a rule group, whereas recording rules in Prometheus aren't guaranteed to
be run sequentially.
Cortex XCOR uses a single data store. To enhance performance, use the
following recommendations:
* Break up the recording rules to scope to different clusters, or another label
that scopes your metrics.
* Use the `metric_name` field so they all get written back into the same name.
With a Prometheus or Thanos setup, Cortex XCOR recommends
[scoping the rules to the local Prometheus server](https://thanos.io/tip/components/rule.md/#rule-aka-ruler)
to avoid cross-Prometheus queries.
## View recording rules
Select from the following methods to view your recording rules.
> [tab] Web
>
> In the navigation menu, click ** Go to admin view**
> and then select
** Optimization > Recording Rules**.
>
> The recording rules page is searchable by rule **Name** or **Execution group**.
>
> The following fields display:
>
> * **Name:** The rule name.
> * **Execution Group:** The execution group this rule is assigned to. Rules in the
> same execution group run at intervals. The entire group must complete an execution
> before the rules in that group will run again.
> * **Metric Name:** The time series to output to.
> * **Interval:** How often the rule evaluates.
> * **Labels:** Label names added to the output metric.
> * **Query:** Click the `<>` to display the query used for this rule.
> [tab] Chronoctl
>
> To list your existing recording rules using [Chronoctl](/tooling/chronoctl), use the
> `chronoctl recording-rules list` command:
>
> ```shell theme={null}
> chronoctl recording-rules list
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListRecordingRules`](/tooling/api-info/definition/operations/ListRecordingRules) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 or update a recording rule
Select from the following methods to create or update recording rules.
> [!NOTE]
>
> Users can modify Terraform-managed resources only by using Terraform.
> [Learn more](/tooling/infrastructure/terraform#prevent-changes-to-managed-resources).
> [tab] Chronoctl
>
> To create a recording rule with [Chronoctl](/tooling/chronoctl), define the rule in a
> YAML file and apply it.
>
> > [!NOTE]
> >
> > If you don't already have a YAML configuration file, use the `scaffold` Chronoctl
> > parameter to generate a template for a specific resource type:
> >
> > ```shell theme={null}
> > chronoctl recording-rules scaffold
> > ```
> >
> > You can redirect the results (using the redirection operator `>`) to a file for
> > editing.
>
> 1. Create or edit a YAML configuration file to configure the recording rule. See the
> [Chronoctl example](#chronoctl-example) for a complete configuration file.
>
> 2. Apply the recording rule:
>
> ```shell theme={null}
> chronoctl apply -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML configuration file.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> Create a recording rule with [Terraform](/tooling/infrastructure/terraform) by using
> the `chronosphere_recording_rule` type followed by a name in a resource declaration.
>
> For more information, see the [Terraform recording rule example](#terraform-example).
>
> 1. Add the definition to a Terraform file.
> 2. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateRecordingRule`](/tooling/api-info/definition/operations/CreateRecordingRule) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
### Chronoctl example
The following YAML example includes three recording rules that calculate the average
rate of increase per second for jobs that contain a value for `node`. The results
display for `instance` and `container` as measured over one minute.
This example uses the `metric_name` field to specify the output name of the time
series, and the `name` field to display the human readable name. For backwards
compatibility, the example uses the `name` field for the time series if `metric_name`
isn't specified, like in the third rule.
```yaml expandable Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: RecordingRule
spec:
name: cpu-usage-seconds-sum-rate-1m
slug: instance-container-cpu-usage-seconds-sum-rate1m
prometheus_expr: sum(rate(container_cpu_usage_seconds_total{node=""}[1m])) by (instance,
container)
metric_name: instance_container:cpu_usage_seconds:sum_rate1m
interval_secs: 60
label_policy:
add:
resource: cpu
---
api_version: v1/config
kind: RecordingRule
spec:
name: network-receive-bytes-sum-rate-1m
slug: instance-container-network-receive-bytes-sum-rate1m
metric_name: instance_container:network_receive_bytes:sum_rate1m
prometheus_expr: sum(rate(container_network_receive_bytes_total{node=""}[1m])) by (instance,
container)
interval_secs: 60
label_policy:
add:
resource: network-receive
---
api_version: v1/config
kind: RecordingRule
spec:
name: instance_container:network_transmit_bytes:sum_rate1m
slug: instance-container-network-transmit-bytes-sum-rate1m
prometheus_expr: sum(rate(container_network_transmit_bytes_total{node=""}[1m])) by (instance,
container)
interval_secs: 60
label_policy:
add:
resource: network-transmit
```
### Terraform example
The following code creates a recording rule that Terraform refers to as
`scrape_duration_recording_rule` with the name `60s rule`, and defines the other
data needed to create a recording rule.
```terraform Terraform example icon="square-terminal" theme={null}
resource "chronosphere_recording_rule" "scrape_duration_recording_rule" {
# Name for the rule
# Value forms the metric name output if metric_name is not specified.
name = "60s rule"
metric_name = "scrape_duration_seconds:max_60s"
# Arbitrary labels to attach to the rule
# These labels end up being part of the output metric,
# and take precedence over any labels that the expression would have created.
# For example, if the expression had metrics with "foo=bar", but the value was
# "foo=test", the final metric generated would have "foo=test".
labels = {
"owner" = "infra"
}
# Interval at which to evaluate the rule
interval = "60s"
# The PromQL expression to evaluate
expr = "max(scrape_duration_seconds)"
}
```
## Delete a recording rule
Select from the following methods to delete a recording rule.
> [tab] Chronoctl
>
> To delete a recording rule using [Chronoctl](/tooling/chronoctl), use the
> `chronoctl recording-rules delete` command:
>
> ```shell theme={null}
> chronoctl recording-rules delete SLUG
> ```
>
> Replace *`SLUG`* with the slug of the rule you want to delete.
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteRecordingRule`](/tooling/api-info/definition/operations/DeleteRecordingRule) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Rollup rules
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/rules/rollup
What are rollup rules, and how to create, edit, or delete them.
To downsample and aggregate metrics after they're sent by the client but before
they're stored, create *rollup rules*.
Rollup rules are a type of [aggregation rule](/control/shaping/shape-metrics/rules)
that help you reduce the cardinality footprint of your metrics by dropping raw
data to eliminate unneeded labels. High cardinality footprints can cause slow
dashboards and queries.
If you're working with [late-arriving data](/administer/limits-licensing/limits/metric-limits#late-arriving-metrics),
rollup rules are well suited for ensuring all of your data aggregates the way you
need it.
As an example, `instance` or `pod` labels don't often add value on their own,
but removing these labels from the client side isn't always possible. You can
use rollup rules to avoid storing these labels.
Rollup rules support both Prometheus and Graphite metrics.
## View rollup rules
Select from the following methods to view rollup rules.
> [tab] Web
>
> In Palo Alto Networks Cortex XCOR, view rollup rules in the
> [Aggregation rules UI](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules).
> [tab] Chronoctl
>
> To list only rollup rules on the command line with [Chronoctl](/tooling/chronoctl),
> use this command:
>
> ```shell theme={null}
> chronoctl rollup-rules list
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ListRollupRules`](/tooling/api-info/definition/operations/ListRollupRules) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
For information about viewing, copying, or downloading rule configurations, see
[Rule configuration](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules#rule-configuration).
### Find rollup rules that apply to a metric
If you know a metric name but not which rollup rules apply to it, search for rules
whose filters accept that metric.
> [tab] Chronoctl
>
> > Requires [Chronoctl](/tooling/chronoctl) version 1.36.0 or later.
>
> Use the `--matches-series` flag to return rollup rules that might apply to the
> `http_requests_total` metric:
>
> ```shell theme={null}
> chronoctl rollup-rules list --matches-series '__name__=http_requests_total'
> ```
>
> Combine `--matches-series` with `--slugs`, `--names`, or `--bucket-slugs` to
> further restrict the results.
> [tab] API
>
> Use the `matches_series` parameter of the
> [`ListRollupRules`](/tooling/api-info/definition/operations/ListRollupRules)
> endpoint. Combine `matches_series` with `slugs`, `names`, or `bucket_slugs` to
> further restrict the results.
>
> After [creating an API token](/tooling/api-info#create-an-api-token), run the following
> request to return rollup rules that might apply to the `http_requests_total` metric:
>
> ```shell theme={null}
> curl -sS -G "https://${XCOR_DOMAIN}/api/v1/config/rollup-rules" \
> -H "API-Token: ${XCOR_API_TOKEN}" \
> --data-urlencode 'matches_series=__name__=http_requests_total'
> ```
Matching returns rules whose filters accept the metric name you provide. Cortex XCOR
evaluates each rule's glob filters in the same way as it does during ingestion, so
the results include rules that match the metric name through a wildcard.
For example, searching for `__name__=http_requests_total` produces the following
results:
| Rule filter | Result |
| - | - |
| `__name__` is `http_requests_total` | Returned |
| `__name__` is `http_requests_*` | Returned |
| `__name__` is `{http_requests_total,grpc_requests_total}` | Returned |
| `__name__` is `http_requests_total` and `env` is `prod` | Returned |
| The rule has no `__name__` filter | Returned |
| `__name__` is `grpc_requests_total` | Not returned |
| `__name__` is `grpc_*` | Not returned |
The search evaluates only the labels you provide. A returned rule might apply to only
some time series for the metric, such as time series where `env` is `prod`.
The following limitations apply:
* Provide exactly one entry in the form `__name__=METRIC_NAME`. Other labels aren't
supported.
* Provide a complete metric name. Values that contain glob characters such as `*`,
`?`, `[]`, or `{}` or that start with `!` return an error.
For details about rule filter syntax, see [Filters](#filters).
## Create a rollup rule
Select from the following methods to apply rollup rules. Cortex XCOR
doesn't limit the number of rollup rules a system can have.
> [!NOTE]
>
> If you define a rollup rule using the Cortex XCOR app, you must download
> the rule configuration and apply it with one of the supported methods.
> [tab] Web
>
> Create rollup rule configurations in Cortex XCOR from the
> [Aggregation rules UI](/control/shaping/shape-metrics/reduce-cardinality/aggregation-rules).
>
> When creating a rule configuration, the **Visual Editor** displays by default.
> When creating a rule in Live Telemetry Analyzer, the dialog pre-populates fields based
> on the user's selected data.
>
> To create a rule configuration:
>
> 1. Enter or edit data for the following fields:
> * **Rule Name**: Add or edit the name of the rule.
> * **Rule Details**: Either **Rule Preview** or **Rule Enabled**. See
> [rule mode](#rule-mode) for more information.
> * **Matching Time Series:** Time series the rule applies to. You must include a
> **Label**, operator (`=` or `!=`), and a **Value**. The value you enter maps to
> the [`filters`](#filters) section of the
> [CreateRollupRule](/tooling/api-info/definition/operations/CreateRollupRule#body-rollup-rule-filters)
> endpoint.
>
> For example, if you want the rollup rule to match on
> [Prometheus gauge metrics](/control/shaping/shape-metrics/types#prometheus), enter
> `__m3_prom_type__` as the label to match on, and `gauge` as the value. The
> resulting filter looks like:
>
> ```text theme={null}
> __m3_prom_type__ = gauge
> ```
>
> Values accept a comma-separated list and
> [glob syntax](/investigate/querying/glob-syntax), including matching multiple
> patterns with an `OR`, such as `service:{svc1,svc2}`. Click **Add**
> to add another time series.
> * **Labels to Roll Up**: **Discard Labels** or **Keep Labels**. Add labels to the
> **Input Labels** text box.
> * **Output Metric**: The new metric's name and aggregation configuration.
> * **Output Metric Name:** Edit the output metric name. Clear the checkbox for
> **Include metric name** to remove the original name.
>
> * **Input Metric Type:** Select a
> [metric type](/control/shaping/shape-metrics/types#cortex-xcor-types), which
> determines how the rollup rule interprets all matching data points. For
> example, if you select **Gauge**, the rollup rule interprets all matching
> data points as that data type, even if the original source isn't a gauge
> metric. This behavior means that the metric type you choose doesn't have to
> match the data type of the incoming data.
>
> If you want to match the incoming metric to a specific type, enter two
> matching time series in the rollup rule: one to match the metric, and
> another to match the metric type. Use `__metric_type__` to define the type
> of metric you want to match on. For example, if you want to match a time
> series named `agg_write_latency` that's a cumulative exponential histogram,
> define two series that look like:
>
> ```text theme={null}
> __name__ = agg_write_latency AND __metric_type__ = cumulative_exponential_histogram
> ```
>
> * **Aggregation:** Select an [aggregation operation](#aggregation-operations).
>
> * **Aggregation Interval:** The length of time between samples. See
> [Aggregation interval](#aggregation-interval).
> * **Raw Data**: Turn on **Drop raw input data** to remove the raw input data
> after aggregation.
> 2. When finished, click **Code config**.
> 3. Choose your rule creation method from these options:
> * **Chronoctl**
> * **Terraform**
> * **API**
> 4. Apply the changes based on your selected method.
> [tab] Chronoctl
>
> To create a rollup rule with [Chronoctl](/tooling/chronoctl), define the rule in a
> YAML file and apply it.
>
> If you don't already have a YAML configuration file, use the `scaffold` Chronoctl
> parameter to generate a template for a specific resource type:
>
> ```shell theme={null}
> chronoctl rollup-rules scaffold
> ```
>
> You can redirect the results (using the redirection operator `>`) to a file for
> editing.
>
> 1. Create or edit a YAML configuration file to configure the rollup rule.
>
> 2. Apply the rollup rule:
>
> ```shell /FILE_NAME/ theme={null}
> chronoctl apply -f FILE_NAME.yaml
> ```
>
> Replace *`FILE_NAME`* with the name of the YAML configuration file.
>
> See the [Chronoctl rollup rule example](#chronoctl-rollup-rule-example) for more
> information.
> [tab] Terraform
>
> > [!NOTE]
> >
> > When you run `terraform plan` to generate an execution plan, Cortex XCOR automatically
> > tests configurations that include notification policies by submitting them as dry runs.
> > For details, see the
> > [Terraform provider](/tooling/infrastructure/terraform#validate-plans-with-dry-runs)
> > documentation.
>
> Create a rollup rule with Terraform by using the `chronosphere_rollup_rule`
> type, followed by a name in a resource declaration. See the
> [Terraform rollup rule example](#terraform-rollup-rule-example) for more information.
>
> 1. Add the definition to a Terraform file.
> 2. Run this command to create the resource:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`CreateRollupRule`](/tooling/api-info/definition/operations/CreateRollupRule) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
Rollup rules take effect immediately, but can require a full
[aggregation interval](#aggregation-interval) to show a change.
### Best practices for rule creation
Following these guidelines helps ensure your rollup rules work as intended:
* Use [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer) to verify your
[glob syntax](/investigate/querying/glob-syntax) to ensure your query matches
the correct metrics.
* Before using a rollup rule to group labels, be sure those labels aren't used
in other places, such as dashboards, monitors, or the queries you use to
debug issues.
* A dash (`-`) inside square brackets is a range operator, not a literal character.
The filter `service_cluster:[a-d]` matches a single character from `a` through `d`.
To match a value that contains a literal dash, use curly braces, which take a
comma-separated list of alternatives and treat a dash as an ordinary character. For
example: `service_cluster:{my-label,other-label}`.
* Metrics can match more than one rule. Matching multiple rules can affect data
retention. If a rule matches any `drop_raw=true`, raw metrics are dropped.
* If a single output series receives more than 10 million unique input series,
Cortex XCOR might stop accepting new input series specified in the
rollup rule, which could result in partially aggregated metrics. To avoid this
behavior, choose a [label policy](#label-policies) that writes more output series
by removing fewer labels.
```mermaid actions={false} theme={null}
---
title: Raw data persistence flowchart
---
flowchart LR
accTitle: Raw data persistence flowchart
accDescr: This flowchart shows how metrics matching multiple rules can have unexpected data persistence.
R1[Rule 1]-->DRT[drop raw=true]
R2[Rule 2]-->DRT
R3[Rule 3]-->DRF[drop raw=false]
ExRule[sample_metric with label=test]-->|matches| R1
ExRule-->|matches| R3
ER[End result is raw data drops and aggregated data persists]
DRT-->|Raw data dropped| ER
DRF-->|Raw data persisted| ER
```
### Chronoctl rollup rule example
Here's an example of a rollup rule that matches time series with the value
`permits_blocked`, while discarding any labels matching `instance` and `job`. It uses
a cumulative counter type metric, and aggregates as a sum using a 30-second interval.
```yaml Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: RollupRule
spec:
slug: permits_blocked_without_instance
name: permits blocked without instance
filters:
- name: __name__
value_glob: permits_blocked
metric_name: '{{ .MetricName }}:without_instance'
metric_type: CUMULATIVE_COUNTER
aggregation: SUM
interval: 30s
label_policy:
discard:
- instance
- job
add_metric_type_label: true
mode: ENABLED
```
### Terraform rollup rule example
Here's an example of a rollup rule that matches time series with the value
`permits_blocked`, while discarding any labels matching `instance` and `job`.
It uses a cumulative counter type metric, and aggregates as a sum using a 30-second interval.
```terraform Terraform example icon="square-terminal" theme={null}
resource "chronosphere_rollup_rule" "permits_blocked_without_instance" {
name = "permits blocked without instance"
slug = "permits_blocked_without_instance"
filter = "__name__:permits_blocked"
metric_type = "CUMULATIVE_COUNTER"
aggregation = "SUM"
interval = "30s"
exclude_by = ["instance", "job"]
metric_type_tag = true
mode = "ENABLED"
new_metric = "{{ .MetricName }}:without_instance"
}
```
## Delete a rollup rule
> [tab] Chronoctl
>
> To delete rollup rules with [Chronoctl](/tooling/chronoctl), use this command:
>
> ```shell /SLUG/ theme={null}
> chronoctl rollup-rules delete SLUG
> ```
>
> Replace *`SLUG`* with the rule's slug.
>
> For example, to delete the `http_request_duration_by_service_and_status` rule,
> use this command:
>
> ```shell theme={null}
> chronoctl rollup-rules delete http_request_duration_by_service_and_status
> ```
>
> If your slug starts with a dash (`-`), use double quotes (`"`) around the slug
> name.
>
> ```shell theme={null}
> chronoctl rollup-rules delete "-my-rollup-rule"
> ```
> [tab] Terraform
>
> To delete a resource that's managed by [Terraform](/tooling/infrastructure/terraform):
>
> 1. Edit your Terraform configuration file to remove the pre-existing resource
> definition.
> 2. Run this command to remove the resource from Cortex XCOR:
>
> ```shell theme={null}
> terraform apply
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteRollupRule`](/tooling/api-info/definition/operations/DeleteRollupRule) endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Rollup rule attributes
To accurately aggregate your data, rollup rules require you to both configure
multiple fields and to have an understanding of
[aggregation operations](#aggregation-operations).
See the [CreateRollupRule API](/tooling/api-info/definition/operations/CreateRollupRule)
documentation for the complete list of fields that are part of the `rollup_rule`
object that you define when [creating a rollup rule](#create-a-rollup-rule) with any
of the supported methods.
### Filters
The `filters` field selects the incoming metrics a rule applies to. Each entry
matches one label name against a value, and a metric must match every entry to match
the rule. Values support [glob syntax](/investigate/querying/glob-syntax), including
matching multiple patterns with an `OR`, such as `service:{svc1,svc2}`.
Synthetic labels match on request metadata instead of on a metric's label.
The following table lists the synthetic labels that a rollup rule filter most often
matches on, and the values each one accepts:
| Filter | Matches | Valid values |
| - | - | - |
| `__metric_type__` | The [metric type](/control/shaping/shape-metrics/types#cortex-xcor-types). Use this filter to match on metric type. | `cumulative_counter`, `cumulative_exponential_histogram`, `delta_counter`, `delta_exponential_histogram`, `gauge`, `measurement` |
| `__metric_source__` | The [source format](/control/shaping/shape-metrics/types#supported-formats) the metric arrived in. | `carbon`, `chrono_azure`, `chrono_cloudflare`, `chrono_gcp`, `chrono_integration`, `cloudwatch_metric_stream`, `dogstatsd`, `open_metrics`, `open_telemetry`, `prometheus`, `signalfx`, `statsd`, `tagged_statsd`, `wavefront` |
| `__m3_prom_type__` | The [Prometheus metric type](/control/shaping/shape-metrics/types#prometheus), for data ingested with Prometheus. | `counter`, `gauge`, `histogram`, `gauge_histogram`, `summary`, `info`, `state_set` |
| `__otel_type__` | The [OpenTelemetry metric type](/control/shaping/shape-metrics/types#opentelemetry), for data ingested with OpenTelemetry. | `sum`, `monotonic_sum`, `gauge`, `histogram`, `exp_histogram`, `summary` |
For example, the following filter matches any cumulative counter that carries a
`service=gateway` label and whose metric name starts with `http_requests_`:
```text theme={null}
__metric_type__:cumulative_counter service:gateway __name__:http_requests_*
```
### Aggregation interval
The `interval` field sets the amount of time between the aggregated data points a
rule produces. If you omit it, the rule uses the default resolution from your
[retention policy](/administer/limits-licensing/licensing).
An interval must match a resolution that your tenant can write aggregated data to,
typically `15s`, `30s`, or `60s`.
### Rule mode
The `mode` field controls whether a rule aggregates data. It accepts two values:
* `ENABLED`: Aggregates incoming data according to the rule configuration. A rule
that omits `mode` uses this value.
* `PREVIEW`: Reports the rule's estimated impact without changing stored data. For
the preview workflow, see
[Preview a rule's shaping impact](/control/shaping/shape-metrics/reduce-cardinality/shaping-impact).
### Conflicting output metric names
Set `skip_on_conflict` to `true` to skip a rule when another rollup rule already
produces a metric with the same output name. Use this field to write a rule that
produces a series only when no other rule produces one under that name. Default:
`false`.
### Label policies
Use label policies to define which labels to preserve in the resulting metric. In the
rollup rule definition, add the appropriate field to specify which labels to retain
or discard. Most rollup rules must set one of these fields, and no rule can set both.
Neither field accepts `__name__`. A rollup rule can't group by the metric name or
drop it. To change the output metric's name, use `metric_name` instead.
> [!NOTE]
>
> Rules that set `graphite_label_policy` can't set `keep` or `discard`, their Terraform
> equivalents `group_by` and `exclude_by`, or `metric_name`. Manage Graphite positional
> labels with [`graphite_label_policy.replace`](#set-a-graphite-label-policy) instead.
#### Keep specified labels
To aggregate only metrics that contain *all* of the specified labels and discard all
other labels, use `group_by` (Terraform) or `keep`. When using these rollup rules,
you must specify the labels to aggregate the metrics by. If a metric doesn't include
all of the specified labels, the metric isn't included in the rule.
If a rollup rule uses `group_by` or `keep`, the rule will match only metrics with
labels that contain these fields, even if the label `filters` would have matched
these metrics.
A rule that uses `group_by` or `keep` also constrains its own [filters](#filters).
The filters must include a `__name__` entry, and that entry can't contain a wildcard,
so the rule targets one metric name instead of an arbitrary set. Adding the
`{{ .MetricName }}` template to `metric_name` lifts both restrictions, because the
output name then varies with each matched metric.
#### Remove specified labels
To target a group of metrics for a particular service, team, or other higher-level
set of metrics, use `exclude_by` (Terraform) or `discard`. When using these rollup
rules, you specify which labels to remove from the aggregated metric, while keeping
all other labels.
#### Set a Graphite label policy
For Graphite metrics, you can use the `graphite_label_policy` parameter to also
set a Graphite-specific label policy. This lets you define replacements for label
values without changing their positions, which can reduce cardinality without breaking
Graphite metrics' preferred positional indexing.
For example, assume you have raw metric names that follow this pattern:
```text theme={null}
cluster.production.instance.instance1.requests_count
cluster.production.instance.instance2.requests_count
...
```
You can create a Graphite label policy that defines a replacement rule that replaces
the third positional label name (`__g3__`) with a new string value (`INSTANCE`).
This replacement aggregates these metrics as
`cluster.production.instance.INSTANCE.requests_count`, without changing their positional
indexing.
> [tab] Chronoctl
>
> The output of the `chronoctl rollup-rules scaffold` command includes the `graphite_label_policy`
> parameter:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: RollupRule
> spec:
> # ...
> graphite_label_policy:
> # List of labels to replace. Use to discard high-cardinality values while still
> # preserving the original positions of the Graphite metric.
> replace:
> - # Name of the label to replace the value for. Only positional Graphite labels
> # such as '__gX__' are allowed.
> name:
> # New value of the replaced label.
> new_value:
> # ...
> ```
>
> To implement the rule from the example scenario as a Chronoctl YAML resource, define
> the `name` and `new_value` in the list of `replace` values:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: RollupRule
> spec:
> # ...
> graphite_label_policy:
> replace:
> - name: "__g3__"
> new_value: "INSTANCE"
> # ...
> ```
>
> Define multiple replacements in a single rollup rule by adding more pairs of `name`
> and `new_value` to the `replace` list.
> [tab] Terraform
>
> The `graphite_label_policy` block in the `chronosphere_rollup_rule` resource contains
> a `replace` block with `name` and `new_value` arguments.
>
> For example, to implement the rule from the example scenario as a Terraform resource:
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_rollup_rule" "rollup_rule" {
> # ...
> graphite_label_policy {
> replace {
> name = "__g3__"
> new_value = "INSTANCE"
> }
> }
> # ...
> }
> ```
### Aggregation operations
Some operations can change the type of the metric during aggregation. The
resulting metric type of an aggregation is called the *output* metric type.
Even if you are ingesting data with the wrong metric type, configure your rollup rule
with the metric type that the ingested data should be. For example, if Cortex XCOR
ingests metrics with type `GAUGE`, but the values actually
represent `DELTA_COUNTER`, use a `metric_type=DELTA_COUNTER` rollup rule to aggregate
them.
Rollup rules support the following aggregation operations:
#### `CUMULATIVE_COUNTER`
Cumulative counters support these aggregations:
* `SUM`: Takes the increase of each individual input series within the
configured interval, then sums the increases together according to the configured label
policy. The output is the cumulative summed increase across all input series.
* `COUNT`: Counts the number of unique input series matched by the configured label
policy (for example, cardinality).
The output type of all cumulative counter aggregations is a [`CUMULATIVE_COUNTER`](/control/shaping/shape-metrics/types#cumulative-counter).
#### `GAUGE`
Gauges support the following aggregation methods:
* `SUM`: Takes the max value of each individual input series within the
configured interval, then sums all final values together by the configured
label policy.
* `COUNT`: Counts the number of unique input series matched by the configured label
policy (for example, cardinality).
* `MIN`: Takes the minimum value of all data points within the configured
interval across all series matched by the configured label policy.
* `MAX`: Takes the maximum value of all data points within the configured
interval across all series matched by the configured label policy.
* `PXX`, `MEAN`, `MEDIAN`, `STDEV`, `SUMSQ`: Takes the maximum value of each
individual input series within the configured interval, and then computes the
value distribution.
The output type of all gauge aggregations is a [`GAUGE`](/control/shaping/shape-metrics/types#gauge).
When querying a gauge metric with a range vector included in the query
downsampling might impact the accuracy of the query result. Most use cases that
fit this criteria can be converted to use counters instead, which avoids the issue.
#### `DELTA_COUNTER`
Supported aggregations:
* `SUM`: Sums all values of all series matched by the configured label policy. All
values must be nonnegative.
* `COUNT`: Counts the number of unique input series matched by the configured label
policy, such as cardinality. Adding more samples to an existing series
doesn't change the count. Only new series impact the count.
* `COUNT_SAMPLES`: Counts the number of input samples matched by the configured label
policy. Every sample increments the count, even when multiple samples land on the
same series.
The output type of all delta counter aggregations is a [`DELTA_COUNTER`](/control/shaping/shape-metrics/types#delta-counter).
A `DELTA_COUNTER` rule treats three settings as a single group: `metric_name`,
`aggregation`, and the label policy, which is exactly one of `keep` or `discard`.
Either set all three or omit all three. Setting any one of the three makes the other
two required.
Omitting all three aggregates matching series as a `SUM`, keeps the original metric
name, and retains every label. The effect is to downsample the counter to the rule's
interval without otherwise changing the series, which is what you want when you need
a coarser resolution and nothing else.
`MEASUREMENT` and `DELTA_EXPONENTIAL_HISTOGRAM` rules can also omit `metric_name` and
the label policy, but both types require an `aggregation`.
Every rollup rule requires a `name`. The `name` field identifies the rule itself, and
is distinct from `metric_name`, which names the output metric.
#### `MEASUREMENT`
A key feature of `MEASUREMENT` aggregations lies in how they treat individual
samples. Unlike other types such as [`GAUGE`](/control/shaping/shape-metrics/rules/rollup#gauge)
and [`CUMULATIVE_COUNTER`](/control/shaping/shape-metrics/rules/rollup#cumulative_counter),
`MEASUREMENT` metrics aggregate all at once, across all samples of your matching
time series within the aggregated time interval. This enables calculation of
accurate statistics server-side, within Cortex XCOR.
A typical use case for `MEASUREMENT` aggregations is calculating statistics across
raw request latencies across all instances. This can be correctly performed through
`metric_type=MEASUREMENT` and `aggregation=P95`. Using `metric_type=GAUGE` in this
scenario produces results you don't want, discarding all samples except the
per-instance max value, then computing the ninety-fifth percentile across these
per-instance max values.
Every `MEASUREMENT` rule must set `drop_raw` to `true`. Cortex XCOR
rejects a `MEASUREMENT` rule that retains its raw input data.
Measurements support the following aggregation methods:
* `SUM`: Sums all values of all series matched by the configured label policy. All
values must be nonnegative. The output metric type is a
[`DELTA_COUNTER`](/control/shaping/shape-metrics/types#delta-counter).
* `COUNT_SAMPLES`: Counts the number of input samples matched by the configured label
policy. The output metric type is a
[`DELTA_COUNTER`](/control/shaping/shape-metrics/types#delta-counter).
* `SUMSQ`: Sums the squares of all values of all series matched by the configured
label policy. The output metric type is a
[`DELTA_COUNTER`](/control/shaping/shape-metrics/types#delta-counter).
* `LAST`: Takes the last value of all samples matched by the configured label policy.
The output metric type is a [`GAUGE`](/control/shaping/shape-metrics/types#gauge).
* `MIN`: Takes the minimum value of all samples matched by the configured label
policy. The output metric type is a [`GAUGE`](/control/shaping/shape-metrics/types#gauge).
* `MAX`: Takes the maximum value of all samples matched by the configured label
policy. The output metric type is a [`GAUGE`](/control/shaping/shape-metrics/types#gauge).
* `PXX`, `MEAN`, `MEDIAN`, `STDEV`: Computes the value distribution across all
samples matched by the configured label policy. The output metric type is a
[`GAUGE`](/control/shaping/shape-metrics/types#gauge).
* `HISTOGRAM`: Summarizes the distribution of values as an exponential histogram
with a starting scale of 5. The output type is a
[`DELTA_EXPONENTIAL_HISTOGRAM`](/control/shaping/shape-metrics/types#delta-exponential-histograms).
### Histograms aggregation operations
> [!NOTE]
>
> If either the input histogram or resulting aggregation exceeds the 160-bucket limit,
> Cortex XCOR decreases the exponential histogram scale until the bucket
> count is within the limit. Downscaling reduces the exponential histogram's resolution.
#### `CUMULATIVE_EXPONENTIAL_HISTOGRAM`
Cumulative exponential histogram aggregations operate on OpenTelemetry exponential
histograms with cumulative temporality, and on Prometheus native histograms with
an exponential bucket layout.
Cumulative exponential histograms support this aggregation method:
* `SUM`: Merges input cumulative exponential histograms by the configured label
policy. The output metric type is a
[`CUMULATIVE_EXPONENTIAL_HISTOGRAM`](/control/shaping/shape-metrics/types#cumulative-exponential-histograms).
#### `DELTA_EXPONENTIAL_HISTOGRAM`
Delta exponential histogram aggregations operate on OpenTelemetry exponential histograms
with delta temporality.
Delta exponential histograms support this aggregation method:
* `SUM`: Merges input delta exponential histograms by the configured label policy.
The output metric type is a
[`DELTA_EXPONENTIAL_HISTOGRAM`](/control/shaping/shape-metrics/types#delta-exponential-histograms).
# Metric types
Source: https://docs-xcor.paloaltonetworks.com/control/shaping/shape-metrics/types
Learn how counters, gauges, histograms, and other metric types affect aggregation, long-term downsampling, and query results.
Each ingested and aggregated metric has a metric type, a critical piece of metadata
that indicates what kind of data a metric represents. Metric types affect how the
data [aggregates](/control/shaping/shape-metrics/rules/rollup#aggregation-operations) for
storage, [long-term downsampling](/control/shaping/shape-metrics/downsampling) behaves, and how
that data displays within Palo Alto Networks Cortex XCOR.
If a metric is ingested or aggregated with the wrong type, you can get unexpected
results when aggregating or querying the data, or data loss when persisting data in
long term storage.
## Cortex XCOR types
Cortex XCOR supports ingesting many different metric types.
### Cumulative counter
A counter that stores a strictly increasing count of distinct events or a
reset-to-zero on restart. Counters are a fundamental metric construct that keeps
track of the number of times a certain event has occurred.
* Each datapoint stores the running total at the given timestamp.
* Aggregated using `metric_type=CUMULATIVE_COUNTER`
[rollup rules](/control/shaping/shape-metrics/rules/rollup).
* Queryable as a
[Prometheus counter](https://prometheus.io/docs/concepts/metric_types/#counter).
* Subject to [long-term downsampling](/control/shaping/shape-metrics/downsampling).
* View incoming cumulative counters with a `__metric_type__:cumulative_counter`
filter in the [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer).
Examples of cumulative counters include:
* Number of requests served
* Number of user logins
* Number of heap allocations
### Delta counter
A delta counter is a counter where each data point stores a strictly positive delta
increment at the given timestamp. For example, a client can send a `1` every time a
request is served to count the number of requests served. With this method, the
client keeps track only of how many events since the last emission or flush of the
metric value, and emits only that value. Unlike a cumulative counter, a delta counter
doesn't keep a running sum.
* Stores the same kinds of data as cumulative counters, but with a different format.
* Aggregated with `metric_type=DELTA_COUNTER` [rollup rules](/control/shaping/shape-metrics/rules/rollup).
Raw delta counter data is automatically aggregated unless explicitly dropped by
a rollup rule.
* Queryable as a [Prometheus counter](https://prometheus.io/docs/concepts/metric_types/#counter).
* View incoming delta counters with a `__metric_type__:delta_counter` filter
in the [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer).
For more information about querying delta counters in Cortex XCOR, see
[Querying delta temporality metrics](/investigate/querying/metrics/delta-queries).
### Gauge
A gauge is a basic metric type that tracks a value which changes over time.
* Each datapoint stores the value at the given timestamp. It's impossible to have
two values at the same point in time.
* Aggregated with `metric_type=GAUGE` [rollup rules](/control/shaping/shape-metrics/rules/rollup).
* Queryable as a
[Prometheus gauge](https://prometheus.io/docs/concepts/metric_types/#gauge).
* Subject to [long-term downsampling](/control/shaping/shape-metrics/downsampling).
* View incoming gauges with a `__metric_type__:gauge` filter
in the [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer).
Some examples of gauges are:
* Current number of in-flight requests.
* Current number of signed-in users.
* Current amount of memory in use.
### Histogram
The frequency of values in a set of measurements that fall within certain ranges
called *buckets*. A histogram uses several buckets defined in a *bucket layout*.
Cortex XCOR processes and persists each histogram as a single structured
value and time series.
Cortex XCOR supports OpenTelemetry exponential histograms and Prometheus
native histograms, and also supports both cumulative and delta temporality. The
histogram's bucket layout defines the histogram metric type in Cortex XCOR.
You can query histograms using
[PromQL histogram functions](https://prometheus.io/docs/prometheus/latest/querying/functions/).
They're subject to the same long-term downsampling as other metric types.
> [!NOTE]
>
> Cortex XCOR processes and persists Prometheus histograms as individual
> cumulative counter or delta counter time series. To query both histograms and classic
> Prometheus histograms, see
> [Querying histograms](/investigate/querying/promql/apply-functions#querying-histograms).
Some examples of histograms include:
* Distributions of request latencies
* Distributions of payload sizes
| Metric Type | Bucket Layout | Temporality | Description |
| - | - | - | - |
| Cumulative exponential histogram | Exponential | Cumulative | A cumulative histogram with exponential bucket layout summarizes a set of measurements by defining non-overlapping, exponentially increasing bucket ranges and counting the frequency of observations within each bucket range. It includes the total count and sum of all observations. See [Cumulative exponential histograms](#cumulative-exponential-histograms). |
| Delta exponential histogram | Exponential | Delta | A delta exponential histogram has the same properties of a cumulative exponential histogram. The only difference is the delta temporality, where the instrumentation client only summarizes and sends observations since the last emission or flush of the histogram metric value. See [Delta exponential histograms](#delta-exponential-histograms). |
Histograms are limited in these ways:
* The maximum bucket limit is 160 buckets.
* The maximum exponential histogram scale is 8, and the minimum scale is -4.
#### Cumulative exponential histograms
The cumulative exponential histogram type is compatible with both OpenTelemetry
cumulative exponential histograms and classic Prometheus native histograms with
exponential bucket layouts.
* Cortex XCOR automatically reduces the exponential histogram scale
when the histogram exceeds the 160-bucket limit. When downscaling, it doubles
the exponential histogram bucket width to summarize the observations with fewer
but wider buckets, effectively reducing the exponential histogram's resolution.
When aggregating or querying exponential histograms with different bucket scales,
Cortex XCOR scales them down to the lowest common histogram scale.
Zero-threshold handling similarly widens scales until values fit.
* Cortex XCOR aggregates them with
`metric_type=cumulative_exponential_histogram` rollup rules.
* You can view incoming measurements by using a
`__metric_type__:cumulative_exponential_histogram` filter in the Live Telemetry
Analyzer.
#### Delta exponential histograms
The delta exponential histogram type is compatible only with OpenTelemetry delta
exponential histograms.
* Cortex XCOR aggregates them with `metric_type=delta_exponential_histogram`
rollup rules.
* You can view incoming measurements by using a
`__metric_type__:delta_exponential_histogram` filter in the Live Telemetry Analyzer.
For more information about querying delta histograms in Cortex XCOR, see
[Querying delta temporality metrics](/investigate/querying/metrics/delta-queries).
### Measurement
A raw observation with some discrete value. Measurements differ from counters as
each measurement event has a discrete, arbitrary value. Measurements also differ from a gauge,
as there can be multiple values at any point in time.
* You must use a `metric_type=MEASUREMENT`
[rollup rule](/control/shaping/shape-metrics/rules/rollup) with `drop_raw=true` to aggregate
measurements into a persistable metric type. Raw measurement data can't be persisted.
* The `MEASUREMENT` metric type is best used when all values should be
[aggregated](/control/shaping/shape-metrics/rules/rollup#measurement) at once across
many matching time series.
* View incoming measurements with a `__metric_type__:measurement` filter
in the [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer).
Some examples of measurements are:
* The latency of an individual request
* The payload size of an individual request
## Supported formats
Cortex XCOR can ingest metrics from many different [external metric clients](/ingest/metrics-traces/collector/addl-metrics).
Each external metric client has their own concept of "metric type" which is
mapped into a Cortex XCOR metric type.
### Prometheus
| Prometheus Type | Cortex XCOR Type |
| - | - |
| Gauge | Gauge |
| Counter | Cumulative counter |
| Histogram | Cumulative counter |
| Summary (quantile data points) | Gauge |
| Summary (sum and count data points) | Cumulative counter |
| Native histogram with exponential bucket layout | Cumulative exponential histogram |
### OpenTelemetry
| OpenTelemetry Type | Cortex XCOR Type |
| - | - |
| Gauge | Gauge |
| Cumulative monotonic sum | Cumulative counter |
| Delta monotonic sum | Delta counter |
| Cumulative histogram | Cumulative counter |
| Delta histogram | Delta counter |
| Summary (quantile data points) | Gauge |
| Summary (sum and count data points) | Cumulative counter |
| Cumulative non-monotonic sum | Gauge |
| Cumulative exponential histogram | Cumulative exponential histogram |
| Delta exponential histogram | Delta exponential histogram |
Cortex XCOR doesn't support delta non-monotonic sums (also known as delta
up-down counters).
### Datadog
| Datadog Type | Cortex XCOR Type |
| - | - |
| Gauge | Gauge |
| Count | Delta counter |
| Histogram | Measurement |
| Distribution | Measurement |
### SignalFX
| SignalFX Type | Cortex XCOR Type |
| - | - |
| Gauge | Gauge |
| Cumulative | Cumulative counter |
| Counter | Delta counter |
### Wavefront
| Wavefront Type | Cortex XCOR Type |
| - | - |
| Gauge | Gauge |
| Counter | Cumulative counter |
| Delta counter | Delta counter |
| Histogram | Cumulative counter |
### StatsD
| StatsD Type | Cortex XCOR Type |
| - | - |
| Gauge | Gauge |
| Counter | Delta counter |
| Timer | Measurement |
### Google Cloud
| Google Cloud Type | Cortex XCOR Type |
| - | - |
| Gauge | Gauge |
| Cumulative | Cumulative counter |
| Delta | Delta counter |
| Distribution | Delta counter |
Google Cloud distributions are transformed to
[Prometheus classic histograms](/investigate/querying/promql/apply-functions#querying-classic-prometheus-histograms).
They're stored as separate delta counter time series per distribution bucket,
with a separate time series for the distribution count and sum.
# Data optimization concepts
Source: https://docs-xcor.paloaltonetworks.com/control/storage
Learn about data optimization concepts in Cortex XCOR and how you can use them to control your data.
Palo Alto Networks Cortex XCOR uses [collectors](/ingest) to ingest data, and utilizes
push and pull
models of ingestion, depending on the telemetry data collected and the method of
ingestion.
Cortex XCOR provides the following optimization concepts to help manage your data and
keep only the data that's most important to your organization.
## Consumption concepts
In a consumption model, you create *partitions*, which are slices of your data that
have distinct owners. Partitions provide a consistent structure for attributing usage
and costs to the appropriate owners in your organization so they can isolate and
control independent parts of the business.
Partitions let you apply *budgets*, which are optional shaping policies you can assign
to a partition to safeguard against runaway usage and overspending. Budgets provide
flexibility to enforce accountability at the correct level of ownership. Budgets
include thresholds that define which actions to take when a threshold is exceeded.
To learn more about these control mechanisms, see
[Manage consumption](/control/consumption).
## Capacity concepts
> [!NOTE]
>
> The capacity model is being replaced by the [consumption model](#consumption-concepts).
In a capacity model, metrics use *quotas* to assign specific percentages of your
total persisted writes limit to *pools* of metrics. Each pool might represent teams
or other logical groupings within your organization. Use metric quotas to give each
pool a specific quota of your total persisted writes license, expressed either as a
percentage or a value in data points per second (DPPS).
To learn more about these control mechanisms, see
[quotas and pools](/control/shaping/shape-metrics/quotas).
## Trace optimization concepts
In both the consumption and capacity models, you can use *datasets* as a proactive
control mechanism to organize your data and map it to named groups relevant to your
organization. Datasets can either overlap or stand alone, and can be assigned to only
a single business unit or service within your organization.
Each dataset entity lets you define a filter to assign specific chunks of data to a
particular dataset. A default, system-defined dataset exists for budgeting. You can
assign the default dataset to data that isn't explicitly assigned to any other
dataset.
To change the sampling rates of one or more datasets and to more effectively control
your persisted data, use *behaviors*. This shaping mechanism lets you change sampling
rates of one or more datasets without needing to write fine-grained sampling or
shaping rules.
To learn more about these control mechanisms, see
[sample your traces](/control/shaping/sample-traces).
# Early access program
Source: https://docs-xcor.paloaltonetworks.com/early-access
Learn about the Cortex XCOR early access program and what it means to participate.
Palo Alto Networks offers an Early Access (EA) program, which gives select
customers the
opportunity to preview and influence upcoming features before they reach General
Availability (GA). Your participation is essential in helping Palo Alto Networks
build products.
## Program benefits
The EA program offers the following benefits:
* **First access to new features**: Try out new capabilities weeks or months before
GA release, allowing your teams to experiment with new features, plan
implementations, and train users.
* **Influence product direction**: Your feedback directly shapes feature design and
capabilities. EA participants work closely with Palo Alto Networks product teams to
ensure
features make observability easier and more intuitive, and integrate seamlessly into
your workflows.
* **Strategic partnership**: Gain visibility into the Palo Alto Networks Cortex XCOR
product roadmap
and build stronger relationships with product and engineering teams through
dedicated feedback channels.
## Considerations
EA features are under active development. Changes will occur without advanced
notification, and can range from cosmetic updates to modifications that require
significant workflow changes. This iterative approach lets Palo Alto Networks rapidly
incorporate customer feedback and refine features before GA.
> [!WARNING]
>
> Maintenance and support for EA features operate differently than GA features.
> Although Palo Alto Networks makes a best effort to quick address major bugs or issues
> during the EA period, EA features aren't subject to the 99.9% uptime obligation
> promised in the SLA for GA features.
To protect your operations, Palo Alto Networks won't release any features to the EA program
that involve billing changes or have potential data quality impacts. These features
undergo additional validation and are available only in GA.
# Cortex XCOR documentation
Source: https://docs-xcor.paloaltonetworks.com/index
Learn about the aspects of the Cortex XCOR documentation.
Select your Palo Alto Networks Cortex XCOR product to view its product documentation.
## Palo Alto Networks Cortex XCOR
A SaaS-based observability and monitoring platform made for cloud-native
infrastructures. Monitor telemetry data across your entire system to identify and
solve issues. Minimize impact and downtime for your app and your users while
controlling what data you pay for.
> [card] [Go to Cortex XCOR documentation](/overview)
## Palo Alto Networks Telemetry Pipeline
An observability pipeline platform for routing and processing telemetry data.
Integrate with your existing observability tools to send logs, metrics, and traces
from any source to any destination. Connect to these sources and destinations through
a variety of built-in integration plugins.
> [card] [Go to Palo Alto Networks Telemetry Pipeline documentation](/pipeline)
# Ingest telemetry data
Source: https://docs-xcor.paloaltonetworks.com/ingest
Use control mechanisms to manage the telemetry data you ingest into Palo Alto Networks Cortex XCOR.
Before you can use Palo Alto Networks Cortex XCOR to view and manage your
telemetry data (of whatever type), you need to get that data into Cortex XCOR.
```mermaid actions={false} theme={null}
flowchart LR
accTitle: Palo Alto Networks Cortex XCOR architecture diagram
subgraph "Cortex XCOR"
cp((Palo Alto Networks Cortex XCOR))
end
subgraph "Your environment"
inf(Infrastructure applications) -- Logs, metrics, and traces --> cxdot(CXDOT Collector)
inf -- Logs and change events --> cp
inf -- Metrics and traces --> coll(Chronosphere Collector)
inf -- Logs, metrics, and traces --> otel(OpenTelemetry Collector)
inf -- Logs --> pipe(Palo Alto Networks Telemetry Pipeline or existing pipeline)
cxdot --> cp
coll --> cp
otel --> cp
pipe --> cp
end
click coll "/ingest/metrics-traces/collector"
click pipe "/ingest/pipeline/v2"
click otel "/ingest/otel-ingestion"
click cxdot "/ingest/xcor/collector"
classDef platform fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF;
class cp,coll,pipe,otel,cxdot platform
```
## Supported ingestion methods
Cortex XCOR supports multiple methods to ingest telemetry data, which
depend on which type of data you want to ingest:
| Ingestion method | Change events | Logs | Metrics | Traces |
| - | :-: | :-: | :-: | :-: |
| [Direct to Cortex XCOR](/ingest/third-party) | | | | |
| [CXDOT Collector](/ingest/xcor/collector) | | | | |
| [Chronosphere Collector](/ingest/metrics-traces/collector) | | | | |
| [OpenTelemetry](/ingest/otel-ingestion) | | | | |
| [Palo Alto Networks Telemetry Pipeline](/ingest/pipeline/v2) | | | | |
| [Existing pipeline](/ingest/logs) | | | | |
After ingesting telemetry data, you can use the control mechanisms that Cortex XCOR
provides to [control costs](/control) and ensure you're ingesting only the
data you care about.
### OpenTelemetry support
Use the upstream OpenTelemetry Collector or the
CXDOT Collector to ingest logs, metrics, and traces. For information about both
methods, see [OpenTelemetry support in Cortex XCOR](/ingest/otel-ingestion).
## Ingestion models
Cortex XCOR utilizes *push* and *pull* models of ingestion, depending on the data
collected and the method of ingestion.
| Telemetry type | Push | Pull |
| - | :-: | :-: |
| Metrics | | |
| Traces | | |
| Logs | | |
*Pull* models, like the Chronosphere Collector, scrape telemetry data from external
sources and pull it in. These metrics have consistent reporting intervals.
*Push* models, like tracing, send telemetry data to Cortex XCOR, which is then
processed. These metrics can have a broad spectrum of reporting frequency, from large
bursts of data to long periods with no data reporting.
The ingestion model depends on the telemetry data source. Metrics pushed to
Cortex XCOR can have [latency delays](/ingest/metrics-traces/gcp#metrics-availability)
or [sparse time series](/investigate/querying/metrics/troubleshooting#sparse-time-series),
which can result in unexpected query results.
# Ingest log data
Source: https://docs-xcor.paloaltonetworks.com/ingest/logs
Learn about how to ingest log data into Cortex XCOR.
Ingest data from any of the following supported sources into Palo Alto Networks Cortex XCOR.
> [card] [Fluent Bit](/ingest/logs/fluentbit-logs)
>
> Configure an HTTP output plugin to route logs from Fluent Bit.
> [card] [Google Cloud](/ingest/xcor/integrations/server/gcp/logs)
>
> Run a Dataflow job in your Google Cloud project to send logs from Pub/Sub.
> [card] [HTTP endpoint](/ingest/logs/http-logs)
>
> Use the logging HTTP endpoint to send logs directly to Cortex XCOR.
> [card] [Logstash](/ingest/logs/logstash-logs)
>
> Configure an HTTP output plugin to route logs from Logstash.
> [card] [OpenTelemetry](/ingest/logs/otel-logs)
>
> Use the OpenTelemetry protocol (OTLP) HTTP endpoint to route logs from OpenTelemetry.
> [card] [Palo Alto Networks Telemetry Pipeline](/ingest/logs/pipeline-logs)
>
> Use Palo Alto Networks Telemetry Pipeline to route logs from multiple sources.
After ingesting log data, verify Cortex XCOR is receiving your logs
as anticipated.
> [card] [Verify log data](/ingest/logs/verify-logs)
>
> Verify that Cortex XCOR is receiving your log data.
# Route logs from Fluent Bit
Source: https://docs-xcor.paloaltonetworks.com/ingest/logs/fluentbit-logs
Learn how to route logs from Fluent Bit to Palo Alto Networks Cortex XCOR.
You can use Fluent Bit to send logs to Palo Alto Networks Cortex XCOR. To do
so, add an
[HTTP output plugin](https://docs.fluentbit.io/manual/pipeline/outputs/http)
that specifies your Cortex XCOR tenant as its destination.
## Example configuration
To route logs from Fluent Bit to Cortex XCOR, Cortex XCOR recommends
configuring an HTTP output plugin with the following parameters and values:
> [tab] YAML configuration
>
> ```yaml theme={null}
> pipeline:
> # ...
> outputs:
> - name: http
> match: "kube.*"
> alias: Cortex XCOR
> host: TENANT
> port: 443
> uri: /api/v1/data/logs/ingest
> header: "API-Token ${API_TOKEN}"
> format: json
> compress: zstd
> json_date_format: iso8601
> json_date_key: TIME
> tls: true
> tls.verify: true
> tls.debug: 1
> net.keepalive: true
> net.keepalive_idle_timeout: 30s
> net.connect_timeout: 10s
> net.connect_timeout_log_error: true
> net.keepalive_max_recycle: 2000
> ```
> [tab] Classic configuration
>
> ```ini theme={null}
> [OUTPUT]
> Name http
> Match kube.*
> Alias Cortex XCOR
> Host TENANT
> Port 443
> URI /api/v1/data/logs/ingest
> Header API-Token ${API_TOKEN}
> Format json
> Compress zstd
> json_date_format iso8601
> json_date_key TIME
> tls On
> tls.verify On
> tls.debug 1
> net.keepalive On
> net.keepalive_idle_timeout 30s
> net.connect_timeout 10s
> net.connect_timeout_log_error On
> net.keepalive_max_recycle 2000
> ```
* Replace *`API_TOKEN`* with the API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
> [!NOTE]
>
> The service account must have read access to route log data to Cortex XCOR.
* Replace *`TENANT`* with the name of your Cortex XCOR tenant.
* Replace *`TIME`* with the value you assigned to timestamps in your
[log normalization settings](/control/shaping/shape-logs/normalize-logs).
If you didn't set up log normalization for timestamps, replace *`TIME`*
with `timestamp`.
# Route logs from Google Cloud Platform
Source: https://docs-xcor.paloaltonetworks.com/ingest/logs/gcp-logs
Learn how to route logs from Google Cloud Platform into Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> To set up new log collection from Google Cloud, use the Dataflow job in
> [Ingest Google Cloud logs](/ingest/xcor/integrations/server/gcp/logs). The setup on
> this page, where Palo Alto Networks Cortex XCOR Support pulls logs from a subscription
> you create, is supported only for tenants already running it.
Google Cloud Platform provides
[sinks](https://cloud.google.com/logging/docs/routing/overview#sinks), which control
how you can route log data to supported destinations. Use the
[Google Cloud Pub/Sub](https://cloud.google.com/pubsub/docs) destination to route log
data from Google Cloud Platform to Cortex XCOR.
Complete the following steps to route logs from Google Cloud Platform:
1. [Create a sink for logs](#create-a-sink-for-logs).
2. [Create a service account](#create-a-service-account).
3. [Create a pull subscription](#create-a-pull-subscription).
4. [Contact Cortex XCOR Support](#contact-cortex-xcor-support).
If you want to use Terraform to manage routing Google logs to Cortex XCOR,
refer to the [Terraform example](#terraform-example). After applying this
configuration, Terraform generates the information that you supply to
[Cortex XCOR Support](#contact-cortex-xcor-support).
> [!NOTE]
>
> This integration is only intended to handle throughput with low volume. To determine
> whether this integration is suited to your use case, contact
> [Cortex XCOR Support](/support).
If you want to route metrics data from Google Cloud Platform, see
[Ingest Google Cloud metrics](/ingest/xcor/integrations/server/gcp).
## Create a sink for logs
First, you need to create a sink that defines the service type and destination to
route your logs.
1. In the Google Cloud Logs Console, in the left navigation, click **Log Router**
to open the [Log router](https://console.cloud.google.com/logs/router) page.
2. Follow the steps in the Google Cloud documentation to
[create a sink](https://cloud.google.com/logging/docs/export/configure_export_v2#creating_sink).
3. Select **Cloud Pub/Sub topic** as the sink service.
4. Optional: Enter a filter expression that matches the log entries you want to
include.
See the
[Logging query language](https://cloud.google.com/logging/docs/view/logging-query-language)
in the Google Cloud documentation for information about how to construct queries.
5. Complete the remaining steps to create the sink.
Next, [create a service account](#create-a-service-account).
## Create a service account
After creating a sink, you create a service account in Google Cloud that
Cortex XCOR impersonates.
Before starting this process, obtain the Cortex XCOR principal for Google
Cloud. Click your [profile icon](/navigate#your-account) from the menu bar and select
**My Account**. Copy the value next to **Google Cloud Logs IAM Principal**. Each
Google Cloud service account must grant access to the Cortex XCOR
principal to impersonate them.
1. In the Google Cloud console,
[create a service account](https://cloud.google.com/iam/docs/service-accounts-create#creating).
> [!NOTE]
>
> The service account must have read access to route log data to Cortex XCOR.
2. Add the Cortex XCOR principal you obtained previously to the Google
Cloud service account.
3. Grant the principal the `iam.serviceAccountTokenCreator` role.
4. Enter information for the remaining fields to finish creating the service account.
Next, [create a pull subscription](#create-a-pull-subscription).
## Create a pull subscription
Add a [pull subscription](https://cloud.google.com/pubsub/docs/subscription-overview)
to the Pub/Sub destination you previously created. Cortex XCOR initiates
requests to the Pub/Sub server to retrieve messages.
1. In the Google Cloud console,
[Create a pull subscription](https://cloud.google.com/pubsub/docs/create-subscription#create_a_pull_subscription).
2. In the **Delivery type** menu, select **Pull**.
3. Configure the following recommended settings:
| Setting | Value |
| - | - |
| Message retention duration | 23 hours\* |
| Expiration period | Never expire |
| Acknowledgement deadline | 60 seconds |
| Exactly once delivery | No |
| Message ordering | No |
| Dead lettering | No |
| Retry policy | Retry after exponential backoff delay |
\* Set **Message retention duration** to less than 24 hours to avoid
storage costs.
1. Grant access to the Pub/Sub you created by assigning the following roles to your
new internal service account:
* `roles/pubsub.subscriber`
* `roles/pubsub.viewer`
Lastly, [contact Cortex XCOR Support](#contact-cortex-xcor-support) and provide the details
about your pull subscription.
## Contact Cortex XCOR Support
After completing the previous steps, [contact Cortex XCOR Support](/support) and
provide the following information:
* The name of your new Google Cloud service account email, such as:
```text theme={null}
SERVICE-ACCOUNT@PROJECT-ID.iam.gserviceaccount.com
```
* *`SERVICE-ACCOUNT`* is the name of the Google Cloud service account you created
in [create a service account](#create-a-service-account).
* *`PROJECT-ID`* is the ID of your Google Cloud project.
* The name of the logging sink subscription you created, such as
```text theme={null}
projects/PROJECT-ID/subscriptions/SUBSCRIPTION
```
* *`SUBSCRIPTION`* is the name of the pull subscription you created in
[create a pull subscription](#create-a-pull-subscription).
Cortex XCOR can then enable the logging integration to start routing your Google
Cloud logs to Cortex XCOR.
## Terraform example
The following code provides an example for creating a single Google Cloud service
account in the a Google Cloud project, and enables Cortex XCOR to
impersonate and gain access.
```terraform expandable Terraform example icon="square-terminal" theme={null}
locals {
// Email address of your Cortex XCOR Logs tenant-specific principal.
chronosphere_sa_email = "gcp-logs-TENANT@chronosphere-production-b.iam.gserviceaccount.com"
// Google Cloud project containing logging data to be ingested into
// Cortex XCOR.
logging_project_id = "PROJECT_ID"
// Organization ID of the Google Cloud organization containing the project.
org_id = "ORGANIZATION_ID"
}
// Creates Pub/Sub topic for logging sink.
resource "google_pubsub_topic" "main" {
name = "logging_sink"
project = local.project_id
}
// Creates a new logging sink.
resource "google_logging_organization_sink" "main" {
org_id = local.org_id
name = "all_logs_sink"
destination = "pubsub.googleapis.com/${google_pubsub_topic.main.id}"
include_children = true
}
// Grants sink permission to roles so they can write to the Pub/Sub topic.
data "google_iam_policy" "topic" {
binding {
role = "roles/pubsub.publisher"
members = [
google_logging_organization_sink.main.writer_identity,
]
}
}
// Binds the role to a new topic.
resource "google_pubsub_topic_iam_policy" "main" {
project = local.project_id
topic = google_pubsub_topic.main.name
policy_data = data.google_iam_policy.topic.policy_data
}
// Creates a new Pub/Sub subscription.
resource "google_pubsub_subscription" "main" {
name = "all_logs_sink"
project = local.project_id
topic = google_pubsub_topic.main.name
message_retention_duration = "23h"
ack_deadline_seconds = 60
retry_policy {
minimum_backoff = "10s"
}
enable_message_ordering = false
enable_exactly_once_delivery = false
}
// Creates a policy granting the new Cortex XCOR logs service account access to
// the subscription.
data "google_iam_policy" "subscription" {
binding {
role = "roles/pubsub.viewer"
members = [
google_service_account.chronosphere_logs.member
]
}
binding {
role = "roles/pubsub.subscriber"
members = [
google_service_account.chronosphere_logs.member
]
}
}
// Binds the new policy to the subscription.
resource "google_pubsub_subscription_iam_policy" "main" {
project = local.project_id
subscription = google_pubsub_subscription.main.name
policy_data = data.google_iam_policy.subscription.policy_data
}
// Service account that lets a Cortex XCOR tenant-specific principal
// to impersonate it.
resource "google_service_account" "chronosphere_logs" {
project = local.project_id
account_id = "chronosphere-logs"
}
// The service account provides the Cortex XCOR tenant-specific principal with
// roles/iam.serviceAccountTokenCreator access so that it can impersonate it. Only
// the Cortex XCOR tenant-specific principal can perform this
// impersonation.
data "google_iam_policy" "chronosphere_logs" {
binding {
role = "roles/iam.serviceAccountTokenCreator"
members = ["serviceAccount:${local.chronosphere_sa_email}"]
}
}
// Assigns the token creator permission to the service account.
resource "google_service_account_iam_policy" "chronosphere_logs" {
service_account_id = google_service_account.chronosphere_logs.name
policy_data = data.google_iam_policy.chronosphere_logs.policy_data
}
```
# Route logs over HTTP
Source: https://docs-xcor.paloaltonetworks.com/ingest/logs/http-logs
Use the Cortex XCOR logging HTTP endpoint to send logs to your Cortex XCOR tenant over HTTP.
Use the Palo Alto Networks Cortex XCOR logging HTTP endpoint to send your logs to Cortex
XCOR over HTTP.
The endpoint uses the following format:
```text theme={null}
https://TENANT.chronosphere.io/api/v1/data/logs/ingest
```
* *`TENANT`*: The name of your Cortex XCOR tenant.
In addition to formatted log data, such as JSON, the logging HTTP endpoint accepts
logs in plain text format. To minimize egress costs, this endpoint supports `gzip`,
`snappy`, and `zstd` compression methods.
Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
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 Cortex XCOR instance.
* *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
* *`ENDPOINT_PATH`*: The specific endpoint you want to access.
> [!NOTE]
>
> The service account must have read access to route log data to Cortex XCOR.
The following example shows a formatted `curl` request that includes the logging HTTP endpoint:
```shell wrap theme={null}
export CHRONOSPHERE_API_TOKEN="TOKEN"
export CHRONOSPHERE_DOMAIN="INSTANCE.chronosphere.io"
curl -H "API-Token: ${CHRONOSPHERE_API_TOKEN}" \
-X METHOD "https://${CHRONOSPHERE_DOMAIN}.chronosphere.io/api/v1/data/logs/ingest"
```
## Limits
The logging HTTP endpoint has the following limits:
* Logs with timestamps exceeding 24 hours into the future or past are rejected.
* Requests (compressed) exceeding 50 MB are rejected.
## Status codes
The logging HTTP endpoint returns the following status codes:
* `200`: Accepted. The request was accepted for processing.
* `413`: Large request. The maximum content size per payload (compressed) is
50 MB.
# Route logs from Logstash
Source: https://docs-xcor.paloaltonetworks.com/ingest/logs/logstash-logs
Learn how to route logs from Logstash to Palo Alto Networks Cortex XCOR.
You can route log data from Logstash to Palo Alto Networks Cortex XCOR. To route
logs, configure an
[HTTP output plugin](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-http.html)
in your
[Logstash pipeline configuration file](https://www.elastic.co/guide/en/logstash/current/config-setting-files.html)
that specifies your Cortex XCOR tenant as a destination.
1. In your Logstash pipeline configuration file, add an `output` section that defines
the `http` plugin:
```text theme={null}
output {
http {
http_method=>"post"
headers => {
"Content-Type" => "application/json"
"API-token" => "API_TOKEN"
}
url=>"https://TENANT.chronosphere.io/api/v1/data/logs/ingest"
format=>"json_batch"
}
}
```
* Replace *`API_TOKEN`* with the API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
> [!NOTE]
>
> The service account must have read access to route log data to Cortex XCOR.
* Replace *`TENANT`* with the name of your Cortex XCOR tenant.
* Optional: The `format=>"json_batch"` option collects each batch of events
received by the output and places them into a single JSON array that's sent in
one request.
2. After defining the output, [contact Cortex XCOR Support](/support) and indicate
which field in your data contains log timestamps.
# Use OpenTelemetry protocol endpoints
Source: https://docs-xcor.paloaltonetworks.com/ingest/logs/otel-logs
Learn how to configure and use Palo Alto Networks Cortex XCOR endpoints for OpenTelemetry protocol ingestion of log data.
Palo Alto Networks Cortex XCOR supports ingesting log data using OpenTelemetry
protocol (OTLP) HTTP ingestion endpoints.
> [!NOTE]
>
> For best results, ingest telemetry through a local OpenTelemetry Collector
> for processing and batching. Sending telemetry directly from an OpenTelemetry SDK
> can be less reliable.
## Requirements
Your OTLP configuration must meet certain requirements.
* **`API-Token` header:** All requests must include the `API-Token` HTTP header,
and its value must be the API token of a valid
[service account](/administer/accounts-teams/service-accounts)
with write permissions.
* **OTLP version support:** Only v1.0 and higher are supported.
* **Supported compression methods:** Cortex XCOR supports `gzip`, `snappy`,
and `zstd` compression, and recommends `zstd`.
* **Encryption:** All requests must be encrypted using TLS.
### Recommendations
Cortex XCOR recommends setting the timeout value for a logs request to 30 seconds,
and to enable retries to prevent transient network errors from causing data loss.
## OTLP endpoint URLs
Cortex XCOR provides HTTP endpoints for logs, metrics, and traces.
| Telemetry type | HTTP endpoint URL |
| - | - |
| Logs | `https://TENANT.chronosphere.io/data/opentelemetry/v1/logs` |
| Metrics | `https://TENANT.chronosphere.io/data/opentelemetry/v1/metrics` |
| Traces | `https://TENANT.chronosphere.io/data/opentelemetry/v1/traces` |
*`TENANT`*: The name of your Cortex XCOR tenant.
OpenTelemetry exporters complete the path based on the telemetry type. For the
`otlphttp` exporter, set the endpoint base path as follows:
```yaml theme={null}
exporters:
otlphttp/chronosphere:
endpoint: https://TENANT.chronosphere.io/data/opentelemetry/
compression: zstd
headers:
API-Token: ${env:API_TOKEN}
# ...
```
For an example OTLP exporter configuration, see
[Configure the OpenTelemetry Collector](/ingest/metrics-traces/otel/otel-ingest#configure-the-opentelemetry-collector).
# Route logs through Palo Alto Networks Telemetry Pipeline
Source: https://docs-xcor.paloaltonetworks.com/ingest/logs/pipeline-logs
Learn how to route log data through Palo Alto Networks Telemetry Pipeline to Palo Alto Networks Cortex XCOR.
Use Palo Alto Networks Telemetry Pipeline to ingest logs from sources
such as Fluent Bit, Open Telemetry, and HTTP. Apply parsers and processing rules,
then send the output to Palo Alto Networks Cortex XCOR. You create and define a
pipeline in Palo Alto Networks Telemetry Pipeline and set Cortex XCOR as a destination.
After deploying your pipeline, processed log data streams to Cortex XCOR
and is available for [exploring and querying](/investigate/querying/query-logs) in Logs
Explorer.
## Prerequisites
Before creating a pipeline, you must [install Palo Alto Networks Telemetry Pipeline](/ingest/pipeline/v2/install),
which includes installing a Core Operator and Core Instance.
## Create a pipeline
Specify a source and destination, and apply parsers and processing rules.
To route logs through Palo Alto Networks Telemetry Pipeline to Cortex XCOR:
1. [Create a pipeline](/ingest/pipeline/v2/build/create-modify#create-a-pipeline). Follow the
steps outlined in the Palo Alto Networks Telemetry Pipeline documentation.
2. Add a source, such as Fluent Bit, Elasticsearch, or OpenTelemetry.
3. Add the [Cortex XCOR Logs](/ingest/pipeline/plugins/destination-plugins/chronosphere)
destination.
4. Click the **Cortex XCOR Logs** destination to edit its configuration:
1. In the **General** section, in the **Host** field, enter:
```text /TENANT/ theme={null}
TENANT.chronosphere.io
```
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
2. Expand the **Advanced** section, and in the **URI** field, enter:
```text theme={null}
/api/v1/data/logs/ingest
```
5. Complete the remaining steps to deploy your pipeline.
After deploying your pipeline,
[verify that Cortex XCOR is receiving your logs](/ingest/logs/verify-logs)
as anticipated.
# Verify Cortex XCOR is receiving log data
Source: https://docs-xcor.paloaltonetworks.com/ingest/logs/verify-logs
Learn how to verify that Palo Alto Networks Cortex XCOR is ingesting your log data.
After [ingesting data](/ingest/logs) , use Logs Explorer to verify that Palo Alto Networks
Cortex XCOR
is receiving log data.
1. In the navigation menu select
** Explorers > Logs Explorer**.
2. On the **Logs Explorer** page, select a time window that includes the period when
Cortex XCOR started ingesting log data.
The timeline graph displays a spike at the time when Cortex XCOR
started ingesting log data.
3. Verify the `message`, `timestamp`, `service`, and `severity` fields are being
assigned correctly. If these fields aren't mapped in the way you intended, contact
[Cortex XCOR Support](/support).
# Ingest metric and trace data
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces
Learn about the collection methods used to ingest metrics and traces into Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR supports two
[Collectors](#chronosphere-collector-or-opentelemetry-collector) to ingest metric
and trace data, the Chronosphere Collector and the OpenTelemetry Collector.
Cortex XCOR also supports direct metric imports from
[Google Cloud](/ingest/xcor/integrations/server/gcp).
## Chronosphere Collector or OpenTelemetry Collector
Your Collector selection depends on the telemetry data you plan to ingest.
Cortex XCOR recommends using the vendor-supported, optimized, and highly performant
[Chronosphere Collector](/ingest/metrics-traces/collector) for Prometheus discovery and scrape
workloads. This use case typically works best with metrics data.
Use the [OpenTelemetry Collector](/ingest/metrics-traces/otel) if your organization uses
OpenTelemetry SDKs for app instrumentation. An added benefit of using the
OpenTelemetry Collector is you can configure dynamic, remotely configurable
[head sampling](/control/shaping/sample-traces/head-sampling), which is a powerful control
mechanism for managing your tracing costs. Cortex XCOR supports the
[OpenTelemetry JaegerRemoteSampler](https://opentelemetry.io/docs/specs/otel/trace/sdk/#jaegerremotesampler)
head sampling standard for remotely controlling the sampling configuration of
OpenTelemetry SDKs.
| Chronosphere Collector | OpenTelemetry Collector |
| :- | :- |
| Proprietary | Open source |
| Fully supported by Cortex XCOR Support | Exporter configuration support |
| No remote trace sampling support | Remote trace sampling support |
> [!NOTE]
>
> Cortex XCOR doesn't provide customer support for OpenTelemetry components.
## Integrations
Cortex XCOR supports these metrics integrations:
> [card] [AWS Cloudwatch metrics](/ingest/xcor/integrations/server/aws-cloudwatch)
>
> Configure AWS to stream metrics to Cortex XCOR through CloudWatch Metrics Streams.
> [card] [Azure metrics](/ingest/xcor/integrations/server/azure)
>
> Connect Cortex XCOR with Azure Monitor to ingest metrics.
> [card] [Google Cloud metrics](/ingest/xcor/integrations/server/gcp)
>
> Connect Cortex XCOR with Google Cloud to ingest metrics from Google Cloud projects.
> [card] [OpenTelemetry](/ingest/metrics-traces/otel)
>
> Use the OpenTelemetry protocol (OTLP) HTTP endpoint to route metrics from OpenTelemetry.
# Chronosphere Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector
Learn how the Chronosphere Collector scrapes Prometheus endpoints, receives traces, and sends telemetry data to Cortex XCOR.
The Chronosphere Collector is a standalone app whose main function is to discover and
scrape a Prometheus server that's exposed by your app. The Collector then sends any
discovered data to the Palo Alto Networks Cortex XCOR service through a
connection secured by a revocable API token. If the Collector can't scrape certain
jobs or components, you can manually push metrics to it. For more information, refer
to [Service discovery](/ingest/metrics-traces/collector/discover).
In addition to ingesting metrics, the Collector can:
* Filter, rename, and drop Prometheus metrics that pass through it by using
[Prometheus's relabeling rules](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config),
based on specific label-value pairs.
* Add [global labels](/ingest/metrics-traces/collector/configure/optimizations#add-global-labels)
to all Prometheus metrics the Collector ingests. For example, you can append all
Prometheus metrics passing through a particular Collector with the label
`service="col1"`.
* [Receive traces](/overview/types/traces) from your services, such as
OpenTelemetry spans and other popular open source formats like Jaeger and
Zipkin.
> [!NOTE]
>
> Cortex XCOR supports Chronosphere Collector versions for a year from release. You
> can find a full list of versions and release dates in the Chronosphere Collector release notes
> located in Palo Alto Networks Cortex XCOR. To view the release notes, in the
> navigation menu select
** More information > Release notes**,
> and then click the **Collector** tab.
## Get started
The Collector supports IPv4, IPv6, or fully qualified domain names for a single endpoint.
To get started with the Collector:
1. [Review the architecture](#architecture) to determine how you want to install the
Collector.
2. [Install the Collector](/ingest/metrics-traces/collector/install),
either to retrieve metric data or receive trace data.
3. [Verify and monitor the Collector](/ingest/metrics-traces/collector/monitor) to
ensure your data is streaming in to Cortex XCOR.
4. [Configure service discovery](/ingest/metrics-traces/collector/discover) to
discover other apps to scrape metrics from.
5. [Enable recommended optimizations](/ingest/metrics-traces/collector/configure/optimizations#chronosphere-collector-optimizations)
and modify default settings.
6. Optional: [Ingest additional metrics](/ingest/metrics-traces/collector/addl-metrics)
such as DogStatsD, Graphite, Prometheus, or Pushgateway.
If you're using Kubernetes, you can also
[modify the scrape configuration](/ingest/metrics-traces/collector/discover/scrape-configuration)
to override scrape defaults, change the annotation prefix, and define the `jobs`
configuration.
## Architecture
You can install the Collector with Kubernetes as a DaemonSet, Deployment, or as a
sidecar. Each of these models have advantages and disadvantages, with different
architectures.
### DaemonSet
Installing the Collector as a Kubernetes DaemonSet is a pull-based model, where the
Collector scrapes endpoints using either annotations or `ServiceMonitors`. With this
method, you deploy a Collector on every node in your cluster. This method is the
recommended way to install the Collector to receive metrics.
```mermaid actions={false} theme={null}
graph TD
accTitle: Chronosphere Collector DaemonSet architecture diagram
accDescr: Architecture diagram that shows Collectors installed in each node of your Cluster, which then pass their data to the Cortex XCOR tenant.
subgraph Kubernetes Cluster
subgraph n1 [Node]
a(( Pod App )):::app
b((Pod Storage)):::app
c((Pod Chronosphere Collector)):::coll
end
subgraph n2 [Node]
d(( Pod App )):::app
e((Pod Storage)):::app
f((Pod Chronosphere Collector)):::coll
end
end
c --> t(Cortex XCOR Tenant)
f --> t
classDef coll fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF
classDef app stroke:#495057,stroke-width:2px
style t fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF,stroke-dasharray: 5 5
```
#### Advantages
Because the Collector resides on the same Kubernetes node as your app, latency is low. As your
cluster grows, deploy a Collector on each new node to scale your cluster
horizontally. Installing one Collector per node also means that you're less likely to
overload any single Collector.
This method allows for phased rollouts of new Collector versions and configuration
changes to help avoid losing scrape coverage. Also, if you lose a node, you're only
losing metrics for that node and not your entire cluster.
#### Disadvantages
Some environments, such as AWS Fargate, restrict you from deploying an app as a
DaemonSet. Kubernetes applies resource requirements globally across your cluster,
which means that DaemonSets can evict other applications from the node depending on
prioritization. Also, DaemonSets don't deal well with noisy scrape endpoints, such as
`kube-state-metrics`.
### Deployment
Installing the Collector as a Kubernetes Deployment works best for push-based models,
where your app pushes data to a Kubernetes Service, which the Collector receives data
from. This method is the recommended way to install the Collector to receive
distributed trace data.
To install the Collector in a Deployment where it pulls metrics data from scrape
targets, Cortex XCOR recommends using Prometheus Service Discovery. If you don't
need Pod metadata, you can install the Collector in a Deployment using
ServiceMonitors.
```mermaid actions={false} theme={null}
graph TD
accTitle: Chronosphere Collector Kubernetes Deployment architecture diagram
accDescr: Architecture diagram that shows the flow of data that is pushed to a Kubernetes Service, from which Collectors receive data and then pass to the Cortex XCOR tenant.
subgraph Kubernetes Cluster
subgraph Node
a((Pod)):::app
b((Pod)):::app
c((Pod)):::app
d((Pod)):::app
e((Pod)):::app
end
a --> k((Kubernetes Service)):::app
b --> k
c --> k
d --> k
e --> k
k --> a1((Chronosphere Collector)):::coll
k --> a2((Chronosphere Collector)):::coll
k --> a3((Chronosphere Collector)):::coll
end
a1 --> t(Cortex XCOR Tenant)
a2 --> t
a3 --> t
classDef coll fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF
classDef app stroke:#495057,stroke-width:2px
style t fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF,stroke-dasharray: 5 5
```
#### Advantages
Deployments work well for monitoring high cardinality endpoints. You can choose to
either configure multiple Collectors in your cluster or deploy a singular Collector.
You can also select the number of Collectors to run in your cluster. As your cluster
grows, add more Pods to scale your Deployment horizontally.
#### Disadvantages
If you deploy a singular Collector that's undersized for your workload, the Collector
might experience delays in scrape latency or encounter out of memory situations. A
Deployment can also be problematic when using staleness markers, and you can't
customize the push configuration of the Collector per app.
### Sidecar
A sidecar is a dedicated resource for your app that's ideal for handling high volume
data, such an app that generates copious time series data. To run the Collector as a
sidecar, you can install an individual Collector in each Pod of your cluster. Because
the Collector Container and app Container run on the same Pod, you can optimize
resources for the Pod.
```mermaid actions={false} theme={null}
graph TD
accTitle: Chronosphere Collector sidecar architecture diagram
accDescr: Architecture diagram that shows running the Collector in a sidecar, with each Pod containing its own Collector, which then send information to the Cortex XCOR tenant.
subgraph Kubernetes Cluster
subgraph Node
subgraph pod1 [Pod]
a((App Container)):::app --> b((Chronosphere Collector)):::coll
end
subgraph pod2 [Pod]
c((App Container)):::app --> d((Chronosphere Collector)):::coll
end
subgraph pod3 [Pod]
e((App Container)):::app --> f((Chronosphere Collector)):::coll
end
end
end
b --> g(Cortex XCOR Tenant)
d --> g
f --> g
classDef coll fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF
classDef app stroke:#495057,stroke-width:2px
style g fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF,stroke-dasharray: 5 5
```
#### Advantages
If a Collector goes offline, you lose only the metrics for a single Pod. You have
more control over resource usage for high cardinality apps and can customize the
Collector per app.
#### Disadvantages
Each Pod requires a sidecar Container, which requires additional Kubernetes resources
for your cluster. Sidecars require you to maintain the app manifest to include the
Collector as a sidecar, which increases overhead. Because the Collector exists on
the same Pod as your app Container, the Collector can impact the entire Pod if it
experiences problems.
# Ingest additional metrics
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/addl-metrics
Ingest Carbon, StatsD, SignalFx, Wavefront, and other metric formats with the Chronosphere Collector, and enable client-side aggregations.
Scraping metric endpoints is the preferred method of ingesting metrics to the
Chronosphere Collector, but you can also ingest the following metric formats:
* [Carbon](/ingest/metrics-traces/collector/addl-metrics/carbon)
* [DogStatsD](/ingest/metrics-traces/collector/addl-metrics/dogstatsd)
* [Prometheus and OpenMetrics](/ingest/metrics-traces/collector/addl-metrics/prom-openmetrics)
* [Pushgateway](/ingest/metrics-traces/collector/addl-metrics/prom-pushgateway)
* [SignalFx](/ingest/metrics-traces/collector/addl-metrics/signalfx)
* [StatsD](/ingest/metrics-traces/collector/addl-metrics/statsd)
* [Tagged StatsD](/ingest/metrics-traces/collector/addl-metrics/tagged-statsd)
* [Wavefront](/ingest/metrics-traces/collector/addl-metrics/wavefront)
## Enable aggregations
You can enable client-side aggregations for
[Carbon](/ingest/metrics-traces/collector/addl-metrics/carbon),
[StatsD](/ingest/metrics-traces/collector/addl-metrics/statsd), and
[Datadog DogStatsD](/ingest/metrics-traces/collector/addl-metrics/dogstatsd) metrics.
These aggregations reduce network egress and processed writes to Palo Alto Networks Cortex XCOR.
When the Collector ingests a data sample, it aggregates the data based on the metric type
and sends a single data point to Cortex XCOR that represents the sample for
the defined period. The Collector aggregates on the following metric types:
* Counters, which are rolled up through addition.
* Gauges, which are selected by the last value written.
* Timers, which use sketches of the underlying sample to build quantiles.
Aggregations are disabled by default. To enable aggregations, define the
`push.PROTOCOL.aggregation` YAML collection in your Collector manifest, where
*`PROTOCOL`* can be `carbon`, `dogstatsd`, or `statsd`. For example, the following
YAML collection enables aggregations for StatsD with defined values for each of the
supported metric types:
```yaml theme={null}
push:
statsd:
aggregation:
counters:
interval: "10s"
gauges:
interval: "10s"
timers:
interval: "10s"
inactiveExpireAfter: "2m"
```
* `interval`: Defines the length of time before writing to Cortex XCOR.
A longer `interval` duration provides more effective caching, but also increases
the length of delays before writing.
* `inactiveExpireAt`: Determines the length of time before Cortex XCOR evicts unused
keys from the local cache. Default: `2m`.
# Carbon ingestion
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/addl-metrics/carbon
Configure the Chronosphere Collector to ingest Carbon metrics from Graphite clients as pre-aggregated gauge data.
Carbon is an approach to sending Graphite data to the Collector. With this method,
Palo Alto Networks Cortex XCOR treats any Carbon data as pre-aggregated before
it arrives at the Collector. Downsampling rules apply only for long-term retention
with all metrics assumed to be gauges, while the short-term retention data is
persisted as-is.
Only use this when you are certain about the resolution of the data sent, with any
change in resolution causing Cortex XCOR to persist more metrics. In general,
Cortex XCOR doesn't recommend this approach of sending Graphite metrics, as the
resolution and control of metrics ingestion is defined by the Carbon clients sending
the data, and not the Collector or backend.
You can enable
[client-side aggregations](/ingest/metrics-traces/collector/addl-metrics#enable-aggregations)
for Carbon. These aggregations reduce network egress and processed writes to
Cortex XCOR.
To ingest Carbon metrics with the Collector, add the following to the configuration
file under the `push` YAML collection:
```yaml theme={null}
push:
carbon:
enabled: true
listenAddress: 0.0.0.0:3032
listenProtocol: udp
```
You can configure the following options in the Collector manifest for Carbon.
* `listenAddress`: The address the server listens on. Point clients
sending Carbon metrics to this address and port. Default: `0.0.0.0:3032`.
When changing the default port, also update the container ports in the DaemonSet
manifest to match.
* `listenProtocol`: The protocol the server listens on. The Chronosphere Collector supports
`udp`, `tcp,` or `tcp/udp` (both protocols on the same port). Default: `udp`.
> [!NOTE]
>
> The Carbon server runs as a UDP server at the provided listen address.
# DogStatsD ingestion
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/addl-metrics/dogstatsd
Processes and configuration for ingesting DogStatsD metrics into Palo Alto Networks Cortex XCOR.
When accepting DogStatsD metrics over the User Datagram Protocol (UDP), Palo Alto Networks
Cortex XCOR
requires you to run the Chronosphere Collector as a
Kubernetes [DaemonSet](/ingest/metrics-traces/collector#deployment)
or as a [sidecar](/ingest/metrics-traces/collector#sidecar).
All ingested DogStatsD metrics are subject to sanitization rules that follow the
[Datadog best practice guidelines](https://docs.datadoghq.com/developers/guide/what-best-practices-are-recommended-for-naming-metrics-and-tags/).
For example, Cortex XCOR converts all DogStatsD labels to
lowercase.
For information about converting Datadog metrics and dashboards to Cortex XCOR, see the [Datadog overview](/ingest/metrics-traces/collector/mappings/datadog).
The Collector supports DogStatsD protocols v1.0 through v1.6, and aggregates timer
and distribution metrics as delta exponential histograms.
## Deploy the Chronosphere Collector
Datadog metrics libraries primarily send metrics using the UDP protocol, which sends
packets without reliability mechanisms, such as handshakes, retries, or acknowledgments.
Using UDP to send data over the network increases the risk of losing metric data
due to lost packets and other network issues.
Because local UDP communication is generally more stable, keeping communication
on the same Kubernetes node reduces this risk.
### Install Collector as a Kubernetes DaemonSet
To install the Chronosphere Collector, follow the steps described in
[Kubernetes Collector installation to retrieve metrics](/ingest/metrics-traces/collector/install/kubernetes).
The manifest defines a ClusterRole with the permissions required to access the local
Kubelet API and mounts a volume to access the `cgroups` directory on the node.
## Configure Chronosphere Collector for DogStatsD metrics
1. Use the configuration from the
[annotated manifest](https://storage.googleapis.com/chronosphere-release/latest/kubernetes/chronocollector.yaml)
in the
[Kubernetes Collector installation documentation](/ingest/metrics-traces/collector/install/kubernetes)
as a starting point.
2. Add `hostPort` to the DaemonSet `containters.ports` YAML collection to enable
network communication on the host network.
```yaml theme={null}
spec:
template:
spec:
containers:
ports:
# ...
- containerPort: 8125
hostPort: 8125 # Add hostPort
name: dogstatsd
protocol: UDP
```
3. Enable DogStatsD mode under the `push.dogstatsd.enabled` YAML collection in the
Collector manifest.
```yaml theme={null}
push:
dogstatsd:
enabled: true
```
4. Configure additional [DogStatsD configuration options](#dogstatsd-configuration-options)
under the `push.dogstatsd` YAML collection as necessary.
## DogStatsD configuration options
You can configure the following options in the Collector manifest for DogStatsD.
Exception are denoted as "not configurable," which appear in code configuration
output but can't be overridden by changing their values.
In addition to augmenting labels with metadata from Kubernetes Pods, Collector v0.115.0
and later also supports label augmentation derived from the Kubernetes Node on which
the Collector is running. Node metadata is fetched only once, at startup.
* `listenAddress`: The address and port on which the server listens for connections.
Point DogStatsD clients sending metrics to this address and port.
Default: `0.0.0.0:8125`.
When changing the default port, also update the container ports in the DaemonSet
manifest to match.
* `listenProtocol`: The protocol the server listens on. The Chronosphere Collector supports
`udp`, `tcp,` or `tcp/udp` (both protocols on the same port). Default: `udp`.
```yaml theme={null}
push:
dogstatsd:
enabled: true
listenAddress: 0.0.0.0:8125
listenProtocol: udp
```
* `aggregation`: A YAML collection that defines how the Collector ingests a data
sample.
When Chronosphere Collector ingests a data sample, it aggregates the data based
on the metric type and sends a single data point to Cortex XCOR that
represents the sample for the defined `interval`. These aggregations reduce network
egress and processed writes to Cortex XCOR.
Chronosphere Collector aggregates data points based on the metric type as follows:
* `counters` (not configurable): Sums all data point values for a time series
and sends the `SUM` as a [`DELTA COUNTER`](/control/shaping/shape-metrics/types#delta-counter).
* `gauges` (not configurable): Selects the `LAST` value for a time series in the
interval.
* `timers`: Aggregates timer values into a
[`DELTA EXPONENTIAL HISTOGRAM`](/control/shaping/shape-metrics/types#delta-exponential-histograms),
by default, including DogStatsD histograms and distributions.
* `aggregationType`: Defines how the Collector aggregates timers. Default: `histogram`.
The `tdigest` option is deprecated. Use `histogram` instead.
* `interval`: Defines the length of time before writing to Cortex XCOR.
Set an interval value that aligns with your licensed persistent writes and
cardinality ratio. A more frequent aggregation interval increases persisted
writes.
* `inactiveExpireAfter`: Determines the amount of time before Chronosphere Collector
evicts unused aggregation keys from the local cache. Default: `2m`.
* `labels`: Adds labels to all DogStatsD metrics pushed. Define each label as a
key-value pair.
For example, the default configuration adds the labels `env` and `k8s_cluster_name`
using environment variables for the values.
* `prefix`: Adds a prefix to all DogStatsD metrics pushed.
For example, setting this value to `qa` prefixes all metric names with `qa` followed
by \`.\`, the dot separator. A metric like `build_info.ip` becomes `qa.build_info.ip`
and is normalized to `qa_build_info_ip`.
* `kubernetesMetadataAugmentation:` Defines the configuration and addition of Kubernetes
metadata, labels, and annotations to be added to the time series.
The Chronosphere Collector doesn't support using node or namespace metadata as the
source for label
augmentation.
* `enabled`: A Boolean value that toggles augmentation. Default: `false`.
The Chronosphere Collector retrieves metadata from the local Kubelet API
and doesn't support other sources.
* `kubelet`:
* `kubeletNodeIP`: Defines the public IP address assigned to Kubelet. Defaults
to the value of the `KUBERNETES_NODE_IP` environment variable.
* `kubeletNodePort`: Defines the port that Kubelet listens on for HTTP requests.
Default: `10250`.
* `kubeletNodePodsEndpoint`: Overrides the URL of Kubelet's `/pods` endpoint,
which by default is constructed from `kubeletNodePort` and `kubeletNodeIP`
as `https://${kubeletNodePort}:${kubeletNodeIP}/pods`.
* `kubeletNodeTLSInsecureSkipVerify`: Determines whether the Chronosphere Collector
skips verification of Kubelet's TLS certificate. Default: `true`.
* `kubeletNodeBearerTokenFile`: Defines the path to the file containing Collector's
service account token. Default: `/var/run/secrets/kubernetes.io/serviceaccount/token`.
* `timeout`: Defines the amount of time the Chronosphere Collector waits for a response from
the metadata source. Default: `1s`.
* `refreshInterval`: Defines the interval between refreshes if a cache miss
didn't trigger a cache update from Kubelet. Default: `10s`.
* `metadataToAugment`: Adds time series labels based on Kubernetes metadata from the
Pod that sent the metrics or the Node on which the Collector is running.
Node metadata is fetched only once, at startup. Supported metadata keys are
`name` and `namespace`.
* `labelsToAugment`: Adds time series labels based on Kubernetes labels from the
Pod that sent the metrics or the Node on which the Collector is running.
Node metadata is fetched only once, at startup.
Specify the source Kubernetes label by name, and provide a name for the label
as it should appear on the resulting metric time series.
For example, the default configuration uses the value from the Kubernetes Pod
label `app` as the value for the `service_name` label for all metrics.
* `annotationsToAugment`: Adds time series labels based on Kubernetes annotations
from the Pod that sent the metrics or the Node on which the Collector is running.
Specify the source Kubernetes annotation by name, and provide a name for the
label as it should appear on the resulting metric time series.
For example, the default configuration uses the Kubernetes Pod annotation `app.myorg.com/owner`
value as the value for the `team_owner` label.
* `extractLabelsFromAnnotations`: A collection that extracts label-value pairs
from Kubernetes Pod annotation values serialized as JSON key-value maps to add
labels to time series ingested by the DogStatsD protocol handler. Set this to
a `pod` containing `ad.datadoghq.com/tags` and `ad.datadoghq.com/%%container_name%%.tags`.
This supports
[Datadog Agent Tag Autodiscovery](https://docs.datadoghq.com/containers/kubernetes/tag/?tab=datadogoperator#tag-autodiscovery).
* `cgroupRefreshInterval`: Defines how often to refresh the inode to cgroup mapping,
if a cache miss didn't trigger a lookup. Default: `5m`.
* `disableCgroupInodeResolution`: If `true`, disables the resolution of inodes
to cgroups and containers. Default: `false`.
* `stripContainerID`: Removes the `container_id` or `c` label sent by the DogStatsD
metrics client. Default: `true`.
### Example configuration
The following example YAML collection lists all the configuration options for receiving
DogStatsD metrics with Chronosphere Collector:
```yaml theme={null}
push:
dogstatsd:
enabled: true
listenAddress: 0.0.0.0:8125
listenProtocol: tcp/udp
aggregation:
timers:
aggregationType: histogram
interval: 60s
inactiveExpireAfter: "2m"
labels:
env: ${ENV:""}
k8s_cluster_name: ${KUBERNETES_CLUSTER_NAME:""}
# prefix: "qa"
kubernetesMetadataAugmentation:
enabled: true
kubelet:
kubeletNodeIP: ${KUBERNETES_NODE_IP}
kubeletNodePort: 10250
# kubeletNodePodsEndpoint: https://${KUBERNETES_NODE_IP}:10250/pods
kubeletNodeTLSInsecureSkipVerify: true
kubeletNodeBearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
refreshInterval: 10s
timeout: 1s
# Note: Node metadata is fetched only once, at startup.
metadataToAugment:
pod: # map of metadata_keyname: metric_label
name: kube_pod_name
namespace: kube_namespace
node: # map of node_metadata_key: metric_label
name: kube_node_name
labelsToAugment:
pod: # map of pod_label: metric_label
app: service_name
node: # map of node_label: metric_label
app: kube_node_name
annotationsToAugment:
pod: # map of pod_annotation: metric_label
"app.myorg.com/owner": owner_team
node: # map of node_annotation: metric_label
"app.myorg.com/owner": node_owner
extractLabelsFromAnnotations:
pod:
- ad.datadoghq.com/tags
- ad.datadoghq.com/%%container_name%%.tags
cgroupRefreshInterval: 5m
# disableCgroupInodeResolution: false
stripContainerID: true
```
# Prometheus and OpenMetrics ingestion
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/addl-metrics/prom-openmetrics
Configure the Chronosphere Collector to accept text-exposition payloads in either Prometheus or OpenMetrics format.
You can configure the Collector to accept text-exposition payloads in either
Prometheus or OpenMetrics formats.
To enable the Prometheus and OpenMetrics ingestion for the Collector, add
`importPrometheus` and `importOpenMetrics` under the `push` YAML collection in the
Collector configuration:
```yaml theme={null}
push:
importPrometheus:
enabled: true
importOpenMetrics:
enabled: true
```
Traffic is served from `/import/openmetrics` and `/import/prometheus` from the
`listenAddress`, which defaults to `0.0.0.0:3030`.
```shell theme={null}
# Importing an untyped metric in OpenMetrics format.
curl -d $'test_metric_import 100\n# EOF' -X POST http://localhost:3030/import/openmetrics
# Same import, but in Prometheus format.
curl -d 'test_metric_import 100' -X POST http://localhost:3030/import/prometheus
```
Additional query parameters:
* `extra_label`: pass in repeated, default labels for all time series, formatted as
`name=value`.
* `default_timestamp`: provide a default timestamp in Unix milliseconds for
any time series that doesn't have one. Otherwise, the value defaults to `Now()` on
the Palo Alto Networks Cortex XCOR backend.
The following command includes both of these additional query parameters:
```shell theme={null}
curl -d 'test_metric_import 100' -X POST \
http://localhost:3030/import/prometheus?extra_label=svc%3Dauth&extra_label=team%3Dbar&default_timestamp=1669701600
```
## Export Prometheus assets
You can use [Chronoctl](/tooling/chronoctl) to sync Prometheus rule definitions and
Alertmanager configuration into Cortex XCOR over the Cortex XCOR API.
> [!NOTE]
>
> You need Chronoctl installed and configured. Read the
> [Chronoctl documentation](/tooling/chronoctl) for more details.
For example, to export rules from a Prometheus Operator cluster and sync them:
1. In your Prometheus installation, retrieve your Prometheus rules into a YAML file:
```shell theme={null}
kubectl get prometheusrules -o yaml -A > prometheus_rules.yml
```
2. Gather the Alertmanager configuration you want evaluated with those rules (for
example, your existing `alertmanager.yml`).
3. Run `chronoctl sync prometheus`. You must pass both Prometheus rules and
Alertmanager YAML (`-p` and `-a`):
```shell theme={null}
chronoctl sync prometheus -p prometheus_rules.yml -a alertmanager.yml
```
Chronoctl prints a changelog of changes applied in Cortex XCOR. To
preview changes without writing them, add `--dry-run`.
To control how rules map to teams and collections, pass a Cortex XCOR mapping
file with `-c`:
```shell theme={null}
chronoctl sync prometheus -p prometheus_rules.yml -a alertmanager.yml -c chronoconfig.yml
```
For flags and output formats, run `chronoctl sync prometheus --help` or see the
[Chronoctl documentation](/tooling/chronoctl).
# Pushgateway ingestion
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/addl-metrics/prom-pushgateway
Learn how to configure and use the Prometheus Pushgateway to collect metrics.
Scraping metrics is preferred whenever possible, but you can use the Prometheus
Pushgateway for ephemeral jobs such as batch, AWS Lambda, or Google Cloud
Functions that the Collector couldn't scrape otherwise.
The Collector provides an HTTP endpoint that's compatible with the
[Prometheus Pushgateway](https://github.com/prometheus/pushgateway), with the
following caveats:
* The open source Prometheus Pushgateway is a cache for metrics. Because the
Collector is a proxy, it forwards metric payloads to the Palo Alto Networks Cortex XCOR backend
instead of caching metrics. This distinction means:
* HTTP `DELETE` requests aren't supported.
* HTTP `PUT` and `POST` requests are semantically the same.
* The Query API, or `GET` requests, aren't supported.
* Neither the Prometheus Pushgateway nor the Collector support any aggregation.
* The Collector only supports GZIP compressed payloads. Snappy-compressed payloads
aren't supported.
* Transport Layer Security (TLS) isn't supported. All traffic to the Collector is in
plain text, but traffic to the Cortex XCOR backend is always encrypted.
Adhere to the following best practices when using the Prometheus Pushgateway
with the Collector:
* Ensure that at least one of the labels are unique to the instance of the calling
job so that time series don't collide. If the label IDs are sufficiently high in
cardinality, you might want to aggregate the labels.
* Push metrics periodically, ideally when a job shuts down.
* Run Collectors as sidecars (where all traffic is over `localhost`), or as a formal
Kubernetes service.
To enable the Prometheus Pushgateway for the Collector, modify the Collector
configuration file and add the following lines:
```yaml theme={null}
# This will register an HTTP endpoint on the listenerAddress for the Collector.
push:
pushgateway:
enabled: true
```
## Examples
The following examples show how to send traffic with the Prometheus Pushgateway to
the Collector, assuming that the listen address is running on port `3030`.
### Using curl
When running this `curl` command, replace `` with the IP address of your
Collector.
```shell theme={null}
curl --data-binary @- http://:3030/pushgateway/metrics/job/some_job/job_id/my_unique_id <` is the name of the Kubernetes pod where the Collector is
running:
```shell theme={null}
kubectl port-forward 3030
```
You can then run the previous `curl` command and use `localhost` instead of the
Collector IP address.
### Using the Prometheus Pushgateway client
```go theme={null}
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/push"
)
func main() {
registry := prometheus.NewRegistry()
// Push metrics on shutdown.
defer func() {
// The address can be replaced with a Kubernetes Service name,
// however, the URL must end in /pushgateway.
push.New("http://localhost:3030/pushgateway", "my_job").
Grouping("job_id", "my_unique_id").Gatherer(registry).Push()
}()
}
```
# SignalFx ingestion
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/addl-metrics/signalfx
Configure the Chronosphere Collector to process SignalFx data points from apps instrumented with a SignalFx client library.
You can configure the Collector to process SignalFx data points. The Collector serves
SignalFx traffic at the `/signalfx/v2/datapoint` HTTP endpoint from the
`listenAddress`, which defaults to `0.0.0.0:3030`. The `/v2/datapoint` suffix is the
default expected path appended by SignalFx client libraries.
This integration pattern assumes that you've instrumented your apps with a SignalFx
client library, such as the [golib](https://github.com/signalfx/golib) library for
Go.
For equivalent functions between SignalFx and PromQL, see the
[equivalent function list](/ingest/metrics-traces/collector/mappings/signalfx).
## Configure SignalFx ingestion
1. Download this
[annotated manifest](https://storage.googleapis.com/chronosphere-release/latest/kubernetes/chronocollector.yaml)
as a starting point.
2. Enable SignalFx mode under the `push.signalFX.enabled` YAML collection in the
Collector manifest.
```yaml theme={null}
push:
signalFX:
enabled: true
```
3. Modify additional configuration options under the `push.signalFX` YAML collection.
# Receive and aggregate metrics from StatsD
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/addl-metrics/statsd
Processes and configuration for receiving StatsD metrics to Palo Alto Networks Cortex XCOR.
The Chronosphere Collector supports Graphite metrics and two methods of configuring
Graphite-related ingestion: StatsD or
[Carbon](/ingest/metrics-traces/collector/addl-metrics/carbon). To enable or make
changes to Graphite ingestion, contact [Cortex XCOR Support](/support).
StatsD sends unaggregated data to the Chronosphere Collector, which aggregates StatsD
metrics at a configurable interval and sends them to Palo Alto Networks Cortex XCOR.
## Deploy the Chronosphere Collector
StatsD metrics libraries primarily send metrics using the User Datagram Protocol
(UDP), which sends packets with no handshakes, retries, acknowledgments, or other
reliability mechanisms. Using UDP to send data over the network increases the risk
of losing metrics data due to lost packets or other network issues. Keeping communication
on the same Kubernetes node reduces these issues because local UDP communication
is generally more stable.
### Install Collector as a Kubernetes DaemonSet
To install the Chronosphere Collector, follow the steps described in
[Kubernetes Collector installation to retrieve metrics](/ingest/metrics-traces/collector/install/kubernetes).
## Configure Chronosphere Collector for StatsD metrics
Perform the following steps to configure Chronosphere Collector for StatsD metrics.
1. Use the configuration in the
[annotated manifest](https://storage.googleapis.com/chronosphere-release/latest/kubernetes/chronocollector.yaml)
from
[Kubernetes Collector installation to retrieve metrics](/ingest/metrics-traces/collector/install/kubernetes)
as a starting point.
2. Enable StatsD mode using the `push.statsd.enabled` YAML collection in the Collector
manifest:
```yaml theme={null}
push:
statsd:
enabled: true
```
3. Configure additional [StatsD configuration options](#statsd-configuration-options)
under the `push.statsd` YAML collection as necessary.
## StatsD configuration options
You can configure the following options in the Collector manifest for StatsD,
with the exception of those denoted in the following list as not configurable, which
appear in code configuration output but can't be overridden by changing their values.
* `enabled`: A Boolean option that determines whether to enable StatsD mode under
the `push.statsd.enabled` YAML collection in the Chronosphere Collector configuration.
Default: `true`.
* `listenAddress`: The address and port on which the server listens for connections.
Point StatsD clients sending metrics to this address and port. Default: `0.0.0.0:3031`.
* `listenProtocol`: Defines whether to use `udp` or `tcp` protocols. Default: `udp`.
* `aggregation`: A YAML collection that defines how the Collector aggregates data
samples.
When Chronosphere Collector ingests a data sample, it aggregates the data based
on the metric type and sends a single data point to Cortex XCOR that
represents the sample for the defined `interval`. These aggregations reduce network
egress and processed writes to Cortex XCOR.
Chronosphere Collector aggregates data points based on the metric type as follows:
* `counters` (not configurable): Sums all data point values for a time series
and sends the `SUM` as a [`DELTA COUNTER`](/control/shaping/shape-metrics/types#delta-counter).
* `gauges` (not configurable): Selects the `LAST` value for a time series in the
interval.
* `timers`: A YAML collection that defines the aggregation type of timers.
By default, Chronosphere Collector doesn't aggregate timer values.
Aggregation rules are required to aggregate timers at ingestion.
* `aggregationType`: Defines how Chronosphere Collector aggregates timers.
Default: `none`, which supports using Graphite to query metrics.
Set this value to `histogram` to instead send a
[`DELTA EXPONENTIAL HISTOGRAM`](/control/shaping/shape-metrics/types#delta-exponential-histograms)
that can be queried only by using PromQL.
* `interval`: Defines the amount of time before writing to Cortex XCOR.
Use an interval value that aligns with your licensed persisted writes and
cardinality ratio. A more frequent aggregation interval increases persisted writes.
Default: `60s`.
* `inactiveExpireAfter`: Determines the amount of time before Chronosphere Collector
evicts unused aggregation keys from the local cache. Default: `2m`.
## Example configuration
The following example YAML collection lists all of the configuration options for
receiving StatsD metrics with Chronosphere Collector:
```yaml theme={null}
push:
statsd:
enabled: true
listenAddress: 0.0.0.0:3031
listenProtocol: udp
aggregation:
timers:
# Valid values are "histogram" and "none"
aggregationType: none
interval: 60s
inactiveExpireAfter: "2m"
```
# Wavefront
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/addl-metrics/wavefront
Configure the Chronosphere Collector to accept metric payloads in Wavefront data format, including histogram distributions.
You can configure the Collector to accept metric payloads in Wavefront data format,
instrumented with a Wavefront client library, such as the
[wavefront-sdk-go](https://github.com/wavefrontHQ/wavefront-sdk-go) library.
## Basic configuration and data format
To enable Wavefront ingestion for the Collector, add the `wavefront` configuration
block under the `push` key in the Collector configuration:
```yaml theme={null}
push:
wavefront:
enabled: true
```
The metrics ingestion protocol used by Wavefront requires clients to submit their metrics to
compatible backends using `HTTP POST`. The payload should be sent as text in the
Wavefront data format. Each `HTTP POST` body can contain multiple
metrics and distributions, separated by newlines. Learn more about the [Wavefront Data
Format](https://docs.wavefront.com/wavefront_data_format.html) and [Sending Histogram
Distributions](https://docs.wavefront.com/proxies_histograms.html#sending-histogram-distributions).
The Collector Wavefront endpoint serves from the path `/wavefront/report` from the
`listenAddress`, which defaults to `0.0.0.0:3030`.
The Collector implementation for Wavefront can parse `collectDLabels` from the metric
name and store them as tags for the time series. For example, a metric name like
`k8s.service1[label1=value1,label2=value2]test` produces a metric name of
`k8s_service1test`, with labels `label1=value1` and `label2=value2`.
## Advanced configuration options
* `mode`
The mode field is optional and its default value is `regular`. The field can take other
values, such as `graphite` and `graphite_expanded`. This field controls metric name
sanitizing and storage in Palo Alto Networks Cortex XCOR. Similar to the DogStatsD configuration,
Wavefront configuration also supports this field and exhibits similar behavior.
```yaml theme={null}
push:
wavefront:
enabled: true
mode: graphite
```
* `defaultHistogramBuckets`
The histograms' default upper bounds for distribution-type metrics span from two
milliseconds to 3,600 seconds. In most cases, the default settings are sufficient. If
necessary, adjust these default values using the `defaultHistogramBuckets`
key in the configuration, as demonstrated here:
```yaml theme={null}
push:
wavefront:
enabled: true
mode: regular
defaultHistogramBuckets:
- upper: 0.004
- upper: 0.006
- upper: 0.008
- upper: 0.01
- upper: 0.02
- upper: 0.04
- upper: 0.06
- upper: 0.08
- upper: 0.1
- upper: 0.2
- upper: 0.4
- upper: 0.6
- upper: 0.8
- upper: 1.0
- upper: 1.5
- upper: 2.0
- upper: 2.5
- upper: 3.0
- upper: 3.5
- upper: 4.0
- upper: 4.5
- upper: 5.0
- upper: 5.5
- upper: 6.0
- upper: 6.5
- upper: 7.0
- upper: 7.5
- upper: 8.0
- upper: 8.5
- upper: 9.0
- upper: 9.5
- upper: 10
- upper: 15
- upper: 20
- upper: 25
- upper: 30
- upper: 35
- upper: 40
- upper: 45
- upper: 50
- upper: 55
- upper: 60
- upper: 150
- upper: 300
- upper: 450
- upper: 600
- upper: 900
- upper: 1200
- upper: 1500
- upper: 1800
- upper: 2100
- upper: 2400
- upper: 2700
- upper: 3000
- upper: 3300
- upper: 3600
```
# Configure your Chronosphere Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/configure
Define a Chronosphere Collector manifest that sets the installation method and scrape endpoints, then update it in your cluster.
To install and use the Chronosphere Collector, you define a manifest that describes
how the Collector operates. Manifests are static YAML files that include details such
as the installation method for the Collector and what endpoints the Collector scrapes
to ingest data.
You can base your manifest on
[this example](https://storage.googleapis.com/chronosphere-release/latest/kubernetes/chronocollector.yaml),
which contains details about common configuration options when installing the
Collector with Kubernetes to retrieve metric data.
You can modify the default Collector manifest to:
* [Apply recommended optimizations](/ingest/metrics-traces/collector/configure/optimizations).
* [Monitor Kubernetes resources](/ingest/metrics-traces/collector/discover/monitor-kubernetes).
## Modify the Collector manifest
If you modify the Collector configuration manifest, you must send the updated
manifest to the cluster and then restart the Collector:
1. Apply the updated manifest to the cluster:
```shell theme={null}
kubectl apply -f path/to/manifest.yml
```
2. Restart the Collector to propagate the changes:
**DaemonSet**
```shell theme={null}
kubectl rollout restart daemonset/chronocollector
```
**Deployment**
```shell theme={null}
kubectl rollout restart deployment/chronocollector
```
# Scrape Prometheus native histograms
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/configure/native-histograms
Configure the Chronosphere Collector to scrape Prometheus native histograms, and control histogram cost and backward compatibility.
To scrape Prometheus native histograms, you must configure the Collector to enable
native histogram scraping.
Palo Alto Networks Cortex XCOR persists Prometheus native histograms as a
[histogram metric type](/control/shaping/shape-metrics/types#histogram).
You can define aggregation rules to control histogram costs. For more information,
see [supported histogram aggregation operations](/control/shaping/shape-metrics/rules/rollup#histograms-aggregation-operations).
Histogram persisted writes, persisted cardinality, and matched writes consume
[Histogram Metric License](/administer/limits-licensing/concepts/capacity-licensing#histogram-metrics-license)
capacity.
## Backward compatibility
Prometheus clients don't support exposing native histograms in the text-based exposition
format. To scrape native histograms, Chronosphere Collector negotiates the Protobuf
format for scraping.
The change to scrape the Protobuf format can cause problems for backward compatibility.
Depending on the Prometheus client, the value for classic histogram `le` labels and
summary quantile labels appear as an integer in text format (`le="50"`) and a decimal
number (`le="50.0"`) in Protobuf format.
Because these values are strings, queries that filter by the integer label value
stop working when the `le` values are in a decimal number format. For more information,
see the
[Prometheus documentation](https://prometheus.io/docs/prometheus/latest/feature_flags/#native-histograms).
The Chronosphere Collector provides backward compatibility by dual-scraping the
text-based format and the Protobuf format. The Collector first scrapes the Protobuf
exposition and keeps only native histogram metrics. The Collector then scrapes the
text-based format for all other metrics to preserve the `le` value format in histogram
and quantile time series. Dual-scraping ensures backward compatibility and adds
only minor overhead.
## Migrate from classic Prometheus histograms to native histograms
The Prometheus Java and Go clients support Prometheus native histograms. Because
native histograms are an experimental feature, use the latest version of the Prometheus
Java and Go clients for the best experience.
### Prometheus client configuration
The Prometheus Java client maintains both
[classic and native histogram representation](https://prometheus.github.io/client_java/api/io/prometheus/metrics/core/metrics/Histogram.html)
by default. It exposes the classic histogram representation in the text-based format
and the native histogram representation in the Protobuf format.
The Go Prometheus client can also expose both classic and native histogram
representations. However, unlike the Java client it requires you to opt-in to each
bucket layout. To make the classic histogram available for scraping, users must
explicitly define the
[custom bucket layouts](https://github.com/prometheus/client_golang/blob/6e3f4b1091875216850a486b1c2eb0e5ea852f98/prometheus/histogram.go#L394).
To make the native histogram representation available, users must set a value for
[`NativeHistogramBucketFactor`](https://github.com/prometheus/client_golang/blob/6e3f4b1091875216850a486b1c2eb0e5ea852f98/prometheus/histogram.go#L399).
> [!NOTE]
>
> The `Buckets` field configures classic histograms. To collect exponential histograms,
> use the `NativeHistogramBucketFactor` parameter.
### Chronosphere Collector configuration
Start by configuring the Chronosphere Collector to collect both the classic and native
histogram representations. After you've built up enough historical data and modified
your queries to use native histograms, you can modify the Collector configuration
to scrape only the Protobuf format.
Collect both classic and native histogram representations for at least as long as
your query time windows. For example, if you have service-level objective queries
with a 30-day look-back period, collect both representations for at least 31 days
before changing your settings to scrape only the Protobuf format.
### Recommended initial configuration
Cortex XCOR recommends the following Collector configuration when initially
transitioning from classic histograms to native histograms. The configuration sets up
the Collector to:
* Negotiate scraping both the Protobuf and text-based expositions.
* Scrape native histograms from the Protobuf exposition when present.
* Scrape all other metrics from the text-based exposition.
* Send both the classic and native histogram representations to Cortex XCOR,
when a histogram exists in both formats.
```yaml theme={null}
scrape:
nativeHistograms:
enabled: true # Enables scraping native histograms. Defaults to false.
defaults:
scrapeClassicHistograms: true # Sends both the classic and native histogram
# representation when both are present. Defaults to false.
```
### Fully-migrated configuration
After you've collected enough histogram data and have modified your queries to query
the native histogram representation, you can configure the Collector to no longer
send the classic histogram representation.
The following configuration configures the Collector to:
* Negotiate scraping both the Protobuf and text-based expositions.
* Scrape all metrics from the Protobuf exposition when present.
```yaml theme={null}
scrape:
nativeHistograms:
enabled: true # Enables scraping native histograms. Defaults to false.
```
# Chronosphere Collector optimizations
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/configure/optimizations
Apply recommended and optional Chronosphere Collector optimizations, such as ingestion buffering, for Kubernetes and Prometheus.
The following configurations provide different optimizations for the Chronosphere
Collector. Although their use isn't required, some of these configurations are
recommended, and all of them can optimize the Collector in different ways, depending
on your needs.
These configurations apply to running the Collector with either Kubernetes or
Prometheus.
> [!NOTE]
>
> If you modify a Collector manifest, you must
> [update it in the cluster and restart the Collector](/ingest/metrics-traces/collector/configure#modify-the-collector-manifest).
## Recommended optimizations
The following configurations are recommended for use with the Collector.
### Enable ingestion buffering
The Collector can retry a subset of metric upload failures (explicitly excludes
rate-limited uploads and malformed metrics).
To configure ingestion buffering, create a writable directory and pass it to the
Collector to store this data.
```yaml theme={null}
ingestionBuffering:
retry:
enabled: true
directory: /path/to/WRITE_DIRECTORY
# How long individual metric uploads should be retried before being considered permanently failed
# Values greater than 90 seconds may lead to unexpected behavior and are not supported
defaultTTLInSeconds: 90
# The Collector will use strictly less than this amount of disk space.
maxBufferSizeMB: 1024
```
Replace *`WRITE_DIRECTORY`* with the writable directory the Collector can use for
ingestion buffering. With Kubernetes, you can use an
[`emptyDir`](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) volume
mount.
You can disable ingestion buffering for individual types of metrics. For example, to
disable ingestion buffer retries for Carbon metrics, add a `push.carbon` YAML
collection to the Collector configuration file and define ingestion buffering for
Carbon metrics:
```yaml theme={null}
push:
carbon:
retry:
disabled: true
# You can also adjust the TTL for this type of metric here
# ttlInSeconds: 30
```
### Configure connection pooling
> [!NOTE]
>
> Connection pooling is enabled by default with a pool size of `1`.
A single Collector instance is capable of high throughput. However, if the Collector
sends metrics at more than 100 requests per second, increase the number of pooled
backend connections to improve overall throughput in the client.
If you enable self-scraping, you can submit the following query with Metrics Explorer
to verify the connection pooling setting:
```text theme={null}
sum by(instance) (rate(chronocollector_gateway_push_latency_count[1m])) > 100
```
To configure connection pooling, add the following YAML collection and define the
values appropriately:
```yaml theme={null}
backend:
connectionPooling:
# Enables connection pooling. By default, this is enabled.
enabled: true
# The pool size is tunable with values from [1,8]. If not specified and pooling is enabled, then
# the default size is 1.
poolSize: 1
```
### Enable staleness markers
When a scrape target disappears or doesn't return a sample for a time series that was
present in a previous scrape, queries return the last value. After five minutes,
queries return no value, which means queries might return out-of-date data.
By enabling staleness markers, the Collector can hint to the database that a time
series has gone stale, and exclude it from query results until it reappears. A
staleness marker gets published when the target disappears or doesn't return a
sample. Staleness markers are disabled by default in the Collector configuration.
> [!WARNING]
>
> Staleness markers are a best effort optimization.
>
> If a Collector instance restarts on the last scrape before a sample isn't provided
> for a time series, a staleness marker isn't published.
There is a memory cost to enabling staleness markers. The memory increase is
dependent on the time series scraped and their labels.
For example, if the Collector is scraping 500 time series per second, memory usage
increases by about 10%. If it's scraping 8,000 time series per second, memory usage
increases by about 100%. If the Collector has self-scraping enabled, submit the
following query with Metrics Explorer to review the scraped time series:
```text theme={null}
rate(chronocollector_scrape_sample[5m])
```
To enable staleness markers, add the following YAML collection to your Collector
configuration:
```yaml theme={null}
scrape:
enableStalenessMarker: true
```
## Additional configurations
The following configurations are available for your use, as needed.
### Modify the default compression algorithm
The Collector uses [Zstandard](https://github.com/facebook/zstd)
(`zstd`) as the default compression algorithm instead of `snappy`. The `zstd`
algorithm can greatly reduce network egress costs, which can reduce the data flowing
out of your network by up to 60% compared to `snappy`. On average, `zstd` requires
about 15% more memory than `snappy`, but offers a compression ratio that's 2.5 times
greater.
By default, zstd compression concurrency is capped at 1, and all requests must synchronize
access. This limits the memory overhead and CPU processing required for compression.
This can also reduce throughput, although the reduction is limited. If your Collector
encounters processing bottlenecks, you can increase the concurrency value:
```yaml theme={null}
backend:
zstd:
concurrency: 1
```
Similarly, you can tune the compression level. With a `level` setting, which supports a
range of values `["fastest", "default", "better", "best"]` that provide increasing orders
of compression. The Collector defaults to `default`, which corresponds to Level 3
zstd compression. `best` strives for the best compression regardless of CPU cost, and
`better` typically increases the CPU cost by 2-3x. The 2.5x improvement was achieved with
`level: default` compression and `concurrency: 1`.
```yaml theme={null}
backend:
zstd:
concurrency: 1
level: "default" # fastest, default, better, and best are acceptable values.
```
The following graph shows the compression difference between using `zstd` instead of
`snappy` as the default compression algorithm. Although `snappy` provides 10 times
(10x) the amount of compression, `zstd` provides roughly twenty-five times (25x)
compression.
> [!NOTE]
>
> The compression savings realized in your environment greatly depends on the format of
> your data. For example, the Collector can achieve higher compression with Prometheus
> data, but each payload contains more data than StatsD.

If this tradeoff doesn't work for your environment, you can modify the Collector
configuration file to instead use `snappy`:
```yaml theme={null}
backend:
compressionFormat: "snappy"
```
### Implement environment variables
Environment variable expansion is a powerful concept when defining a Collector
configuration. Expansions use the syntax `${ENVIRONMENT_VARIABLE:"VALUE"}`, which you
can use anywhere to define per-environment configurations dynamically.
For example, the Collector manifests provided in the
[Kubernetes installation](/ingest/metrics-traces/collector/install/kubernetes) page include
an environment variable named `KUBERNETES_CLUSTER_NAME` that refers to the Kubernetes
namespace. You can define a value for this variable in your Collector manifest under
the `spec.template.spec.containers.env` YAML collection:
```yaml theme={null}
spec:
template:
spec:
containers:
env:
- name: KUBERNETES_CLUSTER_NAME
value: CLUSTER_NAME
```
Replace *`CLUSTER_NAME`* with the name of your Kubernetes cluster.
Refer to the
[Go `Expand` documentation](https://pkg.go.dev/go.uber.org/config#Expand) for more
information about environment variable expansion.
> [!NOTE]
>
> [Environment variable expansions](/ingest/metrics-traces/collector/configure/optimizations#implement-environment-variables)
> and
> [Prometheus relabel rule](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config)
> regular expression capture group references can use the same syntax.
> For example, `${1}` is valid in both contexts.
>
> If your relabel configuration uses Prometheus relabel rule regular expression capture
> group references, and they are in the `${1}` format, escape the syntax by adding an
> extra `$` character to the expression such as `$${1}`.
### Define the `listenAddress`
The `listenAddress` is the address that the Collector serves requests on. It supports
the `/metrics` endpoint and the
[import endpoints](/ingest/metrics-traces/collector/addl-metrics/prom-openmetrics#prometheus-and-openmetrics-ingestion)
if enabled. You can also configure the `listenAddress` by using the environment
variable `LISTEN_ADDRESS`.
The default value is `0.0.0.0:3030`.
### Set the logging level
You can control the information that the Collector emits by setting a logging level
in the configuration file.
To set a logging level, add the following YAML collection to your configuration:
```yaml theme={null}
logging:
level: ${LOGGING_LEVEL:LEVEL}
```
Replace *`LEVEL`* with one of the following values. Use the `info` logging level for
general use.
| Logging level | Description |
| - | - |
| `info` | Provides general information about state changes, such as when adding a new scrape target. |
| `debug` | Provides additional details about the scrape discovery process. |
| `warn` | Returns information related to potential issues. |
| `error` | Returns error information for debugging purposes. |
| `panic` | Don't use this logging level. |
#### Temporarily change the Collector logging level
The Collector exposes an HTTP endpoint available at the `listenAddress` that
temporarily changes the logging level of the Collector.
The `/set_log_level` endpoint accepts a JSON body with parameters.
The following request sets the logging level to `debug` for a duration of 90 seconds:
```shell theme={null}
curl -X PUT http://localhost:3030/set_log_level -d '{"log_level": "debug", "duration": 90}'
```
* `log_level`: Required. Defines the logging level.
* `duration`: Optional: Defines the duration to temporarily set the logging level
for, in seconds. Default: `60`.
> [!NOTE]
>
> If you send a new request before a previous request's duration has expired, the
> previous request is overridden with the latest request's parameters.
### Add global labels
You can add global or default labels using:
* [A static list](#labels-from-a-configuration-list)
* [An external JSON file](#labels-from-an-external-file)
* [Both a static list and an external file](#labels-from-both-a-configuration-list-and-an-external-file)
> [!WARNING]
>
> If you define a global label with the same name as the label of an ingested metric,
> the Collector respects the label for the ingested metric and doesn't overwrite it.
#### Labels from a configuration list
If you're using either Kubernetes or Prometheus discovery, you can add default labels
as key-value pairs under the `labels.defaults` YAML collection:
```yaml theme={null}
labels:
defaults:
my_global_label: ${MY_VALUE:""}
my_second_global_label: ${MY_SECOND_VALUE:""}
```
If you're using Kubernetes, you can append a value to each metric sent to
Palo Alto Networks Cortex XCOR by adding the `KUBERNETES_CLUSTER_NAME`
environment variable as a default label under the
`labels.defaults.tenant_k8s_cluster` YAML collection:
```yaml theme={null}
labels:
defaults:
tenant_k8s_cluster: ${KUBERNETES_CLUSTER_NAME:""}
```
Refer to the [Kubernetes documentation](https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/)
for more information about pod fields you can expose to the Collector within
manifest.
For Prometheus discovery, you can add labels to your job configuration using the
`labels` YAML collection. For example, the following configuration adds `rack` and
`host` to every metric:
```yaml theme={null}
static_configs:
- targets: ['0.0.0.0:9100']
labels:
host: 'foo'
rack: 'bar'
```
#### Labels from an external file
You can define labels in an external JSON file in the `labels.file` YAML collection:
```yaml theme={null}
labels:
file: "labels.json"
```
You then add key-value pairs in the `labels.json` JSON file:
```json theme={null}
{
"default_label_1": "default_val_1",
"default_label_2": "default_val_2"
}
```
#### Labels from both a configuration list and an external file
If you specify labels in both the configuration and an external file, the Collector
uses the combined list of default labels, if there are no duplicated keys defined
with both methods.
> [!WARNING]
>
> If you define a label key both in the static list in configuration and the external
> JSON file, the Collector reports an error and fails to start.
To specify default labels in both input sources:
* Add key-value pairs under the `label.defaults` YAML collection.
* Specify an external JSON file in the `labels.file` YAML collection.
```yaml theme={null}
labels:
defaults:
default_label_1: "default_val_1"
default_label_2: "default_val_2"
file: "labels.json"
```
You then add key-value pairs in the `labels.json` JSON file:
```json theme={null}
{
"default_label_3": "default_val_3",
"default_label_4": "default_val_4"
}
```
In this example, the Collector uses all four default labels defined.
### Configure runtime memory limits
The Collector sets a runtime memory limit of 85% of the container (process cgroup)
memory quota under Linux, allowing automatic tuning outside of Kubernetes installations.
You can customize these limits by configuring settings in the `performance` section
of the Collector configuration.
```yaml theme={null}
performance:
# enforceSoftMemoryLimit enables automatic turning of GOMEMLIMIT from environment
# (Linux cgroups) limits. Enabled by default.
enforceSoftMemoryLimit: true
# reservedMemoryPercent controls how much memory to set aside for non-heap use,
# if memory quota was autodetected from cgroup limits.
# Go runtime memory limit will be set to $quota - ($quota * reservedMemoryPercent / 100).
# For more information, see https://go.dev/doc/gc-guide#Memory_limit
reservedMemoryPercent: 15
```
### Configure metrics batching
> Requires [Chronosphere Collector](/ingest/metrics-traces/collector) version 0.114.0 or later.
The Collector batches metrics across requests to improve efficiency when sending
metrics to Cortex XCOR. For example, the Collector sends a batch of metrics
scraped from multiple scrape jobs in a single request to Cortex XCOR metrics
ingestion endpoint, rather than creating separate requests to send metrics from each
scrape job. The Collector similarly batches metrics from push protocols, such as
Pushgateway and DogStatsD.
The Collector batches metrics on a per-protocol basis, with separate batches for
Prometheus scraped metrics, Pushgateway, DogStatsD, and other protocols.
The `requestBatching` settings, configured in the `backend` YAML collection, apply
globally to each independent protocol queue.
> [!WARNING]
>
> **Don't change the default settings** unless advised to do so by Cortex XCOR Support.
> The following example documents these settings but intentionally comments them out.
```yaml theme={null}
# backend:
# requestBatching:
# disabled: false
# # maxConcurrentRequests limits the max number of in-flight requests.
# maxConcurrentRequests: 50
# # maxBufferSize is a limit in bytes for in-flight data payloads. Requests are
# # rejected if an amount of bytes larger than this value is already in flight,
# # similar to `maxConcurrentRequests`.
# maxBufferSize: 1073741824
# # batchTimeout sets the maximum delay for requests if the minimum batch threshold
# # hasn't been reached.
# batchTimeout: 5s
# # maxRequestSize is the threshold in bytes that triggers a backend request.
# maxRequestSize: 131072
```
# Debug endpoints
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/debugging
How to debug Chronosphere Collector issues by using available HTTP endpoints.
The Chronosphere Collector exposes HTTP endpoints to return information about
the Collector that can help with debugging issues. The Collector enables these
endpoints by default. To disable them, set [`debug.disabled`](#debug-configuration)
to `true` in the Collector manifest.
> [!NOTE]
>
> In Collector version 0.118.0 and later, debug endpoints are bound to loopback
> or localhost by default. For more information about the settings to override
> this default behavior, see [Debug configuration](#debug-configuration).
## Access the debug endpoints
All endpoints except `/set_log_level` are clickable links on the `/debug` HTML page,
and are also directly accessible with a `GET` request.
1. In the Collector manifest, enable Prometheus discovery and configure at least one
scrape configuration:
> [!NOTE]
>
> You must complete this step to access the debug endpoints, regardless of whether
> you're using the Collector to scrape Prometheus endpoints for metrics.
```yaml theme={null}
prometheus:
enabled: true
scrape_configs:
- job_name: 'access_debug'
scrape_interval: 30s
scrape_timeout: 15s
static_configs:
- targets: ['192.168.192:9100']
```
2. To establish a connection with the Collector, use a method compatible with your
Collector installation method.
> [tab] Kubernetes
>
> For Kubernetes installations, set up port forwarding to access the debug endpoint:
>
> ```shell theme={null}
> kubectl port-forward chronocollector-POD_NAME LISTEN_PORT
> ```
>
> Replace the following:
>
> * *`POD_NAME`*: The name of the Kubernetes pod where your Collector instance is
> running.
> * *`LISTEN_PORT`*: The port where the Collector serves debug requests. The value of
> [`debug.listenAddress`](#debug-configuration) defines this port. If no value
> is set, the default port is `3030`.
> [tab] Standalone
>
> For standalone installations, use one of the following methods:
>
> * (Recommended) Use SSH to directly access your host.
>
> * Configure the Collector to listen to a specific address by setting a value for
> [`debug.listenAddress`](#debug-configuration).
>
> * Configure the Collector to set
> [`debug.exposeDebugPagesOnAllInterfaces`](/ingest/metrics-traces/collector/debugging#debug-configuration)
> to `true`. Use with caution, as enabling this setting can publicly expose
> debug endpoints.
3. Open your browser and navigate to `HOSTPORT/debug`. Replace *`HOSTPORT`*
with the relevant value based on the method and configuration
settings you used in step 2:
> [tab] Kubernetes
>
> Replace *`HOSTPORT`* with the value `localhost:3030`.
> [tab] Standalone
>
> * If you used SSH to directly access your host, replace *`HOSTPORT`*
> with the value `localhost:3030`.
>
> * If you set a value for `debug.listenAddress`, replace *`HOSTPORT`* with the
> same value you set for `debug.listenAddress`.
>
> * If you set `debug.exposeDebugPagesOnAllInterfaces` to `true`, replace
> *`HOSTPORT`* with any valid address that your server listens on.
> [!NOTE]
>
> To make a `GET` request to any debug endpoint, query
> `http://HOSTPORT/debug/`, replacing *`HOSTPORT`* with the relevant
> value.
4. Click one of the [available endpoints](#available-debug-endpoints) from the list.
## Available debug endpoints
* `/debug`
Displays an HTML page that lists all debug endpoints, each of which is accessible by
clicking an endpoint from the list. This page also displays a table of active scrape
targets, which includes two columns:
* **Target Info:** Lists configuration details for each scrape target.
* **Last Scrape Result:** For each scrape outcome, lists information about that
outcome. If available, a decoded body sample shows a portion of the most recent
scrape output.
* `/debug/bundle`
Downloads a `tar.gz` file that contains the output of all debug endpoints. The
file format is `node-name--date--time.tar.gz`, where `node-name` is the name of the
node the Collector runs in.
* `/debug/collector_runtime_memory_stats`
Returns runtime memory metrics for the Collector.
* `/debug/config_dump`
Returns a JSON representation of the Collector configuration settings defined in
the `raw_config`, combined with the values for those settings calculated at runtime.
Responses from this endpoint might contain sensitive credentials.
In Collector version 0.118.0 and later, this endpoint is disabled by default.
To enable it, set `debug.enableRawConfig` to true.
* `/debug/endpoint_slices`
Returns a JSON list of all Kubernetes EndpointSlices the Collector detects.
* `/debug/job_configs`
Returns a JSON list of all computed Kubernetes jobs created from the Collector
configuration.
* `/debug/pods`
Returns a JSON list of all Kubernetes pods the Collector detects.
* `/debug/pprof`
Serves a protocol buffer of the Collector in
[pprof](https://github.com/google/pprof) format.
* `/debug/raw_config`
Returns the raw Collector configuration file as-is, without runtime-computed values.
Responses from this endpoint might contain sensitive credentials.
In Collector version 0.118.0 and later, this endpoint is disabled by default.
To enable it, set `debug.enableRawConfig` to true.
* `/debug/service_monitors`
Returns a JSON list of all dynamic service monitor configurations the Collector
tracks.
* `/debug/set_log_level`
Accepts a `PUT` request to temporarily change the logging level of the Collector
for a specified duration.
Refer to [temporarily change the Collector log level](/ingest/metrics-traces/collector/configure/optimizations#temporarily-change-the-collector-logging-level)
for more information.
* `/debug/services`
Returns a JSON list of all Kubernetes Services the Collector detects.
* `/debug/targets`
Returns a JSON list of key-value pairs that represent all Kubernetes targets the
Collector monitors. The first element is the Collector configuration, followed by a
list of all scrape configurations created from the configuration. The endpoint
doesn't display Graphite targets.
* `/debug/version`
Returns a JSON representation of the Collector version information. This is the
same information the Collector displays at startup.
## Debug configuration
The following Collector configuration settings control the behavior of debug endpoints.
> [!WARNING]
>
> By default, debug endpoints are served only through loopback or localhost. If
> `debug.exposeDebugPagesOnAllInterfaces` is set to `true`, or if a value is set
> for `debug.listenAddress`, this restriction is no longer enforced.
>
> When this restriction isn't enforced, remote hosts are able to access
> debug endpoints, which can expose sensitive internal data.
```yaml theme={null}
debug:
disabled: false
exposeDebugPagesOnAllInterfaces: false
listenAddress: ""
enableRawConfig: false
```
| Setting | Description | Default |
| - | - | - |
| `debug.disabled` | If `true`, disables all debug endpoints. Requires Collector version 0.117.0 or later. | `false` |
| `debug.exposeDebugPagesOnAllInterfaces` | If `true`, debug endpoints are served on all interfaces that the Collector listens to. Palo Alto Networks Cortex XCOR recommends against enabling this setting in production environments. | `false` |
| `debug.listenAddress` | Overrides the default address and port for debug endpoints. This value is distinct from the [global `listenAddress`](/ingest/metrics-traces/collector/configure/optimizations#define-the-listenaddress). | *none* |
| `debug.enableRawConfig` | If `true`, enables the `/debug/config_dump` and `/debug/raw_config` endpoints. | `false` |
# Configure Chronosphere Collector service discovery for Prometheus metrics
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/discover
Compare Chronosphere Collector service discovery methods, including ServiceMonitors, Kubernetes annotations, and Prometheus discovery.
Chronosphere Collector supports several mechanisms to discover which metrics applications
to scrape Prometheus metrics from:
* [ServiceMonitors](#servicemonitors) (each node)
* [Kubernetes annotations](#kubernetes-annotations) (each node)
* [Prometheus service discovery](#prometheus-service-discovery) (per cluster)
Using `ServiceMonitors` or Kubernetes annotations (or a combination of both) are
recommended for most deployments.
> [!NOTE]
>
> Use push-based collection mechanisms for use cases where jobs can't be scraped
> automatically, such as AWS Lambda, Google Cloud Functions, or ephemeral batch jobs.
## ServiceMonitors
`ServiceMonitors` are a custom resource definition (CRD) you can use to define scrape
configurations and options in a separate Kubernetes resource.
> [!NOTE]
>
> Discovery is scoped to the targets on the local node by default, which requires you
> to deploy the Collector as a [DaemonSet](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector)
> for this method of service discovery.
### Prerequisites
Run the following command to install the
[`ServiceMonitor` CRD](https://prometheus-operator.dev/docs/getting-started/design/#servicemonitor)
from the full Prometheus Operator, using the file in the `kube-prometheus-stack`
Helm chart:
```shell theme={null}
kubectl apply -f https://raw.githubusercontent.com/prometheus-community/helm-charts/e46dc6360b6733299452c8fd65d304004484de79/charts/kube-prometheus-stack/crds/crd-servicemonitors.yaml
```
> [!NOTE]
>
> Palo Alto Networks Cortex XCOR supports only fields in version 0.44.1 of the Prometheus Operator.
### Enable ServiceMonitor discovery
To enable ServiceMonitor discovery in the Collector, make the following configuration
changes:
1. Add the following options after the `ClusterRole` resource in the manifest under
`rules`:
```yaml theme={null}
kind: ClusterRole
rules:
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- list
- watch
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- get
- list
- watch
```
2. Enable the `ServiceMonitors` feature of the Collector by setting the following
keys to `true` in the manifest `ConfigMap` under the `discovery` > `kubernetes`
key:
```yaml theme={null}
discovery:
kubernetes:
enabled: true
serviceMonitorsEnabled: true
endpointsDiscoveryEnabled: true
podMatchingStrategy: VALUE
# Use additionalPodMatching only if necessary, such as when using a Virtual Kubelet.
# Requires Collector v0.113.0.
# additionalPodMatching:
# - labelSelector: your-label-with-node-name=${KUBERNETES_NODE_NAME:""}
# Dynamically start and stop this additional Pod matcher based
# on whether the default Pod matcher identifies any Pods that also
# match the given label selector.
# activationRule:
# podLabelSelector: service=xyz,app=abc
```
* `serviceMonitorsEnabled`: Indicates whether to use ServiceMonitors to generate job
configurations.
* `endpointsDiscoveryEnabled`: Determines whether to discover Endpoints. Requires
`serviceMonitorsEnabled` to be set to `true`.
* `podMatchingStrategy`: Determines how to use ServiceMonitors and annotations when
discovering targets. Accepts the following settings for *`VALUE`*:
* `all`: Allows any and all scrape jobs to be registered for a single pod.
* `annotations_first`: Matches annotations first. If no matches return, then other
matching can occur.
* `service_monitors_first`: Matches ServiceMonitors first. If no matches return,
then other matching can occur.
* `service_monitors_only`: Matches ServiceMonitors only.
* `additionalPodMatching`: An array that configures the discovery of additional
Pods in addition to those on the same Node as the Chronosphere Collector Pod,
such as when a set of other Pods is divided among the set of Chronosphere
Collector DaemonSet Pods. For example, you can configure this to discover and
scrape Pods that represent workloads within a [Virtual Kubelet](https://virtual-kubelet.io/)
whose host Pod is on the same Node as the Collector Pod.
Each item in the `additionalPodMatching` array must specify a `labelSelector`
or `fieldSelector` to filter which Pods to watch.
> [!NOTE]
>
> Additional Pod matching requires Chronosphere Collector v0.113.0 or later.
* `labelSelector`: Matches Pods where a label value matches the name of the
Node on which the Collector Pod DaemonSet instance is running. Define the
selector value to match additional Pods to be selected.
* `activationRule`: Adds an activation rule to `additionalPodMatching` to dynamically
start and stop Kubernetes API watches based on the presence of Pods running
on the same Node that match the `podLabelSelector`. If a given Collector
instance identifies a Pod on its respective Node that matches the activation rule's
label selector, that Collector will enable the additional watch stream. If
that Pod ceases to exist, the Collector will also stop the additional watch stream.
### Pod-based ServiceMonitor discovery
If you use a version of Kubernetes that doesn't support endpoint slices, you can set
`endpointsDiscoveryEnabled` to `false` to run the Collector in a mode that doesn't
discover Kubernetes endpoint slices or service resources.
In this mode, the Collector can still discover scrape targets using `ServiceMonitors`
under specific circumstances depending on the Kubernetes resource configuration. The
Collector uses the Pod's labels as the Service's labels. If the Pod's labels match
the Service's labels a `ServiceMonitor` that uses `targetPort` (container port) to
indicate the port to scrapes.
> [!WARNING]
>
> Because this discovery method can be very resource intensive, don't use this method
> for most deployments. Instead, contact [Cortex XCOR Support](/support) for more
> information about pod-based ServiceMonitor discovery.
#### Run as a DaemonSet with ServiceMonitors
If you want to run the Collector as a DaemonSet and scrape `kube-state-metrics`
through a Collector running as a Deployment, you need to update the manifest for both
Collector instances.
In your DaemonSet, add the `serviceMonitor` > `serviceMonitorSelector` key to your
manifest and define the following `matchExpressions` to ensure that your DaemonSet
only matches on `ServiceMonitors` that don't contain `kube-state-metrics`:
```yaml theme={null}
serviceMonitor:
serviceMonitorSelector:
matchAll: false
matchExpressions:
- label: app.kubernetes.io/name
operator: NotIn
values:
- kube-state-metrics
```
In your Deployment, add the same key and definitions to your manifest, but set the
`operator` value of the `matchExpressions` attribute to `In`. This setting ensures
that your Deployment only matches on `ServiceMonitors` that contain
`kube-state-metrics`:
```yaml theme={null}
serviceMonitor:
serviceMonitorSelector:
matchAll: false
matchExpressions:
- label: app.kubernetes.io/name
operator: In
values:
- kube-state-metrics
```
### Match specific ServiceMonitors
By default, the Collector ingests metrics from all `ServiceMonitor` sources. To match
specific instances, use a series of `AND` match rules under the
`serviceMonitor` > `serviceMonitorSelector` key and set the `matchAll` under the
`serviceMonitorSelector` key to `false`.
```yaml theme={null}
serviceMonitorSelector:
matchAll: false
```
The available match rules are:
* `matchLabelsRegexp`: Labels and a regular expression to match a value. For example:
```yaml theme={null}
matchLabelsRegexp:
labelone: '[a-z]+'
```
* `matchLabels`: Labels and a matching value. For example:
```yaml theme={null}
matchLabels:
labelone: foo
```
* `matchExpressions`: Depending on the operator set, labels that exist or don't
exist, or have or don't have specific values. For example:
* To match `ServiceMonitors` that have the `examplelabel` with values `a`
**or** `b` use the `In` operator:
```yaml theme={null}
matchExpressions:
- label: examplelabel
operator: In
values:
- a
- b
```
* To match `ServiceMonitors` that have the `examplelabel` without values
`a` **or** `b`, use the `NotIn` operator. The `NotIn` operator also matches
any `ServiceMonitors` without the `examplelabel` present:
```yaml theme={null}
matchExpressions:
- label: examplelabel
operator: NotIn
values:
- a
- b
```
* To match `ServiceMonitors` that have the `examplelabel` with **any** value,
use the `Exists` operator:
```yaml theme={null}
matchExpressions:
- label: examplelabel
operator: Exists
```
* To match `ServiceMonitors` that don't have the `examplelabel`, use the
`DoesNotExist` operator:
```yaml theme={null}
matchExpressions:
- label: examplelabel
operator: DoesNotExist
```
### Match endpoints without pods using ServiceMonitors
The default Collector configuration isn't suitable if you want to discover endpoints
but lack access to Pod information. For example, if you want to:
* Monitor the Kubernetes API server, which doesn't run on the same node as
Kubernetes workloads.
* Monitor endpoints that can be running anywhere in the cluster, but without using a
Collector running as a DaemonSet.
* Discover and scrape `kube-state-metrics`, which listen to the Kubernetes API server
and generate metrics about deployments, nodes, and pods.
> [!NOTE]
>
> If you're monitoring endpoints but don't have access to Pod information, the
> `ServiceMonitor` can't use the `TargetPort` attribute to target the endpoint and
> must instead use the `Port` attribute.
In these cases, run the Collector as a [Kubernetes Deployment](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector-using-a-deployment)
with a single instance, and set the `allowSkipPodInfo` attribute to `true`.
```yaml theme={null}
serviceMonitor:
allowSkipPodInfo: true
```
> [!WARNING]
>
> Use this attribute with caution. Setting `allowSkipPodInfo` to `true` for a DaemonSet
> can cause every Collector in the DaemonSet to attempt to scrape every endpoint in the
> cluster, or cause duplicate scrapes.
### Enable restricted mode
> Requires [Chronosphere Collector](/ingest/metrics-traces/collector) version 0.116.0 or later.
You can enable restricted mode for ServiceMonitors, which instructs the Collector
to ignore certain keys within `serviceMonitor.spec.endpoints` that could allow a
malicious ServiceMonitor to access files or URLs accessible by the Collector.
The default value is `false`. Cortex XCOR recommends setting this value to `true`
if you run the Collector in an environment where ServiceMonitors might be created
by actors who you don't fully trust.
```yaml theme={null}
serviceMonitor:
restrictedMode: true
```
If restricted mode is enabled, the Collector ignores the following keys within
`serviceMonitor.spec.endpoints`:
* `BasicAuth`
* `BearerTokenFile`
* `BearerTokenSecret`
* `ProxyURL`
* `TLSConfig.{CAFile,CertFile,KeyFile}`
## Kubernetes annotations
> [!NOTE]
>
> Discovery is scoped to the targets on the local node by default, which requires you
> to deploy the Collector as a [DaemonSet](/ingest/metrics-traces/collector/install/kubernetes)
> for this method of service discovery.
For the Collector to start scraping the Pods in a Kubernetes cluster, set the
following `annotations` on each Pod in the cluster:
```yaml theme={null}
spec:
template:
metadata:
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '{port_number}'
```
The following manifest is an example of using these two annotations for a basic
[Node Exporter](https://github.com/prometheus/node_exporter) deployment. Based on
these annotations, by default, the Collector starts scraping the `/metrics` endpoint
on port `9100`.
```yaml theme={null}
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app.kubernetes.io/name: node-exporter
app.kubernetes.io/version: v1.0.1
name: node-exporter
namespace: monitoring
spec:
selector:
matchLabels:
app.kubernetes.io/name: node-exporter
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9100"
labels:
app.kubernetes.io/name: node-exporter
app.kubernetes.io/version: v1.0.1
spec:
containers:
- image: quay.io/prometheus/node-exporter:v1.0.1
name: node-exporter
# ...
```
You can set additional annotations to control other scrape options. For a complete
list of supported annotations, read the [scrape configuration documentation](/ingest/metrics-traces/collector/discover/scrape-configuration).
You can change the annotation prefix, which defaults to `prometheus.io/`, from the
`kubernetes` > `processor` section of the Collector `ConfigMap`.
After any changes, send the updated manifest to the cluster with the following
command:
```shell theme={null}
kubectl apply -f path/to/manifest.yml
```
> [!NOTE]
>
> If you modify a Collector manifest, you must
> [update it in the cluster and restart the Collector](/ingest/metrics-traces/collector/configure#modify-the-collector-manifest).
## Prometheus service discovery
> [!NOTE]
>
> If using Prometheus service discovery within Kubernetes,
> [deploy a single Collector as a Kubernetes Deployment](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector-using-a-deployment)
> per cluster. This is to avoid every Collector instance duplicating scrapes to all
> endpoints defined in the Prometheus service discovery configuration.
To enable Prometheus service discovery, set `discovery.prometheus.enabled` to `true`
in the Collector configuration. Provide the list of scrape configurations in the
`discovery.prometheus.scrape_configs` section. The following example uses the
[kubernetes\_sd\_config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config).
```yaml theme={null}
discovery:
prometheus:
enabled: true
scrape_configs:
- job_name: kubernetes-pods
honor_timestamps: true
scrape_interval: 30s
scrape_timeout: 30s
metrics_path: /metrics
scheme: http
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels:
[__meta_kubernetes_pod_annotation_prometheus_io_scrape]
separator: ;
regex: 'true'
replacement: $1
action: keep
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
separator: ;
regex: (.+)
target_label: __metrics_path__
replacement: $1
action: replace
- source_labels:
[__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
separator: ;
regex: ([^:]+)(?::\d+)?;(\d+)
target_label: __address__
replacement: $1:$2
action: replace
- separator: ;
regex: __meta_kubernetes_pod_label_(.+)
replacement: $1
action: labelmap
- source_labels: [__meta_kubernetes_namespace]
separator: ;
regex: (.*)
target_label: kubernetes_namespace
replacement: $1
action: replace
- source_labels: [__meta_kubernetes_pod_name]
separator: ;
regex: (.*)
target_label: kubernetes_pod_name
replacement: $1
action: replace
```
For details, see the
[Prometheus scrape configuration documentation](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config).
For a complete list of examples, see the examples section in the
[Prometheus GitHub repository](https://github.com/prometheus/prometheus/tree/main/documentation/examples).
### Set the Collector to scrape its own metrics
For the Collector to scrape its own metrics, add another job to the
`discovery.prometheus.scrape_configs` key:
```yaml theme={null}
# ...
- job_name: 'collector'
scrape_interval: 30s
scrape_timeout: 30s
static_configs:
- targets: ['0.0.0.0:3030']
# ...
```
# Discover and scrape Kubernetes resources with Chronosphere Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/discover/monitor-kubernetes
Configure the Chronosphere Collector to discover and scrape Kubernetes resources, including kubelet and cAdvisor metrics.
To monitor Kubernetes resources with Chronosphere Collector and ensure that your
clusters are healthy, use one of the following configuration methods.
## Monitor kubelet or cAdvisor metrics
If running in Kubernetes, you can configure the Collector to scrape kubelet or
cAdvisor metrics by setting the `kubeletMetricsEnabled` or `cadvisorMetricsEnabled`
flag to `true` under the `kubeletMonitoring` YAML collection.
For example:
```yaml theme={null}
discovery:
kubernetes:
# ...
kubeletMonitoring:
port: 10250
bearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token"
kubeletMetricsEnabled: true
cadvisorMetricsEnabled: true
probesMetricsEnabled: true
labelsToAugment: []
annotationsToAugment: []
```
* `port`: The port that the `kubelet` is running on. Default: `10250`.
* `bearerTokenFile`: The path to the file containing Collector's service account
token. Default: `"/var/run/secrets/kubernetes.io/serviceaccount/token"`.
* `kubeletMetricsEnabled`: Enables scraping kubelet metrics. Default: `false`.
* `cadvisorMetricsEnabled`: Enables scraping cAdvisor metrics. Default: `false`.
* `probesMetricsEnabled`: Enables collecting metrics on the status of liveness,
readiness, and startup kubelet probes for Kubernetes containers. Default: `false`.
* [`labelsToAugment`](#add-metadata-labels-from-pod-labels): Lists the metadata
labels from pod labels that the Collector adds to metrics.
* [`annotationsToAugment`](#add-metadata-labels-from-pod-annotations): Lists the
metadata labels from pod annotations the Collector adds to metrics.
> [!WARNING]
>
> When running the Collector in Kubernetes as a DaemonSet, you can configure the
> Collector to scrape kubelet or cAdvisor metrics from the node the Collector
> DaemonSet instance is running on. To configure this behavior, under the
> `kubeletMonitoring` YAML collection, set the `kubeletMetricsEnabled` or
> `cadvisorMetricsEnabled` flag to `true`The settings under the `kubletMonitoring`
> collection are applied only when the Collector is deployed as a DaemonSet.
>
> Enabling `kubeletMetricsEnabled`, `cadvisorMetricsEnabled`, or `probesMetricsEnabled`
> doesn't require the creation of additional ServiceMonitor definitions. Use
> [global rewrite configurations](/ingest/metrics-traces/collector/discover/scrape-configuration)
> to manipulate labels for metrics from these sources.
### Add metadata labels from pod labels
By default, container-level metrics don't include metadata labels like `service` or
`app`, which searches can include when querying for these metrics. To automatically
add these labels from pod labels, use the `labelsToAugment` flag to list the labels
that Collector adds to the metrics.
For example, to add the `app` label to the container level metrics for a `node-exporter`
DaemonSet deployment, use the following configuration under the `kubeletMonitoring`
key:
```yaml theme={null}
discovery:
kubernetes:
# ...
kubeletMonitoring:
# ...
labelsToAugment: ["app", ...]
```
This adds `app="node-exporter"` to these metrics, based on the following example
`node-exporter` manifest:
```yaml theme={null}
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app: node-exporter
name: node-exporter
namespace: monitoring
# ...
```
### Add metadata labels from pod annotations
By default, container-level metrics don't include metadata labels, which searches can
include when querying for these metrics. To automatically add these labels from pod
annotations, use the `annotationsToAugment` flag to list the labels the Collector
adds to the metrics.
For example, to add the `app_kubernetes_io_component` label to the container-level
metrics for a `node-exporter` DaemonSet deployment, use the following configuration
under the `kubeletMonitoring` key:
```yaml theme={null}
discovery:
kubernetes:
# ...
kubeletMonitoring:
# ...
annotationsToAugment: ["app.kubernetes.io/component", ...]
```
This adds `app_kubernetes_io_component="infrastructure"` to these metrics, assuming
the following example `node-exporter` manifest:
```yaml theme={null}
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
app.kubernetes.io/component: infrastructure
name: node-exporter
namespace: monitoring
# ...
```
## Map Kubernetes labels to Prometheus labels
The Collector lets you specify pod labels and annotations you want to keep as a
Prometheus label. This feature applies to pods only.
The following configuration example converts all pod labels called `my_label` and all
pod annotations called `my.pod.annotation` into Prometheus labels for the metrics
scraped from discovered pods. This is equivalent to a Prometheus `labelmap` rule, but
sanitizes the label names and values:
```yaml theme={null}
discovery:
kubernetes:
enabled: true
metadataConfig:
- resource: "pod"
annotationsToKeep:
- my.pod.annotation
labelsToKeep:
- my_label
```
## Discover `kube-system` endpoints
To discover endpoints in the `kube-system` namespace, set the
`kubeSystemEndpointsDiscoveryEnabled` flag to `true`. Because `kube-system` has many
constantly changing endpoints that might cause unnecessary load on the Collector, the
endpoint is disabled by default.
Using EndpointSlices significantly reduces the amount of load on the Kubernetes API
server.
> [!NOTE]
>
> If you modify a Collector manifest, you must
> [update it in the cluster and restart the Collector](/ingest/metrics-traces/collector/configure#modify-the-collector-manifest).
## Discover and scrape `kube-state-metrics`
You can use `ServiceMonitors` to scrape `kube-state-metrics`, which generate metrics
that track the health of deployments, nodes, and pods in a Kubernetes cluster.
Monitoring these metrics can help to ensure the health of your cluster because the
Collector expects to continually receive `kube-state-metrics`. If the Collector can't
scrape these metrics, it's likely your Kubernetes cluster is experiencing issues you
need to resolve.
Monitoring `kube-state-metrics` with a DaemonSet Collector is manageable for smaller
clusters, but can lead to out of memory (OOM) errors as the cluster scales.
Palo Alto Networks Cortex XCOR recommends running the Collector as a sidecar to take advantage of
staleness markers. The following steps assume that:
* You're running a separate Collector as a Deployment to monitor `kube-state-metrics`.
* You've already defined a Kubernetes Service and ServiceMonitor for `kube-state-metrics`.
If you're already running the Collector as a DaemonSet, you must update the manifest
for both Collector instances.
After installing the `ServiceMonitors` CRD, complete the following steps to discover
`kube-state-metrics`:
1. Download
[this manifest](https://storage.googleapis.com/chronosphere-release/latest/kubernetes/ksm-chronocollector.yaml).
2. In the `data` section, replace the values for `address` and `api-token` with
your Base64-encoded API token:
```yaml theme={null}
---
apiVersion: v1
data:
address:
api-token:
```
3. Apply the manifest:
```shell theme={null}
kubectl apply -f path/to/ksm-chronocollector.yaml
```
4. Confirm the `Deployment` is started and running, and view the logs of the pod.
1. Use `kubectl get pods` to list the pods:
```shell theme={null}
kubectl get pods
```
2. In the output, identify the pod to examine by its `NAME` column value. For example,
the pod name in the following output is `chronocollector-jtgfw`.
```text theme={null}
NAME READY STATUS RESTARTS AGE
chronocollector-jtgfw 1/1 Running 0 1m
...
```
3. Use `kubectl logs` to review the pod's logs:
```shell theme={null}
kubectl logs chronocollector-jtgfw
```
## Ingest Kubernetes API server metrics
The Kubernetes API Server provides REST operations and a frontend to a cluster's
shared state through which all other components interact. Unlike most other metrics
emitted from a cluster, Kubernetes doesn't expose API Server metrics by using a pod,
but instead exposes metrics directly from an endpoint in the API Server.
To ingest these metrics through traditional service discovery methods, you must
discover and scrape the endpoints directly. The Collector supports using
`ServiceMonitors` or job service discovery.
### Discover API Server metrics with ServiceMonitors
#### Discover metrics for a managed Kubernetes cluster
To use [ServiceMonitors](/ingest/metrics-traces/collector/discover#servicemonitors)
to discover and scrape API server metrics from a managed Kubernetes cluster, such
as Amazon Elastic Kubernetes Service (EKS) or Google Kubernetes Engine (GKE), enable
both the `allowSkipPodInfo` flag under the top level `serviceMonitor` key and the
`endpointsDiscoveryEnabled` flag under the `discovery.kubernetes` YAML collection
in the Collector configuration.
```yaml theme={null}
serviceMonitor:
allowSkipPodInfo: true
# ...
discovery:
kubernetes:
endpointsDiscoveryEnabled: true
```
> [!WARNING]
>
> If using this method, deploy the Collector as an
> [individual Kubernetes Deployment](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector-using-a-deployment)
> rather than a DaemonSet. This prevents multiple Collectors from scraping the same API
> Server metrics. Additionally, set the appropriate
> [ServiceMonitor matching](/ingest/metrics-traces/collector/discover#servicemonitors)
> to prevent other Collectors from discovering the API Server ServiceMonitor.
#### Discover metrics for a self-managed Kubernetes cluster
To use [ServiceMonitors](/ingest/metrics-traces/collector/discover#servicemonitors) to discover
and scrape API server metrics from a self-managed Kubernetes cluster, such as k0ps,
enable the `endpointsDiscoveryEnabled` flag under the `discovery.kubernetes` YAML
collection in the Collector configuration:
```yaml theme={null}
discovery:
kubernetes:
endpointsDiscoveryEnabled: true
```
> [!NOTE]
>
> In this configuration, you can deploy the Collector as a DaemonSet, which installs
> the Collector on the master nodes that run the Kubernetes API Server so the Collector
> can scrape it.
### Discover API Server metrics with the jobs service
To discover and scrape API Server metrics without using `ServiceMonitors`, you can
use the `jobs` section of the Collector configuration for service discovery.
> [!WARNING]
>
> If using this method, deploy the Collector as an
> [individual Kubernetes Deployment](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector-using-a-deployment)
> instead of as a DaemonSet. This prevents multiple Collectors from scraping the same
> API Server metrics.
The following is an example that discovers the API Server based on the value of the
`__meta_kubernetes_pod_label_k8s_app` label equal to `kube-apiserver` (found in the
API Server Service object).
```yaml theme={null}
jobs:
- name: kube-apiserver
selector:
kubernetes:
matchLabels:
__meta_kubernetes_pod_label_k8s_app: kube-apiserver
options:
scheme: https
http:
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
tls:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecureSkipVerify: true
relabels:
- sourceLabels: [__name__]
targetLabel: service
replacement: kube-apiserver
- sourceLabels: [__meta_kubernetes_pod_node_name]
targetLabel: node
```
# Scrape configuration using Kubernetes
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/discover/scrape-configuration
Set global, annotation, and job-level scrape configurations for the Chronosphere Collector.
When using Kubernetes discovery, Chronosphere Collector determines the options for
scraping endpoints based on this order:
1. Default global scrape configuration
2. [Global scrape configuration](/ingest/metrics-traces/collector/discover/scrape-configuration#global-scrape-configuration)
3. [Kubernetes annotations](/ingest/metrics-traces/collector/discover/scrape-configuration#kubernetes-annotations)
4. [Job configuration](/ingest/metrics-traces/collector/discover/scrape-configuration#define-jobs-configuration)
Any settings made by an earlier configuration are overwritten by a later configuration.
For example, the default scrape interval as set in the default global scrape configuration
is 10 seconds (`10s`). You can override this interval by setting a scrape configuration,
adding an annotation to a Kubernetes object, or adding a job configuration.
## Global scrape configuration
To apply those settings globally to all jobs, define the following default scrape
configuration:
```yaml theme={null}
scrape:
defaults:
metricsPath: "/metrics"
scheme: "http"
scrapeInterval: 10s
scrapeTimeout: 10s
honorLabels: false
honorTimestamps: true
followRedirects: true
relabels:
metricRelabels:
enableCompression: true
```
> The `followRedirects` option requires Chronosphere Collector version 0.117.0 or later.
You can override the global `scrape` configuration to set options for your instance.
If you don't specify a field, it uses the default values.
The [Prometheus `relabel_config`](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config)
configuration applies to `relabels` and `metricRelabels` parameters. This configuration
allows for advanced modifications to any target and its labels before Collector
ingests metrics.
By default, scrapes request gzip compression by using the `Accept-Encoding` header.
This is configured by the `enableCompression` option.
## Kubernetes annotations
You can use Kubernetes annotations to override any global defaults. The Collector
supports the following Prometheus annotations to enable scraping for a pod. By
default, `prometheus.io` prefixes each of these annotations, such as
`prometheus.io/scrape`. You can [change the annotation prefix](#change-annotation-prefix)
to a different value.
* `/scrape`: Determines whether to enable scraping. Excludes scraping the pod if
set to `false`.
* `/port`: The port to scrape on the pod.
* `/path`: The pod's metrics path.
* `/params`: HTTP URL parameters.
* `/scheme`: The connection protocol, either `http` or `https`.
* `/job`: Overrides the value of the `job` label.
* `/collectionInterval`: Determines how often to scrape endpoints. Default: `10s`.
* `/collectionTimeout`: The timeout for a scrape operation.
* `/serviceAccountBearerToken`: The token value, if using service account authentication.
* `/httpProxyURL`: The Proxy URL of connections to this pod.
* `/tlsServerName`: The host name when using TLS authentication.
* `/tlsInsecureSkipVerify`: Determines whether to verify a server's certificate.
Set to `true` to avoid verifying the server's certificate for validity.
The pod being scraped might use some of the following annotations. If so, the Collector
pod must also have either an environment variable or a file pointing to `files/env vars`.
* `/httpBasicAuthUsernameEnvVar`: The `Username` environment variable when using
basic authentication.
* `/httpBasicAuthPasswordEnvVar`: The `Password` environment variable when using
basic authentication.
* `/httpBasicAuthPasswordFile`: The path to a file containing a password when using
basic authentication.
* `/httpBearerTokenEnvVar`: The `Token` environment variable when using HTTP bearer
token authentication.
* `/httpBearerTokenFile`: The path to a file containing a bearer token when using
HTTP bearer token authentication.
* `/tlsCAFile`: The path to a CA certificate when using TLS authentication.
* `/tlsCertFile`: The path to a personal certificate when using TLS authentication.
* `/tlsKeyFile`: The path to a private key when using TLS authentication.
For example, if the Kubernetes pod to be scraped includes the following annotations:
```text theme={null}
prometheus.io/scrape=true
prometheus.io/port=8090
prometheus.io/httpBasicAuthUsernameEnvVar=USERNAME
httpBasicAuthPasswordEnvVar=PASSWORD
```
The Collector pod must define these environment variables to populate the
`httpBasicAuthUsernameEnvVar` and `httpBasicAuthPasswordEnvVar` annotations' values:
```text theme={null}
USERNAME=admin
PASSWORD=mypassword
```
### Change annotation prefix
You can change the annotation prefix by setting the environment variable
*`KUBERNETES_PROCESSOR_ANNOTATIONS_PREFIX`* as the value of the `annotationsPrefix` key
in the `processor` section of the `kubernetes` collection. The default value is
`prometheus.io/`.
```yaml theme={null}
kubernetes:
# ...
# processor defines configuration for processing pods discovered on Kubernetes.
processor:
# annotationsPrefix is the prefix for annotations that the Collector uses to scrape discovered pods.
annotationsPrefix: ${KUBERNETES_PROCESSOR_ANNOTATIONS_PREFIX:"prometheus.io/"}
```
> [!NOTE]
>
> If you modify a Collector manifest, you must
> [update it in the cluster and restart the Collector](/ingest/metrics-traces/collector/configure#modify-the-collector-manifest).
### Enable restricted mode
> Requires [Chronosphere Collector](/ingest/metrics-traces/collector) version 0.116.0 or later.
You can enable restricted mode for annotations, which instructs the Collector to
ignore certain annotations that could allow a malicious Pod to access files or
URLs accessible by the Collector. The default value is `false` . Palo Alto Networks Cortex
XCOR recommends
setting this value to `true` if you run the Collector in an environment where
Pods might be created by actors who you don't fully trust.
```yaml theme={null}
kubernetes:
# ...
processor:
annotationsRestrictedMode: true
```
If restricted mode is enabled, the Collector ignores the following annotations:
* `[annotationsPrefix]/httpBasicAuth{Username,Password}EnvVar`
* `[annotationsPrefix]/httpBasicAuthPasswordFile`
* `[annotationsPrefix]/httpBearerTokenEnvVar`
* `[annotationsPrefix]/httpBearerTokenFile`
* `[annotationsPrefix]/httpProxyURL`
* `[annotationsPrefix]/serviceAccountBearerToken`
* `[annotationsPrefix]/tls{CA,Cert,Key}File`
> [!NOTE]
>
> If you modify a Collector manifest, you must
> [update it in the cluster and restart the Collector](/ingest/metrics-traces/collector/configure#modify-the-collector-manifest).
### Scrape multiple ports
The `prometheus.io/port` annotation can accept a comma-separated list of the ports
to scrape, such as `prometheus.io/port: 1234,5678`.
The endpoints must both use the same path. For example both ports `1234` and `5678`
must expose Prometheus metrics on the `/metrics` path.
If you specify multiple ports, the pods must expose all ports in the list. The following
is an example of a container ports configuration in a pod manifest that exposes
both `1234` and `5678`:
```yaml theme={null}
ports:
- name: metrics
containerPort: 1234
- name: other_metrics
containerPort: 5678
```
### Define `jobs` configuration
When using annotations for scraping, you can configure the `jobs` collection to
override any of the defaults set in the global scrape configuration.
The following example contains the value types for the `jobs` collection:
```yaml theme={null}
jobs:
- name: "example_job"
options:
metricsPath: PATH
params: STRING
scheme: SCHEME
scrapeInterval: SCRAPE_INTERVAL
scrapeTimeout: SCRAPE_TIMEOUT
honorLabels: BOOLEAN
honorTimestamps: BOOLEAN
followRedirects: BOOLEAN
relabels: RELABEL_CONFIG
metricRelabels: RELABEL_CONFIG
enableCompression: BOOLEAN
```
> [!NOTE]
>
> The `name` value must be unique across all scrape configurations, and must match the
> job name set in the annotations. For example, `prometheus.io/job`.
For example, to change the `scrapeInterval` to `1m` and create a relabeling rule that
changes the name of the label `code` to `status_code` for the `api` job, add the
following configuration to the `config.yml` field of the `chronocollector-config`
ConfigMap:
```yaml theme={null}
jobs:
- name: api
options:
scrapeInterval: 1m
relabels:
- action: replace
regex: (.*)
replacement: $1
sourceLabels:
- code
targetLabel: status_code
```
> [!NOTE]
>
> If you modify a Collector manifest, you must
> [update it in the cluster and restart the Collector](/ingest/metrics-traces/collector/configure#modify-the-collector-manifest).
### Differences between `relabel` and `metricRelabels`
A Prometheus `relabel` configuration defines the targets you want to scrape and
the target labels. Using `relabel` rewrites the label set of a target before it's
scraped.
Collector applies `metricRelabels` after the scrape but before ingesting data. Use
`metricRelabels` if there are expensive metrics that you want to drop, or labels
coming from the scrape itself that you want to manipulate.
In this example, the `relabel` rule replaces the name of the label `code` to
`status_code` for the `api` job before scraping the metrics:
```yaml theme={null}
jobs:
- name: api
options:
scrapeInterval: 1m
relabels:
- action: replace
regex: (.*)
replacement: $1
sourceLabels:
- code
targetLabel: status_code
```
The following `metricsRelabel` rule replaces the `pod` and `job` labels for the
`cadvisor` job on `promremotebench-0` to `database`:
```yaml theme={null}
jobs:
- name: cadvisor
options:
metricRelabels:
- action: replace
regex: promremotebench-0;(.*)
replacement: $1
sourceLabels:
- pod
- job
targetLabel: database
```
> [!NOTE]
>
> [Environment variable expansions](/ingest/metrics-traces/collector/configure/optimizations#implement-environment-variables)
> and
> [Prometheus relabel rule](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config)
> regular expression capture group references can use the same syntax.
> For example, `${1}` is valid in both contexts.
>
> If your relabel configuration uses Prometheus relabel rule regular expression capture
> group references, and they are in the `${1}` format, escape the syntax by adding an
> extra `$` character to the expression such as `$${1}`.
#### `metricRelabels` actions
The following actions are available for `metricRelabels`:
* `replace`: Match a regular expression against the concatenated `sourceLabels`.
Then, set `targetLabel` to `replacement`, with match group references (such as
`${1}` or `${2}`) in the replacement substituted by their value. If the regular
expression doesn't match, no replacement occurs.
* `keep`: Drop targets for which a regular expression doesn't match the concatenated
`sourceLabels`.
```yaml theme={null}
jobs:
- name: kubelet
options:
metricRelabels:
- action: keep
regex: (?i)(kubelet_volume_stats_available_bytes|kubelet_volume_stats_capacity_bytes)
sourceLabels: [__name__]
```
* `drop`: Drop targets for which the regular expression matches the concatenated
`sourceLabels`.
The following example demonstrates using `relabels` to drop the `__name__` on
`cadvisor` metrics:
```yaml theme={null}
jobs:
- name: cadvisor
options:
relabels:
- action: drop
regex: (.*)
sourceLabels: [__name__]
```
* `labelmap`: Match a regular expression against all label names. Then, copy the
values of the matching labels to the label names given by the replacement with
match group references (such as `${1}` or `${2}`) in the replacement substituted by
their value.
The following example uses `labelmap` to copy all labels containing
`__meta_kubernetes_service_label_` and keep only a portion:
```yaml theme={null}
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
```
In this example, the label `__meta_kubernetes_service_label_app='api'` is changed
to `app='api'`.
* `labeldrop`: Match a regular expression against all label names and remove any
label that from the set of labels.
The following example matches all label names that contain
`container_label_com_amazonaws_ecs_task_arn`:
```yaml theme={null}
metricRelabels:
- regex: 'container_label_com_amazonaws_ecs_task_arn'
action: labeldrop
```
* `labelkeep`: Match a regular expression against all label names and remove any
label that doesn't match from the set of labels.
The following example drops all label names that don't match `job`:
```yaml theme={null}
metricRelabels:
- regex: 'job'
action: labelkeep
```
# Install the Chronosphere Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/install
Compare Chronosphere Collector installation methods for collecting metrics with Kubernetes or a standalone binary and for receiving traces.
The Chronosphere Collector can either collect metrics data or receive trace data.
When collecting metrics data, the Collector *pulls* data it scrapes from Prometheus
endpoints. When receiving trace data, an app *pushes* data to a service, with the
Collector behind that service receiving the data.
Regardless of the installation method you use, Palo Alto Networks Cortex XCOR recommends deploying
separate, independent Collectors for metrics and for traces. This distinction means
that a Collector either collects metrics data or receives trace data.
## Collect metrics data
You can install the Collector to retrieve metrics data, either with Kubernetes or as
a standalone binary. When deployed within Kubernetes, the Collector scrapes
Prometheus endpoints exposed on pods, based on pod-level annotations.
### With Kubernetes
You can install the Collector with Kubernetes to collect metrics as:
* [A Kubernetes DaemonSet](/ingest/metrics-traces/collector/install/kubernetes) (recommended)
* [A Deployment](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector-using-a-deployment)
* [A sidecar](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector-as-a-sidecar)
Cortex XCOR recommends installing the Collector as a Kubernetes DaemonSet on each
node in a cluster to:
* Minimize cross-node network traffic within a cluster.
* Eliminate a single point of failure in case one node is offline.
* Provide the ability to switch to a standalone deployment if the Collector is
using too many resources.
### Without Kubernetes
If you don't use Kubernetes, or want to gather metrics from services not managed by
Kubernetes, you can install the Collector
[as a standalone binary](/ingest/metrics-traces/collector/install/standalone).
> [!NOTE]
>
> Docker images are `multiplatform` builds for both `linux/amd64` and `linux/arm64`.
> Cortex XCOR also offers
> [Linux binaries](/ingest/metrics-traces/collector/install/standalone#download-the-collector-binary-and-make-it-executable)
> for both of these platforms.
## Receive trace data
To receive trace data, Cortex XCOR recommends
[installing the Collector](/ingest/metrics-traces/collector/install/tracing) as a Kubernetes
Deployment, typically with a service in front to receive trace data. Your tracing app
pushes trace data to the service, which the Collector receives the data from.
# Kubernetes Collector installation to retrieve metrics
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/install/kubernetes
Install the Chronosphere Collector as a Kubernetes DaemonSet, Deployment, or sidecar to scrape Prometheus metrics from your cluster.
The recommended way to install the Chronosphere Collector to retrieve metrics data is
with a Kubernetes DaemonSet scraping endpoints, using either annotations or
ServiceMonitors. This configuration ensures that if a Collector pod restarts or
terminates, only the metrics in that node aren't scraped, and all other nodes remain
unaffected.
The following steps align with this method of installing the Collector.
You can also install the Collector with Kubernetes
[as a Deployment](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector-using-a-deployment)
or [as a sidecar](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector-as-a-sidecar).
> [!NOTE]
>
> The following steps assume that the applications running in the Kubernetes cluster
> expose Prometheus metrics. To ingest other metric types such as StatsD, refer to
> [Ingest additional metrics](/ingest/metrics-traces/collector/addl-metrics).
To install the Collector:
1. [Create an API token](#create-an-api-token).
2. [Define the Collector manifest](#define-the-collector-manifest).
3. [Create a Kubernetes secret](#create-a-kubernetes-secret).
4. [Install the Collector](#install-the-collector).
5. [Verify the Collector](#verify-the-collector).
## Create an API token
To interact with the Collector, you must
[create a service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account).
Palo Alto Networks Cortex XCOR recommends creating a restricted service account with a write-only
scope. Use the generated API token in your Kubernetes `Secret` to authenticate
with the Collector.
> [!WARNING]
>
> Store your API token in a secure location. If you lose your token, you must create
> a new service account.
## Define the Collector manifest
1. Download the
[example manifest](https://storage.googleapis.com/chronosphere-release/latest/kubernetes/chronocollector.yaml).
2. Locate the `spec.template.spec.containers.image` YAML collection and change
`vVERSION_NUMBER` to the version of the Collector you want to install. For
example, `v0.116.0`:
```yaml theme={null}
spec:
template:
spec:
containers:
- image: gcr.io/chronosphereio/chronocollector:vVERSION_NUMBER
```
Cortex XCOR supports Chronosphere Collector versions for a year from release. You
can find a full list of versions and release dates in the Chronosphere Collector release notes
located in Palo Alto Networks Cortex XCOR. To view the release notes, in the
navigation menu select
** More information > Release notes**,
and then click the **Collector** tab.
3. Modify any configuration values in the `ConfigMap` based on your needs. Refer to
the [Collector configuration](/ingest/metrics-traces/collector/configure) for
details about configuration options.
## Create a Kubernetes secret
Create a Kubernetes `Secret` that includes the API token from your service account,
plus a custom domain address.
1. Add `base64` encoding to your domain name and API token:
```shell theme={null}
echo -n "TENANT:443" | base64
echo -n "API_TOKEN" | base64
```
Replace the following:
* *`TENANT`*: The name of your Cortex XCOR tenant.
* *`API_TOKEN`*: The API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
2. Copy the values that output to your terminal, which you add as part of your
Kubernetes `Secret` in the next step.
3. In your `chronocollector.yaml` file, locate the following YAML collection and
replace values for `address` and `api-token` with the encoded values that you
copied from your terminal.
```yaml theme={null}
apiVersion: v1
data:
address: ENCODED_ADDRESS
api-token: ENCODED_API_TOKEN
kind: Secret
metadata:
labels:
app: chronocollector
name: chronosphere-secret
namespace: default
type: Opaque
```
Another option is to add the *`ADDRESS`* and *`API_TOKEN`* directly to the
Kubernetes cluster using `kubectl`:
```shell theme={null}
kubectl create secret generic chronosphere-secret \
--from-literal=api-token=API_TOKEN \
--from-literal=address=ADDRESS
```
4. Save and close your `chronocollector.yaml` file.
Now you're ready to [install the Collector](#install-the-collector).
## Install the Collector
To install the Collector, apply the `chronocollector.yaml` manifest that you
configured. When using a
[DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/),
you must install the Collector on each node in a cluster.
> [!WARNING]
>
> Installing the Collector grants permissions to read metadata about pods scheduled on
> the local node. Review your `chronocollector.yaml` manifest carefully before applying
> it.
1. Apply the manifest.
```shell theme={null}
kubectl apply -f path/to/chronocollector.yaml
```
2. Confirm that the `DaemonSet` is up and running, and view the logs of the pod:
```shell theme={null}
kubectl get pods
NAME READY STATUS RESTARTS AGE
chronocollector-POD_NAME 1/1 Running 0 1m
```
3. View the pod logs to ensure there are no errors:
```shell theme={null}
kubectl logs chronocollector-POD_NAME
# ...
```
Replace *`POD_NAME`* with the name of the Kubernetes pod where your Collector
instance is running.
## Verify the Collector
After installing the Collector, verify it's sending metrics to your Cortex XCOR tenant:
1. Open Cortex XCOR and in the navigation menu select
** Explorers > Metrics Explorer**.
2. Enter the following query in the query field.
```text theme={null}
count(chronocollector_jobs) by (instance)
```
3. Click **Run**.
The name of your Collector instance returned from the `kubectl logs` command
displays in the table of metrics:
| Time | Instance |
| - | - |
| 2023-02-03 10:56:04 | default/chronocollector-POD\_NAME |
For other methods of verifying that the Collector is running, refer to
[verify and monitor the Collector](/ingest/metrics-traces/collector/monitor).
### Install the Collector using a Deployment
If you use Prometheus service discovery, deploy the Collector as a standalone
Deployment. This implementation avoids every Collector duplicating scrapes to all
endpoints defined in the Prometheus service discovery configuration.
> [!WARNING]
>
> Only run the Collector as a [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)
> if you're using configuration-based Prometheus service discovery, or where specified
> in the [service discovery documentation](/ingest/metrics-traces/collector/discover).
> Otherwise, deploy the Collector as a DaemonSet.
The instructions for deploying the Collector as a Deployment are the same as for a
DaemonSet, except you use
[this manifest](https://storage.googleapis.com/chronosphere-release/latest/kubernetes/deployment-chronocollector.yaml).
### Install the Collector as a sidecar
Some environments (like AWS Fargate) restrict users from deploying an app as a
`DaemonSet` and require deploying the Collector as a sidecar alongside other
containers. You can also use a sidecar configuration for more control over resource
utilization for particularly high cardinality scrape targets.
If your app is already running as a container in a Pod, you can add the Collector as
another container in the same Pod. The instructions for deploying the Collector as a
sidecar are the same as for a `DaemonSet`, except you use
[this manifest](https://storage.googleapis.com/chronosphere-release/latest/kubernetes/sidecar-chronocollector.yaml)
and add the Collector as another container to the `spec.template.spec.containers`
block of the manifest, along with any other Kubernetes resources your app requires.
## Configure service discovery
After configuring and installing the Collector,
[configure Kubernetes annotations](/ingest/metrics-traces/collector/discover#kubernetes-annotations)
so that the Collector can start scraping the Pods in your Kubernetes cluster.
If you installed the Collector as a Deployment or as a sidecar service,
[configure service discovery](/ingest/metrics-traces/collector/discover)
using `ServiceMonitors` or Prometheus service discovery.
## Modify Collector resource usage
After deploying the Collector, you can modify resource usage depending on various
inputs, including, but not limited to:
* Amount of scraped metrics
* Scrape interval of each target
* Number of metric labels
* Total length of the label strings
Because the work of the Collector is I/O bound, Cortex XCOR recommends running the
Collector with one
[Kubernetes CPU unit](https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/#cpu-units)
or its equivalent.
To simplify the process of predicting memory usage, make an initial estimation based
on the number of metrics scraped every second by your Collector instance. The
following table lists the recommended memory limits for a Collector instance, with
its default settings based on observed usage:
> [!NOTE]
>
> This information is both a starting point and an upper limit. Tune your Collectors
> after their deployments, based on practical usage.
| Metrics/Second | Recommended memory |
| - | - |
| 0k to 10k | 500 MB |
| 10k to 20k | 800 MB |
| 20k to 30k | 1 GB |
| Greater than 30k | 1 GB and 200 MB per additional 5k metrics/sec |
### Ingestion buffering
Enabling [ingestion buffering](/ingest/metrics-traces/collector/configure/optimizations#enable-ingestion-buffering)
doesn't have any substantial impact on memory usage.
The following graph displays the memory usage of a Collector instance handling
different input data volume (4k and 3k metrics per second, respectively). The memory
usage doesn't change significantly after enabling the buffering feature or increasing
the failure rate from 0% to 50%.

# Standalone Collector installation to retrieve metrics
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/install/standalone
Run the Chronosphere Collector as a standalone binary to gather metrics from services that Kubernetes doesn't manage.
If you don't use Kubernetes, or want to gather metrics from services not managed by
Kubernetes, you can run the Collector as a standalone binary.
## Create an API token
To interact with the Collector, you must
[create a service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account).
You must be a member of a team with the SysAdmin role to create a new service account.
Palo Alto Networks Cortex XCOR recommends creating a restricted service account with a write-only
scope. Use the generated API token in your Kubernetes `Secret` to authenticate
with the Collector.
> [!WARNING]
>
> Store your API token in a secure location. If you lose your token, you must create
> a new service account.
## Download the Collector binary and make it executable
Cortex XCOR supports Chronosphere Collector versions for a year from release. You
can find a full list of versions and release dates in the Chronosphere Collector release notes
located in Palo Alto Networks Cortex XCOR. To view the release notes, in the
navigation menu select
** More information > Release notes**,
and then click the **Collector** tab.
1. Download one of the platform-specific binaries:
* [Linux amd64](https://storage.googleapis.com/chronosphere-release/latest/chronocollector-linux-amd64)
* [Linux arm64](https://storage.googleapis.com/chronosphere-release/latest/chronocollector-linux-arm64)
* [Windows x86-64](https://storage.googleapis.com/chronosphere-release/latest/chronocollector-windows-amd64.exe)
* [macOS](https://storage.googleapis.com/chronosphere-release/latest/chronocollector-darwin-amd64)
2. Modify the permissions on the binary to make it executable. For example,
to change permissions on the `linux-amd64` version of the binary:
```shell theme={null}
chmod +x chronocollector-linux-amd64
```
## Define the Collector configuration file
Download the [example configuration file](https://storage.googleapis.com/chronosphere-release/latest/standalone/config.yml)
and modify any configuration values based on your needs.
For applicable fields, you can set environment variables instead of specifying them
in the configuration file. For example, to specify the `listenAddress`, set an
environment variable named `${LISTEN_ADDRESS}` with the value you want to use, such
as:
```yaml theme={null}
listenAddress: "${LISTEN_ADDRESS:0.0.0.0:3029}"
```
The following list includes key fields for which you can specify values:
* **Backend**: You must add a `gateway` backend to specify your Cortex XCOR
instance.
```yaml theme={null}
backend:
type: gateway
gateway:
address: TENANT:443
insecure: false
cert: ""
certSkipVerify: false
```
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
* **Global Labels**: If you don't need to apply global labels to all metrics, remove
the `labels` key. If you need global labels and are scraping metrics from a
Prometheus endpoint, you can apply labels to each scrape target.
For example, to add `host` and `rack` to each metric:
```yaml theme={null}
static_configs:
- targets: ['0.0.0.0:9100']
labels:
host: 'prod-server'
rack: '14'
```
> [!NOTE]
>
> Each Prometheus scrape configuration type has a different way of specifying global
> labels. Refer to the Prometheus
> [scrape configuration documentation](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config)
> for more details.
* **Discovery**: To scrape a static Prometheus endpoint, configure a scrape setting.
Refer to the Prometheus
[service discovery documentation](/ingest/metrics-traces/collector/discover)
for more details.
## Run the Collector
You can run the Collector standalone with a binary, with Docker, or as a Systemd
service. To run the Collector, pass the configuration file and generated API token.
Replace the following values before running the startup commands:
* *`TENANT`*: The name of your Cortex XCOR tenant.
* *`API_TOKEN`*: The API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
* *`VERSION`*: Version of the Collector that you want to run, prefixed with `v`.
### Run standalone with a binary
```shell theme={null}
GATEWAY_ADDRESS=TENANT:443 API_TOKEN=API_TOKEN PATH_TO_FILE/COLLECTOR_BINARY -f PATH_TO_FILE/config.yml
```
### Run standalone with Docker
```shell theme={null}
docker run -v $(pwd)/PATH_TO_FILE/config.yml:/etc/chronocollector/config.yml -e "GATEWAY_ADDRESS=TENANT:443" -e "API_TOKEN=API_TOKEN" gcr.io/chronosphereio/chronocollector:vVERSION
```
### Run standalone as a service
You can install the Collector as a Systemd service on Linux systems:
1. Create a `chronocollector` user and group:
```shell theme={null}
sudo groupadd -f chronocollector
sudo useradd -g chronocollector --no-create-home --shell /bin/false chronocollector
```
2. Change the ownership of the directory containing the Collector configuration file.
The following command expects the Collector `config.yml` file in the
`/etc/chronocollector` directory:
```shell theme={null}
sudo chown -R chronocollector:chronocollector /etc/chronocollector
```
3. Copy the Collector binary to the `/usr/bin` directory and modify the permissions:
```shell theme={null}
sudo cp ./chronocollector /usr/bin/
sudo chown chronocollector:chronocollector /usr/bin/chronocollector
```
4. In the `/usr/lib/systemd/system` directory, create and define a script such as
`chronocollector.service` for the Collector service:
```text theme={null}
[Unit]
Description=Chronocollector
Documentation=https://docs.chronosphere.io/ingest/metrics-traces/collector
Wants=network-online.target
After=network-online.target
[Service]
User=chronocollector
Group=chronocollector
Type=simple
Restart=on-failure
Environment="GATEWAY_ADDRESS=TENANT.chronosphere.io:443"
Environment="API_TOKEN=API_TOKEN"
ExecStart=/usr/bin/chronocollector -f /etc/chronocollector/config.yml
[Install]
WantedBy=multi-user.target
```
5. Change the permissions of the `chronocollector.service` script you created:
```shell theme={null}
sudo chmod 664 /usr/lib/systemd/system/chronocollector.service
```
6. Enable and verify the `chronocollector` service:
```shell theme={null}
sudo systemctl daemon-reload
sudo systemctl start chronocollector
sudo systemctl status chronocollector
sudo systemctl enable chronocollector.service
```
# Kubernetes Collector installation to receive traces
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/install/tracing
Install the Chronosphere Collector as a Kubernetes Deployment to receive OpenTelemetry, Jaeger, or Zipkin trace data from your apps.
The recommended way to install the Collector to receive trace data is with a
Kubernetes Deployment, with a service in front to receive trace data. Your tracing
app pushes trace data to the service, which the Collector receives the data from.
Palo Alto Networks Cortex XCOR recommends instrumenting your app to emit span data in
[OpenTelemetry format](https://opentelemetry.io/docs/reference/specification/protocol/otlp/)
if you haven't already invested in legacy tracing instrumentation. You can configure
the Collector to accept OpenTelemetry traces in both gRPC and JSON over HTTP formats.
A single Collector can accept OpenTelemetry traces in both of these formats
simultaneously.
The Collector manifest linked in this page uses OpenTelemetry by default, but you can
modify the manifest to use other supported formats, such as Jaeger or Zipkin.
To install the Collector:
1. [Create an API token](#create-an-api-token).
2. [Define the Collector manifest](#define-the-collector-manifest).
3. [Create a Kubernetes secret](#create-a-kubernetes-secret).
4. [Install the Collector](#install-the-collector).
5. [Verify the Collector](#verify-the-collector).
## Create an API token
To interact with the Collector, you must
[create a service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account).
You must be a member of a team with the SysAdmin role to create a new service account.
Cortex XCOR recommends creating a restricted service account with a write-only
scope. Use the generated API token in your Kubernetes `Secret` to authenticate
with the Collector.
> [!WARNING]
>
> Store your API token in a secure location. If you lose your token, you must create
> a new service account.
## Define the Collector manifest
1. Download the
[example manifest](https://storage.googleapis.com/chronosphere-release/latest/kubernetes/tracing-chronocollector.yaml).
2. Locate the `spec.template.spec.containers.image` YAML collection and change
`vVERSION_NUMBER` to the version of the Collector you want to install. For
example, `v0.116.0`:
```yaml theme={null}
spec:
template:
spec:
containers:
- image: gcr.io/chronosphereio/chronocollector:vVERSION_NUMBER
```
Cortex XCOR supports Chronosphere Collector versions for a year from release. You
can find a full list of versions and release dates in the Chronosphere Collector release notes
located in Palo Alto Networks Cortex XCOR. To view the release notes, in the
navigation menu select
** More information > Release notes**,
and then click the **Collector** tab.
3. Define the format you want the Collector to receive spans in, such as
OpenTelemetry, Jaeger or Zipkin. The following example enables receiving spans in
OpenTelemetry format:
> [!NOTE]
>
> You can only enable one format of traces to receive. You must remove or comment
> out any additional trace formats from the `spans` YAML collection.
1. In the `spans` YAML collection, define the format you want to receive spans
for. For example, to receive spans in OpenTelemetry format:
```yaml theme={null}
spans:
enabled: true
compression:
enabled: true
otel:
enabled: true
listenAddress: 0.0.0.0:4317
```
If you want to accept OpenTelemetry traces in JSON format over HTTP, add the
following `http` definitions to your YAML collection under `spans`. This YAML
collection starts an HTTP receiver that accepts traces in both gRPC and JSON
over HTTP formats.
```yaml theme={null}
spans:
# ...
otel:
enabled: true
listenAddress: 0.0.0.0:4317
httpEnabled: true
httpListenAddress: 0.0.0.0:4318
```
2. For the tracing `Service`, modify the `spec.ports.name` YAML collection to
reflect the trace format you want to use. For example, to receive spans in
OpenTelemetry format:
```yaml theme={null}
kind: Service
# ...
spec:
ports:
- name: otel
port: 4317
protocol: TCP
targetPort: otel
```
4. Save your Collector manifest, which you apply in a subsequent step after creating
a Kubernetes secret.
## Create a Kubernetes secret
Create a Kubernetes `Secret` that includes the API token from your service account,
plus a custom domain address.
1. Add `base64` encoding to your domain name and API token:
```shell theme={null}
echo -n "TENANT:443" | base64
echo -n "API_TOKEN" | base64
```
Replace the following:
* *`TENANT`*: The name of your Cortex XCOR tenant.
* *`API_TOKEN`*: The API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
2. Copy the values that output to your terminal, which you add as part of your
Kubernetes `Secret` in the next step.
3. In your `tracing-chronocollector.yaml` file, locate the following YAML collection
and replace values for `address` and `api-token` with the encoded values that you
copied from your terminal.
```yaml theme={null}
apiVersion: v1
data:
address: ENCODED_TENANT
api-token: ENCODED_API_TOKEN
kind: Secret
metadata:
labels:
app: chronocollector-tracing
name: chronosphere-tracing-secret
namespace: default
type: Opaque
```
Another option is to add the *`TENANT`* and *`API_TOKEN`* directly to the Kubernetes
cluster using `kubectl`:
```shell theme={null}
kubectl create secret generic chronosphere-secret \
--from-literal=api-token=API_TOKEN \
--from-literal=address=TENANT
```
4. Save and close your `tracing-chronocollector.yaml` file.
Now you're ready to [install the Collector](#install-the-collector).
## Install the Collector
To install the Collector, apply the `tracing-chronocollector.yaml` manifest that you
configured.
> [!WARNING]
>
> Installing the Collector grants permissions to read metadata about pods scheduled on
> the local node. Review your `tracing-chronocollector.yaml` manifest carefully before
> applying it.
1. Apply the manifest.
```shell theme={null}
kubectl apply -f path/to/tracing-chronocollector.yaml
```
2. Confirm the deployment is up and running, and view the logs of the pod:
```shell theme={null}
kubectl get pods
```
The output is similar to the following:
```text theme={null}
NAME READY STATUS RESTARTS AGE
chronocollector-tracing-POD_NAME 1/1 Running 0 1m
```
3. View the pod logs to ensure there are no errors:
```shell theme={null}
kubectl logs chronocollector-tracing-POD_NAME
```
Replace *`POD_NAME`* with the name of the Kubernetes pod where your Collector
instance is running.
## Verify the Collector
After installing the Collector, verify that it's sending traces to your Cortex XCOR
tenant.
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Live Telemetry**.
2. Click the **Traces** tab.
3. Click **Capture live data** to display the stream of incoming spans. The default grouping
shows spans by service (`__service__`), but you can include additional tags to group
by such as `__trace_id__` and `__span_id__`.
# Upgrade the Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/install/upgrade
Upgrade the Chronosphere Collector to a new version.
When you're ready to upgrade the Chronosphere Collector to a new version, determine
your current version before upgrading. You can then upgrade the Collector based on
your installation method.
> [!NOTE]
>
> Palo Alto Networks Cortex XCOR supports Chronosphere Collector versions for one year from
> their release dates. Use
> only a supported version, unless explicitly instructed otherwise by Cortex XCOR
> Support. If you experience issues, upgrade to the latest supported version.
## Determine your current version
Use one of the following methods to determine the current version of your Collector:
* [Check your manifest](#check-your-manifest)
* [Query the `/debug/version` endpoint](#query-the-/debug/version-endpoint)
* [Use Metrics Explorer](#use-metrics-explorer)
### Check your manifest
Open your Collector manifest and locate the `spec.template.spec.containers.env.image`
YAML collection. The string includes `vVERSION`, where `VERSION` is the Collector
version number:
```yaml theme={null}
spec:
# ...
template:
spec:
containers:
- env:
image: gcr.io/chronosphereio/chronocollector:vVERSION
```
*`VERSION`* is the current version number of the Collector.
### Query the `/debug/version` endpoint
The Collector exposes a `/debug/version` endpoint that you can query to return the
Collector version. To learn about the supported methods for accessing debug endpoints,
see [Access the debug endpoints](/ingest/metrics-traces/collector/debugging#access-the-debug-endpoints).
The query response returns a JSON representation of the Collector version information,
which is the same information the Collector prints when starting. For example:
```json theme={null}
{
"go_version": "go1.23.4",
"version": "v0.116.0",
"branch": "HEAD",
"revision": "a4c82d1f7",
"build_date": "2026-05-12-18:42:05",
"build_time": "1778876525"
}
```
### Use Metrics Explorer
1. In the navigation menu select
** Explorers > Metrics Explorer**
to access the Metrics Explorer.
2. Enter the following query in the query field.
```text theme={null}
count(chronocollector_build_information) by (build_version, instance)
```
3. Click **Run**.
The version of each Collector instance displays in the `build_version` column of
the query results table. For example:
| Time | build\_version | instance |
| - | - | - |
| 2025-10-10 11:07:15 | v0\_116\_0 | test-env/chronocollector-test3-2z8dx |
| 2025-10-10 11:07:15 | v0\_115\_0 | test-env/chronocollector-test3-4vcd9 |
## Upgrade to a new version
After determining your current version, you're ready to upgrade your Collector. Your
installation method determines how you upgrade the Collector.
### Upgrade a Kubernetes deployment
If you deployed your Collector as a Kubernetes DaemonSet or Deployment, complete the
following steps to upgrade your Collector.
1. Open your Collector manifest and locate the
`spec.template.spec.containers.env.image` YAML collection.
2. In the `image` string, modify the version number to the version that you want to
upgrade to. For example, the following `image` indicates version `0.116.0` of the
Collector:
```yaml theme={null}
spec:
# ...
template:
spec:
containers:
- env:
image: gcr.io/chronosphereio/chronocollector:v0.116.0
```
3. Complete a rolling restart of your pods:
```shell theme={null}
kubectl rollout restart daemonset chronocollector -n NAMESPACE
```
Replace *`NAMESPACE`* with your Kubernetes namespace.
4. Re-enable port forwarding for your Collector. The following command enables port
forwarding on port `3030`:
```shell theme={null}
kubectl port-forward chronocollector-POD_NAME 3030
```
### Upgrade a standalone deployment
If you deployed your Collector as a standalone binary, download the latest version
and redeploy the Collector.
Refer to the [Standalone Collector installation](/ingest/metrics-traces/collector/install/standalone)
page for steps on how to download the latest binary and redeploy it.
# Map data sources to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings
Map metrics data and query functions from Prometheus, Datadog, SignalFx, and Wavefront to Palo Alto Networks Cortex XCOR.
To display metrics and traces to users, Palo Alto Networks Cortex XCOR ingests data
through the use of
its own [Collector](/ingest/metrics-traces/collector). The Collector supports several metrics
formats.
Use this section to learn more about how to map other metrics formats' data and
functions to Cortex XCOR:
* [Prometheus](/ingest/metrics-traces/collector/mappings/prometheus/prometheus-recommendations) is
the default for Cortex XCOR.
* [Datadog](/ingest/metrics-traces/collector/mappings/datadog) data can be imported into
Cortex XCOR.
* [SignalFx](/ingest/metrics-traces/collector/mappings/signalfx) queries work differently than
PromQL.
* [Wavefront](/ingest/metrics-traces/collector/mappings/wavefront) queries work differently than
PromQL.
# Datadog migration information
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings/datadog
Learn how Palo Alto Networks Cortex XCOR ingests metrics, and plan a migration from Datadog Agent and DogStatsD.
Datadog is a monitoring and analytic tool for measuring system performance metrics
and event monitoring.
The custom metrics are ingested into Datadog platform using locally installed
components, such as:
* Datadog Agent, which collects metrics through integration.
* DogStatsD is a UDP server listening for applications to send the metrics
based on a push model.
[Learn more about ingesting DogStatsD](/ingest/metrics-traces/collector/addl-metrics/dogstatsd).
* Using the HTTP API.
Datadog Agent and DogStatsD are lightweight software designed to get metrics and
forwarding them to the Datadog back end for persistence.
As metrics data increases in scale, the cost of ingress traffic and data persistence
can increase exponentially and become difficult to control.
Palo Alto Networks Cortex XCOR approaches monitoring and analysis differently.
The Collector ingests metrics and traces using a pull model, sending data to the
Cortex XCOR back end. The Collector is compliant with the major open
source standards, including Prometheus, OpenTelemetry, and older formats (like
Graphite/StatsD).
The Cortex XCOR control layer determines how metrics and traces should be
aggregated, dropped, or rolled-up. Businesses can take advantage of these
features to save costs and improve monitoring performance.
Many of the Datadog constructs translate to Cortex XCOR. Although the
Customer Success team handles the initial migration from Datadog to Cortex XCOR, use the
following pages to understand how each product approaches data:
* [Migration considerations](/ingest/metrics-traces/collector/mappings/datadog/migration-issues):
What you need
to know before you migrate.
* [Querying metrics](/ingest/metrics-traces/collector/mappings/datadog/dogstatsd): Understanding how
Cortex XCOR differs from the Datadog query syntax.
* [Monitor migration](/ingest/metrics-traces/collector/mappings/datadog/convert-monitors):
Understanding how
Cortex XCOR monitors differ from Datadog monitors.
* [Mapping](/ingest/metrics-traces/collector/mappings/datadog/mapping): A breakdown
of how various functions and
operations work in each product, and how they correspond.
* [Widgets versus dashboards](/ingest/metrics-traces/collector/mappings/datadog/dashboards):
Learn how some
Datadog widgets relate to Cortex XCOR dashboards.
Migrating from Datadog to Cortex XCOR follows these general steps:
1. Review the ingestion model.
2. Migrate metric collection.
3. Migrate dashboards.
4. Migrate monitors and alerts.
5. Optimize data ingestion and persisted data.
# Convert Datadog monitors
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings/datadog/convert-monitors
Convert a Datadog monitor into the equivalent monitor, notification policy, and notifier resources in Palo Alto Networks Cortex XCOR.
[Datadog monitors](https://docs.datadoghq.com/api/latest/monitors/) actively check
metrics of the infrastructure and manage alerts on alert platforms. Palo Alto Networks Cortex XCOR
uses [monitors and alerts](/investigate/alerts) for the same purposes.
Datadog creates monitoring and notification in one longer file, while Cortex XCOR
separates monitors and notifications into smaller logical configuration files. These
smaller files enable users to target and update specific changes without risking the
entire configuration.
## Before you begin
A single Datadog monitor becomes several Cortex XCOR resources: a `Monitor`, a
`NotificationPolicy`, and one or more `Notifier` definitions. Before you convert a
monitor, gather the following details from the Datadog definition so you can map them
to the correct resource:
* **Query**: The Datadog `query` becomes the `Monitor` PromQL query. Review
[querying metrics](/ingest/metrics-traces/collector/mappings/datadog/dogstatsd) for
how the query syntax differs.
* **Thresholds and severities**: The Datadog `options.thresholds` (critical, warning)
and any no-data behavior become `series_conditions` on the `Monitor`.
Cortex XCOR doesn't support separate recovery thresholds.
* **Notification routes**: Each `@`-mention in the Datadog `message` (such as a Slack
channel or PagerDuty service) becomes a `Notifier`, and the routing logic becomes a
`NotificationPolicy`.
* **Tags**: Datadog `tags` become `Monitor` labels, which you can then use to route
alerts with notification policy overrides.
Review [migration considerations](/ingest/metrics-traces/collector/mappings/datadog/migration-issues)
before you start, then use the [field mapping](#field-mapping) tables to translate
each field. Apply the resulting files with [Chronoctl](/tooling/chronoctl).
## Compare configurations
These are examples of matching configurations for Datadog and
Cortex XCOR.
> [tab] Datadog
>
> This is an example of a Datadog monitor definition.
>
> ```text theme={null}
> "id": 1234567,
> "org_id": 12345,
> "type": "metric alert",
> "name": "IOWAIT is high ({{value}})",
> "message": "{{#is_alert}}\Load is too high, check and lower load immediately (use AWS console for {{pod.name}} to scale tasks to 1 and investigate)\n@slack-ops-bots \n{{/is_alert}} \n\n{{#is_alert_recovery}}\n@slack-ops-bots \n@pagerduty-resolve \n{{/is_alert_recovery}}{{#is_warning}}\nLoad is reaching the limit.\n@slack-ops-warning-bots\n@pagerduty{{/is_warning}}",
> "tags": [
> "high-load",
> "team:platform"
> ],
> "query": "min(last_30m):max:system.cpu.iowait{function:cassandraevents} by {pod,name} > 20",
> "options": {
> "notify_audit": false,
> "locked": false,
> "timeout_h": 0,
> "include_tags": true,
> "no_data_timeframe": 30,
> "require_full_window": true,
> "notify_by": ["pod"],
> "notify_no_data": true,
> "new_group_delay": 60,
> "renotify_interval": 30,
> "renotify_occurrences": 1,
> "renotify_statuses": [
> "alert",
> "no data",
> ],
> "scheduling_options": {
> "evaluation_window": {
> "hour_starts": 30
> }
> },
> "thresholds": {
> "critical": 20,
> "critical_recovery": 10,
> "warning": 15
> },
> "timeout_h": 12,
> "escalation_message": "{{#is_alert}}\nEscalated to pagerduty - \nLoad is too high, check and lower load immediately (use AWS console for {{pod.name}} to scale tasks to 1 and investigate)\n@slack-ops-bots \n@pagerduty \ n{{/is_alert}}",
> "evaluation_delay": 300,
> "min_failure_duration": 120,
> "silenced": {}
> },
> "multi": true,
> "created_at": 1479858941000,
> "created": "2016-11-22T15:55:41.80188-08:00",
> "modified": "2021-10-14T09:23:36.750186-07:00",
> "deleted": null,
> "restricted_roles": null,
> "priority": 1,
> "overall_state_modified": "2022-07-05T06:13:14-07:00",
> "overall_state": "OK",
> "creator": {
> "name": "Jane Smith",
> "handle": "janesmith@example.com",
> "email": "janesmith@example.com",
> "id": 18219
> },
> "matching_downtimes": []
> ```
> [tab] Cortex XCOR
>
> Cortex XCOR configuration breaks down into smaller, more strictly defined
> files covering the same functions. These file definitions use the `v1/config`
> resource format that you apply with [Chronoctl](/tooling/chronoctl).
>
> Configure the monitor:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Monitor
> spec:
> slug: cluster-iowait-high
> name: IOWAIT is high
> labels:
> datadog_id: "1234567"
> tag_iowait: "true"
> team: platform
> annotations:
> message_critical: Load is too high, check and lower load immediately (use AWS console for {{pod.name}} to scale tasks to 1 and investigate)
> message_warning: Load is reaching the limit
> prometheus_query:
> signal_grouping:
> label_names:
> - name
> series_conditions:
> defaults:
> critical:
> conditions:
> - op: GT
> value: 20
> sustain_secs: 120
> warn:
> conditions:
> - op: GT
> value: 15
> sustain_secs: 120
> notification_policy_slug: iowait-notification-policy
> interval_secs: 60
> ```
>
> This is the notification policy:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: NotificationPolicy
> spec:
> slug: iowait-notification-policy
> name: iowait notification policy
> routes:
> defaults:
> critical:
> notifier_slugs:
> - default-route-slack-bot
> warn:
> notifier_slugs:
> - default-route-slack-bot
> overrides:
> - alert_label_matchers:
> - name: tag_iowait
> type: EXACT
> value: "true"
> notifiers:
> critical:
> notifier_slugs:
> - slack-ops-bots
> - pagerduty-critical
> warn:
> notifier_slugs:
> - slack-ops-warning-bots
> - pagerduty-warning
> ```
>
> And separate notifier routes:
>
> Slack, for an Alerts channel:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Notifier
> spec:
> name: Default route slack bot
> slug: default-route-slack-bot
> skip_resolved: false
> slack:
> api_url:
> channel: alerts
> username: oncall-bot
> ```
>
> Slack, for an on-call channel:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Notifier
> spec:
> name: slack-ops-bots
> slug: slack-ops-bots
> skip_resolved: false
> slack:
> api_url:
> channel: oncall
> username: oncall-bot
> ```
>
> Critical alerts sent to PagerDuty:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Notifier
> spec:
> name: pagerduty-critical
> slug: pagerduty-critical
> skip_resolved: false
> pagerduty:
> routing_key:
> url: https://events.pagerduty.com/v2/enqueue
> severity: critical
> ```
>
> Warnings sent to PagerDuty:
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: Notifier
> spec:
> name: pagerduty-warning
> slug: pagerduty-warning
> skip_resolved: false
> pagerduty:
> routing_key:
> url: https://events.pagerduty.com/v2/enqueue
> severity: warning
> ```
## Field mapping
Cortex XCOR and Datadog fields have many equivalent functions. Use the following
tables to map fields between these apps.
> [!NOTE]
>
> Names of Cortex XCOR equivalents are subject to change as the conversion process
> improves.
### Configuration mapping
This table matches Datadog fields to their Cortex XCOR equivalents for monitor
specification.
| Datadog field | Cortex XCOR equivalent |
| - | - |
| `created` | N/A |
| `creator` | N/A |
| `id` | Add to `Monitor.labels`. |
| `message` | Add to `Monitor.annotations` and create `Notifier` resources. See details. |
| `modified` | N/A |
| `multi` | `Monitor.spec.signal_grouping.signal_per_series` |
| `name` | `Monitor.name` - This can also contain variables. |
| `options` | [Monitor options](#monitor-options) |
| `threshold_windows` | N/A - Used only for `anomalies`. |
| `thresholds` | `Monitor.spec.series_conditions.defaults..conditions` |
| `timeout_h` | N/A |
| `overall_state` | For monitors with an `Ignored / Skipped / Unknown` state, still create the monitor but have it either go to a black hole route or create it as muted. |
| `priority` | Can support as a message annotation. |
| `query` | `Monitor.spec.prometheus_query` |
| `restricted_roles` | N/A |
| `state` | N/A |
| `matching_downtimes` | Equivalent to schedules. |
| `tags` | An arbitrary list of strings that fits the tag format (which can be single word tags). Cortex XCOR can support this using `Monitor.labels`, if the field requires a key-value format. Tags are used as label names with the value set to `true.` |
| `type` | The type of monitor. Cortex XCOR supports query alert and metric alerts. |
### Monitor options
Use these values in the specification's `options` field.
| Datadog field | How to map |
| - | - |
| `aggregation` | N/A - For log alerts only. |
| `enable_logs_sample` | N/A - For log alerts only. |
| `enable_samples` | N/A - Per [Datadog docs](https://docs.datadoghq.com/api/latest/monitors/#get-all-monitor-details). This is used only by CI Test and Pipeline monitors. |
| `escalation_message` | No separate message for renotify notifications; can append this to the generic alert message. |
| `evaluation_delay` | Can support by using offset in the query. |
| `group_retention_duration` | N/A - Not for metrics monitors. |
| `groupby_simple_monitor` | N/A - For log alerts only. |
| `include_tags` | Use Prometheus `{{ $value }}` template. |
| `min_failure_duration` | `Monitor.spec.series_conditions.defaults..conditions.sustain_secs` |
| `min_location_failed` | Can support by adding thresholds to the PromQL expression. |
| `new_group_delay` | N/A |
| `new_host_delay` | N/A - Deprecated, use `new_group_delay` instead. |
| `no_data_timeframe` | Threshold for a `no data` alert. See [severity](#severity) section for details. |
| `notification_preset_name` | N/A - Datadog [docs](https://docs.datadoghq.com/api/latest/monitors/#get-all-monitor-details). |
| `notify_audit` | N/A |
| `notify_by` | Equivalent to `Monitor.spec.signal_grouping`, except the inverse. Note: This can be set to `*`, which is the same as setting `Monitor.spec.signal_grouping.signal_per_series`. |
| `notify_no_data` | Add a `NOT_EXISTS` series condition in the MonitorSpec. Review [severity](#severity) for details. |
| `on_missing_data` | N/A - Not for metrics alerts. |
| `renotify_interval` | `NotificationPolicy.routes.overrides.notifiers..repeat_interval_secs` |
| `renotify_occurrences` | N/A |
| `renotify_statuses` | Only renotify on status X. Create overrides using `NotificationPolicy.routes.overrides.notifiers..repeat_interval_secs` for each severity listed here. |
| `require_full_window` | Only evaluate if there's a full window of data. Datadog recommends setting this to `false`. Supportable using the `count_over_time` function. |
| `scheduling_evaluation_window` | [Cumulative time windows](https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#cumulative-time-windows). For example, "evaluate this alert every hour on the :00 mark." |
| `silenced` | Dictionary of [muted tags to end timestamp](https://docs.datadoghq.com/monitors/guide/monitor_api_options/#common-options). Create MutingRule objects for each tag. |
| `thresholds` | Thresholds for severity. Can map to `Monitor.spec.series_conditions.defaults` for warning and critical. No support for separate thresholds for recovery. |
| `variables` | N/A |
## Severity
Cortex XCOR supports both critical and warning severities by implementing different
thresholds for the metric values. In addition to this, Datadog also supports alerting
on no data for a particular metric as a distinct `severity`. Although this state
isn't a true severity, the state is treated the same as critical and warning alerts
for configuration.
Cortex XCOR supports alerting on `no data` conditions using a series condition in
the MonitorSpec:
```yaml Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: Monitor
spec:
prometheus_query:
series_conditions:
defaults:
critical:
conditions:
- op: NOT_EXISTS
sustain_secs: 60
```
## Message and route
Datadog allows different messages and routing endpoints for the different severity
levels (critical, warning, no data). Cortex XCOR can support different messages by
using separate annotations:
```yaml Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: Monitor
spec:
annotations:
message_critical: This is the critical threshold message
message_warning: This is the warning threshold message
message_no_data: This is the message for no data
```
To support different routes, users must use a separate monitor with different labels,
set using notification policies.
## Notification policy resources
Link a `Monitor` resource to a `Notifier` resource by defining a
[notification policy](/investigate/alerts/notifications/policies). Each unique
route in the Datadog message field maps to a `Notifier` resource. The `Monitor`
contains a `label` specifying the notification route it links to, and the
`NotificationPolicy` defines overrides that point to each `Notifier`.
For example:
```yaml Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: Monitor
spec:
labels:
datadog_id: "1234567"
route_slack_ops_bots_critical: "true"
route_slack_ops_bots_warning: "true"
route_pagerduty_critical: "true"
---
api_version: v1/config
kind: NotificationPolicy
spec:
routes:
overrides:
- alert_label_matchers:
- name: route_slack_ops_bots_critical
type: EXACT
value: "true"
notifiers:
critical:
notifier_slugs:
- slack-ops-bots
```
## Evaluation frequency
Datadog doesn't support the use of different evaluation frequencies per monitor, but
instead relies on a hard-coded interval dependant on the
[evaluation window](https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#evaluation-frequency).
For windows of less than `24h`, the window defaults to `1m`. Set this to a value you
want to use with the `Monitor.spec.interval_secs` field (in seconds), or default to
`15` to receive faster alerts.
# Dashboard widgets
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings/datadog/dashboards
Map common Datadog dashboard widgets to Palo Alto Networks Cortex XCOR standard dashboard panels.
Some [Datadog](/ingest/metrics-traces/collector/mappings/datadog) dashboard widgets
have a close match in Palo Alto Networks Cortex XCOR
[standard dashboards](/observe/dashboards). Recreate them with
[panels](/observe/dashboards/panels) on a standard dashboard, not a
[classic dashboard](/observe/dashboards/classic-dashboards).
Before you rebuild visuals, translate Datadog queries to
[PromQL](/investigate/querying/promql). For more information, see
[Querying metrics](/ingest/metrics-traces/collector/mappings/datadog/dogstatsd),
[Mapping](/ingest/metrics-traces/collector/mappings/datadog/mapping), and
[Migration considerations](/ingest/metrics-traces/collector/mappings/datadog/migration-issues).
## Widget overview
| Datadog widget | Cortex XCOR panel | Notes |
| - | - | - |
| Time series (stacked bars) | [Time series chart](/observe/dashboards/panels/time-series-chart) | Plots values across the dashboard time range |
| Top list | [Bar chart](/observe/dashboards/panels/bar-chart) | Set **Query type** to **Instant** in **Options** |
| Top list (tabular) | [Table](/observe/dashboards/panels/table) | Use when you need columns or multiple calculations |
| Query value | [Stat chart](/observe/dashboards/panels/stat-chart) | Single aggregated value |
Cortex XCOR doesn't directly import Datadog dashboard JSON. Rebuild panels
manually or with your migration plan and tooling.
## Stacked bar graph
Datadog time series widgets with stacked bars show values over time. Match them
with a **Time series chart** panel.
1. [Create a panel](/observe/dashboards/panels#create-panels-in-a-dashboard) of type
**Time series chart**, or [edit an existing panel](/observe/dashboards/panels#edit-panels-on-a-dashboard)
and [change its type](/observe/dashboards/panels#change-a-panels-type-cloud) to
**Time series chart**.
2. In the **Query** tab, enter a PromQL query for the series you want to stack.
3. In the **Settings** tab, in the **Visual** section:
* Set **Display** to **Bar**.
* Set **Stack series** to **All** for stacked bars, or to **Percent** for
percent-stacked bars.
4. Optional: In the **Settings** tab, in the **Tooltip** section, set **Sort** to
**Descending** instead of **Auto** or **None**.
5. In the **Edit panel** interface, click **Apply**.
6. On the dashboard, click **Save**.
After you [convert the Datadog query](/ingest/metrics-traces/collector/mappings/datadog/dogstatsd),
the following example shows one pattern for stacked values over time.
```text theme={null}
sum by (LABEL_NAME) (rate(METRIC_NAME[5m]))
```
Replace the following:
* *`METRIC_NAME`*: Your Prometheus metric name.
* *`LABEL_NAME`*: The label you group by.
## Top list
Datadog top list widgets rank series by a single value at a point in time. The
closest match is a **Bar chart** panel.
1. [Create a panel](/observe/dashboards/panels#create-panels-in-a-dashboard) of type
**Bar chart**, or [edit an existing panel](/observe/dashboards/panels#edit-panels-on-a-dashboard)
and [change its type](/observe/dashboards/panels#change-a-panels-type-cloud) to
**Bar chart**.
2. In the **Query** tab:
* In **Options**, set **Query type** to **Instant**.
* Enter a PromQL query with one value per series.
3. In the **Settings** tab, in the **Misc** section, set **Mode** to **Value** for
absolute values, or to **Percentage** for values as a percent of the total.
4. Optional: In the **Settings** tab, in the **Misc** section:
* Set **Sort** to **Descending (value)** if it isn't already. New bar chart panels
default to descending sort.
* Set **Limit** to cap how many bars display. If your query uses `topk`, set
**Limit** to the same value as the `topk` argument, or omit `topk` from the query
and use **Limit** only.
5. In the **Edit panel** interface, click **Apply**.
6. On the dashboard, click **Save**.
Use an instant query that returns one value per series. The `topk` argument limits how many
series the panel ranks, similar to a Datadog top list limit.
The following example shows one pattern for a ranked instant query.
```text theme={null}
topk(10, sum by (LABEL_NAME) (rate(METRIC_NAME[5m])))
```
Replace the following:
* *`METRIC_NAME`*: Your Prometheus metric name.
* *`LABEL_NAME`*: The label you group by.
### Top list as a table
Use a **Table** panel when you need label columns, multiple calculations, or a
sortable grid instead of horizontal bars.
1. [Create a panel](/observe/dashboards/panels#create-panels-in-a-dashboard) of type
**Table**, or [edit an existing panel](/observe/dashboards/panels#edit-panels-on-a-dashboard)
and [change its type](/observe/dashboards/panels#change-a-panels-type-cloud) to
**Table**.
2. In the **Query** tab:
* In **Options**, set **Query type** to **Instant**.
* Enter a PromQL query with one value per series.
3. In the **Settings** tab:
* In the **Data Format** section, set **Time series format** to **Series To Rows**.
* Under **Calculations**, select **Total**.
* In the **Sorting** section, set **Sort by** to **Total** and **Sort order** to
**Descending**.
4. Optional: In the **Settings** tab, in the **Data Format** section, enable
**Label-based columns** to show each series's labels.
5. In the **Edit panel** interface, click **Apply**.
6. On the dashboard, click **Save**.
Use an instant query that returns one value per series. The `topk` argument limits how many
rows display, similar to a Datadog top list limit.
The following example shows one pattern for a ranked instant query.
```text theme={null}
topk(10, sum by (LABEL_NAME) (rate(METRIC_NAME[5m])))
```
Replace the following:
* *`METRIC_NAME`*: Your Prometheus metric name.
* *`LABEL_NAME`*: The label you group by.
# Querying DogStatsD formatted metrics
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings/datadog/dogstatsd
Translate Datadog query syntax into PromQL to query DogStatsD-formatted metrics in Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR can ingest and use Datadog metrics. The query syntax
differs from PromQL,
which requires you to build queries differently.
## Anatomy of a Datadog query
The following example illustrates the structure of a Datadog query. Other queries might
be in a different order:
```text theme={null}
avg(last_1d):avg:count_nonzero(uptime{app:shopist} by {host}.as_rate()).rollup(avg,3600)<2
```
This query breaks down into these sections:
* Evaluation window: `avg(last_1d)`
* Space aggregator: `avg`
* Function: `count_nonzero`
* Metric name: `uptime`
* Filters or scope: `app:shopist`
* Grouping: `host`
* Type converter: `as_rate()`
* Functions: `rollup(avg,3600)`
* Operators: `<2`
For more information and examples, see the Datadog documentation for
[tracing](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax) and
[metrics query syntax](https://docs.datadoghq.com/metrics/#querying-metrics).
## Query syntax and modes
Querying DogStatsD metrics in Cortex XCOR are based on the different modes
[set in the Collector](/ingest/metrics-traces/collector/addl-metrics/dogstatsd#dogstatsd-ingestion).
Metrics storage in the backend depends on the `mode` configured in the `dogstatsd`
section of the `push` configuration in the Collector.
The query syntax is slightly different for each `mode`.
* `regular`
The DogStatsD `METRIC_NAME` maps to the Prometheus `__name__` label, replacing all
non-alphanumeric and non-dot characters with underscores. Dots convert to an
underscore ( `_` ). Any labels defined on the metric remain unchanged and append to
the list of labels. Refer to
[Prometheus naming recommendations](/ingest/metrics-traces/collector/mappings/prometheus/prometheus-recommendations)
for specific information.
* `graphite`
The Prometheus `__name__` label gets a constant `stat` name and the DogStatsD
`METRIC_NAME` assigns to a Prometheus label set in the configuration `namelabelname`
(by default `name`).
* `graphite_expanded`
The expanded Graphite mode is the same as `graphite` mode, except in addition to
storing everything in the `namelabelname` label, the `METRIC_NAME` separates on dot
( `.` ) and stores each part in a separate label. For example, `t0`, `t1`, and `t2`.
Here's an example of a DogStatsD query:
```text theme={null}
users.online:2\|c\|#country:france
```
The following table shows examples of the same query in each of the Collector mode
configurations:
| Mode | Metric Output |
| - | - |
| `regular` | `users_online{country="france"}` or `{__name__="users_online", country="france"}` |
| `graphite` | `stat{name="users.online", country="france"}` |
| `graphite_expanded` | `stat{name="users.online", t0="users", t1="online", country="france"}` |
## Querying best practices
For `graphite_expanded` metrics, it's best to start your query with `stat`, and then
search for either `t0` or the defined labels using autocomplete. By starting with
`stat`, your search scope focuses on the DogStatsD metrics, which improves query performance.
For example, using the previous metric (`users.online:2|c|#country:france`),
you can start your query with `stat`, add `t0` and using autocomplete, and search for
`users`. Then, search for `t1` and so on.
## Metric types and querying
All metrics convert to [Prometheus metric types](/control/shaping/shape-metrics/types)
before storage in Cortex XCOR. Most metric types are the same across DogStatsD and
Prometheus with the exception of counters.
Counters in Prometheus are running counters, which means they always increase or
remain constant, and never decrease. DogStatsD counters are `DELTA` counters.
When querying counters in Cortex XCOR, apply a
[`rate ()` function](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate).
### Querying Prometheus counters
In Prometheus, counters increase monotonically and must be wrapped in either a
`rate` or `increase` function. Cortex XCOR conversion tooling attempts to fetch the metric
type from Datadog. In this case of network issues or the metric not existing on
Datadog side, it falls back to doing a substring match (ending in `_total`, `_count`,
and so on). As an example, `gke_event_reception_client_track_event` doesn't end in a
typical counter-like suffix so Cortex XCOR assumes that it's a gauge if the
metric type fetch fails.
The converted query might look like this:
```text theme={null}
sum_over_time(sum(gke_event_reception_client_track_event{env="prod",event="sent"})[5m:])
```
The corrected query should look like this:
```text theme={null}
sum(rate(gke_event_reception_client_track_event{env="prod",event="sent"}[5m]))
```
You can tell at query time that a metric is a counter if the value climbs
monotonically to the right.
### Convert cumulative histogram queries
To correctly query histograms in Prometheus, you need to know the correct patterns.
Unlike Datadog distributions, Prometheus histograms use the `_bucket` suffix.
> [!NOTE]
>
> When doing a sum by condition, you must include `le`.
#### Query for quantiles
If your original Datadog query is:
```text theme={null}
p75:prom.compression_request_time_milliseconds{} by {codec}
```
The correct Prom query will be:
```text theme={null}
histogram_quantile(.75, sum by (le, codec)(rate(prom_compression_request_time_milliseconds_bucket{}[5m])))
```
#### Query for average
If your original Datadog query is this:
```text theme={null}
avg:prom.compression_request_time_milliseconds{} by {codec}
```
The correct PromQL query will be:
```text theme={null}
sum by (codec) (rate(prom_compression_request_time_milliseconds_sum{}[5m]))) /
sum by (codec) (rate(prom_compression_request_time_milliseconds_count{}[5m])))
```
The generic form is:
```text theme={null}
sum(rate(foo_histogram_sum{}[5m]))/sum(rate(foo_histogram_count{}[5m]))
```
#### Min and max
Convert histogram `min` and `max` by taking the `histogram_quantile(0, ...)` and
`histogram_quantile(1, ...)` respectively.
### Convert exponential histogram queries
It's important to know the pattern for correctly querying exponential histograms in
Prometheus coming from querying for distributions in Datadog.
#### Query for quantiles
If your original Datadog query is this:
```text theme={null}
p50:render_latency.latency{}
```
The correct PromQL query will be:
```text theme={null}
histogram_quantile(.5, sum(rate(render_latency{}[5m])))
```
#### Query for average
Exponential histograms have some special functions to calculate `avg`, `min`, `max`,
and `count`. These functions are `histogram_avg()`, and `histogram_count()`.
If your original Datadog query is this:
```text theme={null}
avg:render_latency{} by {codec}
```
The PromQL query will be:
```text theme={null}
histogram_avg(sum by (codec) (rate(render_latency{}[5m])))
```
#### Min and max
Histogram `min` and `max` can be converted by taking the `histogram_quantile(0, ...)`
and `histogram_quantile(1, ...)`, respectively.
#### Advanced: Take the one-hour average of the p99 of a histogram
Any PromQL query can be wrapped in any `_over_time()` function. To do
so, you must leverage PromQL subquery syntax. The generic format is:
`_over_time(()[1h:])`.
Without the subquery syntax `[1h:]`, you will see an error like `parse error: ranges
only allowed for vector selectors`. In PromQL, the `[1h:]` subquery syntax is
necessary when wrapping a query with an `_over_time()` function because
these functions operate on time series data over a range of time.
The `[1h:]` specifies a time range (`1h`) for the subquery and a default resolution
(`:`) for how often to evaluate the data points within that range. This creates a set
of data points over the specified time range that the `_over_time()`
function can process.
If your original Datadog query is this:
```text theme={null}
p99:prom.cloudtask_handler_time_ms{*}.rollup(avg, 3600)
```
The correct PromQL query will be:
```text theme={null}
avg_over_time(histogram_quantile(.99, sum by(env, service_name) (rate(prom_cloudtask_handler_time_ms{}[5m])))[1h:])
```
## Query differences between Datadog and Cortex XCOR
There are syntax differences between Cortex XCOR and Datadog queries. When you see
differences in your data between the platforms, the following sections can help you
determine the cause.
### Differences in interval
If there are differences in the data being displayed in panels between Datadog and
Cortex XCOR, review the time windows being used to see if they're different. Datadog
can default to displaying a 30 minute time window for deltas, while Cortex XCOR
defaults to 10 minutes. Adjust the query to use the same time window and `min` step
interval to validate the data. The following images show examples of these
differences:
Datadog displaying 2-hour deltas for the past 7 days:

Cortex XCOR displaying 10-min counter increases for the past 7 days (values are smaller):

Same metric with a 2-hour counter increase for the past 7 days:

### Set the Min step
Prometheus, like Datadog, defaults to using a step size which is a function of the
user interface's window size and query time window. Although you might want a line
chart showing trends over time, a bar chart using sum the of values in the chart
displays values higher than the actual values. Cortex XCOR recommends
[setting the `Min step` option](/investigate/querying/metrics/explorer#define-a-querys-minimum-step-period)
equal to the interval used in the query.
In dashboards, you can use the `$interval` variable in both places.
### Handle label mismatch in division using `group_left` and `ignoring`
Vector matching will fail when doing arithmetic on time series with different label
sets. In this example, division fails when grouping by `label_A` and `label_B` in the
numerator, but only `label_A` in the denominator.
```text theme={null}
sum by (label_A, label_B) (metric) / sum by (label_A) (other_metric)
```
The pattern to correctly write this query is as follows:
```text theme={null}
sum by (label_A, label_B) (metric) / ignoring(label_A) group_left() sum by (label_A) (other_metric)
```
### Sum multiple sparse series
Unlike Datadog, PromQL doesn't have behavior to `infer null as 0`. This means when
you try summing together multiple sparse time series, the result will be null if any
individual time series is null. For example, take the following query:
```text theme={null}
sum(requests_succeeded{}) + sum(requests_failed{})
```
If `requests.failed` only ever comes intermittently, the resulting addition would
only produce a value when both `requests.succeeded` and `requests.failed` return
values simultaneously. To solve this problem, Cortex XCOR recommends concatenating
the metrics together on `__name_`:
```text theme={null}
sum({__name__=~"requests_succeeded|requests_failed"})
```
Following this pattern, Prometheus will essentially merge the time series together.
### Complex Boolean logic in filters
Datadog has support for complex Boolean conditionals in label filters. Take the following query:
```text theme={null}
sum:my.metric{NOT error:404 AND NOT (namespace:foo AND error:503)}
```
A simplistic approach to convert this query would result in
```text theme={null}
sum(my_metric{error!="404", namespace!="my.namespace", error!="503"})
```
However, this is incorrect. Taking a step back, the original Datadog query translates to:
* `NOT error:404`: Select all metrics except those with error:404.
* `AND`: Both conditions need to be satisfied.
* `NOT (namespace:my.namespace AND error:503)`: Select all metrics except those with
`namespace:my.namespace` and `error:503` together.
To correctly convert this query to PromQL while preserving the logic, it should be:
```text theme={null}
sum(my_metric{error!="404"} unless (my_metric{namespace="my.namespace", error="503"}))
```
Because `my_metric{error!="404"}` filters out metrics where error is 404 unless
PromQL is used to exclude a subset of the data that matches certain labels from the
main set.
`my_metric{namespace="my.namespace", error="503"}` defines the subset to exclude,
which is those with `namespace:my.namespace` and `error:503`.
This conversion ensures the correct logical interpretation of the original Datadog query.
# Datadog migration considerations
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings/datadog/migration-issues
Review questions about metrics, dashboards, and alerts to plan a migration from Datadog to Palo Alto Networks Cortex XCOR.
Datadog uses its own proprietary query language and storage system. Palo Alto Networks
Cortex XCOR is
based on Prometheus. As you consider moving from Datadog to Cortex XCOR,
review the following questions and suggestions as you plan your migration.
## General
* Are you planning to stay on DogStatsD, or move to
[Prometheus](https://prometheus.io/) or
[Open Telemetry](https://opentelemetry.io/)?
* How's your cluster defined?
### Metrics
Understanding the metrics you're using and how they're used can help determine
the time needed to switch from the previous system to Cortex XCOR.
* Do you have a list of the metrics you are using for dashboards and alerts?
* How many dashboards do you need to convert?
* How many widgets per dashboard?
* Determine the breakdown of widget type (visualization) per dashboard.
* Which dashboards are critical to you and your users?
You can use [popularity ranking in Datadog](https://docs.datadoghq.com/dashboards/#popularity)
to determine this:
* [Get All Dashboards](https://docs.datadoghq.com/api/latest/dashboards/#get-all-dashboards).
* Iterate over these dashboards' IDs: [Get a dashboard](https://docs.datadoghq.com/api/latest/dashboards/#get-a-dashboard).
* How many monitors do you need to convert?
* How do you route alerts in Datadog today?
* Dynamic routing based off of labels.
* Static routing per monitor.
* Which monitors are critical?
Monitors/alerts that are going to PagerDuty are often the most critical.
Example:
[Get All Monitor Details](https://docs.datadoghq.com/api/latest/monitors/#get-all-monitor-details).
## Integrations
Cortex XCOR integrates with other systems.
* What integrations are you currently using?
* What metrics do those integrations use, either ingested or exposed.
* How do you use those metrics in your dashboards and alerts?
This helps create the correct exporter configuration. For example, configuring
[YACE](https://github.com/nerdswords/yet-another-cloudwatch-exporter) to do
a sum statistics aggregation versus average gives different results.
* Do you have a plan for how to ingest the OSS metrics?
* Get consensus about using OSS Grafana dashboards for OSS metrics, or if you'll need
to convert the widgets.
## Custom metrics
You and your users might have created custom metrics for internal applications.
* How many metrics are distributions? Egress costs might be higher for distribution
metrics than for other types.
* Develop an understanding of what your custom metrics are, what they're monitoring,
and what labels they have.
## Alerts migration
Alerts and notifications are often critical parts of your observability platform.
* Obtain a list of the existing alerting platforms being used.
* Create a list of the notification channels in use.
# Differences between the Prometheus Operator and Chronosphere Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings/prometheus/operator-collector
Compare the Prometheus Operator and Chronosphere Collector for deployment, alerting, service discovery, and long-term storage.
## Summary
| Requirement | Prometheus Operator | Chronosphere Collector |
| - | - | - |
| Deployment | StatefulSets managed by Prometheus Operator | Sidecar, Deployment, or DaemonSet |
| Alerting | AlertManagerConfig, AlertManager, PrometheusRule | Alerts and Monitors |
| High availability and long-term storage | Provided by Thanos | Natively supported |
| Service discovery | Probe, PodMonitor, ServiceMonitors | Annotations, ServiceMonitors, Prometheus Discovery |
## Alerting
Palo Alto Networks Cortex XCOR supports Prometheus alerts, but not
[AlertManagerConfig](https://prometheus.io/docs/alerting/latest/configuration/) or
[AlertManager custom resource definitions (CRDs)](https://prometheus-operator.dev/docs/getting-started/design/#alertmanager).
Cortex XCOR alerting (called *monitors*) has concepts that don't apply to
Prometheus alerting rules, has its own concepts and models, and doesn't support
complex routing trees. For more information, refer to the [monitors
documentation](/investigate/alerts/monitors).
Due to Cortex XCOR being a single data store, you can merge alerts, so an
alert queries all metrics and not only metrics local to a Prometheus instance.
You manage alerting configuration separate of any cluster or Chronosphere Collector
configuration with Cortex XCOR, [Chronoctl](/tooling/chronoctl), or
[Terraform](/tooling/infrastructure/terraform). This approach brings more
flexibility for managing configuration and means you can spread configuration
responsibility between teams.
## Scaling
### Thanos support
Cortex XCOR is a scalable backend for Prometheus and doesn't require
[Thanos](https://thanos.io) or the
[ThanosRuler CRD](https://prometheus-operator.dev/docs/getting-started/design/#thanosruler).
### Sharding across instances
The Prometheus Operator supports automatically sharding ServiceMonitors across
multiple Prometheus instances. However, you still need to setup a remote write
destination such as Thanos, or a single large instance.
The Collector handles scale by using a DaemonSet and scoping each instance of the
Collector to a particular node. Using a DaemonSet is the recommended way to deploy
the Collector, but there are other methods available you can read about in the
[Collector documentation](/ingest/metrics-traces/collector/install/kubernetes).
There are advantages and disadvantages to deploying the Collector as a DaemonSet:
* **Advantages**:
* Using a DaemonSet means you don't need large or powerful instances to run the
Collector.
* The DaemonSet implementation reduces any impact of a single Collector instance
experiencing issues.
* **Disadvantages**:
* All instances created with a DaemonSet must have uniform resources.
## Configure Prometheus
Prometheus Operator has a
[Prometheus CRD](https://prometheus-operator.dev/docs/getting-started/design/#prometheus)
for configuring global settings on the instances it creates. Cortex XCOR
supports many of these settings, but instead you set them in Collector configuration.
For more information, visit the
[configuration documentation](/ingest/metrics-traces/collector/configure).
Some Prometheus Operator settings that don't transfer to the context of the Collector,
such as `volumeMounts` and `priorityClass`.
The Collector doesn't support the following fields from the ServiceMonitor CRD:
* `targetLabels`
* `podTargetLabels`
Instead, use [Prometheus `relabel_config`](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config)
which allows advanced modifications to any target and its labels before ingesting the
metrics.
## Service discovery
### Static scrape targets
To replicate the capabilities of the
[Prometheus Operator Probe CRD](https://prometheus-operator.dev/docs/getting-started/design/#probe),
Cortex XCOR recommends running a single instance of the Collector as a sidecar (if
possible), or a one instance Deployment. If you run the Collector as a DaemonSet, all
instances of the Collector attempt to scrape the same targets, resulting in multiple
copies of the same metrics. For more information about available options, refer to
the [Collector documentation](/ingest/metrics-traces/collector/install/kubernetes#install-the-collector).
# Prometheus metric naming recommendations
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings/prometheus/prometheus-recommendations
Follow Prometheus conventions for metric names and labels to keep telemetry consistent across teams in your organization.
When choosing metric names and key-value pairs for labels, it's important to be consistent
throughout your organization. Consistent labels reduce confusion across teams.
A metric consists of a name and a set of labels, regardless of its
[metric type](/control/shaping/shape-metrics/types).
```text theme={null}
node_network_receive_bytes_total{hostname="host1",mode="system"}
```
The *name* of a metric is a single word that uniquely identifies the metric. In this
example, the name is `node_network_receive_bytes_total`.
A *label* is a key-value pairs that helps differentiate and give meaning to
metric names. In this example, the labels are `hostname="host1"` and `mode="system"`.
## Metric name
Use these guidelines to name your metrics:
> [!NOTE]
>
> Metric names must follow [Prometheus name and label requirements](https://prometheus.io/docs/concepts/data_model/).
> Metrics that do not meet these requirements can not be queried and are considered
> invalid. Palo Alto Networks Cortex XCOR rejects metrics that don't meet these definitions.
* Select a metric name that describes a function of the system you're monitoring
(for example, `node_memory_usage_bytes`). Be as concise as possible.
* Include a prefix for the metric name that's relevant to the domain the metric belongs
to. For example, adding `http` to `http_request_duration_seconds` lets users know
this metric belongs to the HTTP domain.
* Use suffixes to describe the unit in plural form. For example, the `seconds` in
`http_request_duration_seconds`.
* Metric names can contain letters, numbers, underscores, or colons, based on the
regular expression `[a-zA-Z_:][a-zA-Z0-9_:]*`.
* Reserve colons (`:`) in the name for calculated or aggregated metrics, such
as those produced by rollup rules.
* Don't use underscores at the beginning of a metric name. Leading underscores are
reserved for internal use.
* Periods (`.`) convert to underscores (`_`).
## Label names and values
Labels are a set of comma-separated key-value pairs, contained in curly braces. Labels
let you query and alert on these different fields.
Use labels to differentiate and give meaning to metric names. For example,
`http_requests_total` refers to the total number of HTTP requests, but isn't fully
descriptive. Using labels, you can break down the number of requests by `method`,
`status_code`, and `endpoint`. Here are some best practices and limitations:
* Label keys
* Use label keys to add dimensions to your metric name. For example,
`endpoint:/api/create_user` or `method:POST`).
* Don't add unbounded, high-cardinality labels, such as UUIDs or timestamps.
* Label keys can contain letters, numbers, underscores, or colons, based on the
regular expression `[a-zA-Z_:][a-zA-Z0-9_:]*`.
* Don't use underscores at the beginning of a label key. Leading underscores are
reserved for internal use.
* Label values
* Label values might contain any Unicode characters.
* A label with an empty label value is equivalent to a label that doesn't exist.
* You can use PromQL to filter and aggregate based on these dimensions. Changing
any label value, including adding or removing a label, creates a new time series.
# Migration notes for SignalFx (Splunk) to PromQL
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings/signalfx
Learn how to translate SignalFx queries to PromQL for Palo Alto Networks Cortex XCOR.
There are several key differences between SignalFx (Splunk) and PromQL of which to be
aware when migrating queries to Palo Alto Networks Cortex XCOR:
* *Rollups* in SignalFx are used to aggregate data points within a single time
series. With Cortex XCOR, rollups are [defined only on ingest](/control/shaping/shape-metrics/rules),
and not at query time. However, PromQL offers a
[set of functions](https://prometheus.io/docs/prometheus/latest/querying/functions/#aggregation_over_time)
for aggregating individual time series over time.
* *Analytics* in SignalFx are the equivalent to functions in PromQL.
## Equivalent function list
| SignalFx | PromQL | Notes |
| - | - | - |
| Absolute value | `abs()` | *none* |
| Bottom | `bottomk()` | *none* |
| Ceiling | `ceil()` | *none* |
| Count | `count()`, `count_over_time()` | *none* |
| Delta | `delta()` | *none* |
| EWMA and Double EWMA | `holt_winters()` | `holt_winters()` is similar to, but not exactly like, Exponentially Weighted Moving Average |
| Exclude | Use comparators | *none* |
| Floor | `floor()` | *none* |
| Integrate | `rate()` | *none* |
| LN - Log (natural) | `ln()` | *none* |
| Log10 | `log10()` | *none* |
| Maximum | `max()`, `max_over_time()` | *none* |
| Mean | `avg()`, `avg_over_time()` | *none* |
| Minimum | `min()`, `min_over_time()` | *none* |
| Percentile | `quantile()`, `quantile_over_time()` | Use histogram\_quantile() with Histograms |
| Power | Use operators | *none* |
| Rate of change | `rate()` | *none* |
| Scale | Use operators | *none* |
| Square root | `sqrt()` | *none* |
| Standard deviation | `stddev()`, `stddev_over_time()` | *none* |
| Sum | `sum()`, `sum_over_time()` | *none* |
| Timeshift | offset | *none* |
| Top | `topk()` | *none* |
| Variance | `stdvar()`, `stdvar_over_time()` | *none* |
# Migration notes for Tanzu (Wavefront) to PromQL
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/mappings/wavefront
Learn how to translate Tanzu Observability queries to PromQL for Palo Alto Networks Cortex XCOR.
WavefrontQL and PromQL are both used to visualize data, and some functions are very
similar. Use this information for guidance as you convert queries from Wavefront to
Prometheus.
## Functions
| Wavefront | PromQL | Notes |
| - | - | - |
| `abs()` | `abs()` | *none* |
| `exists()` | `absent()` | WavefrontQL must use the `ts()` function. |
| Unsupported | `absent_over_time()` | *none* |
| `ceil()` | `ceil()` | WavefrontQL must use the `ts()` function. |
| Unsupported | `changes()` | *none* |
| `limit()` | `clamp_max()` | *none* |
| `floor()` | `clamp_min()` | *none* |
| `day()` | `day_of_month()` | Wavefront needs to specify the time zone with the day function. PromQL returns results in Coordinated Universal Time (UTC). |
| `weekday()` | `day_of_week()` | *none* |
| `daysInMonth()` | `days_in_month()` | *none* |
| `align()` | `_over_time()` | *none* |
| `deriv()` | `deriv()` | *none* |
| `exp()` | `exp()` | *none* |
| Unsupported | `floor()` | *none* |
| `percentile()` | `histogram_quantile()` | In PromQL, use `histogram_quantile(0.95, sum by (le) rate(my_histogram_metric_bucket[1m]))` to get the ninety-fifth percentile. |
| `hw()` | `holt_winters()` | *none* |
| `hour()` | `hour()` | *none* |
| Unsupported | `idelta()` | Use only with gauges in PromQL. |
| `ratediff()` | `increase()` or `irate()` | WavefrontQl `ratediff()` gives you the only difference in value between each two data points. |
| `join()` | `label_join()` | Wavefront can do specific joins like SQL. |
| `taggify()` | `label_replace()` | *none* |
| `log()` | `ln()` | *none* |
| Unsupported | `log2()` | *none* |
| `log10()` | `log10()` | *none* |
| `minute()` | `minute()` | PromQL returns results in Coordinated Universal Time (UTC). You must specify a time zone in WavefrontQL. |
| `month()` | `month()` | PromQL returns results in Coordinated Universal Time (UTC). You must specify a time zone in WavefrontQL. |
| `linearforecast()` | `predict_linear()` | WavefrontQL can specify a length of time in the past for use with predicting the linear regression. PromQL predicts using the entire series, for use only with gauges. |
| `rate()` | `rate()` | *none* |
| `flapping()` | `resets()` | *none* |
| `round()` | `round()` | PromQL rounds up the tied values. |
| Unsupported | `scalar()` | *none* |
| Unsupported | `sort()` | PromQL `sort()` and `sort_desc()` show the data order in the Console view. Because Wavefront visualizes queries in charts instead of a console, they don't support this option. |
| Unsupported | `sort_desc()` | PromQL `sort()` and `sort_desc()` show the data order in the Console view. Because Wavefront visualizes queries in charts instead of a console, they don't support this option. |
| `sqrt()` | `sqrt()` | *none* |
| `time()` | `time()` | *none* |
| `timestamp()` | `timestamp()` | *none* |
| Unsupported | `vector()` | *none* |
| `year()` | `year()` | PromQL returns results in Coordinated Universal Time (UTC). You must specify a time zone in WavefrontQL. |
## Time functions
| Wavefront | PromQL | Notes |
| - | - | - |
| `mavg()` | `avg_over_time()` | *none* |
| `min()` | `min_over_time()` | WavefrontQL must use the `ts()` function to match `min_over_time()`. |
| `max()` | `max_over_time()` | WavefrontQL must use the following form to match `max_over_time()`. |
| `msum()` | `sum_over_time()` | `sum_over_time()` is applicable only to gauges. |
| `mcount()` | `count_over_time()` | *none* |
| `percentile()` | `quantile_over_time()` | WavefrontQL requires the rawpercentile() function instead of percentile(). |
| | `stddev_over_time()` | *none* |
| | `stdvar_over_time()` | *none* |
## Aggregations
| Wavefront | PromQL | Notes |
| - | - | - |
| `rawsum()` | `sum()` | *none* |
| `min()` | `min()` | To emulate PromQl, use the following WavefrontQL form. |
| `max()` | `max()` | To emulate PromQl, use the following WavefrontQL form. |
| `avg()` | `avg()` | To emulate PromQL, use the following WavefrontQL form. |
| | `group()` | *none* |
| `stddev()` | `stddev()` | WavefrontQL can do only standard deviation on histograms. |
| `variance()` | `stdvar()` | The `variance()` function uses interpolation. To not use interpolation, use `rawvariance()`. |
| `count()` | `count()` | WavefrontQL must use the `ts()` function to approximate the effect of the PromQL function. |
| `count()` | `count_values()` | To emulate PromQL function, use a Wavefront `events` function. |
| `bottomk()` | `bottomk()` | *none* |
| `topk()` | `topk()` | *none* |
| | `quantile()` | *none* |
## Binary operators
| Wavefront | PromQL | Notes |
| - | - | - |
| `.eq()` | `==` | *none* |
| `.ne()` | `!=` | *none* |
| `.gt()` | `>` | *none* |
| `.lt()` | `<` | *none* |
| `.ge()` | `>=` | *none* |
| `.le()` | `<=` | *none* |
## Boolean operations
| Wavefront | PromQL | Notes |
| - | - | - |
| `intersect()` | `and` | intersection |
| `union()` | `or` | union |
| `complement()` | `unless` | complement |
# Verify and monitor the Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/monitor
Verify that the Chronosphere Collector is scraping metrics and receiving traces, and monitor Collector health in your clusters.
To ensure the Collector is ingesting data, you can verify the Collector is
[scraping the intended metrics](/ingest/metrics-traces/collector/monitor/verify-metrics) or
[receiving trace data](/ingest/metrics-traces/collector/monitor/verify-traces) from your app.
You can also [monitor the Collector](/ingest/metrics-traces/collector/monitor/monitor-collector)
to ensure that Palo Alto Networks Cortex XCOR receives telemetry data from your instances. If the
Collector can't start or scrape metrics, you can
[troubleshoot metrics ingestion](/ingest/metrics-traces/collector/monitor/monitor-collector#troubleshoot-metric-ingestion).
# Monitor the Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/monitor/monitor-collector
Create monitors on kube-state-metrics to track Chronosphere Collector health and troubleshoot metric ingestion failures.
If Collectors are unreachable, the self-scraping metrics might not reach
Palo Alto Networks Cortex XCOR. In these cases, you can
[create a monitor](/investigate/alerts/monitors#create-a-monitor) for the
`kube-state-metrics` key to examine the health of a Collector.
This method of monitoring the Collector assumes that you're scraping
`kube-state-metrics`, and that your Collectors typically report as expected.
> [!NOTE]
>
> The following examples assume that Collector pod names include the `chronocollector`
> prefix.
## DaemonSet Collector is unavailable
You can create a monitor for the following `kube-state-metrics` to determine whether
a Collector running as a DaemonSet is unavailable.
### Pods are unavailable
Monitor the following metrics to help determine whether DaemonSet pods are
unavailable.
```text theme={null}
(kube_daemonset_status_number_unavailable{daemonset="chronocollector"} * on (instance, host_ip, cluster) group_left(pod) kube_pod_info{pod=~"chronocollector.+", pod_ip!="", created_by_kind="DaemonSet"}) > 0
(kube_daemonset_status_desired_number_scheduled{daemonset="chronocollector"} * on (instance, host_ip, cluster) group_left(pod) kube_pod_info{pod=~"chronocollector.+", pod_ip!="", created_by_kind="DaemonSet"} - on (pod) kube_daemonset_status_number_available{daemonset="chronocollector"} * on (instance, host_ip, cluster) group_left(pod) kube_pod_info{pod=~"chronocollector.+", pod_ip!="", created_by_kind="DaemonSet"}) > 0
```
### Pod is restarting
Monitor the following metrics to help determine if a `kube-state-metrics` Collector
pod is restarting. The following query reviews the past five minutes to return any
pod restarts for the `kube_pod_container_status_restarts_total` metric:
```text theme={null}
rate(kube_pod_container_status_restarts_total{pod=~"chronocollector.+"}[5m]) > 0
```
### Container is restarting
A container might restart for various reasons. For example, the Collector containers
could be stuck in a crash loop due to a failed deployment, or there might be underlying
platform issues. You can examine the service container logs to help determine what caused
a container to restart, and also review the `kube_pod_container_status_terminated_reason`
metrics.
Create a monitor with the following query to return the rate of increase of the
`kube_pod_container_status_restarts_total` metric over the past 15 minutes. This
metric is helpful for detecting container restarts:
```text theme={null}
increase(kube_pod_container_status_restarts_total{container=~"chronocollector"}[15m])
```
### Drops in the number of scraped targets
A significant drop in the number of scrape targets can indicate issues with the
Collector, or with the metric endpoints themselves.
Create a monitor with the following query to calculate the percentage of active
targets the Collector is scraping for a given instance. The query divides the rate of
change in the number of active targets over the past hour by the maximum number of
active targets over the past 24 hours:
```text theme={null}
sum by (instance) (delta(chronocollector_k8s_gatherer_sink_targets_active{job=~".*chronocollector.*"}[1h] offset 1m))/
sum by (instance) (max_over_time(chronocollector_k8s_gatherer_sink_targets_active{job=~".*chronocollector.*"}[1h] offset 24h)) * 100
```
### Calculate scrape latency
Create a monitor with the following query to calculate scrape latency. The query
calculates the P99 latency for scrapes of `chronocollector_scrape_latency_bucket`
metric values grouped by `job` and `le` labels:
```text theme={null}
histogram_quantile(0.99, sum by(job, le) (rate(chronocollector_scrape_latency_bucket{job=~".*chronocollector.*"}[1m])))
```
### Detect error rates
Create a monitor with the following query to detect Collector error rates. The query
calculates the error rate of the Collector within a one-minute period:
```text theme={null}
1 - (sum by (instance) (rate(chronocollector_gateway_push_errors{job=~".*chronocollector.*"}[1m])))/(sum by (instance) (rate(chronocollector_gateway_push_errors{job=~".*chronocollector.*"}[1m])) + sum by (instance) (rate(chronocollector_gateway_push_success{job=~".*chronocollector.*"}[1m])))
```
The output is a value between `0` and `1` that represents the error rate as a percentage
of the total rate for the `chronocollector` job over the specified period. A value
closer to `0` indicates a lower error rate, while a value closer to `1` indicates a
higher error rate.
## Deployment Collector is unavailable
When Chronosphere Collector actively scrapes metrics, it continuously generates
an `up` metric for each target. This metric serves as a heartbeat for the Collector;
if the `up` metric is unavailable, the Collector can't scrape `kube-state-metrics`,
which means `kube-state-metrics` can't indicate the Collector's health.
To track the `up` metric,
[create a monitor](/investigate/alerts/monitors#create-a-monitor) that
generates a notification if this metric is unavailable.
```shell theme={null}
up{instance=~"chronocollector-ksm"} > 0
```
## Track network egress
To assess the effects of compression and egress configuration changes, you can monitor
the egress traffic from the Chronosphere Collector to Cortex XCOR ingestion
endpoints.
To track the egress traffic in gigabytes over a 24-hour period, use the following
query:
```shell theme={null}
sum(increase(chronocollector_gateway_push_bytes{}[1d])) / (1024^3)
```
## Troubleshoot metric ingestion
If the Chronosphere Collector can't start or scrape metrics, use the following methods
to troubleshoot issues. These steps assume that you're running the Collector in a
Kubernetes environment.
1. Review the Collector logs for errors. Run the following command to view the
Collector logs:
```shell theme={null}
kubectl logs ds/chronocollector
```
For example, the following error indicates the scrape timeout is too low for the
job default of `10s`:
```text theme={null}
{"level":"info","ts":1578154502.096278,"msg":"","level":"debug","scrape_pool":"collector","target":"http://0.0.0.0:9100/metrics","msg":"Scrape failed","err":"Get http://0.0.0.0:9100/metrics: context deadline exceeded"}
```
2. If the logs don't provide any insights, ensure the API token and gateway
address exist as a secret in the Kubernetes cluster:
```shell theme={null}
kubectl get secrets
```
3. If there's no output to your terminal, a Secret doesn't exist. Create a Secret
using `kubectl`:
```shell theme={null}
kubectl create secret generic chronosphere-secret \
--from-literal=api-token=API_TOKEN \
--from-literal=address=TENANT:443
```
Replace the following:
* *`API_TOKEN`*: The API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
* *`TENANT`*: The name of your Cortex XCOR tenant.
4. Ensure annotations are properly configured in each of the Pods you want to scrape.
Refer to [Collector Kubernetes annotations](/ingest/metrics-traces/collector/discover#kubernetes-annotations)
for more details.
# Verify the Collector is scraping metrics
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/monitor/verify-metrics
Verify that the Chronosphere Collector is scraping the metrics you expect by using Live Telemetry Analyzer and Collector statistics.
Use the following methods to ensure the Collector is scraping the intended metrics.
> [!NOTE]
>
> Contact [Cortex XCOR Support](/support) if there are other Collector statistics you
> want to access. Similarly, contact Cortex XCOR Support to request having specific
> telemetry data removed from Palo Alto Networks Cortex XCOR.
## Live Telemetry Analyzer
[Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer) lets you inspect, in real
time, the stream of metrics that Cortex XCOR is ingesting. You can use the
Metrics Profiler to verify the Collector's connection to Cortex XCOR by
viewing the metrics that the Collector emits about itself.
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Live Telemetry**.
2. Click the **Metrics** tab.
3. Click **Capture live data** to display streaming metrics.
4. In the **Keys** list, click the **`__name__`** and **instance** label keys.
5. In the **Values** filter, enter the following key:value pairs:
```text theme={null}
__name__:chronocollector_*
instance:INSTANCE_NAME
```
Replace *`INSTANCE_NAME`* with the host and port where the Collector is running.
For example, a Collector running locally uses an instance name of
`localhost:3030`.
In the **Values** list, the displayed metrics include your Collector instance in
the **instance** column.
## Metrics Explorer
[Metrics Explorer](/investigate/querying/metrics/explorer) lets you validate metrics if
you know the name of the metric or label you're searching for.
1. In the navigation menu select
** Explorers > Metrics Explorer**.
2. Enter the following query in the query field.
```text theme={null}
count(chronocollector_jobs) by (instance)
```
3. Click **Run**.
The name of your Collector instance returned from the `kubectl logs` command
displays in the table of metrics:
| Time | Instance |
| - | - |
| 2023-02-03 10:56:04 | default/chronocollector-POD\_NAME |
*`POD_NAME`* is the name of the Kubernetes pod where your Collector instance is
running.
### Dashboards
Cortex XCOR includes a **Collectors** dashboard by default that's
actively maintained and updated. This [dashboard](/observe/dashboards) displays
information about the metrics the Collector scrapes. When the Collector begins
receiving metrics, the Collector dashboard panels populate and display statistics
such as:
* Number of Collectors running on the cluster
* Number of metrics scraped per second
* Number of scrape targets per job
* Memory and CPU consumption
* Push latency to Cortex XCOR
Creating monitors based on some of these key metrics can help you detect if a
Collector is performing poorly.
Refer to the
[default dashboard metrics](/overview/concepts/dictionary#collectors)
for the full list of available metrics.
In the navigation menu select **Dashboards** to access the Collector dashboard.
* If you're using Kubernetes discovery, the Collector configuration includes an
annotation for the Collector dashboard by default.
* If you're using Prometheus discovery and don't see the Collector dashboard, ensure
the following structure exists in your Collector configuration file under the
`discovery` section:
```yaml theme={null}
discovery:
prometheus:
- job_name: 'Collector'
scrape_interval: 15s
scrape_timeout: 30s
static_configs:
- targets: ['0.0.0.0:3030']
```
# Verify the Collector is receiving traces
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/collector/monitor/verify-traces
Verify that the Chronosphere Collector is receiving trace data by using Trace Analyzer and Trace Explorer.
Use the following methods to ensure the Chronosphere Collector is receiving trace
data.
## Trace Analyzer
[Trace Analyzer](/investigate/analyze/trace-analyzer) provides a real-time view of
incoming traces grouped by tag and their relative frequency. Use Trace Analyzer to
display the stream of incoming spans from your trace data.
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Live Telemetry**.
2. Click the **Traces** tab.
3. Click **Capture live data** to display the stream of incoming spans. The default grouping
shows spans by service (`__service__`), but you can include additional tags to group
by such as `__trace_id__` and `__span_id__`.
## Trace Explorer
[Trace Explorer](/investigate/querying/traces) helps you search for traces
and spans so that you can identify, triage, and understand the root cause of
problems.
1. In the navigation menu select
** Explorers > Trace Explorer**.
2. Modify the **Time Window** to the period when the Collector started ingesting
trace data.
The timeline graph displays a spike at the time when trace data started flowing
into Palo Alto Networks Cortex XCOR.
# Ingest metrics and traces using the OpenTelemetry Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/otel
Use the OpenTelemetry Collector to collect metrics and traces and transfer them to Cortex XCOR for analysis.
The [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) is
vendor agnostic, open source, and supports popular backends and the OpenTelemetry
Protocol. You can use the OpenTelemetry Collector to ingest metric data, and configure
dynamic, remotely configurable
[head sampling](/control/shaping/sample-traces/head-sampling#configure-the-opentelemetry-collector)
for your trace data.
## Get started
To get started with the OpenTelemetry Collector:
1. [Instrument your app](https://opentelemetry.io/docs/instrumentation/) with an
[OpenTelemetry SDK](https://opentelemetry.io/docs/instrumentation/).
2. Create an API token to authenticate with Palo Alto Networks Cortex XCOR. You must
[create a service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account).
Cortex XCOR recommends creating a restricted service account with a write-only
scope. Use the generated API token in the OpenTelemetry Collector file
`config.yml` to authenticate with Cortex XCOR.
> [!WARNING]
>
> Store your API token in a secure location. If you lose your token, you must create
> a new service account.
3. Configure your OpenTelemetry Collector to
[ingest metrics or traces](/ingest/metrics-traces/otel/otel-ingest).
## Conversion from OpenTelemetry to Prometheus-compatible metrics
Cortex XCOR follows the
[OpenTelemetry to Prometheus Specification](https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#otlp-metric-points-to-prometheus)
to convert OpenTelemetry metrics to Prometheus-compatible metrics and adds delta
temporality aggregation support to provide a more seamless experience for delta
metrics.
Cortex XCOR implements the following data conversions as defined in the
[OpenTelemetry to Prometheus Specification](https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#otlp-metric-points-to-prometheus):
* Sanitize metric and label names to conform to
[Prometheus naming conventions](/ingest/metrics-traces/collector/mappings/prometheus/prometheus-recommendations).
For example, an OpenTelemetry metric named `http.duration` becomes `http_duration`.
* Collapse multiple consecutive underscore (`_`) characters to a single underscore
character.
* Metric names for OpenTelemetry explicit bucket boundary histograms follow the
OpenMetrics specification to correctly name the time series for each histogram
bucket. For example, a histogram has one `_bucket` series for each bucket, and
a series for the `_sum` and `_count`.
* Cortex XCOR supports staleness markers and writes them whenever any OpenTelemetry
data point presents a `NoRecordedValue` flag for the associated scope.
* Cortex XCOR **requires** `service.instance.id` for all metric time series to
ensure
[metric writer uniqueness](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#single-writer),
and **rejects** metrics without a `service.instance.id` resource attribute. To
configure a value for `service.instance.id`, follow the recommendations in
[Map resource attributes to Prometheus job and instance](/ingest/metrics-traces/otel/otel-ingest#map-resource-attributes-to-prometheus-job-and-instance).
Cortex XCOR deviates from the
[OpenTelemetry to Prometheus Specification](https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#otlp-metric-points-to-prometheus)
to reduce operational chores and improve metric usability.
* Cortex XCOR preserves metric names and doesn't apply metric type or unit suffixes
to metrics as defined in the OpenMetrics specification, with the exception of
explicit bucket boundary histograms.
* Cortex XCOR drops OpenTelemetry resource and data point attributes
that have empty values from the time series. Cortex XCOR then accepts
the resulting time series for processing.
* Cortex XCOR merges both OpenTelemetry Protocol resource attributes
and individual data point attributes into a single set of Prometheus labels for
each time series. Merging resource attributes after ingestion removes the need to
[manually configure resource attribute copying](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/prometheusexporter/README.md#setting-resource-attributes-as-metric-labels)
in your OpenTelemetry Collector configuration. To configure resource attribute
exclusions or turn off resource attribute merging, see
[Configure OpenTelemetry ingestion](/ingest/metrics-traces/otel/otel-config).
* Cortex XCOR doesn't create a
[`target_info`](https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#resource-attributes-1)
metric by default. The `target_info` metric is equivalent to the `up` metric,
the presence of which indicates that a resource is available. You can
[change your configuration](/ingest/metrics-traces/otel/otel-config) to
enable `target_info` metric creation.
# Ingest DogStatsD metrics with the OpenTelemetry Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/otel/ingest-dogstatsd
How to use the OpenTelemetry Collector to ingest DogStatsD metrics.
The [OpenTelemetry Collector StatsD receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/statsdreceiver)
accepts, transforms, and aggregates DogStatsD metrics into OpenTelemetry protocol
(OTLP) metrics for use in Palo Alto Networks Cortex XCOR.
## Install the OpenTelemetry Collector
To install the OpenTelemetry Collector, deploy it as a Kubernetes DaemonSet on the
same node as your DogStatsD clients.
DogStatsD clients use the User Datagram Protocol (UDP) to send metrics. The OpenTelemetry
Collector must be on the same node as the DogStatsD client to ensure reliable network
communication between the DogStatsD client and the OpenTelemetry Collector.
## Configure the OpenTelemetry StatsD receiver
You can configure the StatsD receiver by adding it to your
[OpenTelemetry Configuration](https://opentelemetry.io/docs/collector/configuration/).
The following configuration defines an OpenTelemetry receiver and a
[StatsD receiver](https://github.com/statsd/statsd/blob/master/README.md) to accept
DogStatsD metrics from Datadog clients.
```yaml theme={null}
receivers:
otlp:
protocols:
grpc:
statsd/dogstatsd:
# Default UDP port.
endpoint: "localhost:8125"
# Default interval. Use your licensed resolution: 60s, 30s or 15s.
aggregation_interval: 60s
# Metric type must be enabled. Default.
enable_metric_type: true
# DogStatsD clients support key-only tags, but attributes without a value are ignored in the Prometheus data model.
enable_simple_tags: false
# DogStatsD clients send delta counters (non-monotonic counters).
is_monotonic_counter: true
enable_ip_only_aggregation: true
# Aggregates DogStatsD timers as exponential histograms.
timer_histogram_mapping:
- statsd_type: "timing"
observer_type: "histogram"
histogram:
max_size: 160
- statsd_type: "histogram"
observer_type: "histogram"
histogram:
max_size: 160
- statsd_type: "distribution"
observer_type: "histogram"
histogram:
max_size: 160
```
## Configure an OpenTelemetry protocol exporter to send DogStatsD metrics
DogStatsD metrics sent to Datadog are normalized to follow
[Datadog's best practices](https://docs.datadoghq.com/developers/guide/what-best-practices-are-recommended-for-naming-metrics-and-tags/).
For example, Datadog lowercases tag names and values and modifies tag values to
begin with an alphabetical character.
To reduce migration efforts and minimize changes to queries, Cortex XCOR
can apply the same sanitization to ensure metric names, tags, and values are the
same in both Cortex XCOR and Datadog by passing an additional header.
The following configuration defines these OpenTelemetry protocol (OTLP) exporters:
* `otlp/chronosphere` defines a default configuration to send OTLP metrics without
applying Datadog normalization. Use this exporter to send all metrics from any
source *except* Datadog clients.
* `otlp/chronosphere/dogstatsd` defines a configuration to send OTLP metrics and
apply Datadog normalization. Use this exporter only to send metrics that were
sent by Datadog clients.
```yaml theme={null}
exporters:
# Exporter configured without normalization
otlp/chronosphere:
endpoint: TENANT:443
timeout: 30s
retry_on_failure:
enabled: true
compression: zstd
headers:
API-Token: $API_TOKEN
# Exporter configured to apply Datadog metric normalization
otlp/chronosphere/dogstatsd:
endpoint: TENANT:443
timeout: 30s
retry_on_failure:
enabled: true
compression: zstd
headers:
API-Token: ${env:API_TOKEN}
# Validation Response verbosity: SHORT, SUMMARY, DETAILED
Chronosphere-Metrics-Validation-Response: SHORT
# Enable Datadog metric name and tag normalization
Chronosphere-Metrics-Translation: datadog
Chronosphere-Metrics-Translation-Datadog-NormalizeLabelValues: "true"
```
To configure these exporters for your instance:
1. Replace *`TENANT`* with the name of your Cortex XCOR tenant.
2. Replace *`API_TOKEN`* with the API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
specified as an HTTP header. Cortex XCOR recommends calling this value as an
[environment variable](/ingest/metrics-traces/otel/otel-ingest#prerequisites).
3. Set `retry_on_failure` to `true` to retry attempts after any recoverable errors.
4. Set `timeout` to `30s` to prevent larger requests from timing out, since the
upstream system might require more time for internal batching.
## Define OpenTelemetry Collector pipelines
To receive metrics, connect the receivers and exporters with two separate pipelines:
* **`metrics` pipeline:** The default metrics pipeline receives all OTLP metrics
and sends them to the Cortex XCOR OTLP endpoint.
* **`metrics/dogstatsd` pipeline:** The DogStatsD metrics pipeline receives DogStatsD
metrics and exports them to a Cortex XCOR endpoint with a header to enable Datadog
metric name and tag normalization.
The following service configuration enables the StatsD receiver for the appropriate
pipeline:
```yaml theme={null}
service:
pipelines:
# Defines the default metrics pipeline.
metrics:
receivers: [otlp]
processors: [batch, resourcedetection, resource/service-instance]
exporters: [otlp/chronosphere]
# Defines a metrics pipeline with Datadog metric normalization.
metrics/dogstatsd:
receivers: [otlp/chronosphere/dogstatsd]
processors: [batch, resourcedetection, resource/service-instance]
exporters: [otlp/chronosphere/dogstatsd]
```
The `processors` value adds processors to define batching and ensure time series
uniqueness.
* `batch`: Sets batch processing. For more information, see the "Configure batch
processing" step in
[Configure the OpenTelemetry Collector](/ingest/metrics-traces/otel/otel-ingest#configure-the-opentelemetry-collector).
* `resourcedetection`: Collects information about the environment in which the
OpenTelemetry Collector is running.
* `resource/service-instance`: Cortex XCOR requires a `service.instance.id`
attribute and value for all time series to ensure time series uniqueness. The
ingestion API rejects metrics that lack `service.instance.id`. For more information,
see the
[Map resource attributes](/ingest/metrics-traces/otel/otel-ingest#map-resource-attributes-to-prometheus-job-and-instance).
# Configure ingestion and processing of OpenTelemetry Metrics
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/otel/otel-config
Learn how to configure Palo Alto Networks Cortex XCOR ingestion and processing of OpenTelemetry Metrics data
For prerequisites to configuring the OpenTelemetry Collector for metrics data ingestion,
see [Configure your OpenTelemetry Collector](/ingest/metrics-traces/otel/otel-ingest).
## OpenTelemetry ingestion configuration options
The OpenTelemetry Protocol (OTLP)
[metric data model](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#opentelemetry-protocol-data-model)
defines separate **Resource** and **Data Point** attribute contexts.
* The [Resource context](https://opentelemetry.io/docs/concepts/resources/) contains
attributes, such as `host.name` or `k8s.cluster.name`, that are common to all
time series produced by the metric writer.
* The Data Point context contains attributes unique to the time series, such as `http.route`.
Palo Alto Networks Cortex XCOR provides a configuration interface to control
OpenTelemetry Metric Resource attribute processing. The default OpenTelemetry Metrics
processing configuration in Cortex XCOR merges all Resource and Data Point
attributes to the time series as labels. If there are conflicting attribute keys,
Cortex XCOR uses the Data Point value.
> [!WARNING]
>
> Cortex XCOR excludes some Resource attributes that are likely to exceed
> [attribute value size limits](/investigate/querying/metrics/troubleshooting#managing-invalid-metrics),
> which results in rejected time series. For details, see
> [Cortex XCOR-defined resource attribute exclusions](#cortex-xcor-defined-resource-attribute-exclusions).
You can configure how Cortex XCOR processes OpenTelemetry Metrics to:
* Prevent Cortex XCOR from merging resource attributes.
* Enable the creation and writing of a `target_info` metric using all resource attributes.
The `target_info` metric is functionally equivalent to the `up` metric, the presence
of which indicates that a resource is available.
* Change how Cortex XCOR handles conflicts when merging Resource and
Data Point attributes.
* Define an exclusion list of resource attribute keys to exclude from merging.
## Resource attribute configuration options
The OpenTelemetry Metrics Ingestion configuration has a top-level `resource_attributes`
field with additional sub-fields that define how Cortex XCOR processes
resource attributes.
| Field | Type | Description | Default value |
| - | - | - | - |
| `resource_attributes` | N/A | Top-level configuration field | N/A |
| `generate_target_info` | Boolean | Determines whether to create a `target_info` metric. | `False` |
| `flatten_mode` | Enumeration | Determines how Cortex XCOR merges resource attributes into the time series. | `MERGE` |
| `filter_mode` | Enumeration | Determines which resource attributes Cortex XCOR processes when generating `target_info` and merging resource attributes into time series as labels. | `APPEND_DEFAULT_EXCLUDE_KEYS` |
| `exclude_keys` | String array | Key names to exclude from both `target_info` generation and resource attribute merging. | [Default list](#cortex-xcor-defined-resource-attribute-exclusions) |
### `flatten_mode`
The `flatten_mode` field determines how Cortex XCOR merges resource attributes
into the time series. Its valid values are:
* `MERGE` (default): Cortex XCOR merges Resource attributes into every
data point associated with that resource, so that both sets end up as Prometheus
labels on each individual metric time series. **If attribute keys conflict,
Cortex XCOR uses the value from the data point.**
* `IGNORE`: Cortex XCOR doesn't copy resource attributes to the resulting
time series.
* `OVERWRITE`: Cortex XCOR copies resource attributes onto every data
point. **If attribute keys conflict, Cortex XCOR uses the value from the resource.**
### `filter_mode`
The `filter_mode` field determines which resource attributes Cortex XCOR
processes when generating `target_info` metrics and merging resource attributes
into time series as labels. Its valid values are:
* `APPEND_DEFAULT_EXCLUDE_KEYS` (default): Cortex XCOR includes all attributes
unless they're defined in [your `exclude_keys` list](#exclude_keys) or the default
[Cortex XCOR-defined resource attribute exclusions](#cortex-xcor-defined-resource-attribute-exclusions)
list.
With this setting, Cortex XCOR appends any `exclude_keys` you define
to the default Cortex XCOR-defined list.
* `CUSTOM_EXCLUDE_KEYS`: Cortex XCOR includes all attributes unless they're
specifically defined in your `exclude_keys` list.
With this setting, Cortex XCOR applies only your defined `exclude_keys`
list.
### `exclude_keys`
Use the `exclude_keys` field to list key names that you want Cortex XCOR
to exclude from both `target_info` generation and resource attribute merging.
The field's format is an array of strings, such as:
```text theme={null}
[
"example.exclude",
"another.example.exclude"
]
```
The resource attribute exclusions that Cortex XCOR applies by default
aren't returned in this response. See
[Cortex XCOR-defined resource attribute exclusions](#cortex-xcor-defined-resource-attribute-exclusions)
for the latest list of default key exclusions.
## Cortex XCOR-defined resource attribute exclusions
Some OpenTelemetry Resource attributes are likely to exceed Cortex XCOR
[attribute value size limits](/administer/limits-licensing/limits/metric-limits),
resulting in
[rejected time series](/investigate/querying/metrics/troubleshooting#managing-invalid-metrics).
Cortex XCOR excludes the following Resource attributes by default:
| Rejected key | Reason |
| - | - |
| `process.command_args` | Commonly exceeds the maximum attribute value length. |
| `process.command_line` | Commonly exceeds the maximum attribute value length. |
In cases where the OpenTelemetry Collector truncates these attributes to conform
with Cortex XCOR ingestion requirements, you can change the merge behavior
to include all resource attributes by setting `filter_mode = CUSTOM_EXCLUDE_KEYS`.
## Manage OpenTelemetry metrics ingestion configurations
The Cortex XCOR API Config Endpoint provides methods to create, read, update, and
delete the OpenTelemetry Metrics Configuration.
### View the configuration
You can view OTLP ingestion configurations using one of the following methods.
> [tab] Chronoctl
>
> Use the `read` command of [Chronoctl](/tooling/chronoctl):
>
> ```shell theme={null}
> chronoctl otel-metrics-ingestion read
> ```
>
> The command returns a YAML definition of the `OtelMetricsIngestion` resource. If
> the command returns an HTTP `404 Not Found` status code, your tenant uses the default configuration.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`ReadOtelMetricsIngestion`](/tooling/api-info/definition/operations/ReadOtelMetricsIngestion)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 or update the configuration
You can change the default OpenTelemetry Metrics ingestion configuration using either
[Chronoctl](/tooling/chronoctl) or the [Terraform provider](/tooling/infrastructure/terraform).
> [tab] Chronoctl
>
> Use the `scaffold` command to generate an example `OtelMetricsIngestion` resource.
>
> ```shell theme={null}
> chronoctl otel-metrics-ingestion scaffold
> ```
>
> The following example enables `target_info` metric generation and defines two additional
> resource attribute key names to exclude.
>
> ```yaml Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: OtelMetricsIngestion
> spec:
> resource_attributes:
> generate_target_info: true
> flatten_mode: MERGE
> filter_mode: APPEND_DEFAULT_EXCLUDE_KEYS
> exclude_keys:
> - example.exclude
> - another.example.exclude
> ```
>
> Add the contents to a YAML file and send it to Cortex XCOR with the
> `apply` command:
>
> ```shell theme={null}
> chronoctl apply -f
> ```
>
> You can also use the `otel-metrics-ingestion create` subcommand to create the resource,
> or the `otel-metrics-ingestion update` subcommand to update an existing resource:
>
> ```shell theme={null}
> chronoctl otel-metrics-ingestion create -f
> chronoctl otel-metrics-ingestion update -f
> ```
>
> Replace `` with the filename of the YAML file containing the resource
> definition.
> [tab] Terraform
>
> Use the `chronosphere_otel_metrics_ingestion` resource, followed by a name in the
> resource declaration. The name you provide isn't important because
> Cortex XCOR allows only one OpenTelemetry Metrics ingestion configuration.
>
> The following example enables `target_info` metric generation and defines two additional
> resource attribute key names to exclude:
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_otel_metrics_ingestion" "my-otel-metrics-ingestion" {
> resource_attributes {
> flatten_mode = "MERGE"
> filter_mode = "APPEND_DEFAULT_EXCLUDE_KEYS"
> exclude_keys = ["example.exclude", "another.example.exclude"]
> generate_target_info = true
> }
> }
> ```
> [tab] API
>
> To create an OpenTelemetry ingestion configuration with the Cortex XCOR API, use the
> [`CreateOtelMetricsIngestion`](/tooling/api-info/definition/operations/CreateOtelMetricsIngestion)
> endpoint.
>
> To update an OpenTelemetry ingestion configuration with the Cortex XCOR API, use the
> [`UpdateOtelMetricsIngestion`](/tooling/api-info/definition/operations/UpdateOtelMetricsIngestion)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 the configuration
Use one of the following methods to delete an OpenTelemetry configuration.
> [tab] Chronoctl
>
> You can use [Chronoctl](/tooling/chronoctl) to delete your OpenTelemetry Metrics ingestion
> configuration and restore the default configuration.
>
> Use the `delete` command to delete the configuration.
>
> ```shell theme={null}
> chronoctl otel-metrics-ingestion delete
> ```
>
> If the command fails because of a missing slug, use the `read` command to view the
> resource's slug.
>
> ```shell theme={null}
> chronoctl otel-metrics-ingestion read
> ```
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteOtelMetricsIngestion`](/tooling/api-info/definition/operations/DeleteOtelMetricsIngestion)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
# Configure your OpenTelemetry Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/otel/otel-ingest
Learn about configuring the OpenTelemetry Collector for metric and tracing data.
You can configure the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/)
to send metric and tracing data to Palo Alto Networks Cortex XCOR. You must send
all traffic over HTTPS.
> [!TIP]
>
> To learn more about OpenTelemetry, see
> [What is OpenTelementry?](https://www.paloaltonetworks.com/cyberpedia/what-is-open-telemetry/)
> on the Palo Alto Networks blog.
Cortex XCOR accepts OpenTelemetry Protocol (OTLP) metrics from
OpenTelemetry Collectors by using the gRPC OTLP Exporter.
> [!NOTE]
>
> Cortex XCOR recommends not sending OTLP metrics directly from the OpenTelemetry
> Client SDK.
This procedure adds each configuration section separately. For a complete file,
which you can modify as needed, see the
[OpenTelemetry configuration example](#opentelemetry-configuration-example).
## Prerequisites
To use the OpenTelemetry Collector, you need to
[create a restricted service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account),
which generates an API token you use to authenticate with Cortex XCOR. The
access you provide for the service account depends on how you use the OpenTelemetry
Collector.
| Use case | Read access | Write access |
| - | :-: | :-: |
| Collect metrics | | |
| Remote [head sampling](/control/shaping/sample-traces/head-sampling) only | | |
| Collect traces plus remote head sampling | | |
Cortex XCOR recommends storing the API token generated from your service account
in a separate file, or securely as a
[Kubernetes Secret](https://kubernetes.io/docs/concepts/configuration/secret/), and
reference it using an environment variable, such as `$API_TOKEN`. Binding a Secret to
an environment variable on the Pod is a well-supported, secure pattern in Kubernetes.
## Configure the OpenTelemetry Collector
To configure the OpenTelemetry Collector to ingest metric and trace data:
1. Pull the [OpenTelemetry Docker image](https://opentelemetry.io/docs/collector/getting-started/#docker)
to run the OpenTelemetry Collector in a Docker container:
```shell theme={null}
docker pull otel/opentelemetry-collector-contrib:VERSION
docker run otel/opentelemetry-collector-contrib:VERSION
```
Replace *`VERSION`* with the version of the OpenTelemetry Collector you want to
run, which must be version 0.83 or later.
2. In the OpenTelemetry Collector
[`config.yaml` file](https://opentelemetry.io/docs/collector/configuration/), apply
the following settings to modify the `exporter` YAML collection. Specify an
`endpoint` that points to your Cortex XCOR tenant, and include the
Cortex XCOR API key you created as an HTTP header.
You can modify the OpenTelemetry Collector
[configuration](https://opentelemetry.io/docs/collector/configuration/) if you
want to change the defaults. For example, you can reference a `config.yaml` in a
different location, such as a Kubernetes ConfigMap.
```yaml theme={null}
exporters:
otlp/chronosphere:
endpoint: TENANT:443
timeout: 30s
retry_on_failure:
enabled: true
sending_queue:
num_consumers: 50
# Valid values are snappy, gzip, zstd and none.
compression: zstd
headers:
API-Token: ${env:API_TOKEN}
Chronosphere-Metrics-Validation-Response: SHORT
```
* `endpoint`: Replace *`TENANT`* with the name of your Cortex XCOR tenant.
* `timeout`: Set to `30s` to prevent larger requests from timing out, because
the upstream system might require more time for internal batching.
* `retry_on_failure`: Set `enabled` to `true` to enable retries for all retryable
errors.
* `sending_queue`: Set `num_consumers` to the number of consumers that dequeue
batches from the sending queue. Increase the value of `num_consumers` if the
exporter queue size demonstrates variability over time. A healthy sending queue
metric depicts a small number of batches that shouldn't experience spikes over
time. Cortex XCOR recommends setting this to 50 for
[gateway deployments](https://opentelemetry.io/docs/collector/deployment/gateway/)
of OTel Collectors.
* `compression`: The compression method to apply. The Cortex XCOR
OpenTelemetry endpoint
supports `snappy`, `gzip`, and `zstd` compression, or `none`.
* *`API_TOKEN`*: The API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
* *`Chronosphere-Metrics-Validation-Response`*: The `ErrorMessage` verbosity for
rejected metrics. Default: `SHORT`.
Valid values are:
* `SHORT`, which reports the number of rejected metrics.
* `SUMMARY`, which also includes counts of rejection reasons.
* `DETAILED`, which also includes a sample of rejected metrics.
3. Configure
[batch processing](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/batchprocessor/README.md).
Sending telemetry in batches improves data compression and reduces the number of
outgoing connections required to transmit the data.
For example, the following configuration enforces a maximum batch size limit of
`2000` spans without introducing any artificial delays:
```yaml theme={null}
processors:
batch:
timeout: 1s
send_batch_size: 1000
send_batch_max_size: 2000
```
The `timeout`, `batch size`, and `batch max size` are default recommendations.
Monitor the exporter send and enqueueing failure metrics to tune these parameters
based on your workload.
4. Add the OTLP exporter and the batch processor to the metrics and traces exporters
definition.
```yaml theme={null}
service:
pipelines:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlp/chronosphere]
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlp/chronosphere]
```
5. Instruct the OpenTelemetry Collector to load the API token from an environment
variable.
> [!WARNING]
>
> Never share or store your API token in plain text. Cortex XCOR recommends using
> tools like SOPs to securely store this information.
```yaml theme={null}
# In the OpenTelemetry Collector Deployment:
- name: ${env:API_TOKEN}
valueFrom:
secretKeyRef:
name: chronosphere-api-token
key: apiToken
# The accompanying Secret:
apiVersion: v1
kind: Secret
metadata:
name: chronosphere-api-token
namespace: NAMESPACE
type: Opaque
data:
apiToken: ${env:API_TOKEN}
```
6. Save your OpenTelemetry Collector `config.yaml` file.
## Map resource attributes to Prometheus job and instance
Cortex XCOR uses the OpenTelemetry `service.namespace`, `service.name`
and `service.instance.id` resource attributes as the values for the Prometheus
[job and instance source labels](https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#resource-attributes-1).
* `service.namespace/service.name -> job`: Recommended. Cortex XCOR sets
the job label value as a concatenation of `service.namespace` and `service.name`
attribute values. If only `service.name` is set, then `job = "service.name"`.
If neither `service.namespace` or `service.name` are present as resource attributes,
then Cortex XCOR doesn't create a job label as part of the conversion.
* `service.instance.id -> instance`: Required. Cortex XCOR sets
the instance label value to the `service.instance.id` attribute value.
Cortex XCOR rejects the metric if the `service.instance.id` resource
attribute is missing.
To ensure all metrics have a valid `service.instance.id` attribute, copy an existing,
unique resource attribute, such as `host.name` or `pod.id`, as the unique instance
identifier value for `service.instance.id`.
To define a default `service.instance.id` resource attribute:
1. Add a resource detection processor. Use the resource detection processor can to
detect resource information from the environment. Append or override the resource
value in telemetry data with this information. Configure the resource detection
processor based on the environment where you've deployed the Collector. Review the
[resource detection processor documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor)
to select the processor for your environment. For example, if the Collector is
deployed on a host, the system processor is the best option to gather information
about the host.
```yaml theme={null}
processors:
resourcedetection:
detectors: [env, system]
timeout: 2s
override: true
```
2. Define a resource attribute processor.
In the processors ConfigMap, define a rule to add the `service.instance.id`.
The following example maps the `host.name` resource attribute to a new
`service.instance.id` resource attribute. Depending on how resource detection is
configured, your environment might have other resource attributes available, such
as `k8s.node.uid`, which can serve as the instance identifier.
```yaml theme={null}
resource/service-instance:
attributes:
- key: service.instance.id
from_attribute: host.name
action: insert
```
3. Add the resource detection and resource attribute processors to your metrics
processors pipeline. In the `service.pipelines.metrics.processors` ConfigMap, add
the resource attribute processor defined in the previous step:
```yaml theme={null}
processors: [transform, batch, resourcedetection, resource/service-instance]
```
## Send operational metrics about the OpenTelemetry Collector
The OpenTelemetry Collector exposes metrics about its operations using a Prometheus
scrape endpoint. Cortex XCOR uses OpenTelemetry Collector metrics in the
OpenTelemetry Ingestion & Health dashboard to describe Collector health.
To send operational metrics about your OpenTelemetry Collectors to Cortex XCOR:
1. Define a Prometheus receiver to scrape the endpoint receiver:
```yaml theme={null}
prometheus/otel-collector-self-scrape:
config:
scrape_configs:
- job_name: 'otel-collector-self-scrape'
scrape_interval: 30s
static_configs:
- targets: ['0.0.0.0:8888']
```
2. Add the Prometheus receiver to the metrics pipeline:
```yaml theme={null}
metrics:
receivers: [prometheus/otel-collector-self-scrape, otlp/chronosphere]
```
3. Add the metrics service to the Service ConfigMap:
```yaml theme={null}
service:
telemetry:
metrics:
address: "0.0.0.0:8888"
```
## Next steps
Cortex XCOR should begin ingesting data. Verify the Collector is receiving
[metrics](/ingest/metrics-traces/collector/monitor/verify-metrics) and
[traces](/ingest/metrics-traces/collector/monitor/verify-traces). You can also configure
[head sampling](/control/shaping/sample-traces/head-sampling) to determine whether to drop a span or
trace as early as possible.
If you encounter issues, see the [troubleshooting](/ingest/metrics-traces/troubleshooting) page.
## OpenTelemetry configuration example
The following example is the entire configuration file, containing all of the
previously provided required sections:
```yaml filename="config.yaml" copy theme={null}
receivers:
# OTLP receiver
otlp:
protocols:
grpc:
http:
# Prometheus receiver configured to scrape the Collector's own metrics
prometheus/otel-collector-self-scrape:
config:
scrape_configs:
- job_name: 'otel-collector-self-scrape'
scrape_interval: 30s
static_configs:
- targets: ['0.0.0.0:8888']
exporters:
# OTLP exporter configured to send telemetry to your Cortex XCOR tenant
# Replace the endpoint's `TENANT` and `API_TOKEN` with your values
otlp/chronosphere:
endpoint: "TENANT:443"
timeout: 30s
retry_on_failure:
enabled: true
sending_queue:
num_consumers: 50
# Compression method. Valid values are snappy, gzip, zstd, and none.
compression: zstd
headers:
API-Token: ${env:API_TOKEN}
# Validation Response verbosity. Valid values are SHORT, SUMMARY, and DETAILED.
Chronosphere-Metrics-Validation-Response: SHORT
processors:
# Detect environment information to include as telemetry attributes
# Configure the detector from the list of available detectors:
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor
resourcedetection:
detectors: [env, system]
timeout: 2s
override: true
# Use environment information to define the `service.instance.id` attribute
# This example maps `host.name` detected by the `resourcedetection` processor
# to a new `service.instance.id` resource attribute
resource/service-instance:
attributes:
- key: service.instance.id
from_attribute: host.name
action: insert
# Add the batch processor to efficiently send telemetry
batch:
timeout: 1s
send_batch_size: 1000
send_batch_max_size: 2000
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch, resourcedetection, resource/service-instance]
exporters: [otlp/chronosphere]
metrics:
receivers: [otlp]
processors: [batch, resourcedetection, resource/service-instance]
exporters: [otlp/chronosphere]
# Define a separate metrics pipeline to send the Collector's metrics to
# Cortex XCOR
metrics/internal:
receivers: [prometheus/otel-collector-self-scrape]
processors: [batch, resourcedetection]
exporters: [otlp/chronosphere]
```
# Use OpenTelemetry protocol endpoints
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/otel/otlp-endpoints
Learn how to configure and use Palo Alto Networks Cortex XCOR endpoints for OpenTelemetry protocol ingestion of metrics and traces.
Palo Alto Networks Cortex XCOR supports ingestion of metrics and traces using
OpenTelemetry protocol (OTLP) gRPC and HTTP ingestion endpoints.
> [!NOTE]
>
> For best results, ingest telemetry through a local OpenTelemetry Collector
> for processing and batching. Sending telemetry directly from an OpenTelemetry SDK
> can be less reliable.
## Requirements
Your OTLP configuration must meet certain requirements.
* **`API-Token` header:** All requests must include the `API-Token` HTTP header,
and its value must be the API token of a valid
[service account](/administer/accounts-teams/service-accounts)
with write permissions.
* **OTLP version support:** Only v1.0 and higher are supported.
* **Supported compression methods:** Cortex XCOR supports `gzip`, `snappy`,
and `zstd` compression, and recommends `zstd`.
* **Encryption:** All requests must be encrypted using TLS.
- **Payload requirements:**
* Compressed payloads should be smaller than 16 MB.
* Metric payloads must contain fewer than 10,000 items.
* For details, see [Optimize the batch processor](#optimize-the-batch-processor).
### Recommendations
Cortex XCOR recommends setting the timeout value for a metrics or trace request
to 30 seconds, and to enable retries to prevent transient network errors from causing
data loss.
Cortex XCOR recommends using gRPC instead of HTTP when possible, because gRPC is a more efficient
protocol for sending telemetry to Cortex XCOR.
### Optimize the batch processor
The
[OpenTelemetry Batch Processor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor)
defines batch limits by the quantity of items, not the size of the batch in bytes.
Configure the batch processor as follows to prevent batches from exceeding the maximum
payload size:
* **`send_batch_size`:** Set to `1000` to trigger sending a batch when it reaches
1,000 items.
* **`send_batch_max_size`:** Set to `2000` to force splitting the batch if it exceeds
more than 2,000 items.
* **`timeout`:** Set to `1s` to send any items in the buffer after 1 second.
## OTLP endpoint URLs
Cortex XCOR provides gRPC and HTTP endpoints for metrics and traces.
| Telemetry type | gRPC Endpoint | HTTP endpoint URL |
| - | - | - |
| Metrics | `TENANT:443` | `https://TENANT/data/opentelemetry/v1/metrics` |
| Traces | `TENANT:443` | `https://TENANT/data/opentelemetry/v1/traces` |
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
OpenTelemetry exporters complete the path based on the telemetry type. For the `otlphttp`
exporter, set the endpoint base path as follows:
```yaml theme={null}
exporters:
otlphttp/chronosphere:
endpoint: https://TENANT/data/opentelemetry/
# ...
```
For an example OTLP exporter configuration, see
[Configure the OpenTelemetry Collector](/ingest/metrics-traces/otel/otel-ingest#configure-the-opentelemetry-collector).
## Metrics partial success responses
If a metrics ingestion request succeeds but any series are rejected, the ingester
returns an [OTLP partial success](https://opentelemetry.io/docs/specs/otlp/#partial-success)
response that includes a count (`rejected_data_points`) and a description (`error_message`).
The verbosity of the description is controlled by the `Chronosphere-Metrics-Validation-Response`
header, which can be set to `SHORT`, `SUMMARY`, or `DETAILED` in the
[OTel Collector configuration](/ingest/metrics-traces/otel/otel-ingest#configure-the-opentelemetry-collector).
When a partial success response is returned, the client must not retry the request.
All valid series from the request have been accepted, and the rejected series are
dropped.
For details about the response's design, see the
[OTLP Partial Success Specification](https://opentelemetry.io/docs/specs/otlp/#otlpgrpc-response).
# Troubleshoot ingestion
Source: https://docs-xcor.paloaltonetworks.com/ingest/metrics-traces/troubleshooting
Troubleshoot issues with Cortex XCOR receiving data from the Chronosphere Collector and OTel Collectors.
If you determine some or all of your data isn't displaying in Palo Alto Networks Cortex XCOR,
use the following information to ensure your Collector is ingesting metrics or traces.
> [!NOTE]
>
> Prefer a guided lab? Take [Alert Response and Troubleshooting](/academy/courses/alert-response-and-troubleshooting) to practice separating
> ingestion issues from control and shaping when data looks wrong on-call.
## Verify incoming data
Metrics and traces have different verification processes.
### Verify traces
The [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer) provides a real-time view
of incoming traces grouped by tag and their relative frequency. Use the Live Telemetry
Analyzer to display the stream of incoming spans from your trace data.
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Live Telemetry**.
2. Click the **Traces** tab.
3. Click ** Capture live data** to display the stream of incoming
spans. The default grouping shows spans by service (`__service__`), but you can
include additional tags to group by, such as `__trace_id__` and `__span_id__`.
### Verify metrics
You can also use the [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer) to
inspect the incoming stream of metrics ingested by Cortex XCOR.
1. In the navigation menu, click ** Go to admin view**
and then select
** Optimization > Live Telemetry**.
2. Click the **Metrics** tab.
3. Click **Capture live data** to display streaming metrics.
4. In the **Keys** list, select the `__name__` and `instance` label keys.
5. In the **Values** filter, enter a `key:value` pair for a metric the OpenTelemetry
exporter is sending, or any specific value the Collector is sending.
The **OpenTelemetry Ingestion & Health** [dashboard](/observe/dashboards)
provides two charts which show the rate of metric data points per received and
rejected by the Cortex XCOR OTLP API.
* **Metric Data Points Received**
* **Metric Data Points Rejected**
## No data displays in Cortex XCOR
Common reasons and corresponding log messages for data not appearing in Cortex XCOR:
### Missing API token
If your API key is missing, the following message displays in the OpenTelemetry
Collector logs:
```text wrap highlight=3 theme={null}
Exporting failed. Try enabling retry_on_failure config option to retry on retryable errors
{"kind": "exporter", "data_type": "traces", "name": "otlp/chronosphere", "error":
"Permanent error: rpc error: code = Unauthenticated desc = missing auth header: API-Token"}
```
Ensure you've added the `API-Token` header to the `otlp/chronosphere` exporter
[configuration](/ingest/metrics-traces/otel/otel-ingest) and that you're correctly setting and
passing API token value.
### Invalid API token
If your API key is invalid, the OpenTelemetry Collector logs report the following error:
```text wrap highlight=3 theme={null}
Exporting failed. Try enabling retry_on_failure config option to retry on retryable errors
{"kind": "exporter", "data_type": "traces", "name": "otlp/chronosphere", "error":
"Permanent error: rpc error: code = Unauthenticated desc = invalid auth token"}
```
The Exporter is sending an `API-Token`, but it's invalid. Ensure you've correctly
copied the API Token value and that you're correctly setting and passing the value in
for the API token.
### Incorrect permission
If your [service account](/administer/accounts-teams/service-accounts)
doesn't have write permission, the OpenTelemetry Collector logs report the following error:
```text wrap highlight=3 theme={null}
Exporting failed. Try enabling retry_on_failure config option to retry on retryable errors
{"kind": "exporter", "data_type": "metrics", "name": "otlp/chronosphere", "error":
"Permanent error: rpc error: code = PermissionDenied desc = Permission denied"}
```
The exporter requests an API token with write access. The exporter doesn't require
read access, so you can resolve this issue by creating a new service account with a
`write-only` scope.
## Some metrics are missing in Cortex XCOR
The following sections can help you when you're ingesting some metrics, but some of
the expected metrics are missing.
Validations are applied to metrics as they're ingested.
| Reason code | Description | Remediation |
| - | - | - |
| `label_name_invalid` | The label name isn't compatible with Prometheus. The Collector and Cortex XCOR OTLP endpoint normalize this for you. | See the Prometheus documentation on [metric names and labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). |
| `label_value_invalid` | The label value is invalid. This is enforced only for metric names, which must follow a specific format for PromQL compatibility. The Collector and Cortex XCOR OTLP endpoint normalize this on your behalf. | See the Prometheus documentation on [metric names and labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). |
| `label_name_too_long` | The maximum supported length for a label name is 512 bytes. | Update your instrumentation or consider adding [Prometheus relabel rules](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) or OTel Collector processor changes. |
| `label_count_too_high` | The maximum supported number of labels for a single time series is 64. | Update your instrumentation or consider adding [Prometheus relabel rules](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) or OTel Collector processor changes. |
| `total_bytes_too_high` | The maximum supported amount of bytes used across all labels for a single time series is 4,096. | Update your instrumentation or consider adding [Prometheus relabel rules](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) or OTel Collector processor changes. |
| `otel_service_instance_id_required` | See [`OTEL_SERVICE_INSTANCE_ID_REQUIRED` validation error](#otel_service_instance_id_required-validation-error). | See [`OTEL_SERVICE_INSTANCE_ID_REQUIRED` validation error](#otel_service_instance_id_required-validation-error). |
| `histogram_sample_invalid` | An exponential histogram sample contains internal inconsistencies, such as a mismatch between the overall count field and the sum of all bucket counts. | Check for bugs in instrumentation libraries that emit exponential histograms or OTel Collector receivers or processors that might be corrupting histograms. |
## Metrics were dropped in a partial success
When
[ingesting metrics using the OpenTelemetry protocol](/ingest/metrics-traces/otel/otel-ingest),
Cortex XCOR returns a
[partial success](https://opentelemetry.io/docs/specs/otlp/#partial-success) response
when [metrics are dropped](#metrics-were-dropped-in-a-partial-success). The
OpenTelemetry Collector logs warnings for partial successes, and you can configure it
to provide additional details about what failed.
In the
[OpenTelemetry Collector OTLP Exporter configuration](/ingest/metrics-traces/otel/otel-ingest#configure-the-opentelemetry-collector),
add the `Chronosphere-Metrics-Validation-Response` header with the value set to
`SUMMARY` or `DETAILED` to include the reasons why the metrics were dropped, and
to see which metrics were dropped.
The following is an example of a `DETAILED` response logged by the OpenTelemetry Collector:
```text wrap theme={null}
2025-05-09T17:42:29.363Z warn otlpexporter@v0.123.0/otlp.go:120 Partial success response
{"message": "{\"message\":\"1 of 3 time series failed ingest validation and were dropped. This error includes a sample of up to 25 dropped series.\",\"details\":[{\"reason\":\"OTEL_SERVICE_INSTANCE_ID_REQUIRED\",\"metric\":\"testservice_metrics_sum\",\"subreason\":\"\",\"labels\":{\"deployment_environment\":\"local\",\"foo\":\"baz\",\"job\":\"testservice\",\"service_name\":\"testservice\"}}]}", "dropped_data_points": 1}
```
## OTEL\_SERVICE\_INSTANCE\_ID\_REQUIRED validation error
When using the OpenTelemetry Collector, Cortex XCOR requires
`service.name` and `service.instance.id` as labels for all metrics to construct the
Prometheus resource attributes. Metrics without these labels will be rejected and the
following error message displays in your logs:
```text wrap theme={null}
2025-05-16T22:08:55.619Z warn otlpexporter@v0.126.0/otlp.go:120 Partial success response
{"message": "78 of 78 time series failed ingest validation and were dropped. Add a header to the OTLP exporter to get additional details: 'Chronosphere-Metrics-Validation-Response: SUMMARY' or 'Chronosphere-Metrics-Validation-Response: DETAILED'", "dropped_data_points": 78}
```
Add the `Chronosphere-Metrics-Validation-Response: SUMMARY` header to the
[OTLP Exporter](/ingest/metrics-traces/otel/otel-ingest#configure-the-opentelemetry-collector)
to include the validation error code in the response.
To resolve this, add an attributes processor
to your metrics pipeline to map an existing label that can be used as the unique
instance label for your environment. See
[Mapping resource attributes](/ingest/metrics-traces/otel/otel-ingest#map-resource-attributes-to-prometheus-job-and-instance)
for additional information.
To troubleshoot this issue, investigate metric data points and their attributes
to determine what attributes the metric includes.
Add the `debug` exporter with `detailed` verbosity in the OpenTelemetry Collector
configuration exporters ConfigMap. Then, add the `debug` exporter to your metrics
pipeline. For example:
```yaml highlight={3-4} theme={null}
exporters:
# adds the debug exporter to print data points to log output
debug:
verbosity: detailed
# ... snippet
service:
# ... snippet
pipelines:
metrics:
receivers: [otlp]
processors: [transform, batch, resourcedetection, resourceattributes/instance]
exporters: [debug, otlp/chronosphere]
```
The following is sample output for a metric datapoint logged using the `debug`
exporter. When you review the resource attributes list, you can see the required
`service.name` is available, but `service.instance.id` is missing. The `host.name`
attribute is a unique attribute which can be used as the `service.instance.id`.
See
[Mapping resource attributes](/ingest/metrics-traces/otel/otel-ingest#map-resource-attributes-to-prometheus-job-and-instance)
to learn how to add attribute mapping to copy the `host.name` attribute to
`service.instance.id`.
```text theme={null}
2023-10-18T16:38:46.172Z info ResourceMetrics #0
Resource SchemaURL: https://opentelemetry.io/schemas/1.6.1
Resource attributes:
-> service.namespace: Str(opentelemetry-demo)
-> service.name: Str(currencyservice)
-> telemetry.sdk.version: Str(1.10.0)
-> telemetry.sdk.name: Str(opentelemetry)
-> telemetry.sdk.language: Str(cpp)
-> host.name: Str(3d181cdaa016)
-> os.type: Str(linux)
ScopeMetrics #0
ScopeMetrics SchemaURL:
InstrumentationScope app_currency 1.3.0
Metric #0
Descriptor:
-> Name: app_currency_counter
-> Description:
-> Unit:
-> DataType: Sum
-> IsMonotonic: true
-> AggregationTemporality: Delta
NumberDataPoints #0
Data point attributes:
-> currency_code: Str(USD)
StartTimestamp: 2023-10-18 16:38:45.103115256 +0000 UTC
Timestamp: 2023-10-18 16:38:46.106640465 +0000 UTC
Value: 2
```
# OpenTelemetry support in Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/otel-ingestion
Learn how Palo Alto Networks Cortex XCOR supports OpenTelemetry ingestion for telemetry data.
Palo Alto Networks Cortex XCOR supports OpenTelemetry ingestion for logs,
metrics, and traces. You can either use the CXDOT Collector or the upstream
OpenTelemetry Collector.
## CXDOT Collector
```mermaid actions={false} theme={null}
flowchart LR
accTitle: CXDOT Collector flow
accDescr: Use the CXDOT Collector and its integrations to send logs, metrics, and traces to Palo Alto Networks Cortex XCOR.
subgraph env [Your environment]
cxdot[CXDOT Collector]
end
xcor[Cortex XCOR]
cxdot -- Logs, metrics, and traces --> xcor
```
The [Cortex XCOR Distribution of OpenTelemetry (CXDOT) Collector](/ingest/xcor/collector)
is based on the OpenTelemetry Collector. It includes configurable
[integrations](/ingest/xcor/integrations/collector) for collecting logs, metrics,
and traces. After integrations collect telemetry data, the CXDOT Collector
sends that data to Cortex XCOR.
## Upstream OpenTelemetry Collector
```mermaid actions={false} theme={null}
flowchart LR
accTitle: OpenTelemetry support in Cortex XCOR
accDescr: Use the OpenTelemetry SDK, OpenTelemetry Collector, and OTLP ingestion endpoints to send logs, metrics, and traces to Palo Alto Networks Cortex XCOR.
subgraph env [Your environment]
SDK[OpenTelemetry SDK]
Coll[OpenTelemety Collector]
StatsD[OpenTelemetry Collector with StatsD receiver]
end
subgraph op [Cortex XCOR]
OTLP[OTLP ingestion endpoints]
end
SDK -- Logs, metrics, and traces --> Coll
SDK -- DogStatsD metrics --> StatsD
Coll --> OTLP
StatsD --> OTLP
```
This ingestion process for the upstream OpenTelemetry Collector varies depending on
your environment, configuration settings, and telemetry type, but always follows the
same general path:
1. Your app is instrumented with the OpenTelemetry SDK to emit telemetry data.
2. The OpenTelemetry Collector aggregates and processes this telemetry data.
3. Cortex XCOR ingests this telemetry data through the
OpenTelemetry protocol (OTLP) ingestion endpoints.
### OpenTelemetry support for metrics
You can use the [OpenTelemetry Collector](/ingest/metrics-traces/otel) to send
metrics to Cortex XCOR. Cortex XCOR ingests these metrics through
[OpenTelemetry protocol gRPC and HTTP ingestion endpoints](/ingest/metrics-traces/otel/otlp-endpoints).
To ingest DogStatsD metrics, add
the [StatsD receiver](/ingest/metrics-traces/otel/ingest-dogstatsd) to the
OpenTelemetry Collector.
When Cortex XCOR ingests metrics from OpenTelemetry, it
[converts those metrics to a Prometheus-compatible format](/ingest/metrics-traces/otel#conversion-from-opentelemetry-to-prometheus-compatible-metrics).
The [Live Telemetry Analyzer](/investigate/analyze/telemetry-analyzer)
displays [special request metadata](/investigate/analyze/telemetry-analyzer#special-request-metadata)
relevant to OpenTelemetry metrics.
### OpenTelemetry support for traces
You can use the [OpenTelemetry Collector](/ingest/metrics-traces/otel) to send
traces to Cortex XCOR. Cortex XCOR ingests these traces through
[OpenTelemetry protocol gRPC and HTTP ingestion endpoints](/ingest/metrics-traces/otel/otlp-endpoints).
You can also use the OpenTelemetry Collector to
[configure head sampling](/control/shaping/sample-traces/head-sampling#configure-head-sampling)
for traces.
### OpenTelemetry support for logs
You can use the [OpenTelemetry Collector](/ingest/metrics-traces/otel) to send
logs to Cortex XCOR.
Cortex XCOR ingests these logs through an
[OpenTelemetry protocol HTTP ingestion endpoint](/ingest/logs/otel-logs).
### Monitor your OpenTelemetry Collector health and ingestion volume
When you configure the OpenTelemetry Collector to ingest metrics or traces, you can
[send operational metrics about the OpenTelemetry Collector](/ingest/metrics-traces/otel/otel-ingest#send-operational-metrics-about-the-opentelemetry-collector)
to Cortex XCOR.
For upstream OpenTelemetry Collector instances, the
[OpenTelemetry Ingestion & Health](/observe/dashboards/managed-dashboards#opentelemetry-ingestion-health)
dashboard displays health information and the amount of data each instance ingests and
processes.
# Palo Alto Networks Telemetry Pipeline
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline
Learn about Palo Alto Networks Telemetry Pipeline and when to use it to ingest data into Cortex XCOR.
Palo Alto Networks Telemetry Pipeline lets you control your observability data's journey
from collection to processing to routing. Integrate with your existing observability
tools to send logs, metrics, and traces from any source to any destination.
## Palo Alto Networks Telemetry Pipeline v3
> [card] [Get started with v3](/ingest/pipeline/v3)
## Palo Alto Networks Telemetry Pipeline v2
> [card] [Install](/ingest/pipeline/v2/install)
> [card] [Build a pipeline](/ingest/pipeline/v2/build/create-modify)
> [card] [Configure](/ingest/pipeline/v2/configure)
> [card] [Concepts](/ingest/pipeline/v2/concepts)
## General
> [card] [Plugins](/ingest/pipeline/plugins)
> [card] [Processing rules](/ingest/pipeline/processing-rules)
> [card] [Navigate](/ingest/pipeline/navigate)
> [card] [Pipeline CLI](/ingest/pipeline/pipeline-cli)
# Administer Palo Alto Networks Telemetry Pipeline
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/administer
Learn how to manage tools and features of Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Manage teams and other Palo Alto Networks Telemetry Pipeline administration tasks.
> [card] [Invite team members](/ingest/pipeline/administer/team)
> [card] [Single sign-on](/ingest/pipeline/administer/sso)
# Set up single sign-on
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/administer/sso
Set up SSO for Palo Alto Networks Telemetry Pipeline through your organization's identity provider.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
If your organization manages user credentials through an identity provider,
you can use either SAML or OIDC to set up single sign-on (SSO) access to the
Palo Alto Networks Telemetry Pipeline web interface.
## SAML authentication
To set up SAML authentication through your identity provider, you must:
* Use the value `CONNECTION_NAME` for your connection name.
* Set the single sign-on URL to `https://sso.calyptia.com/login/callback?connection=CONNECTION_NAME`.
* Set the audience URI or SP entity ID to `urn:auth0:dev-15smjh-e:CONNECTION_NAME`.
* Include the attributes `name`, `email`, and `email_verified` in your SAML assertion:
* Use the value `user.firstName` for the `name` attribute.
* Use the value `user.email` for the `email` attribute.
* Use the value `true` for the `email_verified` attribute.
* Download an X.509 certificate from your identity provider.
After completing these tasks, notify Cortex XCOR Support that you've enabled a SAML
connection, and include a copy of your X.509 certificate with your message.
## OIDC authentication
To set up OIDC authentication through your identity provider, you must:
* Set the sign-in redirect URIs to `https://sso.calyptia.com/login/callback` and
`https://dev-15smjh-e.us.auth0.com/login/callback`.
After completing this task, notify Cortex XCOR Support that you've
enabled an OIDC connection.
# Invite team members to your Palo Alto Networks Telemetry Pipeline project
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/administer/team
Invite and manage team members in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can send email invitations to add new members to a project in
Palo Alto Networks Telemetry Pipeline.
1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
2. Open the project that you want to add members to.
3. Go to ** Team**, then click **Invite Members**.
4. In the **Email List** field, enter the email addresses of the members you want
to invite. To invite multiple members, use commas to separate each email address.
5. Click **Invite**.
All new members are assigned the viewer [role](#roles) by default. After a member
accepts your invitation, configure their settings to assign them a different role.
> [!NOTE]
>
> Teams and role are managed at the project level. If you're part of multiple
> projects in Palo Alto Networks Telemetry Pipeline, adding or configuring a
> team member in one project won't affect your other projects.
## Roles
Palo Alto Networks Telemetry Pipeline offers several role types, each with a
different set of permissions for reading, updating, creating, and deleting Palo Alto
Networks Telemetry Pipeline resources. These resources include any pipelines, Core
Instances, plugins, processing rules, fleets, agents, and members associated with a
project.
The following table shows the different permissions available to each role:
| Permission | Viewer | Team | Manager | Admin |
| - | - | - | - | - |
| Read | | | | |
| Update | | | | |
| Create | | | | |
| Delete | | | | |
# Navigate the Palo Alto Networks Telemetry Pipeline web interface
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/navigate
Learn how to navigate the Palo Alto Networks Telemetry Pipeline web interface.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
After you've [installed](/ingest/pipeline/v2/install) Palo Alto Networks Telemetry Pipeline,
you can navigate the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/)
to access a variety of tools and features.
> [!NOTE]
>
> For information about interacting with Palo Alto Networks Telemetry Pipeline through a command-line
> interface, see [Pipeline CLI](/ingest/pipeline/pipeline-cli).
## Home
The Palo Alto Networks Telemetry Pipeline home page includes quick links to common pages and
several embedded video tutorials.
## Core Instances
> This page is only visible for v2 projects.
This page lists the [Core Instances](/ingest/pipeline/v2/concepts#core-operators-and-core-instances)
that you've created and displays information about each, including:
* **Core Instance**: The name of that Core Instance.
* **Status**: The status of that Core Instance.
* **Pipelines Count**: The number of pipelines associated with that Core Instance.
* **Version**: The version of the [Core Operator](/ingest/pipeline/v2/component-versions)
associated with that Core Instance.
* **Last Modification**: The date and time of the most recent changes to that
Core Instance.
You can click **Deploy a new Core Instance**
to [create a new Core Instance](/ingest/pipeline/v2/install/create-instance).
To view more information about a specific Core Instance, to modify that Core Instance,
or to view or modify any of its associated pipelines, click the name of that Core Instance.
This opens the Core Instance details page.
### Core Instance details
This page displays information about a specific Core Instance, including its
name, tags, version, information about its Kubernetes environment, and any
associated pipelines.
Click **Edit** to modify the Core Instance's name and tags, or click
**Advanced Settings**
to manage [files](/ingest/pipeline/v2/configure/files) and
[secrets](/ingest/pipeline/v2/configure/secrets).
In the **Kubernetes Namespaces** section, you can enable
[automated Kubernetes logging](/ingest/pipeline/v2/build/automated-logging).
The **Data Pipelines** section lists the pipelines within that Core Instance and
displays information about each, including:
* **Name**: The name of that pipeline.
* **Status**: The status of that pipeline.
* **Workload**: The [workload type](/ingest/pipeline/v2/configure/kubernetes/workloads)
of that pipeline.
* **Version**: The [version](/ingest/pipeline/v2/component-versions) of the pipeline agent
powering that pipeline. If a pipeline isn't using the latest agent version,
an **Upgrade** is displayed, which you can click to navigate to the
[pipeline details](#pipeline-details-v2-pipelines) page.
* **Uptime**: How long that pipeline has been running.
* **Last modified**: The date and time of the most recent changes to that
pipeline.
You can also click **Create Data Pipeline**
to [create a new pipeline](/ingest/pipeline/v2/build/create-modify).
To view more information about a specific pipeline or to modify its settings,
click the name of that pipeline. This opens the pipeline details page.
### Pipeline details (v2 pipelines)
This page displays information about a specific pipeline, including its active
sources, destination, and endpoints.
Click **Edit** to open the pipeline builder, where you can add and configure
[source plugins](/ingest/pipeline/plugins/source-plugins),
[destination plugins](/ingest/pipeline/plugins/destination-plugins), and
[processing rules](/ingest/pipeline/processing-rules) for that pipeline.
Click **Advanced Settings** to manage
that pipeline's advanced settings, including:
* [Replicas](/ingest/pipeline/v2/configure/scaling)
* [Deployment strategy](/ingest/pipeline/v2/configure/deployment-strategies)
* [Version](/ingest/pipeline/v2/component-versions) and [agent image type](/ingest/pipeline/v2/configure/agent-image)
* [Files](/ingest/pipeline/v2/configure/files)
* [Secrets](/ingest/pipeline/v2/configure/secrets)
If a pipeline isn't using the latest agent [version](/ingest/pipeline/v2/component-versions),
an `Upgrade to available` notice is displayed, and you can click
**Upgrade** to upgrade the pipeline to the latest version.
#### Pipeline output (v2 pipelines)
In the **Pipeline Output** section, click **Get Latest Logs** to view operational logs generated
by that pipeline, including status changes and error messages. If your pipeline
has the [Standard output](/ingest/pipeline/plugins/destination-plugins/standard-output)
destination plugin, the telemetry data routed through your pipeline will also
print here.
> [!NOTE]
>
> When you use **Pipeline Output** while the Standard output plugin is active,
> your telemetry data is temporarily cached in the Palo Alto Networks Telemetry Pipeline backend.
## Pipelines
> This page is visible only for v3 projects.
This page lists the pipelines that you've created and displays information about
each, including:
* **Pipeline Name**: The name of that pipeline.
* **Status**: The status of that pipeline.
* **Version**: The version of the [pipeline collector](/ingest/pipeline/v3#deploy-the-pipeline-collector)
associated with that pipeline.
* **Uptime**: How long that pipeline has been running.
* **Modified**: The date and time of the most recent changes to that pipeline.
You can click **New Pipeline**
to [build a pipeline configuration file](/ingest/pipeline/v3#build-a-pipeline-configuration-file).
To view more information about a specific pipeline, to view previous versions of its
configuration file, or to view its associated agents, click the name of that
pipeline to open its pipeline details page.
### Pipeline details (v3 pipelines)
The **Pipeline details** page displays information about a specific pipeline, including its
active sources, destination, and agents.
Any changes you make from this page are for preview purposes only and won't be
applied to your pipeline. To apply your changes, use the **Copy Config**
or **Download Config** buttons to export your modified
pipeline configuration file, and then use this modified configuration file to
[update your pipeline](/ingest/pipeline/v3#update-a-pipeline).
#### Pipeline output (v3 pipelines)
In the **Pipeline Output** section, click **Get Latest Logs** to view operational logs generated
by that pipeline, including status changes and error messages. If your pipeline
has the [Standard output](/ingest/pipeline/plugins/destination-plugins/standard-output)
destination plugin, the telemetry data routed through your pipeline will also
print here.
> [!NOTE]
>
> When you use **Pipeline Output** while the Standard output plugin is active,
> your telemetry data is temporarily cached in the Palo Alto Networks Telemetry Pipeline backend.
## Monitoring
> This page is visible only for v2 projects.
This page displays information about the performance and throughput of your
Core Instances and pipelines.
## Fleets
> This page is only visible for v2 projects.
This page lists the [fleets](/ingest/pipeline/v2/fleets) that you've deployed and displays
information about each, including:
* **Fleet Name**: The name of that fleet.
* **Agent Type**: The [type of agent](/ingest/pipeline/v2/fleets/agent) that makes up that fleet.
* **Managed Agents**: The number of agents within that fleet.
* **Last Edit**: The date and time of the most recent changes to that fleet.
You can click **Create new fleet**
to [create a new fleet](/ingest/pipeline/v2/fleets#create-a-fleet).
To view more information about a specific fleet, modify that fleet, or view
details about its associated agents, click the name of that fleet. This opens
the fleet details page.
### Fleet details
This page displays information about a specific fleet, including its name,
configuration settings, attached files, and any associated agents.
The **Agents List** section lists the agents within that fleet and displays
information about each, including:
* **Host Name**: The name of the machine where that agent is deployed.
* **Status**: The status of that agent.
* **Version**: The version of the Fluent Bit or Core Agent for that agent.
* **Platform**: The operating system where the agent is deployed.
* **Architecture**: The architecture of the environment where the agent is deployed.
* **Last Edit**: The date and time of the most recent changes to that agent.
You can click **Attach New File**
to add a file to that fleet, or **Add Agent**
to [add a new agent](/ingest/pipeline/v2/fleets/add-agent).
## Parser playground
The parser playground lets you preview the effect of [parsers](/ingest/pipeline/v2/build/parsers)
on your telemetry data. The **Examples** column includes several of the default
parsers included with Palo Alto Networks Telemetry Pipeline, and you can test
your own custom parsers by
pasting any string into the **Regular Expression** field.
To preview the result of a specified parser, either enter raw log data into the
**Enter Your Test String** field or use the pre-populated data, then click **Parse**.
The **Output** pane displays the resulting structured data.
After you've created and testing a custom parser in the parser playground, you can
[add that parser to a `parsers.conf` file](/ingest/pipeline/v2/build/parsers#custom-parsers).
## Pipeline builder playground
> This page is only visible for v2 projects.
The pipeline builder playground lets you construct pipelines in a sandbox environment.
You can use this tool to configure [source plugins](/ingest/pipeline/plugins/source-plugins),
[destination plugins](/ingest/pipeline/plugins/destination-plugins), and
[processing rules](/ingest/pipeline/processing-rules), and then preview the resulting pipeline.
The **Advanced Settings** section also generates a [YAML configuration file](/ingest/pipeline/v2/configure/config-files)
from your choices.
This tool is functionally identical to the pipeline builder for real production
environments, but any plugins or processing rules you configure here won't go into
effect and won't affect your telemetry data. If you'd like to export your choices
for later use, including in a production environment, click **Export** to save a
copy of the pipeline's configuration file to your device.
## Processing rules playground
The processing rules playground lets you create and test [processing rules](/ingest/pipeline/processing-rules)
in a sandbox environment, including custom Lua scripts.
This tool is functionally identical to the processing rules builder for real production
environments, but the playground environment is isolated from the internet and
has no access to internal Palo Alto Networks Telemetry Pipeline resources. Any processing rules you
create here won't affect your pipelines, Core Instances, or telemetry data.
If you'd like to save your playground processing rules for later use,
including in a production environment, click **Export**
to save a JSON template file to your device. You can also click
**Save** to save your template
within the Palo Alto Networks Telemetry Pipeline web interface, which makes that template available
to any other users in your current project.
## Settings
This page displays information about your current Palo Alto Networks Telemetry Pipeline project.
You can also [generate new API keys](/ingest/pipeline/pipeline-cli/authenticate)
and view keys that you previously generated.
## Team
This page displays information about the team members in your current project,
including:
* **User Name**: The name of that user.
* **Email**: The email address of that user.
* **Permissions**: The permissions assigned to that user.
* **Added on**: The time elapsed since that user was added to the project.
Click **Invite Members** to invite members to your project, or click the
**Edit** icon next to a user to adjust settings
for that user.
### Permissions
The following permission levels are available for Palo Alto Networks Telemetry Pipeline users:
* **Viewer**: Users who can view your organization's
Palo Alto Networks Telemetry Pipeline resources.
* **Team**: Users who can view and update Palo Alto Networks Telemetry Pipeline resources.
* **Manager**: Users who can view, update, and create
Palo Alto Networks Telemetry Pipeline resources.
* **Admin**: Users who can view, update, create, and delete Palo Alto Networks Telemetry Pipeline
resources.
# Pipeline CLI
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/pipeline-cli
Learn about the Palo Alto Networks Telemetry Pipeline command-line tool.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Pipeline CLI is the Palo Alto Networks Telemetry Pipeline command-line app.
## Get started
To install Pipeline CLI, [Install Pipeline CLI](/ingest/pipeline/pipeline-cli/install).
After you install Pipeline CLI, you'll need to [authenticate](/ingest/pipeline/pipeline-cli/authenticate)
with Palo Alto Networks Telemetry Pipeline.
## View command list
To view a full list of available commands and flags, run:
```shell theme={null}
calyptia help
```
You can also prepend `calyptia help` to a specific command to view more information
about that command.
> [!NOTE]
>
> Pipeline CLI supports different commands for Palo Alto Networks Telemetry Pipeline v2 and
> Palo Alto Networks Telemetry Pipeline v3. Depending on whether the
> [active project](/ingest/pipeline/pipeline-cli/authenticate#view-active-project)
> is a v2 project or a v3 project, running `calyptia help` displays commands relevant
> to that version.
## View current version
To view the version of Pipeline CLI that you currently have installed, run
the following command:
```shell theme={null}
calyptia version
```
## Command autocompletion
> This feature is compatible only with v2 projects.
You can add support for shell command autocompletion with Pipeline CLI for Bash,
Zsh, Fish, and PowerShell by using the `calyptia completion` command.
This section provides detailed steps for Bash and Zsh on macOS. For Linux-specific
details and instructions for Fish and PowerShell, see the output of
`calyptia completion --help`.
> [tab] Bash
>
> 1. Update or install `bash-completion`:
>
> ```shell theme={null}
> brew install bash-completion
> ```
>
> 2. In a shell initialization script, such as `~/.bashrc`, add the following:
>
> ```shell theme={null}
> source "$(brew --prefix bash-completion)/etc/bash_completion"
> eval "$(calyptia completion bash)"
> ```
>
> 3. Restart the shell.
> [tab] Zsh
>
> 1. Go to your Zsh `site-functions` folder.
>
> * If you installed Zsh with Homebrew, the path is
> `/opt/homebrew/share/zsh/site-functions`.
> * If you use the default macOS Zsh, the path is
> `/usr/local/share/zsh/site-functions`.
>
> 2. Run the following command:
>
> ```shell theme={null}
> calyptia completion zsh > _calyptia
> ```
>
> 3. Ensure your `~/.zshrc` file has
> [`compinit`](https://zsh.sourceforge.io/Doc/Release/Completion-System.html) added.
> If you use `oh-my-zsh`, it adds that for you.
>
> 4. Restart the shell.
You can now press `Tab` on the command line to automatically complete
Pipeline CLI commands.
# Authenticate in Pipeline CLI
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/pipeline-cli/authenticate
Learn how to authenticate with Palo Alto Networks Telemetry Pipeline through Pipeline CLI.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
To use Pipeline CLI, you must [generate an API token](#generate-an-api-token) to
authenticate with Palo Alto Networks Telemetry Pipeline, and then [set that token](#set-or-switch-an-api-token)
in Pipeline CLI.
> [!NOTE]
>
> API tokens are tied to specific projects within Palo Alto Networks Telemetry Pipeline,
> which means only one API token can be active in your Pipeline CLI session. To switch
> between projects, you must
> [switch tokens](#set-or-switch-an-api-token) accordingly.
## Generate an API token
Follow these steps to generate an API token in Palo Alto Networks Telemetry Pipeline:
1. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
2. Open the project where you want to create a fleet.
3. In the navigation menu, select ** Settings**.
4. In the **Generate API key** section, enter a name for your new API key, and then
click **Generate**.
5. If you have multiple projects in Palo Alto Networks Telemetry Pipeline,
repeat these steps for each
project.
## Set or switch an API token
Only one API token can be active in your Pipeline CLI session. Each API token is tied
to a specific project, which means that setting an API token determines which project
is active. If you have multiple Palo Alto Networks Telemetry Pipeline projects,
follow these steps to switch between them.
1. Copy the value of the API token you [generated](#generate-an-api-token) for that
project.
2. Run the following command in Pipeline CLI:
```shell /TOKEN/ theme={null}
calyptia config set_token TOKEN
```
Replace *`TOKEN`* with the value of the API token you copied in the previous step.
### View active project
To view the name of the project associated with your active API token, run the
following command:
```shell theme={null}
calyptia get project
```
# Install Pipeline CLI
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/pipeline-cli/install
Learn how to install Pipeline CLI for Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Pipeline CLI is compatible with Linux, macOS, and Windows for both arm64 and x86\_64
architectures. Use one of the following methods to install Pipeline CLI:
| Method | Linux | macOS | Windows |
| - | :-: | :-: | :-: |
| Homebrew | | | |
| curl | | | |
| Direct download | | | |
> [!NOTE]
>
> If you used the `install-core.sh` script to
> [install a Core Operator on Linux](/ingest/pipeline/v2/install/install-operator/linux),
> the script installed Pipeline CLI for you. You don't need to install
> it again.
## Download and install Pipeline CLI
Select from the following methods to download and install the latest version of
Pipeline CLI.
> [tab] Homebrew
>
> To install Pipeline CLI using Homebrew, run the following commands:
>
> ```shell theme={null}
> brew tap calyptia/tap
> brew install calyptia
> ```
>
> These commands fetch the latest version of Pipeline CLI.
> [tab] Curl
>
> To install Pipeline CLI using curl, run the following command, which is the same
> for both Zsh and Bash:
>
> ```shell theme={null}
> curl -sSfl https://raw.githubusercontent.com/calyptia/cli/main/install.sh | bash
> ```
>
> This command fetches the latest version of Pipeline CLI.
> [tab] Direct download
>
> To install Pipeline CLI by downloading its files directly:
>
> 1. Go to the [Pipeline CLI release page](https://github.com/chronosphereio/calyptia-cli/releases).
> 2. Locate the latest release artifact and download the `.tar.gz` archive that
> corresponds to your operating system and architecture.
> 3. Extract the Pipeline CLI binary from the archive that you downloaded.
> 4. Run the executable file to install Pipeline CLI.
>
> Alternatively, you can download the Pipeline CLI source code from its release
> page and compile it yourself.
## Update Pipeline CLI
To update Pipeline CLI, use any of the previous methods to run the Pipeline CLI
installation process again. If you use the direct download method, be sure to
download the release artifact for the latest version of Pipeline CLI.
# Palo Alto Networks Telemetry Pipeline plugins
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins
Learn how to use plugins in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
```mermaid actions={false} theme={null}
flowchart LR
accTitle: Pipeline flow
accDescr: A simplified representation of a telemetry pipeline, which includes a source plugin, parser, processing rules, and destination plugin.
subgraph Pipeline flow
direction LR
A(Source plugin )
B(Parser )
C(Processing rules )
D(Destination plugin )
A --> B --> C --> D
style A stroke-width:4px
style D stroke-width:4px
end
```
Palo Alto Networks Telemetry Pipeline provides *plugins* that let you route telemetry
data from one or more sources to one or more destinations. Plugins
are customizable and offer support for logs, metrics, and traces, although not
all plugins support all telemetry types.
[Source plugins](/ingest/pipeline/plugins/source-plugins) ingest data into your
pipelines, and [destination plugins](/ingest/pipeline/plugins/destination-plugins)
send that data to the storage or analysis platform of your choice.
## Add plugins to a pipeline
The source and destination plugins for each pipeline are listed in the `inputs`
and `outputs` section of that pipeline's [configuration file](/ingest/pipeline/v2/configure/config-files).
To add plugins to a pipeline, you can either edit a pipeline through the
Palo Alto Networks Telemetry Pipeline web interface, or edit the pipeline's configuration file
directly. Each plugin includes a number of customizable settings, which are
represented as key-value pairs within a configuration file. Many of these
settings have default values.
For example, this snippet shows the default configuration settings for an
[OpenTelemetry source plugin](/ingest/pipeline/plugins/source-plugins/opentelemetry):
```yaml theme={null}
pipeline:
inputs:
- Name: opentelemetry
port: "8088"
tag_from_uri: "false"
buffer_chunk_size: 512K
buffer_max_size: 4M
successful_response_code: "201"
tls.verify: on
tls.debug: "1"
<...>
```
### Descriptive names
To help keep track of your plugins, Palo Alto Networks Telemetry Pipeline
lets you add custom metadata
to each plugin, including descriptive names. These descriptive names don't overwrite
the default names assigned to each plugin. Instead, they're displayed under the
plugin's default name in the Palo Alto Networks Telemetry Pipeline web interface.
> [tab] Web interface
>
> To add a descriptive name to a plugin through the
> Palo Alto Networks Telemetry Pipeline web interface:
>
> 1. In the **Pipeline Builder**, click the existing plugin to edit it.
> 2. Expand the **Metadata** section, and enter a value in the **Name** field.
> 3. Click **Save**.
> [tab] Configuration file
>
> To add a descriptive name to a plugin by editing a
> [pipeline configuration file](/ingest/pipeline/v2/configure/config-files):
>
> * Add the following lines of YAML to the entry for that plugin:
>
> ```yaml theme={null}
> core.metadata:
> name: NAME
> ```
>
> Replace *`NAME`* with the descriptive name you want to use for the plugin.
>
> The `core.metadata` key must be nested at the same level as other top-level
> configuration keys, and must *not* replace the default `Name` key. For example,
> this snippet shows an OpenTelemetry source plugin correctly configured to use
> a descriptive name:
>
> ```yaml theme={null}
> pipeline:
> inputs:
> - Name: opentelemetry
> port: "8088"
> core.metadata:
> name: otel-instance-1
> <...>
> ```
# Send telemetry data with destination plugins
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins
Configure Palo Alto Networks Telemetry Pipeline to send telemetry data to various destinations.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
```mermaid actions={false} theme={null}
flowchart LR
accTitle: Pipeline flow
accDescr: A simplified representation of a telemetry pipeline, which includes a source plugin, parser, processing rules, and destination plugin.
subgraph Pipeline flow
direction LR
A(Source plugin )
B(Parser )
C(Processing rules )
D(Destination plugin)
A --> B --> C --> D
style D stroke-width:4px
end
```
Palo Alto Networks Telemetry Pipeline uses *destination plugins* to send telemetry
data from your pipeline to various destinations.
You can add and configure destination plugins to connect your pipelines to a variety
of storage and analysis tools. Different destination plugins support different data types,
including logs, metrics, and traces.
> [card] [Amazon CloudWatch](/ingest/pipeline/plugins/destination-plugins/amazon-cloudwatch)
> [card] [Amazon Kinesis Firehose](/ingest/pipeline/plugins/destination-plugins/aws-firehose)
> [card] [Amazon Kinesis Streams](/ingest/pipeline/plugins/destination-plugins/aws-streams)
> [card] [Amazon S3](/ingest/pipeline/plugins/destination-plugins/amazon-s3)
> [card] [Axiom](/ingest/pipeline/plugins/destination-plugins/axiom)
> [card] [Azure Blob Storage](/ingest/pipeline/plugins/destination-plugins/azure-blob)
> [card] [Azure Data Explorer](/ingest/pipeline/plugins/destination-plugins/azure-explorer)
> [card] [Azure Event Hubs](/ingest/pipeline/plugins/destination-plugins/azure-eventhub)
> [card] [Azure Logs Ingestion API](/ingest/pipeline/plugins/destination-plugins/azure-ingestion)
> [card] [Azure Monitor](/ingest/pipeline/plugins/destination-plugins/azure-monitor)
> [card] [Azure Sentinel](/ingest/pipeline/plugins/destination-plugins/azure-sentinel)
> [card] [Cortex XCOR](/ingest/pipeline/plugins/destination-plugins/chronosphere)
> [card] [Clickhouse](/ingest/pipeline/plugins/destination-plugins/clickhouse)
> [card] [Confluent Cloud](/ingest/pipeline/plugins/destination-plugins/confluent-cloud)
> [card] [Coralogix](/ingest/pipeline/plugins/destination-plugins/coralogix)
> [card] [Cortex XSIAM](/ingest/pipeline/plugins/destination-plugins/cortex-xsiam)
> [card] [CrowdStrike](/ingest/pipeline/plugins/destination-plugins/crowdstrike)
> [card] [Datadog](/ingest/pipeline/plugins/destination-plugins/datadog)
> [card] [Devo Cloud](/ingest/pipeline/plugins/destination-plugins/devo)
> [card] [Dynatrace](/ingest/pipeline/plugins/destination-plugins/dynatrace)
> [card] [Elasticsearch](/ingest/pipeline/plugins/destination-plugins/elasticsearch)
> [card] [Exabeam](/ingest/pipeline/plugins/destination-plugins/exabeam)
> [card] [Forward](/ingest/pipeline/plugins/destination-plugins/forward)
> [card] [Google Chronicle](/ingest/pipeline/plugins/destination-plugins/google-chronicle)
> [card] [Google Cloud BigQuery](/ingest/pipeline/plugins/destination-plugins/google-bigquery)
> [card] [Google Cloud Operations Suite](/ingest/pipeline/plugins/destination-plugins/gcp-ops)
> [card] [Grafana Loki](/ingest/pipeline/plugins/destination-plugins/grafana-loki)
> [card] [Graylog](/ingest/pipeline/plugins/destination-plugins/graylog)
> [card] [HTTP](/ingest/pipeline/plugins/destination-plugins/http)
> [card] [InfluxDB](/ingest/pipeline/plugins/destination-plugins/influxdb)
> [card] [Kafka](/ingest/pipeline/plugins/destination-plugins/kafka)
> [card] [New Relic](/ingest/pipeline/plugins/destination-plugins/new-relic)
> [card] [Null](/ingest/pipeline/plugins/destination-plugins/null)
> [card] [Observe](/ingest/pipeline/plugins/destination-plugins/observe)
> [card] [Oracle](/ingest/pipeline/plugins/destination-plugins/oracle)
> [card] [OpenSearch](/ingest/pipeline/plugins/destination-plugins/opensearch)
> [card] [OpenTelemetry](/ingest/pipeline/plugins/destination-plugins/opentelemetry)
> [card] [Prometheus Exporter](/ingest/pipeline/plugins/destination-plugins/prometheus-exporter)
> [card] [Prometheus Remote Write](/ingest/pipeline/plugins/destination-plugins/prometheus-remote-write)
> [card] [Redpanda Cloud](/ingest/pipeline/plugins/destination-plugins/redpanda)
> [card] [Scalyr](/ingest/pipeline/plugins/destination-plugins/scalyr)
> [card] [Slack](/ingest/pipeline/plugins/destination-plugins/slack)
> [card] [Splunk](/ingest/pipeline/plugins/destination-plugins/splunk)
> [card] [Standard output](/ingest/pipeline/plugins/destination-plugins/standard-output)
> [card] [Sumo Logic](/ingest/pipeline/plugins/destination-plugins/sumologic)
> [card] [Syslog](/ingest/pipeline/plugins/destination-plugins/syslog)
> [card] [TCP](/ingest/pipeline/plugins/destination-plugins/tcp)
> [card] [UDP](/ingest/pipeline/plugins/destination-plugins/udp)
> [card] [VictoriaMetrics](/ingest/pipeline/plugins/destination-plugins/victoriametrics)
> [card] [Vivo](/ingest/pipeline/plugins/destination-plugins/vivo)
# Amazon CloudWatch Logs and Metrics destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/amazon-cloudwatch
Configure the Amazon CloudWatch Logs and Metrics destination plugin in Palo Alto Networks Telemetry Pipeline to send logs and metrics to Amazon CloudWatch.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Amazon CloudWatch Logs and Metrics
[destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `cloudwatch_logs`) lets you configure your telemetry pipeline to stream
your log data and metrics to CloudWatch Logs and Metrics, respectively.
## Supported telemetry types
The Amazon CloudWatch Logs and Metrics destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Amazon CloudWatch Logs and Metrics destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Region** | `region` | Required. The AWS region to which to send your data. | `us-east-1` |
| **CloudWatch Log Group Name** | `log_group_name` | Required. CloudWatch Log Group Name. | *none* |
| **CloudWatch Log Stream Name** | `log_stream_name` | Required. CloudWatch Log Stream Name. Not compatible with Log Stream Prefix. | *none* |
### AWS Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **IAM Role ARN** | `role_arn` | Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role to assume, for uses like cross-account access. | *none* |
| **CloudWatch Logs and Metrics Endpoint** | `endpoint` | Custom endpoint for the Firehose API. | *none* |
| **STS API Endpoint** | `sts_endpoint` | Custom endpoint for the STS API. | *none* |
| **External ID for STS API** | `external_id` | Specifies an external ID for the STS API. Can be used with the `role_arn` parameter if your role requires an external ID. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **CloudWatch Log Stream Name Prefix** | `log_stream_prefix` | Prefix for CloudWatch Log Stream Name. Tag is appended to the prefix to form the stream name. | *none* |
| **CloudWatch Log Group Template** | `log_group_template` | Template for CloudWatch Log Group name using record accessor syntax. If needed, the plugin falls back to the `log_group_name` value. | *none* |
| **CloudWatch Log Stream Template** | `log_stream_template` | Template for CloudWatch Log Stream name using record accessor syntax. If needed, the plugin falls back to the `log_stream_name` or `log_stream_prefix` value. | *none* |
| **Number of days to retain logs** | `log_retention_days` | Any newly created log group's retention policy is set to this many days. Accepted values: `0`, `1`, `3`, `5`, `7`, `14`, `30`, `60`, `90`, `120`, `150`, `180`, `365`, `400`, `545`, `731`, `1827`, `3653`. | `0` |
| **Log Format** | `log_format` | Used to tell CloudWatch the format of the data. A value of `json/emf` enables CloudWatch to extract custom metrics embedded in a JSON payload. | *none* |
| **Log Key** | `log_key` | By default, the entire log record is sent to CloudWatch. If you specify a key name with this option, only the value of that key is sent to CloudWatch. For example, if you're using the Fluentd Docker log driver, you can specify `log_key log`, and only the log message is sent to CloudWatch. | *none* |
| **Enable Auto Retry Requests** | `auto_retry_requests` | Whether to immediately retry failed requests to AWS services one time. This option doesn't affect the normal Palo Alto Networks Telemetry Pipeline retry mechanism with backoff. Instead, it enables an immediate retry with no delay for networking errors, which can help improve throughput when there are transient or random networking issues. Accepted values: `true`, `false`. | `false` |
| **Enable Auto Create Log Group** | `auto_create_group` | Whether to automatically create the log group. Log streams are always automatically created. Accepted values: `true`, `false`. | `false` |
| **Metric namespace for CloudWatch EMF logs** | `metric_namespace` | Metric namespace for CloudWatch EMF logs. | *none* |
| **Metric Dimension List** | `metric_dimensions` | Metric dimensions is a list of lists. If you have only one list of dimensions, put the values as a comma-separated string. If you want to put list of lists, use the list as semicolon-separated strings. If your value is `d1,d2;d3`, the plugin considers it as `[d1, d2], [d3]`. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Amazon S3 destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/amazon-s3
Configure the Amazon S3 destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Amazon S3.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Amazon S3 [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `s3`) lets you configure your telemetry pipeline to store and archive
your data by sending it directly to your Amazon S3 bucket.
## Supported telemetry types
The Amazon S3 destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Amazon S3 destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Region** | `region` | Required. The AWS region to which to send your data. | `us-east-1` |
| **Bucket** | `bucket` | S3 bucket name. | *none* |
| **Total File Size (Bytes)** | `total_file_size` | Specifies the size of files in S3. Maximum size is 50 GB, minimum is 1 MB. | `1000000` |
| **Compression** | `compression` | Sets the compression type. Accepted values: `arrow`, `zip`. | *none* |
### AWS Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **AWS Shared Credential File** | `aws_shared_credentials_file` | Specifies the [shared credential file](#shared-credential-file) to use when uploading if not using AWS ARN. | *none* |
| **IAM Role ARN** | `role_arn` | Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role to assume, for uses like cross-account access. | *none* |
| **S3 Object ACL Policy** | `canned_acl` | Predefined Canned ACL policy for S3 objects. | *none* |
| **S3 API Endpoint** | `endpoint` | Custom endpoint for the AWS S3 API. | *none* |
| **STS API Endpoint** | `sts_endpoint` | Custom endpoint for the STS API. | *none* |
| **External ID for STS API** | `external_id` | Specifies an external ID for the STS API. Can be used with the `role_arn` parameter if your role requires an external ID. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Use Put Object** | `use_put_object` | Whether to use the S3 PutObject API, instead of multipart upload API. Accepted values: `true`, `false`. | `false` |
| **Send Content-MD5 header** | `send_content_md5` | Sends the Content-MD5 header with object uploads as is required when Object Lock is Enabled. Accepted values: `true`, `false`. | `false` |
| **Preserve Data Ordering** | `preserve_data_ordering` | Normally, when an upload request fails, there is a high chance for the last received chunk to be swapped with a later chunk, resulting in data shuffling. This feature prevents this shuffling by using a queue logic for uploads. Accepted values: `true`, `false`. | `false` |
| **Log Key** | `log_key` | By default, the entire log record is be sent to S3. If you specify a key name with this option, only the value of that key is sent to S3. | *none* |
| **Storage Class** | `storage_class` | Specifies the storage class for S3 objects. If this option isn't specified, objects are stored with the default `STANDARD` storage class. | *none* |
| **Store Dir** | `store_dir` | Directory to locally buffer data before sending. Plugin uses the S3 Multipart upload API to send data in chunks of 5 MB at a time. Only a small amount of data is locally buffered at any given point in time. | `/tmp/calyptia-core/s3` |
| **S3 Key Format** | `s3_key_format` | Format string for keys in S3. This option supports `strftime` time formats and a syntax for selecting parts of the Fluent log tag using a syntax inspired by the `rewrite_tag` filter. Add `$TAG` in the format string to insert the full log tag. Add `$TAG\[0]` to insert the first part of the tag in the S3 key. The tag is split into parts using the characters specified with the `s3_key_format_tag_delimiters` option. Add `$INDEX` to enable sequential indexing for file names, which prevents random string being added to end of the key when the `$UUID` isn't provided. | `/calyptia-core-logs/$TAG/%Y/%m/%d/%H/%M/%S` |
| **S3 Key Format Tag Delimiters** | `s3_key_format_tag_delimiters` | A series of characters used to split the tag into parts for use with the `s3_key_format` option. | `.` |
| **Use Static File Path?** | `static_file_path` | Disables behavior where the UUID string is automatically appended to end of the S3 key name when `$UUID` isn't provided in `s3_key_format`. `$UUID`, time formats, `$TAG`, and other dynamic key formats all work as expected when this feature is set to `true`. Accepted values: `true`, `false`. | `false` |
| **Enable Auto Retry Requests** | `auto_retry_requests` | Whether to immediately retry failed requests to AWS services one time. This option doesn't affect the normal Palo Alto Networks Telemetry Pipeline retry mechanism with backoff. Instead, it enables an immediate retry with no delay for networking errors, which can help improve throughput when there are transient or random networking issues. Accepted values: `true`, `false`. | `true` |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601` (for example, `2018-05-30T09:39:52.000681Z`), `java_sql_timestamp` (for example, `2018-05-30 09:39:52.000681`, which can be used with AWS Athena). | *none* |
| **JSON Date Key** | `json_date_key` | Specifies the name of the date field in output. | *none* |
| **Upload Chunk Size (Bytes)** | `upload_chunk_size` | This plugin uses the S3 Multipart Upload API to stream data to S3, which helps speed up data uploads. This parameter configures the size of each `part` in the upload. The `total_file_size` option configures the size of the file in S3. This option determines the size of chunks uploaded until that size is reached. These chunks are temporarily stored in `chunk_buffer_path` until their size reaches `upload_chunk_size`, at which point the chunk is uploaded to S3. Maximum value is 50 MB, minimum is 5 MB. | `5242880` |
| **Upload Timeout** | `upload_timeout` | Optionally specifies a timeout for uploads. Whenever this amount of time has elapsed, Palo Alto Networks Telemetry Pipeline completes an upload and creates a new file in S3. For example, set this value to 60m to get a new file in S3 every hour. | `10m` |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
## Shared credential file
Your shared credential file provides authentication credentials to the Amazon S3
destination plugin. This file must be an
[AWS credentials file](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html#cli-configure-files-format)
that includes an `aws_access_key_id` parameter and an `aws_secret_access_key`
parameter. For example:
```shell filename="Credentials" theme={null}
[default]
aws_access_key_id=ASIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
```
To reference this file in your plugin configuration, use the following syntax:
```yaml theme={null}
{{ files.NAME }}
```
Replace *`NAME`* with the name of your credentials file.
## Bucket policies
To use the Amazon S3 destination plugin, you must grant the plugin write access
to your S3 buckets. These
[bucket policies](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-policy-language-overview.html)
are managed within Amazon S3, not within the plugin's own configuration.
For example, the following bucket policy lets the Amazon S3 destination plugin
send data to a bucket named `my-bucket`:
```json filename="Bucket policy" theme={null}
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "s3:PutObject",
"Resource": [
"arn:aws:s3:::my-bucket",
"arn:aws:s3:::my-bucket/*"
]
}]
}
```
# Amazon Kinesis Firehose destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/aws-firehose
Configure the Amazon Kinesis Firehose destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Amazon Kinesis Firehose.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Amazon Kinesis Firehose [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `kinesis_firehose`) lets you configure your telemetry pipeline to collect
various data types such as logs, metrics, traces, and events and stream them
directly to your Kinesis Firehose delivery stream.
## Supported telemetry types
The Amazon Kinesis Firehose destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Amazon Kinesis Firehose destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Region** | `region` | Required. The AWS region to which to send your data. | `us-east-1` |
| **Firehose delivery stream name** | `delivery_stream` | Kinesis Firehose name. | *none* |
### AWS Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **IAM Role ARN** | `role_arn` | Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role to assume, for uses like cross-account access. | *none* |
| **Firehose API Endpoint** | `endpoint` | Custom endpoint for the Firehose API. | *none* |
| **STS API Endpoint** | `sts_endpoint` | Custom endpoint for the STS API. | *none* |
| **External ID for STS API** | `external_id` | Specifies an external ID for the STS API. Can be used with the `role_arn` parameter if your role requires an external ID. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Compression** | `compression` | Compression type for Firehose records. Each log record is individually compressed and sent to Firehose. Accepted values: `gzip`, `arrow` (with `arrow` available only if Apache Arrow is enabled at compile time). | *none* |
| **Time Key** | `time_key` | Adds the timestamp to the record under this key. By default, the timestamp from Palo Alto Networks Telemetry Pipeline isn't added to records sent to Kinesis. | *none* |
| **Time Key Format** | `time_key_format` | `strftime`-compliant format string for the timestamp. This option is used with `time_key`. | `%Y-%m-%dT%H:%M:%S` |
| **Log Key** | `log_key` | By default, the entire log record is sent to Kinesis. If you specify a key name with this option, only the value of that key is sent to Kinesis. For example, if you're using the Fluentd Docker log driver, you can specify `log_key log`, and only the log message is sent to Kinesis. | *none* |
| **Enable Auto Retry Requests** | `auto_retry_requests` | Whether to immediately retry failed requests to AWS services one time. This option doesn't affect the normal Palo Alto Networks Telemetry Pipeline retry mechanism with backoff. Instead, it enables an immediate retry with no delay for networking errors, which can help improve throughput when there are transient or random networking issues. Accepted values: `true`, `false`. | `false` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Amazon Kinesis Streams destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/aws-streams
Configure the Amazon Kinesis Streams destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Amazon Kinesis Streams.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Amazon Kinesis Streams [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `kinesis_streams`) lets you stream and analyze your data by sending it
directly to your Amazon Kinesis stream.
## Supported telemetry types
The Amazon Kinesis Streams destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Amazon Kinesis Streams destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Region** | `region` | Required. The AWS region to which to send your data. | `us-east-1` |
| **Kinesis Stream Name** | `stream` | Kinesis Stream name. | *none* |
### AWS Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **IAM Role ARN** | `role_arn` | Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role to assume, for uses like cross-account access. | *none* |
| **Kinesis Streams API Endpoint** | `endpoint` | Custom endpoint for the Kinesis API. | *none* |
| **STS API Endpoint** | `sts_endpoint` | Custom endpoint for the STS API. | *none* |
| **External ID for STS API** | `external_id` | Specifies an external ID for the STS API. Can be used with the `role_arn` parameter if your role requires an external ID. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Time Key** | `time_key` | Adds the timestamp to the record under this key. By default, the timestamp from Palo Alto Networks Telemetry Pipeline isn't added to records sent to Kinesis. | *none* |
| **Time Key Format** | `time_key_format` | `strftime`-compliant format string for the timestamp. This option is used with `time_key`. | `%Y-%m-%dT%H:%M:%S` |
| **Log Key** | `log_key` | By default, the entire log record is sent to Kinesis. If you specify a key name with this option, only the value of that key is sent to Kinesis. For example, if you're using the Fluentd Docker log driver, you can specify `log_key log`, and only the log message is sent to Kinesis. | *none* |
| **Enable Auto Retry Requests** | `auto_retry_requests` | Whether to immediately retry failed requests to AWS services one time. This option doesn't affect the normal Palo Alto Networks Telemetry Pipeline retry mechanism with backoff. Instead, it enables an immediate retry with no delay for networking errors, which can help improve throughput when there are transient or random networking issues. Accepted values: `true`, `false`. | `false` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Axiom destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/axiom
Configure the Axiom destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Axiom.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Axiom [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `Axiom`) lets you integrate your telemetry data with Axiom
for additional processing and analysis.
## Supported telemetry types
The Axiom destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Axiom destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Axiom Token** | `header` | Adds an HTTP header key-value pair. You can set multiple `header` values. | *none* |
| **Dataset Name** | `uri` | Required. The dataset name used when routing data to the Axiom service. For more information, see [Send data from Fluent Bit to Axiom](https://axiom.co/docs/send-data/fluent-bit) in the Axiom documentation. | `/api/v1/datasets/$DATASET_NAME/ingest` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of Axiom data collection endpoint. | `cloud.axiom.co` |
| **Port** | `port` | Required. The port used to communicate with the Axiom service. Use port `443` for TLS. | `443` |
| **Compress** | `compress` | Sets the payload compression mechanism. | `gzip` |
| **HTTP Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. | *none* |
| **Format** | `format` | Required. Specifies the data format to be used in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`, `msgpack`. | `json` |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601` (for example, `2018-05-30T09:39:52.000681Z`), `java_sql_timestamp` (for example, `2018-05-30 09:39:52.000681`, which can be used with AWS Athena). | `iso8601` |
| **JSON Date Key** | `json_date_key` | Specifies the name of the date field in output. | `_time` |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Header Tag** | `header_tag` | Sets an HTTP header whose value is the tag of the record. | *none* |
| **Header Key** | `headers_key` | Specifies the key that contains the headers. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
# Azure Blob Storage destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/azure-blob
Configure the Azure Blob Storage destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Azure Blob Storage.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Azure Blob Storage [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `azure_blob`) lets you store your logs, metrics, and other data types
directly in your Azure Blob Storage account.
## Supported telemetry types
The Azure Blob Storage destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Azure Blob Storage destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Azure Storage Account Name** | `account_name` | Required. Azure Storage account name. | *none* |
| **Azure Storage Shared Key** | `shared_key` | Required. Specifies the Azure Storage Shared Key to authenticate against the service. | *none* |
| **Container Name** | `container_name` | Required. The name of the container that will contain the blobs. | *none* |
| **Path** | `path` | Optional path to store your blobs. If your blob name is `myblob`, you can specify sub-directories where to store it using path. Setting a path to `/logs/kubernetes` will store your blob in `/logs/kubernetes/myblob`. | *none* |
| **Blob Type** | `blob_type` | Specifies the blob type. Accepted values: `appendblob`, `blockblob`. | `appendblob` |
| **Auto Create Container** | `auto_create_container` | If `container_name` doesn't exist in the remote service, enabling this option handles the exception and auto-creates the container. Accepted values: `on`, `off`. | `on` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Azure Event Hubs destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/azure-eventhub
Configure the Azure Event Hubs destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Azure Event Hubs.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Azure Event Hubs [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `kafka`, alias: `Azure_Event_Hub`) lets you configure your telemetry
pipeline to stream your logs and metrics data directly to Azure Event Hubs.
## Supported telemetry types
The Azure Event Hubs destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Azure Event Hubs destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Event Hub Namespace** | `brokers` | Required. The Event Hubs namespace that can be found within the configuration settings. | *none* |
| **Event Hub Topic** | `topics` | Required. The Event Hubs topic to write information to. | *none* |
| **Connection String Key** | `rdkafka.sasl.password` | Required. The Event Hubs connection string from within the Connection Access Policy set for the source. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Message Key** | `message_key` | Optional key to store the message. | *none* |
| **Message Key Field** | `message_key_field` | If set, this value indicates the message key. If not set or found in the record, `message_key` will be used (if set). | *none* |
| **Timestamp Key** | `timestamp_key` | Sets the key to store the record timestamp. | *none* |
| **Timestamp Format** | `timestamp_format` | Sets the timestamp format. Accepted values: `double`, `iso8601`. | `double` |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Queue Full Retries** | `queue_full_retries` | Palo Alto Networks Telemetry Pipeline queues data into rdkafka library, if for some reason the underlying library can't flush the records the queue might fills up blocking new addition of records. The `queue_full_retries` option set the number of local retries to enqueue the data. The default value is 10 times, the interval between each retry is 1 second. Setting the `queue_full_retries` value to 0 sets an unlimited number of retries. | `10` |
| **SASL Username** | `rdkafka.sasl.username` | SASL username. | `$ConnectionString` |
| **Security Protocol** | `rdkafka.security.protocol` | This is the security protocol for Azure Event Hub. If you require OAuth 2.0 or OpenID authentication, open a support ticket prior to changing this setting. | `SASL_SSL` |
| **SASL Mechanism** | `rdkafka.sasl.mechanism` | This is the transport mechanism for the SASL connection. | `PLAIN` |
### Extended librdkafka parameters
This plugin uses the [librdkafka](https://github.com/confluentinc/librdkafka)
library. Certain configuration parameters available through the Palo Alto Networks
Telemetry Pipeline UI are based on librdkafka settings. These parameters generally
use the `rdkafka.` prefix.
In addition to the parameters available through the
Palo Alto Networks Telemetry Pipeline UI, you can
customize any of the
[librdkafka configuration properties](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md)
by adding them to a pipeline configuration file. To do so, append the `rdkafka.`
prefix to the name of that property.
For example, to customize the `socket.keepalive.enable` property, add the
`rdkafka.socket.keepalive.enable` key to your configuration file.
# Azure Data Explorer destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/azure-explorer
Configure the Azure Data Explorer destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Azure Data Explorer.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Azure Data Explorer [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `azure_kusto`) lets you configure your telemetry pipeline to send your
logs and metrics data directly to Azure Data Explorer.
## Supported telemetry types
The Azure Data Explorer destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Azure Data Explorer destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Tenant ID** | `tenant_id` | Required. The tenant or domain ID of the Azure AD registered app. | *none* |
| **Client ID** | `client_id` | Required. The client ID of the Azure AD registered app. | *none* |
| **Client Secret** | `client_secret` | Required. The client secret of the Azure AD registered app (App Secret). | *none* |
| **Ingestion Endpoint** | `ingestion_endpoint` | Required. The clusters ingestion endpoint. | `https://ingest-cluster_name.region.kusto.windows.net` |
| **Database Name** | `database_name` | Required. The database name. | *none* |
| **Table Name** | `table_name` | Required. The table name. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Ingestion Mapping Reference** | `ingestion_mapping_reference` | The name of a JSON ingestion mapping that will be used to map the ingested payload into the table columns. | *none* |
| **Log Key** | `log_key` | Key name of the log content. | `log` |
| **Enable Tag Key** | `include_tag_key` | If `true`, the tag is appended to output. The key name is used `tag_key` property. Accepted values: `true`, `false`. | `true` |
| **Tag Key** | `tag_key` | Specifies the key name where the tag is stored. | `tag` |
| **Enable Time Key** | `include_time_key` | If `true`, a timestamp is appended to output. The key name is used `time_key` property. Accepted values: `true`, `false`. | `true` |
| **Time Key** | `time_key` | Specifies the key name where the timestamp is stored. | `timestamp` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Azure Logs Ingestion API destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/azure-ingestion
Configure the Azure Logs Ingestion API destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Azure Logs Ingestion API.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Azure Logs Ingestion API [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `azure_logs_ingestion`) lets you configure your telemetry pipeline to
output data to Azure Monitor using Azure's Log Ingestion API.
## Supported telemetry types
The Azure Logs Ingestion API destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Azure Logs Ingestion API destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Tenant ID** | `tenant_id` | Required. The tenant ID of the Azure AD app. | *none* |
| **Client ID** | `client_id` | Required. The client ID of the Azure AD app. | *none* |
| **Client Secret** | `client_secret` | Required. The client secret of the Azure AD app (App Secret). | *none* |
| **DCE URL** | `dce_url` | Required. Data Collection Endpoint (DCE) URL. | *none* |
| **DCR ID** | `dcr_id` | Required. Data Collection Rule (DCR) immutable ID. | *none* |
| **Table Name** | `table_name` | Required. The name of the custom log table (include the \_CL suffix as well if applicable). | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Time Key** | `time_key` | Specifies the key name where the timestamp will be stored. | *none* |
| **Enable Time Generated** | `time_generated` | If `true`, the HTTP request header `time-generated-field` is included so Azure can override the timestamp with the key specified by `time_key` option. Accepted values: `true`, `false`. | `true` |
| **Enable Compression** | `compress` | If `true`, enable HTTP payload gzip compression. Accepted values: `true`, `false`. | `true` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Azure Monitor Logs destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/azure-monitor
Configure the Azure Monitor Logs destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Azure Monitor.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Azure Monitor Logs [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `azure`) lets you configure your telemetry pipeline to send your logs and
metrics data directly to Azure Monitor Logs.
## Supported telemetry types
The Azure Monitor Logs destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Azure Monitor Logs destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Customer / Workspace ID** | `customer_id` | Required. Customer ID or WorkspaceID string. | *none* |
| **Client Authentication Key** | `shared_key` | Required. The primary or the secondary Connected Sources client authentication key. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Event Type Name** | `log_type` | The name of the event type. | `fluentbit` |
| **Time Key** | `time_key` | Specifies the key name where the timestamp is stored. | `@timestamp` |
| **Enable Time Generated** | `time_generated` | If `true`, the HTTP request header `time-generated-field` is included so Azure can override the timestamp with the key specified by `time_key` option. Accepted values: `true`, `false`. | `false` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Azure Sentinel destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/azure-sentinel
Configure the Azure Sentinel destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Azure Sentinel.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Azure Sentinel [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `azure`, alias: `Azure_Sentinel`) lets you configure your telemetry
pipeline to send security-related logs and events to Azure Sentinel.
## Supported telemetry types
The Azure Sentinel destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Azure Sentinel destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Customer / Workspace ID** | `customer_id` | Required. Customer ID or WorkspaceID string. | *none* |
| **Client Authentication Key** | `shared_key` | Required. The primary or the secondary Connected Sources client authentication key. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Event Type Name** | `log_type` | The name of the event type. | `fluentbit` |
| **Time Key** | `time_key` | Optional parameter to specify the key name where the timestamp is stored. | `@timestamp` |
| **Enable Time Generated** | `time_generated` | If `true`, the HTTP request header `time-generated-field` is included so Azure can override the timestamp with the key specified by the `time_key` option. Accepted values: `true`, `false`. | `false` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Cortex XCOR Logs destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/chronosphere
Configure the Cortex XCOR Logs destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Cortex XCOR.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Cortex XCOR Logs
[destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `Cortex XCOR`) lets you configure your telemetry pipeline
to output log data to Cortex XCOR.
## Supported telemetry types
The Cortex XCOR Logs destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Cortex XCOR Logs destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. Your Cortex XCOR tenant. | *`TENANT`*`.chronosphere.io` |
| **Port** | `port` | Required. The port to communicate with Cortex XCOR. | `443` |
| **Key** | `header` | Required. The header type to include with your request. | `API-Token` |
| **Value** | `header` | Required. Your ingest API token to authenticate with Cortex XCOR. | *none* |
* Replace *`TENANT`* with the name of your Cortex XCOR tenant.
* Replace *`API_TOKEN`* with the API token generated from your [service account](/administer/accounts-teams/service-accounts). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **URI** | `uri` | Required. HTTP URI for the web server. For example, `/api/v1/data/logs/ingest` for JSON format. | `/api/v1/data/logs/ingest` |
| **Format** | `format` | The data format to use in the HTTP request. | `json` |
| **Compress** | `compress` | Sets payload compression. Accepted values: `gzip`, *none*. | `gzip` |
| **HTTP Proxy** | `proxy` | Specifies an HTTP proxy. The expected format is `http://host:port`. | *none* |
| **JSON Date Format** | `json_date_format` | Specifies the date format. Accepted values: `double`, `epoch`, `iso8601` (such as `2018-05-30T09:39:52.000681Z`), `java_sql_timestamp` (such as `2018-05-30 09:39:52.000681`). | `iso8601` |
| **JSON Date Key** | `json_date_key` | Specifies the name of the date field in output. | `_time` |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Header Tag** | `header_tag` | Sets an HTTP header whose value is the tag of the record. | *none* |
| **Header Key** | `headers_key` | Specifies the key that contains the headers. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
## Example
The following YAML configuration defines a Fluent Bit input and a Cortex XCOR Logs
output.
```yaml theme={null}
pipeline:
inputs:
- name: forward
alias: Fluent_Bit
port: "5170"
tls.verify: on
tls.debug: "1"
tag: forward.cb3bae48-0000-4a51-0000-f6ccd3f0ed0c
filters:
- name: lua
match: forward.cb3bae48-0000-4a51-0000-f6ccd3f0ed0c
active: "false"
outputs:
- name: http
alias: Cortex XCOR
host: TENANT.chronosphere.io
port: "443"
header:
- API-Token f31b...ed7t292
uri: /api/v1/data/logs/ingest
format: json
compress: gzip
json_date_format: iso8601
json_date_key: _time
tls: true
tls.verify: on
tls.debug: "1"
net.keepalive: true
net.keepalive_idle_timeout: 30s
net.connect_timeout: 10s
net.connect_timeout_log_error: true
net.keepalive_max_recycle: "2000"
core.metadata:
name: Cortex XCOR Logs ingest
Match_Regex: .{0,}
```
# Clickhouse destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/clickhouse
Configure the Clickhouse destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Clickhouse.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Clickhouse [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `Clickhouse`) lets you send your telemetry pipeline data
to Clickhouse.
## Supported telemetry types
The Clickhouse destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Clickhouse destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the Clickhouse cloud host. | *none* |
| **Port** | `port` | Required. TCP host port of the target HTTP server. | `8443` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **URI** | `uri` | Required. Specifies a HTTP URI for the target web server. | `/?query=INSERT+INTO+fluentbit.kube+FORMAT+JSONEachRow` |
| **Format** | `format` | Required. Specifies the data format to use in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`. | `json_stream` |
| **JSON Date Format** | `json_date_format` | Specifies the date format. Accepted values: `double`, `epoch`, `iso8601`, `java_sql_timestamp`. | `epoch` |
| **JSON Date Key** | `json_date_key` | Specifies the name of the date field in output. | `timestamp` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
# Confluent Cloud DataSet destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/confluent-cloud
Configure the Confluent Cloud DataSet destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Confluent Cloud.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Confluent Cloud [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `kafka`, alias: `confluent_cloud_output`) lets you send your telemetry
pipeline data to Confluent Cloud.
## Supported telemetry types
The Confluent Cloud destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Confluent Cloud destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Confluent Cloud Bootstrap Servers** | `brokers` | Required. The Confluent Cloud bootstrap servers can be found within the cluster configuration settings. | `SERVERNAME.confluent.cloud:9092` |
| **Confluent Cloud Topic** | `topics` | Required. The Confluent Cloud Topic to send information to. | *none* |
| **Confluent Cloud API Key** | `rdkafka.sasl.username` | Required. Confluent Cloud API Key. | *none* |
| **Confluent Cloud API Secret** | `rdkafka.sasl.password` | Required. The Confluent Cloud API Secret. | *none* |
| **Format** | `format` | Specifies a data format. Accepted values: `json`, `msgpack`. | `json` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Message Key** | `message_key` | Optional key to store the message. | *none* |
| **Message Key Field** | `message_key_field` | If set, the value of `Message_Key_Field` in the record will indicate the message key. If not set nor found in the record, `Message_Key` will be used if set. | *none* |
| **Timestamp Key** | `timestamp_key` | Sets the key to store the record timestamp. | *none* |
| **Timestamp Format** | `timestamp_format` | Sets the format. Accepted values: `double`, `iso8601`. | `double` |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Queue Full Retries** | `queue_full_retries` | Palo Alto Networks Telemetry Pipeline queues data into `rdkafka` library. If the underlying library can't flush the records the queue might fill and block new addition of records. This option sets the number of local retries to enqueue the data. The interval between each retry is 1 second. Setting `queue_full_retries` to `0` to set an unlimited number of retries. | `10` |
| **Security Protocol** | `rdkafka.security.protocol` | The security protocol used to communicate with Confluent Cloud. | `SASL_SSL` |
| **SASL Mechanism** | `rdkafka.sasl.mechanism` | The SASL authentication mechanism for the API. | `PLAIN` |
### Extended librdkafka parameters
This plugin uses the [librdkafka](https://github.com/confluentinc/librdkafka)
library. Certain configuration parameters available through the Palo Alto Networks
Telemetry Pipeline UI are based on librdkafka settings. These parameters generally
use the `rdkafka.` prefix.
In addition to the parameters available through the
Palo Alto Networks Telemetry Pipeline UI, you can
customize any of the
[librdkafka configuration properties](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md)
by adding them to a pipeline configuration file. To do so, append the `rdkafka.`
prefix to the name of that property.
For example, to customize the `socket.keepalive.enable` property, add the
`rdkafka.socket.keepalive.enable` key to your configuration file.
# Coralogix destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/coralogix
Configure the Coralogix destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Coralogix.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Coralogix [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `Coralogix`) lets you configure your telemetry pipeline
to transmit your data to Coralogix for further processing and analysis.
## Supported telemetry types
The Coralogix destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Coralogix destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Coralogix API Endpoint** | `host` | Required. The API endpoint for Coralogix. | `api.coralogix.com` |
| **Coralogix Private Key** | `header` | Add your Coralogix Private Key. You can enter multiple keys. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **URI** | `uri` | Required. Coralogix URI. | `/logs/rest/singles` |
| **Compress** | `compress` | Sets the payload compression mechanism. Accepted values: `gzip`, *none*. | `gzip` |
| **HTTP Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. | *none* |
| **Format** | `format` | Specifies the data format to be used in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`, `msgpack`. | `json_lines` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
# Cortex XSIAM destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/cortex-xsiam
Configure the Cortex XSIAM destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Cortex XSIAM.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Cortex XSIAM [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `paloaltocortex`) lets you configure your telemetry pipeline to send
logs to Palo Alto Networks Cortex XSIAM.
## Supported telemetry types
The Cortex XSIAM destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Cortex XSIAM destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| Cortex URL | `host` | Required. Specifies your Cortex XSIAM webhook URL. | `api-{tenant external URL}.crtx.us.paloaltonetworks.com` |
| Port | `port` | Required. Specifies TCP port of the target HTTP server. | `443` |
| Cortex URI and Instance | `uri` | Required. Specifies the URI to use as part of the request. | `/xsoar/instance/execute/my_instance_01` |
| Headers | `header` | Required. Sets an HTTP header key-value pair. Use your ingest API token to authenticate with Cortex XSIAM. | `Authorization [REPLACE WITH TOKEN]` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| Format | `format` | Specifies the data format to use in the HTTP request body. Accepted values: `json_lines`, `json`, `json_stream`. | `json` |
| Compress | `compress` | Sets the payload compression mechanism. Accepted values: `gzip`, *none*. | *none* |
| HTTP Proxy | `proxy` | Specifies an HTTP proxy. The expected format of this value is `http://host:port`. | *none* |
| JSON Date Format | `json_date_format` | Sets the date format. Accepted values: `double`, `epoch`, `iso8601`, `java_sql_timestamp`. | `iso8601` |
| JSON Date Key | `json_date_key` | Specifies the name of the date field in output. | `_time` |
| Body Key | `body_key` | Specifies the key that contains the format. | *none* |
| Header Tag | `header_tag` | Sets an HTTP header whose value is the tag of the record. | *none* |
| Header Key | `headers_key` | Specifies the key that contains the headers. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `true` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
# CrowdStrike destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/crowdstrike
Configure the CrowdStrike destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to CrowdStrike.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The CrowdStrike [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `Humio`) lets you configure your telemetry pipeline to
send data from any of your sources to the CrowdStrike LogScale platform.
## Supported telemetry types
The CrowdStrike destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the CrowdStrike destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the LogScale Server. | `cloud.community.humio.com` |
| **Port** | `port` | Required. TCP port of the targeted HTTP server. | `443` |
| **Headers** | `header` | Add the LogScale Ingest Token after the `Bearer`. You can add more than one header. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **URI** | `uri` | Required. Specifies an optional HTTP URI for the target web server. | `/api/v1/ingest/json` |
| **Format** | `format` | Required. Specifies the data format to be used in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`. | `json` |
| **Compress** | `compress` | Sets the payload compression mechanism. Accepted values: `gzip`, *none*. | *none* |
| **HTTP Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. | *none* |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601` (for example, `2018-05-30T09:39:52.000681Z`), `java_sql_timestamp` (for example, `2018-05-30 09:39:52.000681`, which can be used with AWS Athena). | `iso8601` |
| **JSON Date Key** | `json_date_key` | Specifies the name of the date field in output. | `_time` |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Header Tag** | `header_tag` | Sets an HTTP header whose value is the tag of the record. | *none* |
| **Header Key** | `headers_key` | Specifies the key that contains the headers. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Datadog Logs destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/datadog
Configure the Datadog Logs destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Datadog.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Datadog Logs [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `datadog`) lets you configure your telemetry pipeline to integrate your
telemetry data with Datadog Logs, letting you store, analyze, and visualize your
log data using logging tools in Datadog.
## Supported telemetry types
The Datadog Logs destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Datadog Logs destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Datadog API Key** | `apikey` | Required. Datadog API Key found within account settings. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Datadog Server** | `host` | The Datadog server where you're sending your logs. | `http-intake.logs.datadoghq.com` |
| **Datadog Service Name** | `dd_service` | The human-readable name for your service generating the logs. The name of your app or database. | *none* |
| **Datadog Source Name** | `dd_source` | A human readable name for the underlying technology of your service. For example, `postgres` or `nginx`. | *none* |
| **Datadog Tags** | `dd_tags` | The tags you want to assign to your logs in Datadog. | *none* |
| **Datadog Message Key** | `dd_message_key` | By default, the plugin searches for the key 'log' and remap the value to the key `message`. If the property is set, the plugin searches the property name key. | *none* |
| **Include Tag Key** | `include_tag_key` | If `true`, tag is appended to output. The key name is used `tag_key` property. Accepted values: `true`, `false`. | `false` |
| **Tag Key** | `tag_key` | The key name of tag. If `include_tag_key` is false, This property is ignored. | `tagkey` |
| **JSON Date Key** | `json_date_key` | Date key name for output in log. | `timestamp` |
| **Compression** | `compress` | Compresses the payload in GZIP format, Datadog supports and recommends setting this to 'gzip'. | `gzip` |
| **Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. HTTPS isn't supported. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Devo Cloud destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/devo
Configure the Devo Cloud destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Devo Cloud.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Devo Cloud [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `syslog`, alias: `devo_cloud`) lets you send your telemetry pipeline data
to Devo Cloud.
## Supported telemetry types
The Devo Cloud destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Devo Cloud destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Devo Collector** | `host` | Required. The URL of the Devo Collector. | `collector-us.devo.com` |
| **Message Key** | `syslog_message_key` | Required, or the message is empty. The key name from the original record that contains the message to deliver. | *none* |
| **Devo Tag Key** | `syslog_appname_key` | The key within the message to be used as the Devo Tag. If **Devo Tag Preset** is specified then this field is not required. | *none* |
| **Devo Tag Preset** | `syslog_appname_preset` | The preset Devo Tag. This field is overwritten if **Devo Tag Key** is set and a key of a record is matched. | `my.app.calyptia.core` |
| **CA Certificate File Path** | `tls.ca_file` | CA certificate file found in Devo Cloud under **Administration > Relays and ELBs > Syslog Certificates > Chain CA**. After downloading, upload as a file and reference as `{{files.}}`. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Path to the private key file, found in Devo Cloud under **Administration > Relays and ELBs > Syslog Certificates > Private Key**. Download, then upload as a file and reference as `{{files.}}`. | *none* |
| **Private Key File Password** | `tls.key_passwd` | The private key password displayed in Devo Cloud under **Administration > Relays and ELBs > Syslog Certificates > Private Key**. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The HTTPS port of the Devo Cloud Relay. | `443` |
| **Mode** | `mode` | Required. Desired transport type. Available options: `tcp`, `tls`, and `udp`. | `tcp` |
| **RFC Format** | `syslog_format` | Required. The format used to send data to Devo Cloud. `rfc3164` is the default and formatting must be changed for `rfc5424`. | `rfc3164` |
| **Syslog Severity Key** | `syslog_severity_key` | The key name from the original record that contains the Syslog severity number. | *none* |
| **Syslog Severity Preset** | `syslog_severity_preset` | The preset severity number. Overwritten if `syslog_severity_key` is set and a key of a record matches. | `informational` |
| **Syslog Facility Key** | `syslog_facility_key` | The key name from the original record that contains the Syslog facility number. | *none* |
| **Syslog Facility Preset** | `syslog_facility_preset` | The preset facility number. Overwritten if `syslog_facility_key` is set and a key of a record matches. | `local7` |
| **Syslog Hostname Key** | `syslog_hostname_key` | The key name from the original record that contains the hostname that generated the message. | *none* |
| **Syslog Hostname Preset** | `syslog_hostname_preset` | The preset hostname. Overwritten if `syslog_hostname_key` is set and a key of a record matches. | `calyptia` |
| **Syslog ProcID Key** | `syslog_procid_key` | The key name from the original record that contains the Process ID that generated the message. | *none* |
| **Syslog ProcID Preset** | `syslog_procid_preset` | The preset process ID. Overwritten if `syslog_procid_key` is set and a key of a record is matched. | *none* |
| **Syslog Message ID Key** | `syslog_msgid_key` | The key name from the original record that contains the Message ID associated to the message. | *none* |
| **Syslog Message ID Preset** | `syslog_msgid_preset` | The preset message ID.Overwritten if `syslog_msgid_key` is set and a key of a record is matched. | *none* |
| **Syslog Structured Data (SD) Key** | `syslog_sd_key` | The key name from the original record that contains the Structured Data (SD) content. | *none* |
| **Syslog Maxsize** | `syslog_maxsize` | The maximum size allowed per message. The value must be an integer representing the number of bytes allowed. If no value is provided, the default size is set depending of the protocol version specified by `syslog_format`. RFC3164 sets max size to 1024 bytes. RFC5424 sets the size to 2048 bytes. | `2048` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | Enables or disables TLS/SSL support. | `true` |
| **TLS Certificate Validation** | `tls.verify` | Turns TLS/SSL certificate validation on or off. TLS must be on for this setting to be enabled. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Dynatrace Logs destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/dynatrace
Configure the Dynatrace Logs destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Dynatrace.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Dynatrace Logs [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `Dynatrace`) lets you configure your telemetry pipeline to
send your log data to Dynatrace.
## Supported telemetry types
The Dynatrace Logs destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Dynatrace Logs destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Dynatrace Environment URL** | `host` | Required. The URL for your Dynatrace instance. For example, `{YOUR-ENVIRONMENT_ID}.live.dynatrace.com`. | *none* |
| **Dynatrace API Token** | `header` | Adds an HTTP header key-value pair for the API token. You can set multiple headers. | *See the following table.* |
The following headers are to set your Dynatrace API Token:
| Key | Value |
| - | - |
| **Authorization** | `Api-Token [REPLACE WITH DYNATRACE API TOKEN]` |
| **Content-Type** | `application/json; charset=utf-8` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Port for Dynatrace** | `port` | The port number of the Dynatrace Logs API. | `443` |
| **URI** | `uri` | The URI of the Dynatrace Logs API. | `/api/v2/logs/ingest` |
| **Allow Duplicated Headers** | `allow_duplicated_headers` | Setting to ensure no duplicate Authorization API-Tokens are present. | `false` |
| **HTTP Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. | *none* |
| **Format** | `format` | Specifies the data format to be used in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`. | `json` |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601` (for example, `2018-05-30T09:39:52.000681Z`), `java_sql_timestamp` (for example, `2018-05-30 09:39:52.000681`, which can be used with AWS Athena). | `iso8601` |
| **JSON Date Key** | `json_date_key` | Specifies the name of the date field in output. | `timestamp` |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Header Tag** | `header_tag` | Sets an HTTP header whose value is the tag of the record. | *none* |
| **Header Key** | `headers_key` | Specifies the key that contains the headers. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Elasticsearch destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/elasticsearch
Configure the Elasticsearch destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Elasticsearch.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Elasticsearch [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `es`) lets you configure your telemetry pipeline to store, search, and
visualize your data using Elasticsearch's indexing and querying capabilities.
## Supported telemetry types
The Elasticsearch destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Elasticsearch destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target Elasticsearch instance. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target Elasticsearch instance. | `9200` |
| **Index** | `index` | Required. Index name. | `calyptia-core` |
| **Logstash Format** | `logstash_format` | Enables Logstash format compatibility. Accepted values: `true`, `false`. | `false` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Replace Dots** | `replace_dots` | When enabled, replaces field name dots with underscore, required by versions of Elasticsearch. Accepted values: `true`, `false`. | `false` |
| **Type** | `type` | Required. Type Name. | `_doc` |
| **Suppress Type Name** | `suppress_type_name` | If true, mapping types are removed. For v7.0.0 or later. Accepted values: `true`, `false`. | `false` |
| **Buffer Size** | `buffer_size` | Specifies the buffer size used to read the response from the Elasticsearch HTTP service. Use this option for debugging purposes where it's required to read full responses. Response size grows depending of the number of records inserted. To set an unlimited amount of memory set this value to `false`, otherwise the value must be according to the Unit Size specification. | `512k` |
| **Path** | `path` | Elasticsearch accepts new data on HTTP query path `/_bulk`. It's also possible to serve Elasticsearch behind a reverse proxy on a sub path. This option defines such path on the Palo Alto Networks Telemetry Pipeline side. It adds only a path prefix in the indexing HTTP POST URI. | *none* |
| **Pipeline** | `pipeline` | Newer versions of Elasticsearch let you set up filters, also called pipelines. This option lets you define which pipeline the database should use. For performance reasons, it's strongly suggested to do parsing and filtering on Palo Alto Networks Telemetry Pipeline side. | *none* |
| **Generate ID** | `generate_id` | When enabled, generates `_id` for outgoing records. This prevents duplicate records when retrying ES. Accepted values: `true`, `false`. | `false` |
| **Write Operation** | `write_operation` | Operation to use to write in bulk requests. | `create` |
| **ID Key** | `id_key` | If set, `_id` is the value of the key from incoming record. | *none* |
| **Replace Dots** | `current_time_index` | Uses current time for index generation instead of message record. Accepted values: `true`, `false`. | `false` |
| **Logstash Prefix** | `logstash_prefix` | When `logstash_format` is enabled, the Index name is composed using a prefix and the date. For example, if `logstash_prefix` is equal to `mydata`, your index becomes `mydata-YYYY.MM.DD`. The last string appended belongs to the date when the data is being generated. | *none* |
| **Logstash Prefix Key** | `logstash_prefix_key` | When included, the value in the record that belongs to the key will be looked up and over-write the `logstash_prefix` for index generation. If the key-value isn't found in the record, the `logstash_prefix` option acts as a fallback. Nested keys are supported through record accessor pattern. | *none* |
| **Logstash Date Format** | `logstash_dateformat` | Time format (based on `strftime`) to generate the second part of the Index name. | `%Y.%m.%d` |
| **Time Key** | `time_key` | When `logstash_format` is enabled, each record will get a new timestamp field. The `time_key` property defines the name of that field. | `@timestamp` |
| **Time Key Format** | `time_key_format` | When `logstash_format` is enabled, this property defines the format of the timestamp. | *none* |
| **Time Key Nanos** | `time_key_nanos` | When `logstash_format` is enabled, enabling this property sends nanosecond precision timestamps. Accepted values: `true`, `false`. | `false` |
| **Include Tag Key** | `include_tag_key` | When enabled, it append the Tag name to the record. Accepted values: `true`, `false`. | `false` |
| **Tag Key** | `tag_key` | When `include_tag_key` is enabled, this property defines the key name of the tag in the message. | `flb-key` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
### AWS Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **Enable AWS Authentication** | `aws_auth` | Enable AWS Sigv4 Authentication. Accepted values: `true`, `false`. | `false` |
| **AWS Region** | `aws_region` | AWS Region of your service. | *none* |
| **AWS STS Endpoint** | `aws_sts_endpoint` | Custom endpoint for the AWS STS API, used with the `aws_role_arn` option. | *none* |
| **AWS IAM Assume Role** | `aws_role_arn` | Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role to assume, for uses like cross-account access. | *none* |
| **AWS External ID** | `aws_external_id` | Specifies an external ID for the STS API, can be used with the `aws_role_arn` parameter if your role requires an external ID. | *none* |
### Elastic Cloud Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **Elastic Cloud ID** | `cloud_id` | Elastic Cloud ID of the cluster to connect to. | *none* |
| **Elastic Cloud Authentication Credentials** | `cloud_auth` | Elastic Cloud authentication credentials. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Debugging
| Name | Key | Description | Default |
| - | - | - | - |
| **Trace Output** | `trace_output` | When enabled, print the Elasticsearch API calls to `stdout`. For diagnostics only. Accepted values: `true`, `false`. | `false` |
| **Trace Error** | `trace_error` | When enabled, print the Elasticsearch exception to `stderr`. For diagnostics only. Accepted values: `true`, `false`. | `false` |
# Exabeam destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/exabeam
Configure the Exabeam destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Exabeam.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Exabeam [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `tcp`, alias: `Exabeam`) lets you configure your telemetry pipeline to output
data to Exabeam.
## Supported telemetry types
The Exabeam destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Exabeam destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target service. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target service. | `80` |
| **Format** | `format` | Required. Specifies the data format to be printed. Accepted values: `json`, `json_lines`, `json_stream`, `msgpack`. | `msgpack` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601`, `java_sql_timestamp`. | *none* |
| **JSON Date Key** | `json_date_key` | Specifies the name of the time key in the output record. To disable the time key set the value to `false`. | *none* |
| **Raw Message Key** | `raw_message_key` | Specifies a key to contains the message to send in raw format. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Forward destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/forward
Configure the Forward destination plugin in Palo Alto Networks Telemetry Pipeline to send logs, metrics, and traces over Forward.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Forward [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `forward`) lets you configure your telemetry pipeline to send processed
telemetry data to your Forward Services. This plugin supports both TCP and UDP
transport protocols and provides options for configuring data buffering and
batching to optimize network usage.
## Supported telemetry types
The Forward destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Forward destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. Target host where Fluent-Bit or Fluentd are listening for Forward messages. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target service. | `24224` |
| **Timestamps as Integers** | `time_as_integer` | Sets timestamps in integer format, and enables compatibility mode for Fluentd v0.12 series. Accepted values: `true`, `false`. | `false` |
| **Upstream Configuration Path** | `upstream` | If Forward will connect to an Upstream instead of a simple host, this property defines the absolute path for the Upstream configuration file. For more details, refer to the Upstream Servers documentation section. | *none* |
| **Unix Socket** | `unix_path` | Specifies the path to the Unix socket to send a Forward message. If set, Upstream is ignored. | *none* |
| **Tag** | `tag` | Overwrites the transmitted tag, which lets the receiving pipeline either start fresh or to attribute the source. | *none* |
| **Send Options** | `send_options` | Always send options, with `size` equaling the count of messages. Accepted values: `true`, `false`. | `false` |
| **Require Ack Response** | `require_ack_response` | Indicates whether to send `chunk`-option and wait for `ack` response from server. Enables at-least-once and receiving server can control rate of traffic. Requires Fluentd v0.14.0 or later server. Accepted values: `true`, `false`. | `false` |
| **Compress** | `compress` | Enables gzip compression. Incompatible with `time_as_integer=true` and tags set dynamically using the Rewrite Tag filter. Requires Fluentd v0.14.7 or later server. Accepted values: `gzip`, *none*. | *none* |
| **Workers** | `workers` | Enables one or more dedicated threads for this output. | `2` (`0` for versions 1.8.12 and earlier) |
# Google Cloud Operations Suite destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/gcp-ops
Send pipeline data to Google Cloud Operations Suite.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Google Cloud Operations Suite [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `stackdriver`) lets you configure your telemetry pipeline to stream your
log data and metrics to Google Cloud Operations Suite.
## Supported telemetry types
The Google Cloud Operations Suite destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Google Cloud Operations Suite destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### GCP Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **Google Service Credentials Path** | `google_service_credentials` | The Service Credentials file lets Palo Alto Networks Telemetry Pipeline communicate directly with Google Cloud Services. For information about how to set up service credentials, see the [Google Cloud Observability documentation](https://cloud.google.com/logging/docs/agent/logging/authorization#create-service-account). | *none* |
| **GCP Service Account Email** | `service_account_email` | Account email associated to the service. Available only if no credentials file is provided. | *none* |
| **GCP Service Account Secret** | `service_account_secret` | Private key content associated with the service account. Available only if no credentials file is provided. | *none* |
| **Metadata Server** | `metadata_server` | Private key content associated with the service account. Available only if no credentials file is provided. | `http://metadata.google.internal` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Region Location** | `location` | The Google Cloud or AWS region in which to store data about the resource. If the resource type is either `generic_node` or `generic_task`, this field is required. | *none* |
| **Namespace Identifier** | `namespace` | A namespace identifier, such as a cluster name or environment. If the resource type is either `generic_node` or `generic_task`, this field is required. | *none* |
| **Node ID Identifier** | `node_id` | A unique identifier for the node within the namespace, such as hostname or IP address. If the resource type is `generic_node`, this field is required. | *none* |
| **Job Identifier** | `job` | An identifier for a grouping of related task, such as the name of a microservice or distributed batch. If the resource type is `generic_task`, this field is required. | *none* |
| **Task ID Identifier** | `task_id` | A unique identifier for the task within the namespace and job, such as a replica index identifying the task within the job. If the resource type is `generic_task`, this field is required. | *none* |
| **GCP Project ID** | `export_to_project_id` | The Google Cloud project to receive these logs. Defaults to the project ID of the `google_service_credentials` file, or the `project_id` from Google's `metadata.google.internal` server. | *none* |
| **Resource Type** | `resource` | Sets the resource type of data. Accepted values: `k8s_container`, `k8s_node`, `k8s_pod`, `global`, `generic_node`, `generic_task`, `gce_instance`. | *none* |
| **Kubernetes Cluster Name** | `k8s_cluster_name` | The name of the cluster that the container (node or pod based on the resource type) is running in. If the resource type is `k8s_container`, `k8s_node`, or `k8s_pod`, this field is required. | *none* |
| **Kubernetes Cluster Location** | `k8s_cluster_location` | The physical location of the cluster that contains (node or pod based on the resource type) the container. If the resource type is `k8s_container`, `k8s_node`, or `k8s_pod`, this field is required. | *none* |
| **Labels Key** | `labels_key` | The value of this field is used by the Stackdriver output plugin to find the related labels from `jsonPayload` and then extract the value of it to set the LogEntry labels. | *none* |
| **Labels** | `labels` | Optional list of comma-separated of strings specifying key-value pairs. The resulting labels are combined with the elements in obtained from `labels_key` to set the LogEntry labels. Elements from labels override duplicate values from `labels_key`. | *none* |
| **Log Name Key** | `log_name_key` | The value of this field is used by the plugin to extract `logName` from `jsonPayload` and set the `logName` field. | *none* |
| **Tag Prefix** | `tag_prefix` | Sets the `tag_prefix` used to validate the tag of logs with k8s resource type. Without this option, the tag of the log must be in format of `k8s_container(pod/node).*` to use the `k8s_container` resource type. Now the tag prefix is configurable by this option, being aware of the ending dot. | *none* |
| **Severity Key** | `severity_key` | Specifies the name of the key from the original record that contains the severity information. | *none* |
| **Enable Cloud Trace Integration** | `autoformat_stackdriver_trace` | Rewrite the trace field to include the projectID and format it for use with Cloud Trace. When enabled, the user can get the correct result by printing only the traceID (usually 32 characters). Accepted values: `true`, `false`. | `false` |
| **Custom K8s Regex** | `custom_k8s_regex` | Sets a custom regular expression to extract field like `pod_name`, `namespace_name`, `container_name`, and `docker_id` from the `local_resource_id` in logs. This is helpful if the value of pod or node name contains dots. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Google Cloud BigQuery destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/google-bigquery
Configure the Google Cloud BigQuery destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Google Cloud BigQuery.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Google Cloud BigQuery [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `bigquery`) lets you configure your telemetry pipeline to send your log
data and metrics to Google Cloud BigQuery.
## Supported telemetry types
The Google Cloud BigQuery destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Google Cloud BigQuery destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Google Service Credentials Path** | `google_service_credentials` | Required. The Service Credentials file lets Palo Alto Networks Telemetry Pipeline communicate directly with Google Cloud Services. For information about how to set up service credentials, see the [Google Cloud Observability documentation](https://cloud.google.com/logging/docs/agent/logging/authorization#create-service-account). | *none* |
| **Google Project Id** | `project_id` | The project ID containing the BigQuery dataset to stream into. If the service file is provided then the project ID is taken from there. | *none* |
| **Existing Data Set ID** | `dataset_id` | The dataset ID of the BigQuery dataset to write into. This dataset must exist in your project. | *none* |
| **Existing Table ID** | `table_id` | The table ID of the BigQuery table to write into. This table must exist in the specified dataset and the schema must match the output. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Skip Invalid Rows** | `skip_invalid_rows` | If `true`, inserts all valid rows of a request, even if invalid rows exist. If `false`, causes the entire request to fail if any invalid rows exist. Accepted values: `true`, `false`. | `false` |
| **Ignore Unknown Values** | `ignore_unknown_values` | Accepts rows that contain values that don't match the schema, and ignores unknown values. When set to `false`, treats unknown values as errors. Accepted values: `true`, `false`. | `false` |
| **Enable Workload Identity Federation** | `enable_workload_identity_federation` | Enables workload identity federation as an alternative authentication method. Can't be used with service account credentials file or environment variable. AWS is the only supported identity provider. Accepted values: `true`, `false`. | `false` |
| **AWS Region for BigQuery** | `aws_region` | Google Cloud region for BigQuery. | *none* |
| **GCP Project Number** | `project_number` | Google Cloud project number where the identity provider was created. Used to construct the full resource name of the identity provider. | *none* |
| **GCP Pool Id** | `pool_id` | Google Cloud workload identity pool where the identity provider was created. Used to construct the full resource name of the identity provider. | *none* |
| **GCP Provider Id** | `provider_id` | Google Cloud workload identity provider. Used to construct the full resource name of the identity provider. Only AWS accounts are supported. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Google Chronicle destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/google-chronicle
Configure the Google Chronicle destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Google Chronicle.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Google Chronicle [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `chronicle`) lets you configure your telemetry pipeline to output data to
Google Chronicle.
## Supported telemetry types
The Google Chronicle destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Google Chronicle destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Chronicle Settings
| Name | Key | Description | Default |
| - | - | - | - |
| **Google Service Credentials Path** | `google_service_credentials` | The Service Credentials file lets Palo Alto Networks Telemetry Pipeline communicate directly with Google Cloud Services using a [service account](https://cloud.google.com/logging/docs/agent/logging/authorization#create-service-account). | *none* |
| **GCP Service Account Email** | `service_account_email` | Account email associated with the service. Available only if no credentials file has been provided. | *none* |
| **GCP Service Account Secret** | `service_account_secret` | Private key content associated with the service account. Available only if no credentials file has been provided. | *none* |
| **GCP Project Id** | `project_id` | The project ID containing the tenant of Google Chronicle to stream into. | *none* |
| **Google Chronicle Customer ID** | `customer_id` | Required. The customer ID to identify the tenant of Google Chronicle to stream into. | *none* |
| **Google Chronicle Log Type** | `log_type` | Required. The log type to handle the request entries. Users must set up the valid, [supported log type](https://cloud.google.com/chronicle/docs/ingestion/parser-list/supported-default-parsers) or the Google Chronicle service denies log ingestion. | *none* |
| **Google Chronicle Log Key** | `log_key` | Required. Specifies the field that contains the log type specified in `log_type`. By default, the whole log record is sent to Google Chronicle. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Region Location** | `region` | The GCP region in which to store Google Chronicle security logs. Accepted values: `ASIA`, `EU`, `UK`, `US`. | `US` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Grafana Loki destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/grafana-loki
Configure the Grafana Loki destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Grafana Loki.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Grafana Loki [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `loki`) lets you configure your telemetry pipeline to send your log data
to Grafana Loki.
## Supported telemetry types
The Grafana Loki destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Grafana Loki destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. Loki hostname or IP address. Don't include the sub path, such as `loki/api/v1/push`. Include only the base hostname or URL. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target Loki service. | `3100` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Tenant ID** | `tenant_id` | Tenant ID used by default to push logs to Loki. If omitted or empty, it's assumed that Loki is running in single-tenant mode and no `X-Scope-OrgID` header is sent. | *none* |
| **Tenant ID Key** | `tenant_id_key` | Required. If set, `X-Scope-OrgID` will be the value of the key from incoming record. It can be useful to set `X-Scode-OrgID` dynamically. | *none* |
| **Labels** | `labels` | Labels for API requests. | `job=fluentbit` |
| **Label Keys** | `label_keys` | Comma-separated list of keys to use as stream labels. | *none* |
| **Enable Auto Kubernetes Labels** | `auto_kubernetes_labels` | If set to true, adds all Kubernetes labels to Loki labels. Accepted values: `true`, `false`. | `false` |
| **Drop Single Key** | `drop_single_key` | If set to true and only a single key remains, the log line sent to Loki is the value of that key. Accepted values: `true`, `false`. | `false` |
| **Remove Keys** | `remove_keys` | Comma-separated list of keys to remove. | *none* |
| **Line Format** | `line_format` | Format to use when flattening the record to a log line. Accepted values: `json` (sent log line is the Palo Alto Networks Telemetry Pipeline record dumped as JSON), `key_value` (log line is each item in the record concatenated together, separated by a single space, in the format `=`). | `json` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Graylog destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/graylog
Configure the Graylog destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Graylog.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Graylog [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `gelf`) lets you send your telemetry pipeline data to Graylog.
## Supported telemetry types
The Graylog destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Graylog destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `Host` | IP address or hostname of the target Graylog server. | `127.0.0.1` |
| **Port** | `Port` | The port that your Graylog GELF input is listening on. | `12201` |
| **Mode** | `Mode` | The protocol to use (`tls`, `tcp` or `udp`). | `udp` |
| **Packet Size** | `Packet_Size` | If `mode` is `udp`, sets the size of packets to be sent. | `1420` |
| **Compress** | `Compress` | If `true`, and `mode` is `udp`, compresses your UDP packets. Accepted values: `true`, `false`. | `true` |
### GELF settings
| Name | Key | Description | Default |
| - | - | - | - |
| **GELF Short Message Key** | `Gelf_Short_Message_Key` | A short descriptive message (must be set in GELF). | `short_message` |
| **GELF Timestamp Key** | `Gelf_Timestamp_Key` | Your log timestamp (should be set in GELF). | `timestamp` |
| **GELF Host Key** | `Gelf_Host_Key` | This key value is used as the name of the host, source, or app that sent this message. (must be set in GELF). | `host` |
| **GELF Full Message Key** | `Gelf_Full_Message_Key` | Key to use as the long message. (Optional in GELF). | *none* |
| **GELF Level Key** | `Gelf_Level_Key` | Key to be used as the log level. Its value must be in standard syslog levels between 0 and 7. (Optional in GELF). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# HTTP destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/http
Configure the HTTP destination plugin in Palo Alto Networks Telemetry Pipeline to send logs over HTTP.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The HTTP [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `HTTP`) lets you configure your telemetry pipeline to send
your data to remote servers or services over the internet to an HTTP endpoint,
such as a web server or an API.
## Supported telemetry types
The HTTP destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the HTTP destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target HTTP Server. | `0.0.0.0` |
| **Port** | `port` | Required. TCP port of the target HTTP Server. | `80` |
| **URI** | `uri` | Required. Specifies an optional HTTP URI for the target web server. | `/` |
| **Format** | `format` | Required. Specifies the data format to be used in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`. | `json_lines` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Headers** | `header` | Adds an HTTP header key-value pair. You can set multiple headers. | *none* |
| **Compress** | `compress` | Sets the payload compression mechanism. Accepted values: `gzip`, *no value* | *none* |
| **HTTP Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. | *none* |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601` (for example, `2018-05-30T09:39:52.000681Z`), `java_sql_timestamp` (for example, `2018-05-30 09:39:52.000681`, which can be used with AWS Athena). | *none* |
| **JSON Date Key** | `json_date_key` | Specifies the name of the date field in output. | *none* |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Header Tag** | `header_tag` | Sets an HTTP header whose value is the tag of the record. | *none* |
| **Header Key** | `headers_key` | Specifies the key that contains the headers. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
### AWS Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **Enable AWS Authentication** | `aws_auth` | Enable AWS Sigv4 Authentication. Accepted values: `true`, `false`. | `false` |
| **AWS Destination Service Code** | `aws_service` | AWS destination service code, used by SigV4 authentication. | *none* |
| **AWS Region** | `aws_region` | AWS Region of your service. | *none* |
| **AWS STS Endpoint** | `aws_sts_endpoint` | Custom endpoint for the AWS STS API, used with the `aws_role_arn` option. | *none* |
| **AWS IAM Assume Role** | `aws_role_arn` | Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role to assume, for uses like cross-account access. | *none* |
| **AWS External ID** | `aws_external_id` | Specifies an external ID for the STS API. Can be used with the `aws_role_arn` parameter if your role requires an external ID. | *none* |
# InfluxDB destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/influxdb
Configure the InfluxDB destination plugin in Palo Alto Networks Telemetry Pipeline to send logs and metrics to InfluxDB.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The InfluxDB [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `influxdb`) lets you configure your telemetry pipeline to route data to
your InfluxDB instances.
## Supported telemetry types
The InfluxDB destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the InfluxDB destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | IP address or hostname of the target HTTP Server. | `127.0.0.1` |
| **Port** | `port` | TCP port of the target HTTP Server. | `80` |
| **Influx v1 - Database** | `database` | InfluxDB Database Name where records are inserted. If you're using a newer version of Influx, use Bucket instead. | `calyptiacore` |
| **Influx v2 - Bucket** | `bucket` | The amount of time between each API call. | *none* |
| **Influx v2 - Org** | `org` | InfluxDB Organization name where the bucket is (v2 only). | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Headers** | `http_header` | Adds an HTTP header key-value pair. Multiple headers can be set. | *none* |
| **Sequence Tag** | `sequence_tag` | The name of the tag whose value is incremented for consecutive simultaneous events. | `_seq` |
| **Custom URI Endpoint** | `uri` | Custom URI endpoint. | *none* |
| **Enable Auto Tags** | `auto_tags` | Custom URI endpoint. Accepted values: `true`, `false`. | `false` |
| **Tag Keys** | `tag_keys` | Space-separated list of keys that need to be tagged. | *none* |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
| **Influx v2 - HTTP Token** | `http_token` | Authentication token used with InfluDB v2. If specified, both `http_user` and `http_passwd` are ignored. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Kafka destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/kafka
Configure the Kafka destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Kafka.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Kafka [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `kafka`) lets you configure your telemetry pipeline to integrate your
data with Apache Kafka for real-time processing and analysis.
## Supported telemetry types
The Kafka destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Kafka destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Brokers** | `brokers` | Required. Single of multiple list of Kafka brokers. For example, `192.168.1.3:9092` or `192.168.1.4:9092`. | *none* |
| **Topics** | `topics` | Required. Single entry or list of comma-separated topics that Palo Alto Networks Telemetry Pipeline uses to send messages to Kafka. If only one topic is set, that topic is used for all records. If multiple topics exists, the one set in the record by `topic_key` is used. | `calyptia-core` |
| **Format** | `format` | Specifies data format. Accepted values: `json`, `msgpack`. | `json` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Message Key** | `message_key` | Optional key to store the message. | *none* |
| **Message Key Field** | `message_key_field` | If set, the value of `message_key_field` in the record will indicate the message key. If not set or found in the record, `message_key` will be used (if set). | *none* |
| **Timestamp Key** | `timestamp_key` | Sets the key to store the record timestamp. | *none* |
| **Timestamp Format** | `timestamp_format` | Sets the format of the timestamp. Accepted values: `double`, `iso8601`. | `double` |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Queue Full Retries** | `queue_full_retries` | Palo Alto Networks Telemetry Pipeline queues data into rdkafka library. If the underlying library can't flush the records, the queue might fill up, blocking new addition of records. This key sets the number of local retries to enqueue the data. The interval between each retry is one second. Setting the key to `0` sets an unlimited number of retries. | `10` |
### Extended librdkafka parameters
This plugin uses the [librdkafka](https://github.com/confluentinc/librdkafka)
library. Certain configuration parameters available through the Palo Alto Networks
Telemetry Pipeline UI are based on librdkafka settings. These parameters generally
use the `rdkafka.` prefix.
In addition to the parameters available through the
Palo Alto Networks Telemetry Pipeline UI, you can
customize any of the
[librdkafka configuration properties](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md)
by adding them to a pipeline configuration file. To do so, append the `rdkafka.`
prefix to the name of that property.
For example, to customize the `socket.keepalive.enable` property, add the
`rdkafka.socket.keepalive.enable` key to your configuration file.
# New Relic Logs destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/new-relic
Configure the New Relic Logs destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to New Relic.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The New Relic Logs [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `nrlogs`) lets you configure your telemetry pipeline to send your log
data to New Relic Logs.
## Supported telemetry types
The New Relic Logs destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the New Relic Logs destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **New Relic API Key** | `api_key` | Required. Your key for data ingestion. The API key is also called the ingestion key. For more details about how to generate the API key, see the [official documentation](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#event-insert-key). From a configuration perspective, either an `api_key` or an `license_key` is required. New Relic suggests using `api_key`. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **New Relic License Key** | `license_key` | Optional authentication parameter for data ingestion. New Relic suggests you instead use the `api_key`. [License Key information](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/license-key). | *none* |
| **Compression** | `compress` | Compression type for the payload. | `gzip` |
| **New Relic Base URI** | `base_uri` | Full address of New Relic API endpoint. For the EU endpoint, set this key to `https://log-api.eu.newrelic.com/log/v1`. | `https://log-api.newrelic.com/log/v1` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Null destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/null
Configure the Null destination plugin in Palo Alto Networks Telemetry Pipeline for logs, metrics, and traces.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Null is a type of data destination that lets you discard your telemetry data without
writing it to any external storage or output destination. The Null
[destination plugin](/ingest/pipeline/plugins/destination-plugins) (name: `"null"`)
is a tool for testing or debugging purposes when you want to simulate a data
flow without actually writing data to disk or sending it to an external system.
With the Null destination plugin, you can configure your pipeline to discard any
telemetry data that passes through it, ensuring that the data isn't saved or
transmitted to any external system. This can be used for verifying the configuration
of your pipeline or for troubleshooting issues in your data processing workflow. The
Null destination plugin can help you avoid unnecessary data storage or network
traffic.
## Supported telemetry types
The Null destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
# Observe destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/observe
Configure the Observe destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Observe.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Observe [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `Observe`) lets you configure your telemetry pipeline to
send your data to Observe through HTTPS.
## Supported telemetry types
The Observe destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Observe destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Observe Customer Id** | `host` | Required. IP address or hostname of Observes data collection endpoint. `$(OBSERVE_CUSTOMER_ID)` is your Customer ID. | `OBSERVE_CUSTOMER_ID.collect.observeinc.com` |
| **Headers** | `header` | Adds an HTTP header key-value pair. Multiple headers can be set. | *See the following table.* |
The following headers are to set your connection:
| Key | Value |
| - | - |
| **Authorization** | `Bearer (REPLACE WITH OBSERVE TOKEN)` |
| **X-Observe-Decoder** | `fluent` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **URI** | `uri` | Required. The default URI used for the Observe service. | `/v1/http/fluentbit` |
| **Port** | `port` | Required. The port used to communicate with the Observe service. | `443` |
| **Compress** | `compress` | Sets the payload compression mechanism. Accepted values: `gzip`, *none*. | `gzip` |
| **HTTP Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. | *none* |
| **Format** | `format` | Required. Specifies the data format to be used in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`, `msgpack`. | `msgpack` |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601` (for example, `2018-05-30T09:39:52.000681Z`), `java_sql_timestamp` (for example, `2018-05-30 09:39:52.000681`, which can be used with AWS Athena). | *none* |
| **JSON Date Key** | `json_date_key` | Specifies the name of the date field in output. | *none* |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Header Tag** | `header_tag` | Sets an HTTP header whose value is the tag of the record. | *none* |
| **Header Key** | `headers_key` | Specifies the key that contains the headers. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
# OpenSearch destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/opensearch
Configure the OpenSearch destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to OpenSearch.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The OpenSearch [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `opensearch`) lets you configure your telemetry pipeline to send your
data to OpenSearch.
## Supported telemetry types
The OpenSearch destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the OpenSearch destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | IP address or hostname of the target OpenSearch instance. | `127.0.0.1` |
| **Port** | `port` | TCP port of the target OpenSearch instance. | `9200` |
| **Index** | `index` | Index name. | `calyptia-core` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Replace Dots** | `replace_dots` | When enabled, replaces field name dots with underscore, required by versions of OpenSearch. Accepted values: `true`, `false`. | `false` |
| **Type** | `type` | Type Name. | `_doc` |
| **Suppress Type Name** | `suppress_type_name` | If true, mapping types are removed. For v7.0.0 or later. Accepted values: `true`, `false`. | `true` |
| **Buffer Size** | `buffer_size` | Specifies the buffer size used to read the response from the OpenSearch HTTP service. This option is useful for debugging purposes where is required to read full responses. Response size grows depending of the number of records inserted. To set an unlimited amount of memory set this value to `false`, otherwise the value must be according to the Unit Size specification | `512k` |
| **Path** | `path` | OpenSearch accepts new data on HTTP query path `/_bulk`. It's also possible to serve Elasticsearch behind a reverse proxy on a sub path. This option defines such path on the Palo Alto Networks Telemetry Pipeline side. It adds only a path prefix in the indexing HTTP POST URI. | *none* |
| **Generate ID** | `generate_id` | When enabled, generates `_id` for outgoing records. This prevents duplicate records when retrying ES. Accepted values: `true`, `false`. | *false* |
| **Write Operation** | `write_operation` | Operation to use to write in bulk requests. | `create` |
| **ID Key** | `id_key` | If set, `_id` will be the value of the key from incoming records. | *none* |
| **Replace Dots** | `current_time_index` | Uses the current time for index generation instead of the message record. Accepted values: `true`, `false`. | `false` |
| **Logstash Prefix** | `logstash_prefix` | When `logstash_format` is enabled, the index name is composed using a prefix and the date. For example, if `logstash_prefix` is `mydata`, your index becomes `mydata-YYYY.MM.DD`. The last string appended belongs to the date when the data is being generated. | *none* |
| **Logstash Prefix Key** | `logstash_prefix_key` | When included, the value in the record that belongs to the key will be looked up and over-write the `logstash_prefix` for index generation. If the key-value isn't found in the record, the `logstash_prefix` option acts as a fallback. Nested keys are supported through record accessor patterns. | *none* |
| **Logstash Date Format** | `logstash_dateformat` | Time format (based on `strftime`) to generate the second part of the index name. | `%Y.%m.%d` |
| **Time Key** | `time_key` | When `logstash_format` is enabled, each record gets a new timestamp field. The `time_key` property defines the name of that field. | `@timestamp` |
| **Time Key** | `time_key_format` | When `logstash_format` is enabled, this property defines the format of the timestamp. | *none* |
| **Time Key Nanos** | `time_key_nanos` | When `logstash_format` is enabled, enabling this property sends nanosecond precision timestamps. Accepted values: `true`, `false`. | `false` |
| **Include Tag Key** | `inclulde_tag_key` | When enabled, it appends the tag name to the record. Accepted values: `true`, `false`. | `false` |
| **Tag Key** | `tag_key` | When `inclulde_tag_key` is enabled, this property defines the key name of the tag in the message. | `flb-key` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
### AWS Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **Enable AWS Authentication** | `aws_auth` | Enable AWS Sigv4 authentication. Accepted values: `true`, `false`. | `false` |
| **AWS Region** | `aws_region` | AWS region of your service. | *none* |
| **AWS STS Endpoint** | `aws_sts_endpoint` | Custom endpoint for the AWS STS API, used with the `aws_role_arn` option. | *none* |
| **AWS IAM Assume Role** | `aws_role_arn` | Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role to assume, for uses like cross-account access. | *none* |
| **AWS External ID** | `aws_external_id` | Specifies an external ID for the STS API. Can be used with the `aws_role_arn` parameter if your role requires an external ID. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Debugging
| Name | Key | Description | Default |
| - | - | - | - |
| **Trace Output** | `trace_output` | When enabled, print the OpenSearch API calls to `stdout`. For diagnostics only. Accepted values: `true`, `false`. | `false` |
| **Trace Error** | `trace_error` | When enabled, print the OpenSearch exceptions to `stderr`. For diagnostics only. Accepted values: `true`, `false`. | `false` |
# OpenTelemetry Output destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/opentelemetry
Configure the OpenTelemetry Output destination plugin in Palo Alto Networks Telemetry Pipeline to send logs, metrics, and traces to OpenTelemetry.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The OpenTelemetry [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `opentelemetry`, alias: `OpenTelemetry`) lets you configure your
telemetry pipeline to send telemetry data to a wide range of data sources, such
as observability platforms, analytics tools, and logging systems.
## Supported telemetry types
The OpenTelemetry destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the OpenTelemetry destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target HTTP Server. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target HTTP Server. | `80` |
| **Metrics URI** | `metrics_uri` | Specifies an optional HTTP URI for the target web server listening for metrics. For example, `/v1/metrics`. | `/` |
| **Logs URI** | `logs_uri` | Specifies an optional HTTP URI for the target web server listening for metrics. For example, `/v1/logs`. | `/` |
| **Traces URI** | `traces_uri` | Specifies an optional HTTP URI for the target web server listening for metrics. For example, `/v1/traces`. | `/` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Headers** | `header` | Adds an HTTP header key-value pair. You can set multiple headers. | *none* |
| **Additional Prometheus Metric Labels** | `add_label` | Adds custom labels to all metrics exposed through the OpenTelemetry exporter. You can set multiple headers. | *none* |
| **HTTP Proxy** | `proxy` | Specifies an HTTP proxy. The expected format of this value is `http://host:port`. | *none* |
| **Log Response Payload** | `log_response_payload` | Logs the response payload within the Core Pipeline log. | `false` |
| **Compress** | `compress` | Sets the payload compression mechanism. Accepted values: `gzip`, *none*. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
# Oracle Log Analytics destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/oracle
Configure the Oracle Log Analytics destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Oracle.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Oracle Log Analytics [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `oracle_log_analytics`) lets you configure your telemetry pipeline to
output log data to Oracle Log Analytics.
## Supported telemetry types
The Oracle Log Analytics destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Oracle Log Analytics destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Configuration File Location** | `config_file_location` | Required. The location of the configuration file containing OCI authentication details. See [SDK and CLI Configuration File](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File) for steps on generating the configuration file. | `~/.oci/config` |
| **Profile Name** | `profile_name` | Required. OCI Config Profile Name to be used from the configuration file. | `DEFAULT` |
| **Namespace** | `namespace` | Required. OCI Tenancy Namespace in which the collected log data is to be uploaded. | *none* |
| **Proxy** | `proxy` | Defines a proxy. Must be in the format `http://host:port`. Supports the HTTP protocol only. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **OCI Config in Record** | `oci_config_in_record` | If set to `true`, the following `oci_la_*` parameters are read from the record itself instead of the output plugin configuration. Accepted values: `true`, `false`. | `false` |
| **OCI Log Group ID** | `oci_la_log_group_id` | Required. The OCID of the Logging Analytics Log Group where the logs must be stored. | *none* |
| **OCI Log Source Name** | `oci_la_log_source_name` | Required. The Logging Analytics Source that must be used to process the log records. | *none* |
| **OCI Entity ID** | `oci_la_entity_id` | The ID of the Logging Analytics Entity. | *none* |
| **OCI Entity Type** | `oci_la_entity_type` | The entity type of the Logging Analytics Entity. | *none* |
| **OCI Log Path** | `oci_la_log_path` | Specifies the original location of the log files. | *none* |
| **OCI Global Metadata** | `oci_la_global_metadata` | Specifies additional global metadata along with original log content to Logging Analytics. The format is `key value`. This option can be set multiple times. | *none* |
| **OCI Metadata** | `oci_la_metadata` | Specifies additional metadata for a log event along with original log content to Logging Analytics. The format is `key value`. This option can be set multiple times. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
## Example
The following YAML configuration defines a Fluent Bit input and an Oracle Log
Analytics output.
```yaml theme={null}
pipeline:
inputs:
- Name: forward
alias: Fluent_Bit
port: "5170"
tls.verify: on
tls.debug: "1"
tag: forward.0dd7a9e7-ed46-4c31-bbd3-40e8b607f501
outputs:
- Name: oracle_log_analytics
config_file_location: ~/.oci/config
profile_name: DEFAULT
namespace: NAMESPACE
proxy: http://host:port
oci_la_log_group_id: log_group_id
oci_la_log_source_name: REST API
oci_la_entity_id: entity
oci_la_entity_type: entity_type
oci_la_log_path: log_path
oci_la_global_metadata:
- key1 value1
oci_la_metadata:
- key2 value2
tls: true
tls.verify: on
tls.debug: "1"
net.keepalive: true
net.keepalive_idle_timeout: 30s
net.connect_timeout: 10s
net.connect_timeout_log_error: true
net.keepalive_max_recycle: "2000"
Match_Regex: .{0,}
```
# Prometheus Exporter destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/prometheus-exporter
Configure the Prometheus Exporter destination plugin in Palo Alto Networks Telemetry Pipeline to expose metrics for scraping.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Prometheus Exporter [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `prometheus_exporter`) lets you export data using the Prometheus
Exporter.
## Supported telemetry types
The Prometheus Exporter destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Prometheus Exporter destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. The address Palo Alto Networks Telemetry Pipeline binds to when hosting Prometheus metrics. | `0.0.0.0` |
| **Port** | `port` | Required. The port Palo Alto Networks Telemetry Pipeline binds to when hosting Prometheus metrics. | `2021` |
| **Add Labels** | `add_label` | Adds custom labels to all metrics exposed through the Prometheus Exporter. You can have multiple fields. | `Value` |
# Prometheus Remote Write destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/prometheus-remote-write
Configure the Prometheus Remote Write destination plugin in Palo Alto Networks Telemetry Pipeline to send metrics over Prometheus Remote Write.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Prometheus Remote Write [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `prometheus_remote_write`, alias: `PrometheusRemoteWrite`)
lets you configure your telemetry pipeline to send metrics data in a standardized
format over HTTP to a configured remote endpoint.
## Supported telemetry types
The Prometheus Remote Write destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Prometheus Remote Write destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target HTTP Server. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target HTTP Server. | `80` |
| **URI** | `uri` | Required. Specifies an optional HTTP URI for the target web server. | `/` |
If you configured [Chronosphere Collector](/ingest/metrics-traces/collector) to
serve as a Prometheus remote write backend, view the Chronosphere Collector configuration
for the configured host, port, and URL.
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Headers** | `header` | Adds an HTTP header key-value pair. You can set multiple headers. | *none* |
| **Additional Prometheus Metric Labels** | `add_label` | Adds custom labels to all metrics exposed through the Prometheus exporter. You can set multiple headers. | *none* |
| **HTTP Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. | *none* |
| **Log Response Payload** | `log_response_payload` | Logs the response payload within the Core Pipeline log. | `false` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
# Redpanda Cloud destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/redpanda
Configure the Redpanda Cloud destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Redpanda Cloud.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Redpanda Cloud [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `kafka`, alias: `RedPandaCloud`) lets you send your telemetry pipeline
data to the Redpanda Cloud service.
## Supported telemetry types
The Redpanda Cloud destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Redpanda Cloud destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Brokers** | `brokers` | Required. List of Kafka Brokers. For example, `192.168.1.3:9092, 192.168.1.4:9092` | *none* |
| **Topics** | `topics` | Required. Single entry or comma-separated list of topics that Palo Alto Networks Telemetry Pipeline uses to send messages to Kafka. If only one topic is set, that one will be used for all records. If multiple topics exist, the topic set in the record by `Topic_Key` is used. | `calyptia-core` |
| **Format** | `format` | Required. Specifies a data format. Accepted values: `json`, `msgpack`. | `json` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Security Protocol** | `rdkafka.security.protocol` | The Security Protocol used to communicate with Redpanda. | `sasl_ssl` |
| **SASL Mechanism** | `rdkafka.sasl.mechanisms` | The SASL authentication mechanism for the API. | `SCRAM-SHA-256` |
| **Redpanda Username** | `rdkafka.sasl.username` | Your Redpanda username. | *none* |
| **Redpanda Password** | `rdkafka.sasl.password` | Required. Password for your Redpanda username. | *none* |
| **Message Key** | `message_key` | Optional key to store the message. | *none* |
| **Message Key Field** | `message_key_field` | If set, the value of `Message_Key_Field` in the record will indicate the message key. If not set nor found in the record, `Message_Key` will be used if set. | *none* |
| **Timestamp Key** | `timestamp_key` | Sets the key to store the record timestamp. | *none* |
| **Timestamp Format** | `timestamp_format` | Sets the format to `iso8601` or `double`. | `double` |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Queue Full Retries** | `queue_full_retries` | Palo Alto Networks Telemetry Pipeline queues data into `rdkafka` library. If the underlying library can't flush the records the queue might fill and block new addition of records. This option sets the number of local retries to enqueue the data. The interval between each retry is 1 second. Setting `queue_full_retries` to `0` to set an unlimited number of retries. | `10` |
### Extended librdkafka parameters
This plugin uses the [librdkafka](https://github.com/confluentinc/librdkafka)
library. Certain configuration parameters available through the Palo Alto Networks
Telemetry Pipeline UI are based on librdkafka settings. These parameters generally
use the `rdkafka.` prefix.
In addition to the parameters available through the
Palo Alto Networks Telemetry Pipeline UI, you can
customize any of the
[librdkafka configuration properties](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md)
by adding them to a pipeline configuration file. To do so, append the `rdkafka.`
prefix to the name of that property.
For example, to customize the `socket.keepalive.enable` property, add the
`rdkafka.socket.keepalive.enable` key to your configuration file.
# Scalyr DataSet destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/scalyr
Configure the Scalyr DataSet destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Scalyr.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Scalyr [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `scalyr_dataset`) lets you send your telemetry pipeline
data to Scalyr as Scalyr datasets.
## Supported telemetry types
The Scalyr destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Scalyr destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target Scalyr server. | *none* |
| **Port** | `port` | Required. TCP host port of the target Scalyr server. | `0` |
| **DataSet Token** | `scalyr_datasets_token` | Specifies the Authentication Bearer Token for the DataSet API. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Compress** | `compress` | Sets the payload compression mechanism. | *none* |
| **HTTP Buffer Size** | `http_buffer_size` | Specifies the buffer size used to read the response from the `scalyr_dataset` HTTP service. | *none* |
| **Enable HTTP Debug Bad Request** | `http_debug_bad_request` | If `true`, and if the HTTP server response status code is `400 Bad Request`, it will print the full HTTP request and response to the `stdout` interface. This feature is available for debugging purposes. Accepted values: `true`, `false`. | `false` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# Slack destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/slack
Configure the Slack destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Slack.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Slack [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `slack`) lets you configure your telemetry pipeline to send specific
types of data or events to your Slack channels, such as error alerts, system
status updates, or performance metrics.
## Supported telemetry types
The Slack destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Slack destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Slack Webhook Address** | `webhook` | Absolute address of the webhook provided by Slack. | `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX` |
# Splunk destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/splunk
Configure the Splunk destination plugin in Palo Alto Networks Telemetry Pipeline to send logs and metrics to Splunk.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Splunk [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `splunk`, alias: `splunk_obs` or `splunk_siem`) lets you configure your
telemetry pipeline to send your telemetry data to Splunk.
## Supported telemetry types
The Splunk destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Splunk destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target Splunk service. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target Splunk service. | `8088` |
| **Compress** | `compress` | Sets the payload compression mechanism. Accepted values: `gzip`, *none*. | *none* |
| **Splunk HTTP Token** | `splunk_token` | Required. Specifies the authentication token for the HTTP Event Collector interface. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Splunk Channel** | `channel` | The `X-Splunk-Request-Channel` header to send to the HTTP Event Collector. | *none* |
| **Enable Splunk Send Raw** | `splunk_send_raw` | When enabled, the recorded keys and values are set in the top level of the map instead of under the event key. For more information, see [Raw events](#raw-events). Accepted values: `true`, `false`. | `false` |
| **Event Key** | `event_key` | Specifies the key name that will be used to send a single value as part of the record. | *none* |
| **Event Host** | `event_host` | Sets the host value to the event data. The value allows a record accessor pattern. | *none* |
| **Event Source** | `event_source` | Sets the source value to assign to the event data. | *none* |
| **Event Source Type** | `event_sourcetype` | Sets the `sourcetype` value to assign to the event data. | *none* |
| **Event Source Type Key** | `event_sourcetype_key` | Sets a record key that will populate `sourcetype`. If the key is found, it will have precedence over the value set in `event_sourcetype`. | *none* |
| **Event Index** | `event_index` | The name of the index by which the event data is to be indexed. | *none* |
| **Event Index Key** | `event_index_key` | Sets a record key that will populate the `index` field. If the key is found, it will have precedence over the value set in `event_index`. | *none* |
| **Event Field(s)** | `event_field` | Sets event fields for the record. This option can be set multiple times and the format is `key_name record_accessor_pattern`. | *none* |
| **Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. HTTPS isn't supported. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
### Debugging
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Buffer Size** | `http_buffer_size` | Specifies the buffer size used to read the response from the Splunk HTTP service. This option is used for debugging purposes when it's required to read full responses. Response size grows depending of the number of records inserted. To set an unlimited amount of memory, set this value to `false`. Otherwise the value must be according to the Unit Size specification. | *none* |
| **Enable HTTP Debug Bad Request** | `http_debug_bad_request` | If the server returns an HTTP `400 Bad Request` status code and this flag is enabled, it will print the full HTTP request and response to the stdout interface. Used for debugging purposes. Accepted values: `true`, `false`. | `false` |
## Raw events
By default, the Splunk destination plugin sends data to the `/services/collector/event`
Splunk endpoint. However, if **Enable Splunk Send Raw** is enabled, this plugin
sends data to the `/services/collector/raw` endpoint instead.
The `/services/collector/raw` endpoint doesn't support nested fields in events, and also ignores
any settings defined in the **Event Field(s)** plugin parameter. Because of these limitations,
Cortex XCOR only recommends sending raw events in specific scenarios, like for machine
data or IoT device data. Additionally, you should only send raw events after you configure
Splunk to receive them accordingly.
For more information about sending raw events, see
the Splunk [Format events for HTTP Event Collector](https://help.splunk.com/en/splunk-enterprise/get-started/get-data-in/10.0/get-data-with-http-event-collector/format-events-for-http-event-collector#Event_metadata)
documentation.
# Standard output destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/standard-output
Configure the Standard output destination plugin in Palo Alto Networks Telemetry Pipeline to send logs, metrics, and traces to standard output.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Standard output [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `stdout`) lets you output your telemetry data to the standard output
stream of a command line interface.
If this plugin is active, you can use the
[**Pipeline Output**](/ingest/pipeline/navigate#pipeline-output-v2-pipelines)
pane in the Palo Alto Networks Telemetry Pipeline web interface to view the data being
routed through your pipeline.
> [!NOTE]
>
> When you use **Pipeline Output** while this plugin is active, your telemetry
> data is temporarily cached in the Palo Alto Networks Telemetry Pipeline backend.
## Supported telemetry types
The Standard output destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Standard output destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Format** | `format` | Required. Specifies the data format to be used in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`. | `json` |
# Sumo Logic destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/sumologic
Configure the Sumo Logic destination plugin in Palo Alto Networks Telemetry Pipeline to send logs to Sumo Logic.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Sumo Logic [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `Sumologic`) lets you configure your telemetry pipeline to
send your data to Sumo Logic through HTTP, allowing you to control the format
and structure of your data.
## Supported telemetry types
The Sumo Logic destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Sumo Logic destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Collector URL** | `host` | Required. Sumo Logic collector URL. | `collectors.au.sumologic.com` |
| **URI** | `uri` | Required. Replace `[PrivateKey]` with the key for your Sumo Logic collector. | `/receiver/v1/http/[PrivateKey]` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Headers** | `header` | Adds an HTTP header key-value pair. You can set multiple headers. | *none* |
| **Compress** | `compress` | Sets the payload compression mechanism. Accepted values: `gzip`, *none*. | *none* |
| **HTTP Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. | *none* |
| **Format** | `format` | Required. Specifies the data format to be used in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`. | `json_lines` |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601` (for example, `2018-05-30T09:39:52.000681Z`), `java_sql_timestamp` (for example, `2018-05-30 09:39:52.000681`, which can be used with AWS Athena). | `iso8601` |
| **JSON Date Key** | `json_date_key` | Specifies the name of the date field in output. | `timestamp` |
| **Body Key** | `body_key` | Specifies the key that contains the body. | *none* |
| **Header Tag** | `header_tag` | Sets an HTTP header whose value is the tag of the record. | *none* |
| **Header Key** | `headers_key` | Specifies the key that contains the headers. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
# Syslog destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/syslog
Configure the Syslog destination plugin in Palo Alto Networks Telemetry Pipeline to send logs over Syslog.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Syslog [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `syslog`) lets you configure your telemetry pipeline to transmit your
data to remote systems or services over the network.
## Supported telemetry types
The Syslog destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Syslog destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. Domain or IP address of the remote Syslog server. | `127.0.0.1` |
| **Port** | `port` | Required. TCP or UDP port of the remote Syslog server. | `514` |
| **Mode** | `mode` | Required. Selected transport type. Accepted values: `tcp`, `tls`, `udp`. | `udp` |
| **Syslog RFC Format** | `syslog_format` | Required. The Syslog protocol format to use. Accepted values: `rfc3164`, `rfc5424`. | `rfc5424` |
| **Syslog Message Key** | `syslog_message_key` | Required. This is the key name from the original record that contains the message to deliver. Required, otherwise the message is empty. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Syslog Severity Key** | `syslog_severity_key` | Optional: The key name from the original record that contains the Syslog severity number. | *none* |
| **Syslog Severity Preset** | `syslog_severity_preset` | Optional: The preset severity number. It will be overwritten if `syslog_severity_key` is set and a key of a record is matched. | *none* |
| **Syslog Facility Key** | `syslog_facility_key` | Optional: The key name from the original record that contains the Syslog facility number. | *none* |
| **Syslog Facility Preset** | `syslog_facility_preset` | Optional: The preset facility number. It will be overwritten if `syslog_facility_key` is set and a key of a record is matched. | *none* |
| **Syslog Hostname Key** | `syslog_hostname_key` | Optional: The key name from the original record that contains the hostname that generated the message. | *none* |
| **Syslog Hostname Preset** | `syslog_hostname_preset` | Optional: The preset hostname. It will be overwritten if `syslog_hostname_key` is set and a key of a record is matched. | *none* |
| **Syslog Appname Key** | `syslog_appname_key` | Optional: The key name from the original record that contains the app name that generated the message. | *none* |
| **Syslog Appname Preset** | `syslog_appname_preset` | Optional: The preset app name. It will be overwritten if `syslog_appnam_key` is set and a key of a record is matched. | *none* |
| **Syslog ProcID Key** | `syslog_procid_key` | Optional: The key name from the original record that contains the Process ID that generated the message. | *none* |
| **Syslog ProcID Preset** | `syslog_procid_preset` | Optional: The preset ProcID. It will be overwritten if `syslog_procid_key` is set and a key of a record is matched. | *none* |
| **Syslog Message ID Key** | `syslog_msgid_key` | Optional: The key name from the original record that contains the Message ID associated to the message. | *none* |
| **Syslog Message ID Preset** | `syslog_msgid_preset` | Optional: The preset message ID. It will be overwritten if `syslog_msgid_key` is set and a key of a record is matched. | *none* |
| **Syslog Structured Data (SD) Key** | `syslog_sd_key` | Optional: The key name from the original record that contains the Structured Data (SD) content. | *none* |
| **Syslog Maxsize** | `syslog_maxsize` | The maximum size allowed per message, as an integer in bytes. | Default size based on the `syslog_format` value: `rfc3164` sets this to `1024`, and `rfc5424` sets this to `2048`. |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# TCP destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/tcp
Configure the TCP destination plugin in Palo Alto Networks Telemetry Pipeline to send logs over TCP.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The TCP [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `tcp`) lets you configure your telemetry pipeline to send your data to
a remote TCP endpoint, letting you integrate your telemetry data with other
systems or services for various purposes.
## Supported telemetry types
The TCP destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the TCP destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target service. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target service. | `80` |
| **Format** | `format` | Required. Sets the format. Accepted values: `json`, `json_lines`, `json_stream`, `mspgack`. | `msgpack` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601` (for example, 2018-05-30T09:39:52.000681Z) `java_sql_timestamp` (for example, 2018-05-30 09:39:52.000681). | *none* |
| **JSON Date Key** | `json_date_key` | Specifies the name of the time key in the output record. To disable the time key, set the value to false. | *none* |
| **Raw Message Key** | `raw_message_key` | Specifies the key that contains the message to send in raw format. For example, log key. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# UDP destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/udp
Configure the UDP destination plugin in Palo Alto Networks Telemetry Pipeline to send logs over UDP.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The UDP [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `udp`) provides a lightweight and efficient mechanism for transmitting
your data, making it ideal for scenarios where low latency and high throughput
are critical. Use this plugin to configure your pipeline to send data to a
remote UDP endpoint, which lets you integrate your telemetry data with other
systems or services.
## Supported telemetry types
The UDP destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the UDP destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target service. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target service. | `80` |
| **Format** | `format` | Required. Sets the format. Accepted values: `json_lines`, `json`, `json_stream`, `msgpack`. | `msgpack` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **JSON Date Format** | `json_date_format` | Specifies the format of the date. Accepted values: `double`, `epoch`, `iso8601` (for example, `2018-05-30T09:39:52.000681Z`), `java_sql_timestamp` (for example, `2018-05-30 09:39:52.000681`). | *none* |
| **JSON Date Key** | `json_date_key` | Specifies the name of the time key in the output record. To disable the time key, set the value to `false`. | *none* |
| **Raw Message Key** | `raw_message_key` | Specifies the key that contains the message to send in raw format. For example, `log key`. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
# VictoriaMetrics destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/victoriametrics
Configure the VictoriaMetrics destination plugin in Palo Alto Networks Telemetry Pipeline to send metrics to VictoriaMetrics.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The VictoriaMetrics [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `prometheus_remote_write`, alias: `VictoriaMetrics`) lets you configure
your telemetry pipeline to send data to VictoriaMetrics.
## Supported telemetry types
The VictoriaMetrics destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the VictoriaMetrics destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. IP address or hostname of the target HTTP Server. | `127.0.0.1` |
| **Port** | `port` | Required. TCP port of the target HTTP Server. | `80` |
| **URI** | `uri` | Required. Specifies an optional HTTP URI for the target web server. | `/` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Headers** | `header` | Adds an HTTP header key-value pair. Multiple headers can be set. | *none* |
| **Additional Prometheus Metric Labels** | `add_label` | Adds custom labels to all metrics exposed through the Prometheus exporter. You can have multiple of these fields. | *none* |
| **HTTP Proxy** | `proxy` | Specifies an HTTP Proxy. The expected format of this value is `http://host:port`. | *none* |
| **Log Response Payload** | `log_response_payload` | Logs the response payload within the Core Pipeline log. | `false` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced Networking
| Name | Key | Description | Default |
| - | - | - | - |
| **DNS Mode** | `net.dns.mode` | Selects the primary DNS connection type, which can be `TCP` or `UDP`. | *none* |
| **DNS Resolver** | `net.dns.resolver` | Selects the primary DNS connection type, which can be `LEGACY` or `ASYNC`. | *none* |
| **Prefer IPv4** | `net.dns.prefer_ipv4` | Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: `true`, `false`. | `false` |
| **Keepalive** | `net.keepalive` | Enables or disables Keepalive support. Accepted values: `true`, `false`. | `true` |
| **Keepalive Idle Timeout** | `net.keepalive_idle_timeout` | Sets the maximum time allowed for an idle Keepalive connection. | `30s` |
| **Max Connect Timeout** | `net.connect_timeout` | Sets the maximum time allowed to establish a connection, which includes the TLS handshake. | `10s` |
| **Max Connect Timeout Log Error** | `net.connect_timeout_log_error` | Specifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: `true`, `false`. | `true` |
| **Source Address** | `net.source_address` | Specifies the network address to bind for data traffic. | *none* |
| **Max Keepalive Recycle** | `net.keepalive_max_recycle` | Sets the maximum number of times a keepalive connection can be used before it's retired. | `2000` |
### Basic Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Basic auth username. | *none* |
| **HTTP Password** | `http_passwd` | Basic auth password. Requires `http_user` to be set. | *none* |
# Vivo destination plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/vivo
Configure the Vivo destination plugin in Palo Alto Networks Telemetry Pipeline to send logs, metrics, and traces to Vivo.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Vivo [destination plugin](/ingest/pipeline/plugins/destination-plugins)
(name: `http`, alias: `vivo`) lets you configure your telemetry pipeline to send
your telemetry data to a remote HTTP endpoint exposed by Vivo Exporter.
## Supported telemetry types
The Vivo destination plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Vivo destination plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Vivo Host** | `host` | Required. IP address or hostname of the target HTTP Server. | `calyptia-vivo` |
| **Port** | `port` | Required. TCP port of the target HTTP Server. | `5489` |
| **URI** | `uri` | Required. Specifies an optional HTTP URI for the target web server. For example, `/something`. | `/sink` |
| **Format** | `format` | Required. Specifies the data format to be used in the HTTP request body. Accepted values: `json`, `json_lines`, `json_stream`. | `json` |
# Ingest telemetry data with source plugins
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins
Configure Palo Alto Networks Telemetry Pipeline to ingest input data from various sources.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
```mermaid actions={false} theme={null}
flowchart LR
accTitle: Pipeline flow
accDescr: A simplified representation of a telemetry pipeline, which includes a source plugin, parser, processing rules, and destination plugin.
subgraph Pipeline flow
direction LR
A(Source plugin)
B(Parser )
C(Processing rules )
D(Destination plugin )
A --> B --> C --> D
style A stroke-width:4px
end
```
Palo Alto Networks Telemetry Pipeline uses *source plugins* to ingest telemetry data
into pipelines, either by receiving it (push) or collecting it (pull).
You can add and configure source plugins to connect your pipelines to a variety
of telemetry sources. Different source plugins support different data types,
including logs, metrics, and traces.
> [card] [Absolute](/ingest/pipeline/plugins/source-plugins/absolute)
> [card] [Amazon Kinesis Firehose](/ingest/pipeline/plugins/source-plugins/aws-firehose)
> [card] [Amazon Kinesis Stream Input](/ingest/pipeline/plugins/source-plugins/aws-streams)
> [card] [Azure Event Grid](/ingest/pipeline/plugins/source-plugins/azure-grid)
> [card] [Azure Event Hubs](/ingest/pipeline/plugins/source-plugins/azure-eventhub)
> [card] [Bash Command](/ingest/pipeline/plugins/source-plugins/bash)
> [card] [Cloudflare LogPush](/ingest/pipeline/plugins/source-plugins/cloudflare)
> [card] [Confluent Cloud](/ingest/pipeline/plugins/source-plugins/confluent-cloud)
> [card] [Datadog Agent](/ingest/pipeline/plugins/source-plugins/datadog-agent)
> [card] [Datagen](/ingest/pipeline/plugins/source-plugins/datagen)
> [card] [Dummy logs, metrics, and traces](/ingest/pipeline/plugins/source-plugins/dummy)
> [card] [Dummy HTTP](/ingest/pipeline/plugins/source-plugins/dummy-http)
> [card] [Elasticsearch HTTP](/ingest/pipeline/plugins/source-plugins/elasticsearch-http)
> [card] [Fluent Bit](/ingest/pipeline/plugins/source-plugins/fluent-bit)
> [card] [Fluentd](/ingest/pipeline/plugins/source-plugins/fluentd)
> [card] [Forward](/ingest/pipeline/plugins/source-plugins/forward)
> [card] [Google Cloud PubSub Input](/ingest/pipeline/plugins/source-plugins/gcp-pubsub)
> [card] [Google Workspace Audit Logs](/ingest/pipeline/plugins/source-plugins/gcp-workspace)
> [card] [HTTP](/ingest/pipeline/plugins/source-plugins/http)
> [card] [HTTP API collector](/ingest/pipeline/plugins/source-plugins/http-collector)
> [card] [Kafka](/ingest/pipeline/plugins/source-plugins/kafka)
> [card] [Kubernetes Events](/ingest/pipeline/plugins/source-plugins/kubernetes)
> [card] [Mandiant ASM](/ingest/pipeline/plugins/source-plugins/mandiant-asm)
> [card] [Microsoft Intune - Audit event](/ingest/pipeline/plugins/source-plugins/intune)
> [card] [Mock Data](/ingest/pipeline/plugins/source-plugins/mock-data)
> [card] [Okta System Logs Collector](/ingest/pipeline/plugins/source-plugins/okta)
> [card] [OpenTelemetry](/ingest/pipeline/plugins/source-plugins/opentelemetry)
> [card] [Prometheus Remote Write](/ingest/pipeline/plugins/source-plugins/prometheus-remote)
> [card] [Prometheus Scrape](/ingest/pipeline/plugins/source-plugins/prometheus-scrape)
> [card] [S3 Input (One Time)](/ingest/pipeline/plugins/source-plugins/amazon-s3)
> [card] [S3 Input (SQS)](/ingest/pipeline/plugins/source-plugins/s3-sqs)
> [card] [Signal Sciences](/ingest/pipeline/plugins/source-plugins/signal-sciences)
> [card] [Slack](/ingest/pipeline/plugins/source-plugins/slack)
> [card] [Splunk HEC](/ingest/pipeline/plugins/source-plugins/splunk-hec)
> [card] [Splunk UF](/ingest/pipeline/plugins/source-plugins/splunk-uf)
> [card] [SQL DB Input](/ingest/pipeline/plugins/source-plugins/sqldb)
> [card] [Syslog](/ingest/pipeline/plugins/source-plugins/syslog)
> [card] [TCP](/ingest/pipeline/plugins/source-plugins/tcp)
> [card] [Telegraf](/ingest/pipeline/plugins/source-plugins/telegraf)
> [card] [Vectra M365 - Incident Detection](/ingest/pipeline/plugins/source-plugins/vectram365)
> [card] [Vercel Logs](/ingest/pipeline/plugins/source-plugins/vercel)
## Push-based and pull-based source plugins
Source plugins are either push-based or pull-based.
* **Push-based** source plugins passively listen for data emitted from a specified source.
* **Pull-based** source plugins actively fetch data from a specified source.
However, source plugins that output test data, like
[Datagen](/ingest/pipeline/plugins/source-plugins/datagen), are classified as pull-based
plugins even though they don't communicate with external sources.
# Absolute source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/absolute
Configure the Absolute source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Absolute [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http_loader`, alias: `absolute`) lets you retrieve data from Absolute
and ingest it into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
> Additionally, this plugin can't be used in combination with these source plugins
> within the same telemetry pipeline:
>
> * [HTTP API collector](/ingest/pipeline/plugins/source-plugins/http-collector)
> * [Mandiant ASM](/ingest/pipeline/plugins/source-plugins/mandiant-asm)
> * [Okta](/ingest/pipeline/plugins/source-plugins/okta)
> * [Signal Sciences](/ingest/pipeline/plugins/source-plugins/signal-sciences)
> * [Slack](/ingest/pipeline/plugins/source-plugins/slack)
> * [Vectra M365](/ingest/pipeline/plugins/source-plugins/vectram365)
## Supported telemetry types
The Absolute source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Absolute source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **API Access URL** | `url` | Required. The URL used to access the Absolute API. | `https://api.absolute.com/jws/validate` |
| **Token Key ID** | *none* | Required. The token access key for accessing Absolute. | *none* |
| **Signing Key** | *none* | Required. The signing key for Absolute access. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# S3 Input (One Time) source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/amazon-s3
Configure the S3 Input (One Time) source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> Requires [pipeline agent](/ingest/pipeline/v2/component-versions) v25.8.1 or later,
> [Core Operator](/ingest/pipeline/v2/component-versions) v3.67.0 or later, and
> [Pipeline CLI](/ingest/pipeline/pipeline-cli) v3.66.0 or later.
The S3 Input (One Time) [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `go-s3-replay-plugin`) lets you ingest data from an Amazon S3 bucket into
a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
## Supported telemetry types
The S3 Input (One Time) source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Requirements
To use the S3 Input (One Time) plugin, you must meet these requirements:
* Your IAM user or IAM role must have the
[`s3:GetObject`](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
permission for your S3 bucket.
## Configuration parameters
Use the parameters in this section to configure the S3 Input (One Time) source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **AWS Bucket Name** | `aws_bucket_name` | Required. The name of the S3 bucket where your data is stored. | *none* |
| **AWS Bucket Region** | `aws_bucket_region` | Required. The name of the AWS region where your S3 bucket exists. For example: `us-east1`. | *none* |
| **File Path** | `logs` | Required. The glob format of the logs stored in your S3 bucket. For example: `/logs/\*.log`. | *none* |
| **Line Buffer Max Size** | `max_line_buffer_size` | The maximum line size the plugin will read from [JSON or plain text files](#supported-data-types). | `10MiB` |
### Advanced
| Name | Key | Description | Default |
| :- | :- | :- | :- |
| **S3 Assume Role ARN** | `assume_role_arn` | The ARN of the role to assume in S3. This can be an ARN within the same account or across accounts. | *none* |
| **S3 Role External ID** | `role_external_id` | The [external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html) of the role to assume in S3. | *none* |
| **S3 Endpoint** | `aws_s3_endpoint` | The URL of your S3 endpoint. | *none* |
| **S3 Read Concurrency** | `s3_read_concurrency` | The maximum number of concurrent S3 [`GetObject`](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) calls that this plugin will make. | The number of logical CPUs allocated to each pipeline [replica](/ingest/pipeline/v2/configure/scaling). |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## Authentication methods
The S3 Input (One Time) plugin supports the following authentication methods:
* [EKS Pod Identities](#eks-pod-identities)
* [IMDS](#imds)
* [IRSA](#irsa)
* [Static credentials](#static-credentials)
### EKS Pod Identities
To use EKS Pod Identities for authentication:
1. In AWS, configure [EKS Pod Identities](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html).
2. In [Pipeline CLI](/ingest/pipeline/pipeline-cli), add the following flag to a `create pipeline`
or `update pipeline` command:
```shell /VALUE/ theme={null}
calyptia {create|update} pipeline --service-account VALUE
```
Replace *`VALUE`* with the name of the Kubernetes service account associated
with your Pods.
### IMDS
To use IMDS for authentication:
* In AWS, configure [IAM roles for your EC2 instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html).
### IRSA
To use IRSA for authentication:
1. In AWS, [set up IRSA for your EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html).
2. [Assign an IAM role to your Kubernetes service account](https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html).
3. In [Pipeline CLI](/ingest/pipeline/pipeline-cli), add the following flag to a `create pipeline`
or `update pipeline` command:
```shell /VALUE/ theme={null}
calyptia {create|update} pipeline --service-account VALUE
```
Replace *`VALUE`* with the name of your Kubernetes service account.
### Static credentials
To use static credentials for authentication:
* In Palo Alto Networks Telemetry Pipeline, [create secrets](/ingest/pipeline/v2/configure/secrets#add-a-secret)
that contain the values of your [IAM access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
These secrets must use the key names `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
> [!NOTE]
>
> You don't need to add an explicit [reference](/ingest/pipeline/v2/configure/secrets#reference-a-secret)
> to these secrets in your pipeline configuration file. If secrets with the correct
> key names are present, the S3 Input (One Time) plugin automatically detects these values
> and uses them for authentication.
## Supported data types
The S3 Input (One Time) plugin can ingest [JSON objects](#json) and [plain text](#plain-text)
from files stored in S3 buckets, including gzip-compressed files. Additionally,
this plugin can extract and ingest compressed and uncompressed files from
[tar archives](#tar-archives).
### JSON
This plugin can ingest data from JSON files with these file extensions:
* `.json`
* `.jsonl`
* `.ndjson`
If a file contains only a single JSON object, this plugin creates
a new log from that object. If a file contains multiple
[newline-delimited JSON (NDJSON)](https://github.com/ndjson/ndjson-spec)
objects, this plugin creates a new log from each JSON object within that file.
Key-value pairs from JSON objects are stored as key-value pairs in the resulting log.
For JSON files that use gzip compression (with file extensions such as `.json.gzip`
or `.json.gz`), this plugin decompresses each file before processing it accordingly.
### Plain text
If a file doesn't use a file extension that identifies it as a JSON file, the
S3 Input (One Time) plugin processes that file as plain text. It creates a new log from
each line of the file and stores the content in a key named `_raw` within the
resulting log.
For non-JSON files that use gzip compression (with file extensions that include
the `.gzip` or `.gz` suffix), this plugin decompresses each file before processing
it accordingly.
### Tar archives
The plugin can extract and consume files from tar archives with these file extensions:
* `.tar`
* `.tar.gz`
* `.tar.gzip`
After the plugin extracts these files, it processes
any [JSON](#json) and [plain text](#plain-text) data accordingly, but skips directories
and symbolic links.
If files inside a tar archive are gzip-compressed, this plugin decompresses those
files accordingly.
## Metadata
The S3 Input (One Time) plugin attaches the following metadata to each log:
* `__chrono_bucket`: The name of the S3 bucket that contains the file from which
the log was created.
* `__chrono_file`: The key of the S3 object from which the log was created.
* `__chrono_tar_file_entry`: For data extracted from [tar archives](#tar-archives)
only. The name of the tar archive that contained the file from which the log
was created.
## Get started
To get started with the S3 Input (One Time) plugin, follow these steps.
1. Either [create a new pipeline](/ingest/pipeline/v2/build/create-modify#create-a-pipeline)
or [modify an existing pipeline](/ingest/pipeline/v2/build/create-modify).
2. For testing purposes, set the pipeline's destination to
[standard output](/ingest/pipeline/plugins/destination-plugins/standard-output).
3. Set the pipeline's source to S3 Input (One Time), and then add values for all required
parameters, along with any optional parameters of your choosing.
4. Set up one of the supported [authentication methods](#authentication-methods)
for the S3 Input (One Time) source plugin.
5. In the Palo Alto Networks Telemetry Pipeline web interface, go to the
summary page for that pipeline.
6. In the [**Pipeline Output**](/ingest/pipeline/navigate#pipeline-output-v2-pipelines) section,
click **Get latest logs**.
7. Review this log output to ensure that you're receiving data from S3. If you don't
receive any data, or if you encounter connection errors, review your plugin
configuration settings.
8. After you've confirmed that the S3 Input (One Time) plugin is functioning correctly,
you can overwrite the standard output destination with the destination where
you want to send your telemetry data.
# Amazon Kinesis Firehose source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/aws-firehose
Receive pipeline data from Amazon Kinesis Firehose.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Amazon Kinesis Firehose [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http`, alias: `AWS_Kinesis_Firehose`) lets you retrieve data from your
Amazon Kinesis Firehose instances and ingest it into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Amazon Kinesis Firehose source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Amazon Kinesis Firehose source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The port to listen to for incoming Kinesis Firehose messages. | `9880` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Tag Key** | `tag_key` | Specifies the key name to overwrite a tag. If set, the value of that key overwrites the tag. | *none* |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | `4M` |
| **Buffer Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | `512k` |
| **Successful Response Code** | `successful_response_code` | Sets a successful response code. Accepted values: `200`, `201`, `204`. | `200` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# Amazon Kinesis Stream Input source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/aws-streams
Receive pipeline data from Amazon Kinesis Stream Input.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Amazon Kinesis Stream Input [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `aws_kinesis_stream`)
lets you retrieve data from Amazon Kinesis Stream and ingest it into a telemetry
pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
## Supported telemetry types
The Amazon Kinesis Stream Input source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Amazon Kinesis Stream Input source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **AWS Access Key** | `aws_access_key_id` | Required. Your AWS access key path. | *none* |
| **AWS Secret Key** | `aws_secret_access_key` | Required. Your AWS secret key path. | *none* |
| **AWS Kinesis Stream Name** | `stream_name` | Required. The AWS Kinesis stream name. | *none* |
| **AWS Region** | `aws_region` | Required. The name of the AWS region. For example, `us-east-1`. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Number of fetched records** | `limit` | The maximum number of records to fetch from the stream on each iteration. | `1000` |
| **Pull Interval** | `empty_interval` | How long to wait before fetching more records. If the stream returns empty, Palo Alto Networks Telemetry Pipeline will continue to pull. | `1s` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Azure Event Hubs source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/azure-eventhub
Configure the Azure Event Hubs source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Azure Event Hubs [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `kafka`, alias: `Azure_Event_Hub`) lets you ingest data from your Azure
Event Hubs instances into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Azure Event Hubs source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Azure Event Hubs source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Event Hub Namespace** | `brokers` | Required. Your Event Hub namespace. | `[REPLACE WITH YOUR NAMESPACE].servicebus.windows.net:9093` |
| **Event Hub Name** | `topics` | Required. The name of the event hub (equivalent to a Kafka topic) to read information from. | *none* |
| **Connection String Key** | `rdkafka.sasl.password` | Required. The Event Hub connection string from within the connection access policy set for the source. | `Endpoint=[REPLACE WITH YOUR CONNECTION STRING VALUE]` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Minimum Queued Messages** | `rdkafka.queued.min.messages` | Minimum number of messages per event hub and partition that Palo Alto Networks Telemetry Pipeline tries to maintain in the local consumer queue. | `10` |
| **Request Timeout (ms)** | `rdkafka.request.timeout.ms` | How long Palo Alto Networks Telemetry Pipeline waits before terminating a request connection. Recommended value: `60000`. | `60000` |
| **Session Timeout (ms)** | `rdkafka.session.timeout.ms` | How long Palo Alto Networks Telemetry Pipeline waits before prior to terminating a session connection. Recommended value: `30000`. | `30000` |
| **SASL Username** | `rdkafka.sasl.username` | SASL username. | `$ConnectionString` |
| **Security Protocol** | `rdkafka.security.protocol` | The security protocol for Azure Event Hub. If you require OAuth 2.0 or OpenID authentication, contact Cortex XCOR Support. | `SASL_SSL` |
| **SASL Mechanism** | `rdkafka.sasl.mechanism` | The transport mechanism for the SASL connection. | `PLAIN` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Other
This parameter doesn't have an equivalent setting in the Palo Alto Networks Telemetry Pipeline web
interface, but you can use it in pipeline configuration files.
| Name | Key | Description | Default |
| - | - | - | - |
| *none* | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single log exceeds this size, the plugin drops that log. | `4M` |
### Extended librdkafka parameters
This plugin uses the [librdkafka](https://github.com/confluentinc/librdkafka)
library. Certain configuration parameters available through the Palo Alto Networks
Telemetry Pipeline UI are based on librdkafka settings. These parameters generally
use the `rdkafka.` prefix.
In addition to the parameters available through the
Palo Alto Networks Telemetry Pipeline UI, you can
customize any of the
[librdkafka configuration properties](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md)
by adding them to a pipeline configuration file. To do so, append the `rdkafka.`
prefix to the name of that property.
For example, to customize the `socket.keepalive.enable` property, add the
`rdkafka.socket.keepalive.enable` key to your configuration file.
> [!NOTE]
>
> Don't use librdkafka properties to configure a pipeline's memory buffer. Instead,
> use the [`buffer_max_size`](#other) parameter.
# Azure Event Grid source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/azure-grid
Configure the Azure Event Grid source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Azure Event Grid [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `azeventgrid`) lets you receive data from Azure and ingest it into a
telemetry pipeline using the [pull delivery](https://learn.microsoft.com/azure/event-grid/pull-delivery-overview)
API.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
## Supported telemetry types
The Azure Event Grid source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Azure Event Grid source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Endpoint** | `endpoint` | Required. The endpoint URL of your Event Grid instance's namespace. | *none* |
| **Shared Key** | `key` | Required. The shared key used for authentication. | *none* |
| **Topic Name** | `topicName` | Required. The topic name from which to receive events. | *none* |
| **Event Subscription Name** | `eventSubscriptionName` | Required. The event subscription name. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## Example configuration
```yaml theme={null}
service:
log_level: error
pipeline:
inputs:
- name: azeventgrid
endpoint: https://myNamespaceName.westus-1.eventgrid.azure.net
key: ${SECRET_AZEVENTGRID_KEY}
topicName: myTopic
eventSubscriptionName: myEventSubscription
outputs:
- name: stdout
match: "*"
```
# Bash Command source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/bash
Run a bash command in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Bash Command [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `exec`) lets you run bash commands once at pipeline startup, or at
repeated intervals.
Although this is a self-contained plugin that doesn't communicate with external
sources, it's still classified as a [pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Bash Command source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Bash Command source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Command** | `command` | Required. The bash command to run. | *none* |
| **Polling Interval (Seconds)** | `interval_sec` | Required. The number of seconds between polls. | *none* |
| **Only Run Once** | `Oneshot` | Allows collection of data preceding pipelines startup. If `true`, this plugin runs only a single time at startup. Accepted values: `true`, `false`. | `false` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Buffer Size** | `Buf_Size` | The buffer sizes for your bash command. In cases of large output, set this value to a larger size. | `8mb` |
| **Polling Interval (nanoseconds)** | `Interval_Nsec` | The number of nanoseconds to add to the polling interval set in the [**Required**](#required) settings. | `0` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Cloudflare LogPush source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/cloudflare
Configure the Cloudflare LogPush source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> Requires [pipeline agent](/ingest/pipeline/v2/component-versions) v25.3.8 or later.
The Cloudflare LogPush [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `cloudflare`) lets you ingest data from Cloudflare LogPush jobs into a
telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
## Supported telemetry types
The Cloudflare LogPush source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Cloudflare LogPush source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `addr` | The port where Palo Alto Networks Telemetry Pipeline will listen for incoming data. In the Palo Alto Networks Telemetry Pipeline web interface, you only need to specify the actual port number. In pipeline configuration files, this value combines the network interface and port number. The network interface for this plugin is always `0.0.0.0`. | `9880` in the web interface, `0.0.0.0:9880` in pipeline configuration files |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **HTTP Username** | `http_user` | Your username for HTTP basic authentication, if applicable. | *none* |
| **HTTP Password** | `http_passwd` | Your password for HTTP basic authentication, if applicable. | *none* |
| **TLS Certificate** | `cert_file` | The path to your TLS certificate file, if applicable. | *none* |
| **TLS Key** | `key_file` | The path to your TLS key file, if applicable. | *none* |
### Ownership Challenge
| Name | Key | Description | Default |
| - | - | - | - |
| **Skip Ownership Challenge** | `skipownershipchallenge` | If `false`, this plugin will trigger a [Cloudflare ownership challenge](#ownership-challenge). If `true`, this plugin won't trigger an ownership challenge. | `true` |
| **Cloudflare API Key or API Token** | `cloudflareapikey` | Required if **Skip Ownership Challenge** is `false`. The Cloudflare API key or API token to use in the ownership challenge. This parameter supports plain text values and the environment variables `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_API_KEY`. | *none* |
| **Cloudflare Email** | `cloudflareemail` | Required if **Skip Ownership Challenge** is `false` and if using key-based authentication, but not token-based authentication. The email address associated with your Cloudflare account. In addition to plain text values, this parameter supports the environment variable `CLOUDFLARE_EMAIL`. | *none* |
| **Destination** | `destination` | Required if **Skip Ownership Challenge** is `false`. The HTTP destination that you configured for your LogPush job. This parameter supports plain text values and the environment variable `CLOUDFLARE_DESTINATION`. | *none* |
| **Cloudflare Account ID** | `cloudflareaccountid` | Required if **Skip Ownership Challenge** is `false` and if **Cloudflare Zone ID** is unset. The Cloudflare account ID associated with your LogPush job. This parameter supports plain text values and the environment variable `CLOUDFLARE_ACCOUNT_ID`. | *none* |
| **Cloudflare Zone ID** | `cloudflarezoneid` | Required if **Skip Ownership Challenge** is `false` and if **Cloudflare Account ID** is unset. The Cloudflare zone ID associated with your LogPush job. This parameter supports plain text values and the environment variable `CLOUDFLARE_ZONE_ID`. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Response Headers** | `resp_headers` | The header for Palo Alto Networks Telemetry Pipeline to include in responses to Cloudflare. To include multiple headers, include each header as a new line. Supports templating. | `Content-Type:application/json` |
| **Response Status Code** | `resp_status_code` | The HTTP status code for Palo Alto Networks Telemetry Pipeline to include in responses to Cloudflare. | `200` |
| **Response Body** | `resp_body` | The response body for Palo Alto Networks Telemetry Pipeline to send to Cloudflare. Supports templating. | `{"status": "ok"}` |
| **Time Extraction Template** | `time_from` | The template to extract time data from logs. For example, if your logs use the RFC3339 time format, set the value `{{.Format time.RFC3339Nano}}`. If no value is set, Palo Alto Networks Telemetry Pipeline assigns a timestamp to each log based on when Palo Alto Networks Telemetry Pipeline *receives* that log. | *none* |
| **Cloudflare Base URL** | `baseurl` | Required if **Skip Ownership Challenge** is `false`. The Cloudflare API base URL to use in the ownership challenge. This parameter supports plain text values and the environment variable `CLOUDFLARE_BASE_URL`. | `https://api.cloudflare.com/client/v4/` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## LogPush jobs
For information about setting up Cloudflare LogPush jobs, consult the Cloudflare
LogPush [Enable HTTP destination](https://developers.cloudflare.com/logs/get-started/enable-destinations/http/)
guide.
When you create a new LogPush job in Cloudflare, there might be a delay before
data from that job starts flowing to Palo Alto Networks Telemetry Pipeline.
Similarly, when you delete
a LogPush job in Cloudflare, there might be a delay before data stops flowing.
These delays can range anywhere from a few minutes to 15 minutes.
## Ownership challenge
You can set **Skip Ownership Challenge** to `false` to trigger a one-time
[Cloudflare ownership challenge](https://developers.cloudflare.com/api/resources/logpush/subresources/ownership/methods/create/)
for enhanced security and safety. However, this ownership challenge is optional,
and it's possible to send LogPush data to Palo Alto Networks Telemetry Pipeline without it.
> [!NOTE]
>
> If you trigger an ownership challenge outside of Palo Alto Networks Telemetry Pipeline, the ensuing
> challenge response will appear in your pipeline logs, including tokens, and will
> be sent to any of your pipeline's active destinations. This behavior occurs even
> when the **Skip Ownership Challenge** setting in Palo Alto Networks Telemetry Pipeline is set to
> `true`.
# Confluent Cloud source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/confluent-cloud
Configure the Confluent Cloud source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Confluent Cloud [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `kafka`, alias: `confluent_cloud`) lets you retrieve data from Confluent
Cloud and ingest it into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Confluent Cloud source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Confluent Cloud source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Confluent Cloud Bootstrap Servers** | `brokers` | Required. The Confluent Cloud bootstrap found within the configuration settings. | `BOOTSTRAP_SERVER.confluent.cloud:9092` |
| **Confluent Cloud Topic** | `topics` | Required. The Confluent Cloud topic to read information from. | *none* |
| **Confluent Cloud API Key** | `rdkafka.sasl.username` | Your Confluent Cloud API key. | *none* |
| **Confluent Cloud API Secret** | `rdkafka.sasl.password` | Required. Your Confluent Cloud API secret. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Minimum Queued Messages** | `rdkafka.queued.min.messages` | The minimum number of messages per topic and partition that Palo Alto Networks Telemetry Pipeline tries to maintain in the local consumer queue. | `10` |
| **Session Timeout (ms)** | `rdkafka.session.timeout.ms` | How long Palo Alto Networks Telemetry Pipeline waits before terminating a session connection. | `45000` |
| **Security Protocol** | `rdkafka.security.protocol` | The security protocol for Azure Event Hub. If you require OAuth 2.0 or OpenID authentication, contact Cortex XCOR Support. | `SASL_SSL` |
| **SASL Mechanism** | `rdkafka.sasl.mechanism` | The transport mechanism for the SASL connection. | `PLAIN` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Other
This parameter doesn't have an equivalent setting in the Palo Alto Networks Telemetry Pipeline web
interface, but you can use it in pipeline configuration files.
| Name | Key | Description | Default |
| - | - | - | - |
| *none* | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single log exceeds this size, the plugin drops that log. | `4M` |
### Extended librdkafka parameters
This plugin uses the [librdkafka](https://github.com/confluentinc/librdkafka)
library. Certain configuration parameters available through the Palo Alto Networks
Telemetry Pipeline UI are based on librdkafka settings. These parameters generally
use the `rdkafka.` prefix.
In addition to the parameters available through the
Palo Alto Networks Telemetry Pipeline UI, you can
customize any of the
[librdkafka configuration properties](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md)
by adding them to a pipeline configuration file. To do so, append the `rdkafka.`
prefix to the name of that property.
For example, to customize the `socket.keepalive.enable` property, add the
`rdkafka.socket.keepalive.enable` key to your configuration file.
> [!NOTE]
>
> Don't use librdkafka properties to configure a pipeline's memory buffer. Instead,
> use the [`buffer_max_size`](#other) parameter.
# Datadog Agent source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/datadog-agent
Use the Datadog Agent source plugin to ingest log data.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Datadog Agent [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http`, alias: `datadog_agent`) ingests data from Datadog into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Datadog Agent source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Datadog Agent source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The port for Palo Alto Networks Telemetry Pipeline to listen on. | `9880` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | `4M` |
| **Buffer Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | `512K` |
| **Successful Response Code** | `successful_response_code` | Sets the code returned by successful responses. Accepted values: `200`, `201`, `204`. | `200` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# Datagen source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/datagen
Use the Datagen source plugin to generate simulated log data to test your pipeline configuration.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Datagen [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `datagen`, alias: `apache_common`) generates simulated log data through
[Gofakeit](https://github.com/brianvoe/gofakeit). You can use this simulated
data to test your pipeline configurations.
Although this is a self-contained plugin that doesn't communicate with external
sources, it's still classified as a [pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
## Supported telemetry types
The Datagen source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Datagen source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Template** | `template` | Required. A JSON object that specifies how to generate log data. Accepted types: Apache common, Syslog rfc3164, or Syslog rfc5424. See [Templates](#templates). | *none* |
| *none* | `rate` | How often to generate logs, in seconds. | `1` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## Templates
Templates define the structure and content of your simulated log data. When you
configure the Datagen source plugin in a pipeline's YAML configuration file, use
the `template` key to create a JSON object. For example:
```yaml theme={null}
pipeline:
inputs:
- name: datagen
template: |-
{
"host": "{{ IPv4Address }}",
"user": {
"user-identifier": "{{ Username }}",
"auth-user-id": "{{ UUID }}",
}
"method": "{{ HTTPMethod }}",
"request": "{{ URLPath }}",
"protocol": "{{ HTTPVersion }}",
"response-code": "{{ HTTPStatusCode }}",
"bytes": "{{ Number 0 30_000 }}"
}
```
When the Datagen plugin generates logs, each log matches the format of your template,
but any included [functions](#functions) are replaced by simulated data. For best
results, Palo Alto Networks Telemetry Pipeline recommends creating a JSON
object that uses custom strings
for its keys and functions for its values.
## Functions
The Datagen plugin uses functions to generate randomized values that follow a
consistent pattern. For example, `{{ HTTPMethod }}` can output a string like
`GET`, `POST`, or `PUT`, but not a string like `GREEN` or `SUNDAY`.
To invoke a function in a [template](#templates), surround the name of that
function with double curly braces.
### Suggested functions
You can use any of the available
[Gofakeit functions](https://github.com/brianvoe/gofakeit#functions)
in a template. The following functions are best suited for generating realistic
log data:
* `{{ HTTPMethod }}`: Returns an HTTP method, like `GET`.
* `{{ HTTPStatusCode }}`: Returns an HTTP status code, like `403`.
* `{{ HTTPVersion }}`: Returns an HTTP protocol version, like `HTTP/1.1`.
* `{{ IPv4Address }}`: Returns a random IPv4 address.
* `{{ IPv6Address }}`: Returns a random IPv6 address.
* `{{ Username }}`: Returns a random username, like `Bailey1270`.
* `{{ UUID }}`: Returns a string of numbers in UUID format.
* `{{ Date }}`: Returns a random time in UTC format.
* `{{ LogLevel syslog }}`: Returns a log type, like `alert`.
* `{{ Number 0 30_000 }}`: Returns a number between 0 and 30,000.
* `{{ URLPath }}`: Returns a string that resembles a URL path, like `/foo/bar`.
This function is unique to Datagen and isn't included in Gofakeit.
* `{{ URLScheme }}`: Returns either `http` or `https`. This function is unique
to Datagen and isn't included in Gofakeit.
## Example output
For a pipeline with the following template:
```yaml theme={null}
pipeline:
inputs:
- name: datagen
template: |-
{
"response-code": "{{ HTTPStatusCode }}",
"bytes": "{{ Number 0 30_000 }}"
"host": "{{ IPv4Address }}",
}
```
The Datagen source plugin generates simulated log data in the following format:
```shell theme={null}
{"response-code"=>201.000000, "bytes"=>29600.000000, "host"=>"64.15.54.123"}
{"response-code"=>302.000000, "bytes"=>429.000000, "host"=>"214.221.240.201"}
{"response-code"=>205.000000, "bytes"=>3507.000000, "host"=>"27.79.197.250"}
{"response-code"=>504.000000, "bytes"=>758.000000, "host"=>"211.135.114.51"}
{"response-code"=>404.000000, "bytes"=>12190.000000, "host"=>"84.74.177.0"}
```
# Dummy logs, metrics, and traces source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/dummy
Generate sample telemetry data for Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Dummy logs, metrics, and traces [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `event_type`) lets you create placeholder telemetry data for Palo Alto Networks
Telemetry Pipeline.
Although this is a self-contained plugin that doesn't communicate with external
sources, it's still classified as a [pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Dummy logs, metrics, and traces source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Dummy logs, metrics, and traces source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Telemetry Type** | `type` | Required. The type of telemetry data to generate. Accepted values: `logs`, `metrics`, `traces`. | `logs` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Dummy HTTP source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/dummy-http
Generate sample telemetry data for Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Dummy HTTP [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `datagen`, alias: `dummy_http`) generates simulated log data that you can
use to test your pipeline configuration. This plugin is based on the
[Datagen source plugin](/ingest/pipeline/plugins/source-plugins/datagen)
and uses a [predefined template](#template-format) to generate its logs.
Although this is a self-contained plugin that doesn't communicate with external
sources, it's still classified as a [pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
## Supported telemetry types
The Dummy HTTP source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Dummy HTTP source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## Template format
Logs generated by the Dummy HTTP source plugin use the following template format:
```yaml theme={null}
template: >-
{
"log": "{{ IPv4Address }} - {{ FirstName }} [{{ Day }}/{{ MonthString }}/{{ Number 2011 2024 }}:{{ Hour }}:{{ Minute }}:{{ Second }} -0700] \"{{ HTTPMethod }} {{ URLPath }} HTTP/{{ HTTPVersion }}\" {{ HTTPStatusCode }} {{ Number 100 10000 }} \"{{ URL }}\" \"{{ UserAgent }}\""
}
```
This template produces logs that resemble the following examples:
```json theme={null}
[{"date":1733159068.797057,"log":"142.201.230.54 - Kitty [31/February/1938:14:22:50 -0700] \"HEAD /user-centric/open-source HTTP/HTTP/1.1\" 301 7907 \"https://www.principalunleash.name/magnetic/end-to-end/eyeballs\" \"Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_8_5 rv:4.0; en-US) AppleWebKit/535.49.6 (KHTML, like Gecko) Version/6.2 Safari/535.49.6\""}]
[{"date":1733159069.797646,"log":"165.214.42.13 - Riley [8/July/1998:16:52:34 -0700] \"GET /enterprise/intuitive HTTP/HTTP/1.1\" 406 6981 \"https://www.productdot-com.com/enable/efficient/content/brand\" \"Mozilla/5.0 (iPad; CPU OS 8_0_3 like Mac OS X; en-US) AppleWebKit/534.13.6 (KHTML, like Gecko) Version/4.0.5 Mobile/8B113 Safari/6534.13.6\""}]
[{"date":1733159070.796631,"log":"13.114.140.228 - Bailey [1/February/1989:18:11:27 -0700] \"HEAD /distributed HTTP/HTTP/1.0\" 401 9871 \"https://www.internationalmorph.biz/24-365/global/action-items\" \"Mozilla/5.0 (iPad; CPU OS 7_3_3 like Mac OS X; en-US) AppleWebKit/532.14.2 (KHTML, like Gecko) Version/4.0.5 Mobile/8B119 Safari/6532.14.2\""}]
[{"date":1733159071.799888,"log":"72.109.188.94 - Fabiola [14/May/1987:0:43:25 -0700] \"DELETE /e-enable/virtual HTTP/HTTP/2.0\" 100 3605 \"https://www.internationalinnovative.com/bandwidth\" \"Opera/8.34 (Macintosh; U; PPC Mac OS X 10_6_7; en-US) Presto/2.12.268 Version/11.00\""}]
[{"date":1733159072.797658,"log":"19.32.161.243 - Marlene [23/March/1917:3:0:19 -0700] \"PATCH /global/deliverables HTTP/HTTP/1.1\" 205 6830 \"https://www.centralenable.info/e-business/vertical/models\" \"Mozilla/5.0 (Windows NT 5.0) AppleWebKit/5320 (KHTML, like Gecko) Chrome/38.0.815.0 Mobile Safari/5320\""}]
[{"date":1733159073.797684,"log":"40.66.86.63 - Leif [12/March/1904:6:28:31 -0700] \"POST /dot-com HTTP/HTTP/1.0\" 304 3638 \"http://www.humansexy.org/transparent\" \"Mozilla/5.0 (Windows NT 5.01; en-US; rv:1.9.2.20) Gecko/1915-02-18 Firefox/35.0\""}]
[{"date":1733159074.79653,"log":"196.27.18.191 - Shanny [10/January/1992:14:28:43 -0700] \"GET /systems/best-of-breed/incubate/enable HTTP/HTTP/2.0\" 403 1572 \"https://www.districtinitiatives.info/holistic/best-of-breed/integrated/24-7\" \"Mozilla/5.0 (Windows NT 6.0) AppleWebKit/5352 (KHTML, like Gecko) Chrome/37.0.888.0 Mobile Safari/5352\""}]
[{"date":1733159075.797568,"log":"154.13.34.48 - Neal [3/October/1931:22:16:42 -0700] \"GET /out-of-the-box/eyeballs/evolve/solutions HTTP/HTTP/1.1\" 200 7010 \"http://www.dynamicintegrate.io/incentivize/niches\" \"Mozilla/5.0 (Windows NT 6.0; en-US; rv:1.9.0.20) Gecko/1955-08-17 Firefox/36.0\""}]
[{"date":1733159076.796681,"log":"220.237.28.126 - Matteo [2/October/1903:10:42:10 -0700] \"HEAD /integrate/efficient HTTP/HTTP/2.0\" 406 2280 \"http://www.productdisintermediate.name/mission-critical/visionary\" \"Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_2 like Mac OS X; en-US) AppleWebKit/536.51.1 (KHTML, like Gecko) Version/3.0.5 Mobile/8B111 Safari/6536.51.1\""}]
[{"date":1733159077.800555,"log":"113.30.237.225 - Abigayle [16/October/1925:10:32:6 -0700] \"DELETE /world-class/expedite/architectures HTTP/HTTP/1.0\" 504 1560 \"https://www.principale-services.io/strategize/deliverables\" \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/5361 (KHTML, like Gecko) Chrome/40.0.884.0 Mobile Safari/5361\""}]
```
# Elasticsearch HTTP source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/elasticsearch-http
Configure the Elasticsearch HTTP source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Elasticsearch HTTP [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `elasticsearch`) lets you ingest data from your Elasticsearch HTTP instances
into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Elasticsearch HTTP source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Elasticsearch HTTP source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `9200` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Buffer Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | `5M` |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | `20M` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# Fluent Bit source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/fluent-bit
Gather telemetry from Fluent Bit sources to send to Palo Alto Networks Telemetry Pipeline for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Fluent Bit [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `forward`, alias: `Fluent_Bit`) lets you ingest data from your Fluent Bit
instances into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Fluent Bit source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Fluent Bit source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port listening for incoming messages. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## Configuring Fluent Bit to route data to Palo Alto Networks Telemetry Pipeline
You can use the `out_forward` Fluent Bit plugin to route data to the Fluent Bit
data source in Palo Alto Networks Telemetry Pipeline. In your Fluent Bit
configuration, use the following configuration:
```yaml theme={null}
[OUTPUT]
Name forward
Match *
Host 127.0.0.1
Port 24244
```
# Fluentd source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/fluentd
Configure the Fluentd source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Fluentd [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `forward`, alias: `Fluentd`) lets you ingest data from your Fluentd
instances into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Fluentd source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Fluentd source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `5170` |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## Configuring Fluentd to send data to Palo Alto Networks Telemetry Pipeline
You can configure Fluentd to send data to Palo Alto Networks Telemetry Pipeline by using the `out_forward`
Fluentd plugin.
For more information, visit the [Fluentd documentation](https://docs.fluentd.org/output/forward).
# Forward source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/forward
Configure the Forward source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs, metrics, and traces for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Forward [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `forward`, alias: `forward`) lets you ingest data from your Forward
services into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Forward source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Forward source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `listen` | Required. The listener network interface. | `0.0.0.0` |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `24224` |
| **Unix Socket Path** | `unix_path` | Specifies the path to Unix socket to receive a Forward message. If set, `listen` and `port` are ignored. | *none* |
| **Unix Socket** | `unix_perm` | Sets the permission of the Unix socket file. If `unix_path` isn't set, this parameter is ignored. | *none* |
| **Buffer Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). | `1024000` |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). | `6144000` |
| **Tag Prefix** | `tag_prefix` | The prefix incoming tag with the defined value. | *none* |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# GCP PubSub Input source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/gcp-pubsub
Configure the GCP PubSub Input source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> Requires Palo Alto Networks Telemetry Pipeline v2.72.0 or later.
The Google Cloud PubSub Input [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `gcp_pubsub`) ingests data from Google Cloud Pub/Sub into a telemetry pipeline.
You can use this plugin to ingest
[LogEntry](https://docs.cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)
objects generated from a
[GCP Logging Sink](https://docs.cloud.google.com/logging/docs/routing/overview#sinks)
with a [pull-type](https://docs.cloud.google.com/pubsub/docs/subscriber)
topic subscription.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Google Cloud PubSub Input source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Google Cloud PubSub Input source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Subscription ID** | `subscription_id` | Required. This value can be either your [Pub/Sub subscription ID](https://docs.cloud.google.com/pubsub/docs/create-subscription) or your [fully qualified subscription name](https://www.google.com/url?q=https://docs.cloud.google.com/pubsub/docs/pubsub-basics%23resource_names\&sa=D\&source=docs\&ust=1765569146016537\&usg=AOvVaw3gxdFgpPaceHZPqRl3eZsC). However, if you don't use a fully qualified subscription name, you must also set the `project_id` parameter. | *none* |
| **Project ID** | `project_id` | Your [Google Cloud project ID](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects). This parameter is required if the value of `subscription_id` isn't a fully qualified subscription name. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| *none* | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). In addition to this parameter, the subscription client for the Google Cloud PubSub Input source plugin has its own [queue limit](#queue-limit). | *none* |
## Authentication
Use one of the following methods to authenticate with Google Cloud.
### Use GKE workload identity
Use this method to provide credentials to ADC through
[an attached service account](https://docs.cloud.google.com/docs/authentication/application-default-credentials#attached-sa).
> [!NOTE]
>
> This method is supported only if you installed
> Palo Alto Networks Telemetry Pipeline in a GKE cluster.
> Additionally, this method assumes that Palo Alto Networks Telemetry Pipeline
> is installed in the same
> GCP project as your Pub/Sub topic subscription.
1. Identify the Kubernetes namespace and service account associated with your
[Core Instance](/ingest/pipeline/v2/concepts#core-operators-and-core-instances).
2. In Google Cloud, create an IAM service account, or identify an existing IAM
service account to associate with your Kubernetes service account.
3. Grant your IAM service account the `roles/pubsub.subscriber` role:
```shell theme={null}
gcloud projects add-iam-policy-binding IAM_SA_PROJECT_ID \
--member "serviceAccount:IAM_SA_NAME@IAM_SA_PROJECT_ID.iam.gserviceaccount.com" \
--role "roles/pubsub.subscriber"
```
Replace the following values:
* `IAM_SA_PROJECT_ID`: The Google Cloud project ID associated with your IAM
service account.
* `IAM_SA_NAME`: The name of your IAM service account.
4. Create an IAM allow policy that gives your Kubernetes service account access
to impersonate the IAM service account:
```shell theme={null}
gcloud iam service-accounts add-iam-policy-binding IAM_SA_NAME@IAM_SA_PROJECT_ID.iam.gserviceaccount.com \
--role roles/iam.workloadIdentityUser \
--member "serviceAccount:IAM_SA_PROJECT_ID.svc.id.goog[NAMESPACE/KSA_NAME]"
```
Replace the following values:
* `IAM_SA_PROJECT_ID:` The Google Cloud project ID associated with your IAM service account.
* `IAM_SA_NAME:` The name of your IAM service account.
* `NAMESPACE`: The Kubernetes namespace associated with your pipeline.
* `KSA_NAME`: The Kubernetes service account associated with your pipeline.
5. Annotate your Kubernetes service account with the name and project ID of
your IAM policy:
```shell theme={null}
kubectl annotate serviceaccount KSA_NAME \
--namespace NAMESPACE \
iam.gke.io/gcp-service-account=IAM_SA_NAME@IAM_SA_PROJECT_ID.iam.gserviceaccount.com
```
Replace the following values:
* `IAM_SA_PROJECT_ID:` The Google Cloud project ID associated with your IAM
service account.
* `IAM_SA_NAME:` The name of your IAM service account.
* `NAMESPACE`: The Kubernetes namespace associated with your pipeline.
* `KSA_NAME`: The Kubernetes service account associated with your pipeline.
6. In Pipeline CLI, use the `--service-account` flag when you create or update a
pipeline that contains this plugin:
```shell theme={null}
calyptia {create|update} pipeline --service-account KSA_NAME
```
Replace `KSA_NAME` with the Kubernetes service account associated with your pipeline.
### Use GCP service account credentials
Use this method to provide credentials to ADC through
[the `GOOGLE_APPLICATION_CREDENTIALS` environment variable](https://docs.cloud.google.com/docs/authentication/application-default-credentials#GAC).
> [!NOTE]
>
> This method is supported for all Palo Alto Networks Telemetry Pipeline
> installation methods, including
> Palo Alto Networks Telemetry Pipeline installations that aren't running in a GKE cluster.
1. If you don't already have an IAM service account in GCP, create a new IAM
service account.
2. [Create a new IAM service account key](https://docs.cloud.google.com/iam/docs/keys-create-delete)
to use with Palo Alto Networks Telemetry Pipeline.
3. Download the IAM key that you created. This download should be a JSON file.
4. In your GKE cluster, create a Kubernetes secret from the JSON file that contains
your IAM key.
5. Use the `--secret-volume-mount` flag when you create or update the pipeline that
contains this plugin:
```shell theme={null}
calyptia {create|update} pipeline --secret-volume-mount SECRET:KEY=GOOGLE_APPLICATION_CREDENTIALS
```
Replace the following values:
* `SECRET`: The name of the secret you created.
* `KEY`: The key that contains your credentials in that secret.
Don't replace `GOOGLE_APPLICATION_CREDENTIALS` with any other value.
## Queue limit
The subscription client for the GCP PubSub source plugin has a 300 MB queue limit.
This means the plugin will pause fetching data from Google Pub/Sub if its
subscription queue exceeds 300 MB.
If other constraints or limits are placed on your pipeline, the GCP PubSub source
plugin might stop fetching data before this queue limit is reached. For example, if
you use `mem_buf_limit` or `resources.storage.backlogMemLimit` to enforce a memory
limit for a v2 pipeline, and that memory limit is reached, those values take
precedence over the 300 MB queue limit.
# Google Workspace Audit Logs source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/gcp-workspace
Use the Google Workspace Audit Logs source plugin.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Google Workspace Audit Logs [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `gsuite-reporter`) lets you retrieve data from Google Workspace and
ingest it into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
## Supported telemetry types
The Google Workspace Audit Logs source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Google Workspace Audit Logs source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### API Key
| Name | Key | Description | Default |
| - | - | - | - |
| **API Key** | `access_token` | Either an API key or a service account file for authentication. | *none* |
### Options
| Name | Key | Description | Default |
| - | - | - | - |
| **Enable Telemetry** | `telemetry` | If `true`, enables telemetry through the Google API. Accepted values: `true`, `false`. | `false` |
| **Pull Interval** | `pull_interval` | The time between calls to the Google API. Minimum of `1s`. | `30s` |
| **Data Directory** | `data_dir` | The storage path to allow resuming data collection. | `/data/storage/gsuite-reporter` |
| **Application Name** | `application_name` | The application name you want to get reports from. See [ApplicationName](https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities/list#ApplicationName). | `admin` |
| **User Key** | `user_key` | The user you want to get reports from. | `all` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# HTTP source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/http
Configure the HTTP source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The HTTP [source plugin](/ingest/pipeline/plugins/source-plugins) (name: `http`)
lets you collect data from various sources and ingest them into a telemetry
pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The HTTP source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the HTTP source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `9880` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Tag Key** | `tag_key` | Specifies the key name to overwrite a tag. If set, the value of that key overwrites the tag. | *none* |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | `4M` |
| **Buffer Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | `512k` |
| **Successful Response Code** | `successful_response_code` | Sets the code returned by successful responses. Accepted values: `200`, `201`, `204`. | `200` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# HTTP API collector source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/http-collector
Receive pipeline data from the HTTP API collector.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The HTTP API Collector [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http_loader`, alias: `http_alias_collector`) lets you ingest data from
your HTTP endpoints into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
> Additionally, this plugin can't be used in combination with these source plugins
> within the same telemetry pipeline:
>
> * [Absolute](/ingest/pipeline/plugins/source-plugins/absolute)
> * [Mandiant ASM](/ingest/pipeline/plugins/source-plugins/mandiant-asm)
> * [Okta](/ingest/pipeline/plugins/source-plugins/okta)
> * [Signal Sciences](/ingest/pipeline/plugins/source-plugins/signal-sciences)
> * [Slack](/ingest/pipeline/plugins/source-plugins/slack)
> * [Vectra M365](/ingest/pipeline/plugins/source-plugins/vectram365)
## Supported telemetry types
The HTTP API Collector source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the HTTP API Collector source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **URL** | `url` | Required. The request URL. Supports templating. | *none* |
| **HTTP Method** | `method` | The request method. Defaults to `GET`, or `POST` if `body` is set. Supports templating. | `GET` |
| **Headers** | `header` | Any request headers, formatted as strings separated by the new line character `\n`. Supports templating. | `User-Agent: Fluent-Bit HTTP Loader Plugin` |
| **Optional Request body** | `body` | The request body. Supports templating. | *none* |
| **Optional Request body** | `store_response_body` | What to store as the response body. This is meant for large response payloads so the plugin doesn't exceed the 5 MiB limit available for data storage in the Cloud at the pipeline metadata API. Supports templating. | `toJson .Response.Body` |
| **Request Timeout** | `timeout` | Controls the request timeout, string duration. If set, must be greater than `0s`. | `0s` |
| **Pull Interval** | `pull_interval` | Controls the time between requests, string duration. If set, must be greater than `0s`. Supports templating. | `1s` |
| **Wait** | `wait` | How much time to wait before starting collection. Useful to sync with `pull_interval`. Supports templating. Evaluate to a string duration. | `0s` |
| **Retry** | `retry` | Controls whether to retry the current request. Supports templating. Evaluate to a Boolean. | `false` |
| **Max Retries** | `max_retries` | The maximum number of retries. | `1` |
| **Stop** | `stop` | Controls when to stop collecting. Supports templating. | `false` |
### Cookie-Based Authentication
| Name | Key | Description | Default |
| - | - | - | - |
| **Auth Cookie URL** | `auth_cookie_url` | Cookie-based authentication URL. | *none* |
| **Auth Cookie Method** | `auth_cookie_method` | Cookie-based authentication request method. | Defaults to `GET`, or `POST` if `auth_cookie_body` is set. |
| **Auth Cookie Header** | `auth_cookie_header` | Cookie-based authentication request headers. String separated by new line character `\n`. | *none* |
| **Auth Cookie Body** | `auth_cookie_body` | Cookie-based authentication request body. | *none* |
### OAuth2
| Name | Key | Description | Default |
| - | - | - | - |
| **OAuth2 Token URL** | `oauth2_token_url` | OAuth 2.0 token URL. To include multiple URLs, separate each URL by a space. | *none* |
| **OAuth2 Client ID** | `oauth2_client_id` | OAuth 2.0 client ID. | *none* |
| **OAuth2 Client Secret** | `oauth2_client_secret` | OAuth 2.0 client secret. Sensible field, prefer using pipeline secrets. | *none* |
| **OAuth2 Scopes** | `oauth2_scopes` | OAuth 2.0 scopes. String, each scope separated by space. | *none* |
| **OAuth2 Additional Params** | `oauth2_endpoint_params` | OAuth 2.0 endpoint parameters. String in URL query string format. | *none* |
### Digest Auth
| Name | Key | Description | Default |
| - | - | - | - |
| **Username** | `auth_digest_username` | Username for HTTP Digest authentication. | *none* |
| **Password** | `auth_digest_password` | Password for HTTP Digest authentication. | *none* |
### Storage
| Name | Key | Description | Default |
| - | - | - | - |
| **Data Directory** | `data_dir` | Controls where to store data used to resume collecting. Defaults to `/data/storage` if exists, or a temporary directory if available, otherwise storage is disabled. | `/data/storage` |
| **Data Expiration Time** | `data_exp` | Controls how much time data can be used after resume. | `0s` |
### Output
| Name | Key | Description | Default |
| - | - | - | - |
| **Skip** | `skip` | Controls when to skip sending records to Palo Alto Networks Telemetry Pipeline. Supports templating. Defaults to ignore error status codes, and empty response body. | `{{or (ge .Response.StatusCode 400) (empty .Response.Body)}}` |
| **Out** | `out` | Controls what to send to Palo Alto Networks Telemetry Pipeline. Supports templating. Defaults to send the response body. | `{{toJson .Response.Body}}` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## Templating
The available [go-templates](https://pkg.go.dev/text/template) include the following
data:
* `Index`: (`int`) always available. Is the current fetch index.
* `Request`: (`Request` struct) available after a successful fetch.
* `Response`: (`Response` struct) available after a successful fetch.
* `LastRequestTime` (`*time.Time`) stores the time when the last request was made.
Available after a successful request.
* `LastResponseTime` (`*time.Time`) stores the time when the last response was received.
Available after a successful request and response roundtrip.
The `Request` struct includes these fields:
* `Method`: `string`.
* `URL`: `*url.URL`.
* `Header`: `http.Header`.
* `Body`: `any`.
The `Response` struct includes these fields:
* `StatusCode`: `int`.
* `Header`: `http.Header`.
* `Body`: `any`.
You can also use any of the following functions provided by
[sprig](http://masterminds.github.io/sprig/):
* `timeRFC3339`: `func() string` returns a constant RFC3339
(`2006-01-02T15:04:05Z07:00`) time format. Can be useful to format `time.Time` as
JSON timestamp.
* `nextLink`: `func (http.Header) string` returns the URL from the header `Link:
rel=next`. Useful for pagination.
* `parseDuration`: `func (string) (Duration, error)` parses a string as
`time.Duration`.
* `has`: `func(obj any, key string)` checks whether the given key exists inside an
object.
* `jq`: `func(query string, data any) (any, error)` transforms data using `jq`.
* `log`: `func(any...)` prints a message to stdout.
* `logf`: `func(format string, args any...)` prints a formatted message to stdout.
* `set_variable`: `func(key string, value any)` store a persistent variable you can
reference later on inside other go-template executions.
* `has_variable`: `func(key string)` checks whether the given variable is set.
* `get_variable`: `func(key string)` retrieve a previously stored persistent
variable, returns the value or an empty string.
* `unset_variable`: `func(key string)` deletes a previously stored persistent
variable.
### Time
A common action is to manipulate time parameters. Here are some common operations:
* `now` returns the current time as `time.Time` type.
* `now.Format "2006-01-02T15:04:05Z07:00"` returns the current time as a string in
RFC3339 format.
* `now.Format timeRFC3339` same as before but using a utility constant.
* `mustToDate timeRFC3339 .Response.Body.time` converts the `time` field inside the
response body to `time.Time` using the RFC3339 time format.
* `.Response.Body.time | mustToDate timeRFC3339` same as before but using the pipe
operator.
* `mustDateModify "+1h" now` return the current time plus 1 hour as `time.Time`.
* `now | mustDateModify "-1h"` similar to the previous one, but uses the pipe
operator, and also subtracts 1 hour. - `(now | mustDateModify "+1h").Format
timeRFC3339` returns the current time plus 1 hour as a string in RFC3339 time format.
Notice the usage of parenthesis. - `((.Response.Body.time | mustToDate timeRFC3339) |
mustDateModify "+1h").Format timeRFC3339` parses the response body `time` field to
`time.Time` then adds 1 hour, then formats it to string in RFC3339 time format.
### Additional Go template resources
* [Go package template documentation](https://pkg.go.dev/text/template)
* Gopher Academy Blog
[Using Go Templates](https://blog.gopheracademy.com/advent-2017/using-go-templates/)
post
* [Mastering HTML templates in Go - The fundamentals](https://philipptanlak.com/mastering-html-templates-in-go-the-fundamentals/),
by Philipp Tanlak
* HashiCorp
[Learn Go template syntax](https://developer.hashicorp.com/nomad/tutorials/templates/go-template-syntax)
page
* [Sprig Function Documentation](http://masterminds.github.io/sprig/)
## Examples
Use the following examples to help you retrieve data from your HTTP endpoints
and ingest it into Palo Alto Networks Telemetry Pipeline.
### SWAPI example
Here's an example using the [SWAPI](https://swapi.dev) API:
```yaml theme={null}
pipeline:
inputs:
- name: http_loader
url: |-
{{with .Response.Body.next}}{{.}}{{else}}https://swapi.dev/api/people{{end}}
out: |-
{{toJson .Response.Body.results}}
skip: |-
{{or (ge .Response.StatusCode 400) (empty .Response.Body.results)}}
```
By fetching `https://swapi.dev/api/people`, you'll receive a response body similar to
the following:
```json theme={null}
{
"next": "https://swapi.dev/api/people/?page=2",
"results": [
{...},
{...}
]
}
```
#### URL
If a value is returned for `next` in the response body, be sure to use that as the
URL. Otherwise, set the default to `https://swapi.dev/api/people`.
#### Out
Select the `results` field from the response body and transform it to JSON. This will
attempt to send an array to Palo Alto Networks Telemetry Pipeline. However,
arrays aren't supported, which
causes the plugin to split the array and send each item in the following manner:
```json theme={null}
{ "index": 1, "value": {} }
```
```json theme={null}
{ "index": 2, "value": {} }
```
```json theme={null}
{ "index": 3, "value": {} }
```
Another way to visualize this is:
```js theme={null}
arr.map((value, index) => ({ index, value })).forEach(send)
```
#### Skip
With skip, you can control when to skip sending data to Palo Alto Networks Telemetry
Pipeline. As an example, you can skip if the response status code is greater or equal
to 400, or if the `results` field in the response body is empty.
#### Transform
Say you are only interested in the `name` property on each result.
```json theme={null}
{
"next": "https://swapi.dev/api/people/?page=2",
"results": [
{
"name": "Luke Skywalker",
// ...
},
{
"name": "C-3PO",
// ...
}
]
}
```
Inside the go-templating, you can use `jq` to transform the data. Change `out` to the
following to map over each result and extract only the `name`:
```handlebars theme={null}
{{.Response.Body | jq ".results.[] | {name}" | toJson}}
```
### JSON placeholder example
The [JSON placeholder](https://jsonplaceholder.typicode.com) API supports pagination,
but doesn't provide a `next` URL to lookup. Instead, the client should pass a `_page`
query string parameter, starting at `1`:
```yaml theme={null}
pipeline:
inputs:
- name: http_loader
url: |-
https://jsonplaceholder.typicode.com/posts?_limit=10&_page={{add .Index 1}}
retry: |-
{{ge .Response.StatusCode 500}}
max_retries: 3
```
#### Index
Inside the template context you will always find the variable `.Index`, which is
an auto-increasing number each time the plugin makes a request. It starts at `0`.
In this case, to start the pagination at `1`, add `1` to the index to advance the
page.
#### Retry
You can enable retrying of requests. In this case, you want to retry if you get a
response with an status code greater than or equal to `500`. Also, in the case the
HTTP client fails for some other reason (perhaps a networking issue) and you don't
get a response back, the request will be retried.
You can control how many tries will be performed using `max_retries`. In this case,
the plugin will try at most three (`3`) times.
### Okta example
When using the [Okta API](https://developer.okta.com/docs/reference/api/system-log/),
it returns a `Link: ; rel="next"` header which you can use for pagination:
```yaml theme={null}
pipeline:
inputs:
- name: http_loader
url: |-
{{- with nextLink .Response.Header -}}
{{.}}
{{- else -}}
https://{replaceWithYourDomain}/api/v1/logs
{{- end -}}
header: "Authorization: SSWS {{secrets.oktaAPIToken}}"
```
#### Next link
There's a helper function called `nextLink` that takes some headers, and then finds
the `Link` header with `rel=next`.
In case you get the header, use that as the URL, otherwise you'll set the default
Okta URL of your domain.
Notice that `with` works as an `if`, but overrides that current template data with
the result. In this case, it's equivalent to:
```handlebars theme={null}
{{- if nextLink .Response.Header -}}
{{nextLink .Response.Header}}
```
### Carbon Black example
The [Carbon Black](https://developer.carbonblack.com/reference/carbon-black-cloud/platform-apis/)
API uses an offset style pagination controlled by `start` and `rows`. You should be
more interested in the time-range filtering, and mixing pagination with it.
Control time range with either a combination of `time_range.start` and `time_range.end`,
which are both fixed timestamps.
> [!NOTE]
>
> There's also the option `range` a relative value (`-2h`). However, to have complete control,
> use fixed timestamps.
Issue a `POST` request with a body like the following:
```json theme={null}
{
"time_range": {
"start": "2023-08-14T01:00:00.000Z",
"end": "2023-08-14T02:00:00.000Z"
},
"start": 1,
"rows": 5
}
```
Advance the page by changing `start` to previous `start` + `rows`. For example,
`1`, `6`, `11`, `16`, and so on.
Change `time_range` only after you have finished paging through the current time
range.
```yaml theme={null}
pipeline:
inputs:
- name: http_loader
url: https://defense.conferdeploy.net/api/alerts/v7/orgs/ABCD1234/alerts/_search
header: |-
Content-Type: application/json
X-Auth-Token: {{secrets.blackCarbonAuthToken}}
body: |-
{{- $now := now.UTC.Truncate (parseDuration "1h") -}}
{{- $timeStart := $now | mustDateModify "-1h" -}}
{{- $timeEnd := $now -}}
{{- $start := 1 -}}
{{- if and .Request .Response -}}
{{- $prevTimeEnd := .Request.Body.time_range.end | mustToDate timeRFC3339 -}}
{{- $start = add .Request.Body.start 5 -}}
{{- if or (empty .Response.Body.results) (lt (len .Response.Body.results) 5) -}}
{{- $timeStart = $prevTimeEnd -}}
{{- $timeEnd = ($timeStart | mustDateModify "+1h") -}}
{{- $start = 1 -}}
{{- end -}}
{{- if $timeEnd.Before $prevTimeEnd -}}
{{- $timeEnd = $prevTimeEnd -}}
{{- $timeStart = ($timeEnd | mustDateModify "-1h") -}}
{{- end -}}
{{- end -}}
{"time_range":{"start":"{{$timeStart.Format timeRFC3339}}","end":"{{$timeEnd.Format timeRFC3339}}"},"start":{{$start}},"rows":5}
out: |-
{{toJson .Response.Body.results}}
skip: |-
{{or (ge .Response.StatusCode 400) (empty .Response.Body.results)}}
pull_interval: |-
{{- if ge .Response.StatusCode 400 -}}
10s
{{- else -}}
{{- $interval := parseDuration "100ms" -}}
{{- if or (empty .Response.Body.results) (lt (len .Response.Body.results) 5) -}}
{{- $interval = parseDuration "1h" -}}
{{- $currentTimeEnd := .Request.Body.time_range.end | mustToDate timeRFC3339 -}}
{{- $nextTimeEnd := $currentTimeEnd.Add $interval -}}
{{- if $nextTimeEnd.After now -}}
{{- $interval = $nextTimeEnd.Sub now -}}
{{- if le $interval.Nanoseconds 0 -}}
{{- $interval = parseDuration "1ns" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{$interval}}
{{- end -}}
```
Make use of go-templating variables to keep order.
#### Body
In the `body`, first define a variable to hold the current timestamp truncated to a 1
hour unit. Use it to define both time range start and end. Also, set the pagination
to `start` at `1`.
The variables `.Request` and `.Response` are not initially available, and are
available only after a successful fetch. The following code happens inside an `if`
that determines if both of them are available.
There you can retrieve the previous time range end. Advanced the page by increasing
the pagination `start` by `5` (rows).
Then, determine if less than `5` (rows) `results` were returned, which means you have
reached the pages end, and pagination is finished. In this case, change the time
range window by adding to the previous request values. You can reset pagination by
setting page `start` to `1`.
There's an additional `if` that checks if the time range window is less
than the previous time range window, in which case it sets it to the previous one.
Finally, use these variables to construct the JSON request body.
#### Pull interval
Then, it's important to set `pull_interval`. If you're not careful, you could start
to ask for time windows in the future, which wouldn't return any data.
First, do a validation check. If you receive a status code greater than or equal to
400, return `10s` as `pull_interval` (you can even use a higher value).
Now, set an initial pull interval of `100ms`. Then, in case `results` inside the
response body is empty or less than 5 (rows), it means you have finished paginating.
In such case, move the time window. To do so, increase the `pull_interval` to `1h`.
Be sure to add an `if` to avoid moving the time window into the future, in which case
you can limit the pull interval to `next - now`.
Determine if the resulting `pull_interval` is negative, and set it to a minimum value
of `1ns`.
In resume, in case of error, use a pull interval of `10s`. In case the pagination has
ended, use `1h` but maxed to now. Otherwise, if you're still paginating, set it to
`100ms`.
### Sentinel One example
When using the
[Sentinel One](https://www.postman.com/api-evangelist/workspace/sentinelone/overview) API,
pagination uses a cursor-based style. You can also control a time window, similar to
how it is done on the Carbon Black API.
The Carbon Black API used a token inside the request headers. But, because Sentinel
One uses cookies, there's a separate login endpoint that you can specify in the
plugin to fetch the auth cookie, and then store in the cookie jar.
```yaml theme={null}
pipeline:
inputs:
- name: http_loader
url: |-
{{- $now := now.UTC.Truncate (parseDuration "1h") -}}
{{- $start := $now | mustDateModify "-1h" -}}
{{- $end := $now -}}
{{- if and .Request .Response -}}
{{- $prevEnd := .Request.URL.Query.Get "updatedAt__lte" | mustToDate timeRFC3339 -}}
{{- if (empty .Response.Body.pagination.nextCursor) -}}
{{- $start = $prevEnd -}}
{{- $end = ($start | mustDateModify "+1h") -}}
{{- end -}}
{{- if $end.Before $prevEnd -}}
{{- $end = $prevEnd -}}
{{- $start = ($end | mustDateModify "-1h") -}}
{{- end -}}
{{- end -}}
https://usea1-partners.sentinelone.net/web/api/v2.1/threats?updatedAt__gte={{$start.Format timeRFC3339}}&updatedAt__lte={{$end.Format timeRFC3339}}&limit=5{{with .Response.Body.pagination.nextCursor}}&cursor={{.}}{{end}}
out: |-
{{toJson .Response.Body.data}}
skip: |-
{{or (ge .Response.StatusCode 400) (not (empty .Response.Body.errors)) (empty .Response.Body.data)}}
pull_interval: |-
{{- if or (ge .Response.StatusCode 400) (not (empty .Response.Body.errors)) -}}
10s
{{- else -}}
{{- $interval := parseDuration "100ms" -}}
{{- if empty .Response.Body.pagination.nextCursor -}}
{{- $interval = parseDuration "1h" -}}
{{- $currentEnd := .Request.URL.Query.Get "updatedAt__lte" | mustToDate timeRFC3339 -}}
{{- $nextEnd := $currentEnd.Add $interval -}}
{{- if $nextEnd.After now -}}
{{- $interval = $nextEnd.Sub now -}}
{{- if le $interval.Nanoseconds 0 -}}
{{- $interval = parseDuration "1ns" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{$interval}}
{{- end -}}
auth_cookie_url: |-
https://usea1-partners.sentinelone.net/web/api/v2.1/users/login/by-api-token
auth_cookie_body: |-
{"data": {"apiToken": "{{secrets.sentinelOneAPIToken}}"}}
auth_cookie_header: |-
Content-Type: application/json
```
#### Auth Cookie URL
If you set `auth_cookie_url`, the plugin issues a request to this URL before starting
collecting.
#### Auth Cookie Exp
You can control for how much time the cookie is valid by using `auth_cookie_exp`,
which accepts a duration string. After the cookie is expired, the plugin will attempt
to renew the cookie.
> [!NOTE]
>
> This body doesn't support go-templates. The notation `{{ secrets.* }}` is a
> feature available in Palo Alto Networks Telemetry Pipeline. Its syntax might resemble go-templates,
> but they are not go-templates.
### Dynatrace example
The following examples uses the
[Dynatrace API](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/audit-logs/get-log).
One important aspect of this API is that it uses a `nextPageKey` for pagination on
the URL query string parameters, but this parameter is exclusive. When setting this
parameter, you can set only that parameter, and not the rest of the filters.
This prevents you from referencing the previous request parameters. For that,
use the `has_variable`, `get_variable`, `set_variable` and `unset_variable` helpers
so you can persist data in the plugin execution. These variables are persisted even
after the Palo Alto Networks Telemetry Pipeline process is restarted.
```yaml theme={null}
pipeline:
inputs:
- name: http_loader
url: |-
{{- $environmentID := "ggy66547" -}}
{{- with .Response.Body.nextPageKey -}}
https://{{$environmentID}}.live.dynatrace.com/api/v2/auditlogs?nextPageKey={{.}}
{{- else -}}
{{- $now := now.UTC.Truncate (parseDuration "1h") -}}
{{- $from := $now | mustDateModify "-1h" -}}
{{- $to := $now -}}
{{- if has_variable "to" -}}
{{- $prevTo := get_variable "to" | mustToDate timeRFC3339 -}}
{{- $from = $prevTo -}}
{{- $to = ($from | mustDateModify "+1h") -}}
{{- if $to.Before $prevTo -}}
{{- $to = $prevTo -}}
{{- $from = ($to | mustDateModify "-1h") -}}
{{- end -}}
{{- end -}}
{{- set_variable "to" ($to.Format timeRFC3339) -}}
https://{{$environmentID}}.live.dynatrace.com/api/v2/auditlogs?from={{$from.Format timeRFC3339}}&to={{$to.Format timeRFC3339}}&sort=timestamp&pageSize=10
{{- end -}}
header: "Authorization: Api-Token {{secrets.dynatraceAPIToken}}"
out: |-
{{toJson .Response.Body.auditLogs}}
skip: |-
{{or (ge .Response.StatusCode 400) (empty .Response.Body.auditLogs)}}
pull_interval: |-
{{- if ge .Response.StatusCode 400 -}}
{{ log "error:" .Response.Body }}
10s
{{- else -}}
{{- $interval := parseDuration "100ms" -}}
{{- if empty .Response.Body.nextPageKey -}}
{{- $interval = parseDuration "1h" -}}
{{- $currentTo := get_variable "to" | mustToDate timeRFC3339 -}}
{{- $nextTo := $currentTo.Add $interval -}}
{{- if $nextTo.After now -}}
{{- $interval = $nextTo.Sub now -}}
{{- if le $interval.Nanoseconds 0 -}}
{{- $interval = parseDuration "1ns" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{$interval}}
{{- end -}}
```
The `url` go-template determines if you received a `nextPageKey` in the response
body. In that case, use that to paginate. Otherwise, set the time window parameters,
similar to the previous examples, but also make use of `set_variable` to persist the
`to` parameter. Doing that lets you reference it later, and not depend on the
previous request.
# Microsoft Intune - Audit event source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/intune
Ingest Microsoft Intune - Audit events in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Microsoft Intune - Audit event [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http_loader`, alias: `microsoft-intune-audit-events`) lets you ingest
data from Microsoft Intune logs into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
## Supported telemetry types
The Microsoft Intune - Audit event source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Microsoft Intune - Audit event source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Tenant ID** | `tenantID` | Required. Your Microsoft tenant ID. | *none* |
| **OAuth2 Client ID** | `oauth2_client_id` | Required. Your Microsoft OAuth 2.0 client ID. | *none* |
| **OAuth2 Client Secret** | `oauth2_client_secret` | Required. Your Microsoft OAuth 2.0 client secret. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Kafka source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/kafka
Configure the Kafka source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can use the Kafka [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `kafka`, alias: `kafka_input`) to ingest data from your Apache Kafka
instances into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Kafka source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Kafka source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Brokers** | `brokers` | Required. Single of multiple lists of Kafka brokers. For example, `192.168.1.3:9092`, `192.168.1.4:9092`. | *none* |
| **Topics** | `topics` | Required. Single entry or list of topics separated by comma (`,`) that Palo Alto Networks Telemetry Pipeline uses to receive messages from Kafka. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Minimum Queued Messages** | `rdkafka.queued.min.messages` | Minimum number of messages per topic and partition Palo Alto Networks Telemetry Pipeline tries to maintain in the local consumer queue. | `10` |
| **Group ID** | `rdkafka.group.id` | The client group ID string. All clients with the same group ID belong to the same group. | *none* |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Other
This parameter doesn't have an equivalent setting in the Palo Alto Networks Telemetry Pipeline web
interface, but you can use it in pipeline configuration files.
| Name | Key | Description | Default |
| - | - | - | - |
| *none* | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single log exceeds this size, the plugin drops that log. | `4M` |
### Extended librdkafka parameters
This plugin uses the [librdkafka](https://github.com/confluentinc/librdkafka)
library. Certain configuration parameters available through the Palo Alto Networks
Telemetry Pipeline UI are based on librdkafka settings. These parameters generally
use the `rdkafka.` prefix.
In addition to the parameters available through the
Palo Alto Networks Telemetry Pipeline UI, you can
customize any of the
[librdkafka configuration properties](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md)
by adding them to a pipeline configuration file. To do so, append the `rdkafka.`
prefix to the name of that property.
For example, to customize the `socket.keepalive.enable` property, add the
`rdkafka.socket.keepalive.enable` key to your configuration file.
> [!NOTE]
>
> Don't use librdkafka properties to configure a pipeline's memory buffer. Instead,
> use the [`buffer_max_size`](#other) parameter.
# Kubernetes Events source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/kubernetes
Ingest Kubernetes events in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Kubernetes Events [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `kubernetes_events`) lets you ingest data from Kubernetes into a
telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Kubernetes Events source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Kubernetes Events source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Kubernetes API Server Endpoint** | `kube_url` | Required. The API server endpoint that's accessible to Palo Alto Networks Telemetry Pipeline. | `https://kubernetes.default.svc` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Kubernetes TLS CA file** | `kube_ca_file` | Your Kubernetes CA certificate file. | *none* |
| **Kubernetes TLS CA path** | `kube_ca_path` | Your Kubernetes CA certificate path. | *none* |
| **Kubernetes authorization Token File**\* | `kube_token_file` | Your Kubernetes authorization token file. | *none* |
| **Kubernetes Token Time To Live (TTL)** | `kube_token_ttl` | The amount of time before a token is reread from its file. | `10M` |
| **Kubernetes Request Limit** | `kube_request_limit` | The request limit for how many events to collect. | `0` |
| **Kubernetes Event Retention Time** | `kube_retention_time` | How long Kubernetes should retain events. | `1h` |
| **Kubernetes Namespace** | `kube_namespace` | The Kubernetes namespace to query events from. By default, fetches events from all namespaces. | *none* |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Mandiant ASM source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/mandiant-asm
Configure the Mandiant ASM source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Mandiant ASM [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http_loader`, alias: `mandiant_asm`) lets you query Mandiant ASM to
ingest data into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
> Additionally, this plugin can't be used in combination with these source plugins
> within the same telemetry pipeline:
>
> * [Absolute](/ingest/pipeline/plugins/source-plugins/absolute)
> * [HTTP API collector](/ingest/pipeline/plugins/source-plugins/http-collector)
> * [Okta](/ingest/pipeline/plugins/source-plugins/okta)
> * [Signal Sciences](/ingest/pipeline/plugins/source-plugins/signal-sciences)
> * [Slack](/ingest/pipeline/plugins/source-plugins/slack)
> * [Vectra M365](/ingest/pipeline/plugins/source-plugins/vectram365)
## Supported telemetry types
The Mandiant ASM source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Mandiant ASM source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
The configured fields replace sections of the `url` field in the YAML file in the
following way:
```text theme={null}
url: https://asm-api.advantage.mandiant.com/api/v1/search/SEARCH_ELEMENT/SEARCH_QUERY
```
| Name | Key | Description | Default |
| - | - | - | - |
| **Project ID** | `PROJECT_ID` | Required. | *none* |
| **Search element** | *none* | Required. Used in `url` field. Accepted values: `entities`, `issues`, `technologies`. | `entities` |
| **Search Query** | *none* | Required. Used in `url` field. | *none* |
| **Access Key** | `INTRIGUE_ACCESS_KEY` | Required. | *none* |
| **Secret Key** | `INTRIGUE_SECRET_KEY` | Required. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Mock Data source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/mock-data
Configure the Mock Data source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Mock Data [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `dummy`) lets you input user-generated data into a telemetry pipeline.
Although this is a self-contained plugin that doesn't communicate with external
sources, it's still classified as a [pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> To use the Mock Data source plugin, you must create your own dataset and feed that
> data to the plugin. If you'd prefer to have Palo Alto Networks Telemetry Pipeline generate
> simulated log data on your behalf, use the
> [Datagen](/ingest/pipeline/plugins/source-plugins/datagen) plugin instead.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
## Supported telemetry types
The Mock Data source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Mock Data source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Mock Data** | `dummy` | Required. Your mock data, in JSON format. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Rate** | `rate` | The amount of events per second to mock. | `1` |
| **Samples** | `samples` | How many times to generate events. | `0` |
| **Base Timestamp in seconds** | `start_time_sec` | A dummy base timestamp, in seconds. | `-1` |
| **Base Timestamp in nano seconds** | `start_time_nsec` | A dummy base timestamp, in nanoseconds | `-1` |
| **Enable Fixed Timestamp** | `fixed_timestamp` | If `true`, use a fixed timestamp, which lets the message pre-generate once. Accepted values: `true`, `false` | `false` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Okta System Logs Collector source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/okta
Receive pipeline data from Okta System Logs Collector.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Okta System Logs Collector [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http_loader`, alias: `okta_system_logs`) lets you ingest data from your
Okta instances into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
> Additionally, this plugin can't be used in combination with these source plugins
> within the same telemetry pipeline:
>
> * [Absolute](/ingest/pipeline/plugins/source-plugins/absolute)
> * [HTTP API collector](/ingest/pipeline/plugins/source-plugins/http-collector)
> * [Mandiant ASM](/ingest/pipeline/plugins/source-plugins/mandiant-asm)
> * [Signal Sciences](/ingest/pipeline/plugins/source-plugins/signal-sciences)
> * [Slack](/ingest/pipeline/plugins/source-plugins/slack)
> * [Vectra M365](/ingest/pipeline/plugins/source-plugins/vectram365)
## Supported telemetry types
The Okta System Logs Collector source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Okta System Logs Collector source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Okta Domain URL** | `url` | The URL of your Okta domain. | *none* |
| **Okta API Token** | `api_token` | Your Okta API token. | *none* |
| **Pull Interval** | `pull_interval` | The time between each API call in Okta system logs. | `10s` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Optional Request body** | `body` | Optional request body. For example, `{"custom":"data"}`. | *none* |
| **Request Timeout** | `timeout` | The amount of time between requests. | `10s` |
| **Max Response Bytes** | `max_response_bytes` | Whether to limit the amount of bytes to read from the response body. | `1572860` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### OAuth2
| Name | Key | Description | Default |
| - | - | - | - |
| **OAuth2 Client ID** | `oauth2_client_id` | Optional OAuth 2.0 Client ID. You need to at least pass the client ID, secret and token URL to enable OAuth 2.0 authentication. Uses the `client_credentials` flow. | *none* |
| **OAuth2 Client Secret** | `oauth2_client_secret` | Optional OAuth 2.0 client secret. | *none* |
| **OAuth2 Token URL** | `oauth2_token_url` | Optional OAuth 2.0 token URL in the formal of HTTP or HTTPS. For example, `https://example.org/oauth2/token`. | *none* |
| **OAuth2 Scopes** | `oauth2_scopes` | Optional list of additional scopes for OAuth 2.0 authentication separated by space. For example, `scope1 scope2`. | *none* |
| **OAuth2 Scopes Separator** | `oauth2_scopes_separator` | Additional parameter to pass during OAuth 2.0 authentication that separates scopes specified in OAuth 2.0 Scopes. | *none* |
| **OAuth2 Additional Params** | `oauth2_endpoint_params` | Optional additional parameters to add during OAuth 2.0 authentication. The format is a URL query string. For example, `foo=bar&bar=qux`. | *none* |
# OpenTelemetry source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/opentelemetry
Configure the OpenTelemetry source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs, metrics, and traces for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The OpenTelemetry [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `opentelemetry`) lets you ingest data from your OpenTelemetry instances
into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The OpenTelemetry source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the OpenTelemetry source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `8088` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Tag from URI** | `tag_from_uri` | Sets tag from URI. For example, `v1_metrics` from /v1/metrics. | `false` |
| **Tag Key** | `tag_key` | Specifies the key name of a tag to overwrite. If set, the tag name will be overwritten by the specified tag key. | *none* |
| **Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | `512K` |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | `4M` |
| **Successful Response Code** | `successful_response_code` | Sets the code returned by successful responses. Accepted values: `200`, `201`, `204`. | `201` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# Prometheus Remote Write source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/prometheus-remote
Configure the Prometheus Remote Write source plugin in Palo Alto Networks Telemetry Pipeline to ingest metrics for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Prometheus Remote Write [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `prometheus_remote_write`) lets you ingest data from the
[Prometheus Remote-Write API](https://prometheus.io/docs/specs/remote_write_spec/)
into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Prometheus Remote Write source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Prometheus Remote Write source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The port for the pipeline to receive data. | `8088` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Tag from URI** | `tag_from_uri` | Sets tag from URI. For example, v1\_metrics from /v1/metrics. | `false` |
| **URI** | `uri` | Sets the URI to receive Prometheus Remote Write metrics on. | `/api/prom/push` |
| **Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | `512K` |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | `4M` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# Prometheus scrape source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/prometheus-scrape
Configure the Prometheus scrape source plugin in Palo Alto Networks Telemetry Pipeline to ingest metrics for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can use the Prometheus scrape [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `prometheus_scrape`) to ingest data from your Prometheus instances and
into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Prometheus scrape source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Prometheus scrape source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Host** | `host` | Required. The host of the Prometheus metric endpoint you want to scrape. | *none* |
| **Port** | `port` | Required. The port of the Prometheus metric endpoint you want to scrape. | *none* |
| **Metrics URI Endpoint** | `metrics_path` | Required. The metrics URI endpoint, which must start with a forward slash. Parameters can also be added to the path by using \`?\`. | `/metrics` |
| **Scrape Interval** | `scrape_interval` | Required. The interval to scrape metrics. | `10s` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# S3 Input (SQS) source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/s3-sqs
Configure the S3 Input (SQS) source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> Requires [pipeline agent](/ingest/pipeline/v2/component-versions) v25.8.1 or later,
> [Core Operator](/ingest/pipeline/v2/component-versions) v3.67.0 or later, and
> [Pipeline CLI](/ingest/pipeline/pipeline-cli) v3.66.0 or later.
The S3 Input (SQS) [source plugin](/ingest/pipeline/plugins/source-plugins) (name: `s3_sqs`)
lets you continuously ingest new data from Amazon S3 buckets into a telemetry pipeline.
This plugin monitors an SQS queue configured to receive notifications
[directly from S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ways-to-add-notification-config-to-bucket.html)
or [through SNS](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-subscribe-queue-sns-topic.html),
then creates logs from the files described in S3 events. This plugin ignores
any SQS notifications that can't be decoded as references to an object in an S3 bucket,
but it doesn't [filter](#filtering) notifications by event type.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
## Supported telemetry types
The S3 Input (SQS) source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Requirements
To use the S3 Input (SQS) plugin, you must meet these requirements:
* Your IAM user or IAM role must have the following permissions for the ARN of your
SQS queue:
* [`sqs:ChangeMessageVisibility`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ChangeMessageVisibility.html)
* [`sqs:DeleteMessage`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteMessage.html)
* [`sqs:GetQueueAttributes`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html)
* [`sqs:GetQueueUrl`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueUrl.html)
* [`sqs:ReceiveMessage`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html)
* Your IAM user or IAM role must have the
[`s3:GetObject`](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
permission for all buckets configured to notify your SQS queue.
* Your SQS queue must have
[a redrive policy and a dead letter queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).
Additionally, Palo Alto Networks Telemetry Pipeline recommends setting the
`maxReceiveCount` of your redrive
queue to a value greater than `1`, which lets SQS retry sending messages upon failure.
## Configuration parameters
Use the parameters in this section to configure the S3 Input (SQS) source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **AWS SQS Queue Name** | `sqs_queue_name` | Required. The name of the SQS queue whose notifications you want to monitor. | *none* |
| **AWS SQS Queue Region** | `sqs_queue_region` | Required if `aws_sqs_endpoint` isn't set. The name of the region where your SQS queue exists. For example, `us-east-1`. | *none* |
### Advanced
| Name | Key | Description | Default |
| :- | :- | :- | :- |
| **Regular Expression Object Match** | `match_regexp` | The regular expression for matching or excluding object keys from S3. This plugin processes notifications only for objects that match the specified regular expression. If not set, the default value of `.*` matches all possible object keys. | `.*` |
| **Delete Message from SQS** | `delete_messages` | If `true`, deletes SQS messages after processing the associated S3 data. If `false`, the plugin re-processes each message at an interval specified by your SQS [visibility timeout](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html), and continues to process each message until a [redrive policy](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) is triggered or until you meet your SQS message retention policy. Palo Alto Networks Telemetry Pipeline recommends not modifying this value unless you're testing a pipeline during its initial setup. This is because deleting SQS messages prevents the plugin from processing the same message multiple times and creating duplicate logs. Accepted values: `true`, `false`. | `true` |
| **Line Buffer Max Size** | `max_line_buffer_size` | The maximum line size the plugin will read from [JSON or plain text files](#supported-data-types). | `10MiB` |
| **S3 Assume Role ARN** | `s3_assume_role_arn` | The ARN of the IAM role for accessing S3 buckets. This can be an ARN within the same account or [across accounts](#cross-account-access). | *none* |
| **S3 Role External ID** | `s3_role_external_id` | The [external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html) of the role to assume in S3. | *none* |
| **SQS Assume Role ARN** | `sqs_assume_role_arn` | The ARN of the IAM role for accessing the SQS queue. This can be an ARN within the same account or [across accounts](#cross-account-access). | *none* |
| **SQS Role External ID** | `sqs_role_external_id` | The [external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html) of the role to assume in SQS. | *none* |
| **SQS Queue Owner Account ID** | `sqs_queue_owner_account_id` | The AWS account ID of the queue owner for [cross-account access](#cross-account-access). | *none* |
| **S3 Read Concurrency** | `s3_read_concurrency` | The maximum number of concurrent S3 [`GetObject`](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) calls that this plugin will make. | The number of logical CPUs allocated to each pipeline [replica](/ingest/pipeline/v2/configure/scaling). |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## Authentication methods
The S3 Input (SQS) plugin supports the following authentication methods:
* [EKS Pod Identities](#eks-pod-identities)
* [IMDS](#imds)
* [IRSA](#irsa)
* [Static credentials](#static-credentials)
### EKS Pod Identities
To use EKS Pod Identities for authentication:
1. In AWS, configure [EKS Pod Identities](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html).
2. In [Pipeline CLI](/ingest/pipeline/pipeline-cli), add the following flag to a `create pipeline`
or `update pipeline` command:
```shell /VALUE/ theme={null}
calyptia {create|update} pipeline --service-account VALUE
```
Replace *`VALUE`* with the name of the Kubernetes service account associated
with your Pods.
### IMDS
To use IMDS for authentication:
* In AWS, configure [IAM roles for your EC2 instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html).
### IRSA
To use IRSA for authentication:
1. In AWS, [set up IRSA for your EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html).
2. [Assign an IAM role to your Kubernetes service account](https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html).
3. In [Pipeline CLI](/ingest/pipeline/pipeline-cli), add the following flag to a `create pipeline`
or `update pipeline` command:
```shell /VALUE/ theme={null}
calyptia {create|update} pipeline --service-account VALUE
```
Replace *`VALUE`* with the name of your Kubernetes service account.
### Static credentials
To use static credentials for authentication:
* In Palo Alto Networks Telemetry Pipeline, [create secrets](/ingest/pipeline/v2/configure/secrets#add-a-secret)
that contain the values of your [IAM access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
These secrets must use the key names `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
> [!NOTE]
>
> You don't need to add an explicit [reference](/ingest/pipeline/v2/configure/secrets#reference-a-secret)
> to these secrets in your pipeline configuration file. If secrets with the correct
> key names are present, the S3 Input (SQS) plugin automatically detects these values
> and uses them for authentication.
## Cross-account access
The S3 Input (SQS) plugin supports cross-account access through the following methods.
* [Using IAM roles](#cross-account-access-using-iam-roles) (recommended)
* [Using resource-based policies](#cross-account-access-using-resource-based-policies)
Cross-account access and authentication are independent. You can use any cross-account
access method with any [authentication method](#authentication-methods).
### Cross-account access using IAM roles
To set up cross-account access using IAM roles, use the following
[configuration parameters](#configuration-parameters):
* `sqs_assume_role_arn`: Required.
* `sqs_role_external_id`: Required if you need to use an external ID to assume
the SQS role.
The S3 (SQS) plugin will extract the necessary account ID from
the value of `sqs_assume_role_arn`, which means that the `sqs_queue_owner_account_id`
parameter isn't required. However, if you do specify a value for `sqs_queue_owner_account_id`,
that value takes precedence over the value extracted from `sqs_assume_role_arn`.
### Cross-account access using resource-based policies
To set up cross-account access using resource-based policies, use the
following [configuration parameters](#configuration-parameters):
* `sqs_assume_role_arn`: Required if you're using an assumed role.
* `sqs_role_external_id`: Required if you need to use an external ID to assume
the SQS role.
* `sqs_queue_owner_account_id`: Required if the SQS queue to which your policy
is attached has a different owner than the account specified in
`sqs_assume_role_arn`, or if you aren't using assumed roles.
## Supported data types
The S3 Input (SQS) plugin can ingest [JSON objects](#json) and [plain text](#plain-text)
from files stored in S3 buckets, including gzip-compressed files. Additionally,
this plugin can extract and ingest compressed and uncompressed files from
[tar archives](#tar-archives).
### JSON
This plugin can ingest data from JSON files with these file extensions:
* `.json`
* `.jsonl`
* `.ndjson`
If a file contains only a single JSON object, this plugin creates
a new log from that object. If a file contains multiple
[newline-delimited JSON (NDJSON)](https://github.com/ndjson/ndjson-spec)
objects, this plugin creates a new log from each JSON object within that file.
Key-value pairs from JSON objects are stored as key-value pairs in the resulting log.
For JSON files that use gzip compression (with file extensions such as `.json.gzip`
or `.json.gz`), this plugin decompresses each file before processing it accordingly.
### Plain text
If a file doesn't use a file extension that identifies it as a JSON file, the
S3 Input (SQS) plugin processes that file as plain text. It creates a new log from
each line of the file and stores the content in a key named `_raw` within the
resulting log.
For non-JSON files that use gzip compression (with file extensions that include
the `.gzip` or `.gz` suffix), this plugin decompresses each file before processing
it accordingly.
### Tar archives
The plugin can extract and consume files from tar archives with these file extensions:
* `.tar`
* `.tar.gz`
* `.tar.gzip`
After the plugin extracts these files, it processes
any [JSON](#json) and [plain text](#plain-text) data accordingly, but skips directories
and symbolic links.
If files inside a tar archive are gzip-compressed, this plugin decompresses those
files accordingly.
## Filtering
The S3 Input (SQS) plugin doesn't filter notifications by event type. If a
notification contains a reference to an object in an S3 bucket, the plugin will
ingest data from that object, regardless of its associated event type.
To create filters based on event type, you must configure the notification settings
of your SQS settings in AWS. For more information, see the AWS
[Event notification types and destinations](https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-event-types-and-destinations.html)
guide.
## Metadata
The S3 Input (SQS) plugin attaches the following metadata to each log:
* `__chrono_bucket`: The name of the S3 bucket that contains the file from which
the log was created.
* `__chrono_file`: The key of the S3 object from which the log was created.
* `__chrono_tar_file_entry`: For data extracted from [tar archives](#tar-archives)
only. The name of the tar archive that contained the file from which the log
was created.
## Get started
To get started with the S3 Input (SQS) plugin, follow these steps.
1. Either [create a new pipeline](/ingest/pipeline/v2/build/create-modify#create-a-pipeline)
or [modify an existing pipeline](/ingest/pipeline/v2/build/create-modify).
2. For testing purposes, set the pipeline's destination to
[standard output](/ingest/pipeline/plugins/destination-plugins/standard-output).
3. Set the pipeline's source to S3 Input (SQS), and then add values for all required
parameters, along with any optional parameters of your choosing.
4. Set up one of the supported [authentication methods](#authentication-methods)
for the S3 Input (SQS) source plugin.
5. In the Palo Alto Networks Telemetry Pipeline web interface, go to the
summary page for that pipeline.
6. In the [**Pipeline Output**](/ingest/pipeline/navigate#pipeline-output-v2-pipelines) section,
click **Get latest logs**.
7. Review this log output to ensure that you're receiving data from S3. If you don't
receive any data, or if you encounter connection errors, review your plugin
configuration settings.
8. After you've confirmed that the S3 Input (SQS) plugin is functioning correctly,
you can overwrite the standard output destination with the destination where
you want to send your telemetry data.
# Signal Sciences source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/signal-sciences
Configure the Signal Sciences source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Signal Sciences [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http_loader`) lets you query the Signal Sciences API to ingest data into
a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
> Additionally, this plugin can't be used in combination with these source plugins
> within the same telemetry pipeline:
>
> * [Absolute](/ingest/pipeline/plugins/source-plugins/absolute)
> * [HTTP API collector](/ingest/pipeline/plugins/source-plugins/http-collector)
> * [Mandiant ASM](/ingest/pipeline/plugins/source-plugins/mandiant-asm)
> * [Okta](/ingest/pipeline/plugins/source-plugins/okta)
> * [Slack](/ingest/pipeline/plugins/source-plugins/slack)
> * [Vectra M365](/ingest/pipeline/plugins/source-plugins/vectram365)
## Supported telemetry types
The Signal Sciences source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Signal Sciences source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
The configured fields replace sections of the `url` field in the YAML file in the
following way:
```text theme={null}
https://dashboard.signalsciences.net{{with
.Response.Body.next.uri}}.{{else}}/api/v0/corps/CORP/sites/SITENAME/requests?q=SEARCH_QUERY{{end}}
```
| Name | Key | Description | Default |
| - | - | - | - |
| **Corp** | *none* | Required. Added to `url` field. | *none* |
| **Site Name** | *none* | Required. Added to `url` field. | *none* |
| **Search Query** | *none* | The query to pass to the Signal Sciences API, as part of the `url` field. | *none* |
| **API Access Token** | *none* | Your Signal Sciences API access token. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Slack source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/slack
Configure the Slack source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Slack [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http_loader`, alias: `slack`) lets you retrieve data from the Slack API
and ingest it into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
> Additionally, this plugin can't be used in combination with these source plugins
> within the same telemetry pipeline:
>
> * [Absolute](/ingest/pipeline/plugins/source-plugins/absolute)
> * [HTTP API collector](/ingest/pipeline/plugins/source-plugins/http-collector)
> * [Mandiant ASM](/ingest/pipeline/plugins/source-plugins/mandiant-asm)
> * [Okta](/ingest/pipeline/plugins/source-plugins/okta)
> * [Signal Sciences](/ingest/pipeline/plugins/source-plugins/signal-sciences)
> * [Vectra M365](/ingest/pipeline/plugins/source-plugins/vectram365)
## Supported telemetry types
The Slack source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Slack source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Token** | *none* | Required. Your Slack API token. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Splunk HEC source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/splunk-hec
Configure the Splunk HEC source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Splunk HEC [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `splunk`, alias: `splunk_hec`) lets you ingest log data from the Splunk
HTTP Event Collector into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Splunk HEC source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Splunk HEC source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Address to Listen On** | `listen` | Required. The address to listen on. | `0.0.0.0` |
| **Port** | `port` | Required. The port for Palo Alto Networks Telemetry Pipeline to listen on. | `9880` |
| **Tag Key** | `tag_key` | Specifies the key name to overwrite a tag. If set, the value of that key overwrites the tag. | *none* |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | `4M` |
| **Buffer Chunk Size** | `buffer_chunk_size` | Required. Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | `512K` |
| **Splunk Token** | `splunk_token` | Your Splunk token for HTTP HEC. | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Splunk UF source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/splunk-uf
Receive pipeline data from the Splunk Universal Forwarder.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can use the Splunk UF [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `tcp`, alias: `Splunk_UF`) to ingest data from your Splunk Universal
Forwarder instances into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Splunk UF source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Splunk UF source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `5170` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Format** | `format` | Sets the format. Accepted values: `json`, *none*. | *none* |
| **Set Separator** | `separator` | Sets separator. | *none* |
| **Chunk Size** | `chunk_size` | Sets the chunk size for incoming messages. | `256kb` |
| **Buffer Size** | `buffer_size` | Sets the chunk size for incoming JSON messages. These chunks are then stored and managed in the space available by `buffer_size`. | *none* |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
## Splunk Universal Forwarder configuration
```text theme={null}
[tcpout]
defaultGroup = calyptia
disabled = false
[tcpout:calyptia]
server = :
sendCookedData = false
negotiateProtocolLevel = 0
```
# SQL DB Input source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/sqldb
Use the SQL DB Input source plugin with Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The SQL DB Input [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `sqldb`, alias: `SQL_DB_Input`) lets you ingest log data from a
relational database into a telemetry pipeline. If you write your logs to a
relational database, you can use the SQL DB Input plugin to convert that data
into a pipeline-friendly format.
This plugin supports the following SQL formats:
* Postgres
* MySQL
* Oracle
* Microsoft SQL Server
* SQLite
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
## Supported telemetry types
The SQL DB Input source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the SQL DB Input source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **DB Type** | `driver` | Required. The SQL driver for your relational data. Accepted values: `postgres`, `mysql`, `oracle`, `sqlserver`, `sqlite`. | `postgres` |
| **Database Connection String** | `dsn` | Required. The data source name for your database, in string format. | *none* |
| **SQL Query** | `query` | Required. The SQL query to perform. This query supports named arguments in `@named` format. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Argument Column** | `columnsForArgs` | A list of column names to turn into arguments, separated by spaces. The most recently scanned row in each specified column becomes a `@named` argument you can use to paginate data. For example, if this key has a value of `id log_time`, the plugin creates two arguments you can use in queries: `@last_id` and `@last_log_time`. | *none* |
| **Time Column** | `timeFrom` | The column in your database with the time when each log was ingested. | If unassigned, each ingested log is assigned a time value equivalent to the time the plugin runs its query. |
| **Time Format** | `timeFormat` | The time format of your `timeFrom` value. Accepted values: `unix_sec`, `unix_ms`, `unix_us`, `unix_ns`, or any RFC time format layout. | If `timeFrom` is an integer: `unix_ns`. If `timeFrom` is a string: `2006-01-02T15:04:05.999999999Z07:00`. |
| **Fetch Interval** | `fetchInterval` | How often to query your database. This value must specify one or more integer and one or more time unit, like `5m` or `1m30s`. Valid time units: `ns`, `us`, `ms`, `s`, `m`, `h`. | `1s` |
| **Storage Key** | `storageKey` | A key to store the plugin's metadata, which lets the plugin store arguments and other configuration data even if the plugin restarts. By default, the plugin writes its own metadata in `sqldb_{hash}.gob` format, where `{hash}` is a string generated from your query arguments. You can also specify your own value, which can follow any format and use any file extension. | *none* |
| **Storage Path** | `storageDir` | The path to the directory where the plugin writes its data. You can use an absolute or relative path, but Palo Alto Networks Telemetry Pipeline recommends using an absolute path. | `/data/storage` (If this directory does not exist, the plugin writes to your operating system's default directory for temporary data.) |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
## Example queries
The following examples describe how to configure the SQL DB Input plugin in different
hypothetical scenarios.
### Serial ID
Given the following database structure, which includes an auto-increasing `id`:
```sql theme={null}
CREATE TABLE logs (
id SERIAL PRIMARY KEY,
payload JSON NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT now()
);
```
You can use the SQL DB Input plugin to paginate over your data using `id`. To include
such a query in your pipeline, configure the plugin as follows:
```yaml theme={null}
pipeline:
inputs:
- name: sqldb
dsn: "postgres://user:password@localhost:5432/dbname"
query: |-
SELECT *
FROM logs
WHERE @last_id IS NULL OR id > @last_id
ORDER BY id
LIMIT 100
columnsForArgs: id
```
The previous query sorts by `id`, and then uses the `id` value from the previous query to
paginate data.
### Time-based pagination
Given the following database structure, which includes a non-sortable `id`:
```sql theme={null}
CREATE TABLE logs (
id UUID PRIMARY KEY,
payload JSON NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT now()
);
```
You can use a combination of `id` and `created_at` to paginate data. To include
such a query in your pipeline, configure the plugin as follows:
```yaml theme={null}
pipeline:
inputs:
- name: sqldb
dsn: "postgres://user:password@localhost:5432/dbname"
query: |-
SELECT *
FROM logs
WHERE @last_id IS NULL OR @last_created_at IS NULL OR (created_at >= @last_created_at OR (created_at = @last_created_at AND id > @last_id))
ORDER BY created_at, id
LIMIT 100
columnsForArgs: "id created_at"
```
The previous query sorts by both `id` and `created_at`, then uses the `id` and
`created_at` values from the previous query to paginate data.
# Syslog source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/syslog
Configure the Syslog source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Syslog [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `syslog`) can collect messages through a Unix socket server using UDP or
TCP, or over the network using TCP or UDP. This lets you configure your
telemetry pipeline to receive, parse, and process Syslog messages.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Syslog source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Syslog source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `5140` |
| **Parser** | `parser` | Specifies an alternative parser for the message. If Mode is set to `tcp` or `udp`, the default parser is `syslog-rfc5424`, otherwise `syslog-rfc3164-local` is used. If your syslog messages have fractional seconds, set this value to `syslog-rfc5424` instead. If you have a custom parser, use Advanced Settings to designate the parser. | *none* |
| **Mode** | `mode` | The protocol to use. Accepted values: `tcp`, `udp`. | `tcp` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | *none* |
| **Buffer Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | *none* |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# TCP source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/tcp
Configure the TCP source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The TCP [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `tcp`) lets you send custom records to an HTTP endpoint. You can use this
plugin to configure your telemetry pipeline to collect data from networked computers.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The TCP source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the TCP source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### Required
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `5170` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Format** | `format` | Sets the format. Accepted values: `json`, *none*. | *none* |
| **Separator** | `separator` | Sets separator. | *none* |
| **Chunk Size** | `chunk_size` | Sets the chunk size for incoming messages. | *none* |
| **Buffer Size** | `buffer_size` | Sets the chunk size for incoming JSON messages. These chunks are then stored and managed in the space available by `buffer_size`. | *none* |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# Telegraf source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/telegraf
Configure the Telegraf source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can use the Telegraf [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http`, alias: `Telegraf`) to ingest data from your Telegraf instances
into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Telegraf source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Telegraf source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `9814` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Tag Key** | `tag_key` | Specifies the key name to overwrite a tag. If set, the value of that key overwrites the tag. | *none* |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | `4M` |
| **Buffer Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | `512k` |
| **Successful Response Code** | `successful_response_code` | Sets the code returned by successful responses. Accepted values: `200`, `201`, `204`. | `200` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# Vectra M365 - Incident Detection source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/vectram365
Use the Vectra M365 - Incident Detection source plugin.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Vectra M365 - Incident Detection [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http_loader`, alias: `vectra-m365-incident-detection`) lets you retrieve
data from Vectra and ingest it into a telemetry pipeline.
This is a
[pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
> [!NOTE]
>
> This plugin doesn't support the use of a
> [descriptive metadata name](/ingest/pipeline/plugins#descriptive-names) in the
> Pipeline Builder interface.
> [!NOTE]
>
> This plugin doesn't support duplicates of itself within the same pipeline.
> Additionally, this plugin can't be used in combination with these source plugins
> within the same telemetry pipeline:
>
> * [Absolute](/ingest/pipeline/plugins/source-plugins/absolute)
> * [HTTP API collector](/ingest/pipeline/plugins/source-plugins/http-collector)
> * [Mandiant ASM](/ingest/pipeline/plugins/source-plugins/mandiant-asm)
> * [Okta](/ingest/pipeline/plugins/source-plugins/okta)
> * [Signal Sciences](/ingest/pipeline/plugins/source-plugins/signal-sciences)
> * [Slack](/ingest/pipeline/plugins/source-plugins/slack)
## Supported telemetry types
The Vectra M365 - Incident Detection source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Vectra M365 - Incident Detection source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Vectra Portal URL** | `vectra_portal_url` | Required. Your Vectra portal URL. | *none* |
| **OAuth2 Client ID** | `oauth2_client_id` | Required. Your OAuth 2.0 client ID for accessing the Vectra portal. | *none* |
| **OAuth2 Client Secret** | `oauth2_client_secret` | Required. The OAuth 2.0 secret key for accessing the Vectra portal. | *none* |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
# Vercel Logs source plugin
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/vercel
Configure the Vercel Logs source plugin in Palo Alto Networks Telemetry Pipeline to ingest logs for processing and routing.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The Vercel Logs [source plugin](/ingest/pipeline/plugins/source-plugins)
(name: `http`, alias: `vercel_logo`) lets you ingest data from your Vercel
instances into a telemetry pipeline.
This is a
[push-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins)
source plugin.
## Supported telemetry types
The Vercel Logs source plugin for Palo Alto Networks Telemetry Pipeline supports these telemetry types:
| Logs | Metrics | Traces |
| :-: | :-: | :-: |
| | | |
## Configuration parameters
Use the parameters in this section to configure the Vercel Logs source plugin. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
### General
| Name | Key | Description | Default |
| - | - | - | - |
| **Port** | `port` | Required. The TCP port used for listening for incoming messages. | `9880` |
| **Vercel Verification Token** | `success_header` | Required. Your Vercel verification token. | `x-vercel-verify {INSERT TOKEN FROM LOG DRAIN SETTINGS}` |
### Advanced
| Name | Key | Description | Default |
| - | - | - | - |
| **Tag Key** | `tag_key` | Specifies the key name to overwrite a tag. If set, the value of that key overwrites the tag. | *none* |
| **Buffer Max Size** | `buffer_max_size` | Sets the maximum [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin drops that record. | `4M` |
| **Buffer Chunk Size** | `buffer_chunk_size` | Sets the default [chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) size for buffered data. If a single record exceeds this size, the plugin temporarily increases the chunk size up to the value of `buffer_max_size` to accommodate it. | `512k` |
| **Successful Response Code** | `successful_response_code` | Sets the code returned by successful responses. Accepted values: `200`, `201`, `204`. | `200` |
| **Memory Buffer Limit** | `mem_buf_limit` | Sets a limit for how much buffered data the plugin can write to memory, which affects backpressure. This value must follow Fluent Bit's rules for [unit sizes](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit#unit-sizes). If unspecified, no limit is enforced. For v2 pipelines, this parameter affects only pipelines with the Deployment or DaemonSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. To learn more, see the v2 [backpressure](/ingest/pipeline/v2/configure/backpressure) guide. For v3 pipelines, this parameter is independent from the [OpenTelemetry `memory_limiter` and `batch` processors](/ingest/pipeline/v3#route-data-from-fluent-bit-to-opentelemetry). | *none* |
### Security and TLS
| Name | Key | Description | Default |
| - | - | - | - |
| **TLS** | `tls` | If `true`, enables TLS/SSL. If `false`, disables TLS/SSL. Accepted values: `true`, `false`. | `false` |
| **TLS Certificate Validation** | `tls.verify` | If `on`, and if `tls` is `true`, enables TLS/SSL certificate validation. If `off`, disables TLS/SSL certificate validation. Accepted values: `on`, `off`. | `on` |
| **TLS Debug Level** | `tls.debug` | Sets TLS debug verbosity level. Accepted values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), `4` (Verbose). | `1` |
| **CA Certificate File Path** | `tls.ca_file` | Absolute path to CA certificate file. | *none* |
| **Certificate File Path** | `tls.crt_file` | Absolute path to certificate file. | *none* |
| **Private Key File Path** | `tls.key_file` | Absolute path to private key file. | *none* |
| **Private Key Path Password** | `tls.key_passwd` | Password for private key file. | *none* |
| **TLS SNI Hostname Extension** | `tls.vhost` | Hostname to be used for TLS SNI extension. | *none* |
# Test plugin settings
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/test-settings
Learn how to test plugin settings and ensure data is flowing through your pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
When you [create or modify a pipeline](/ingest/pipeline/v2/build/create-modify), you can
test the source and destination plugins in that pipeline to ensure
their configuration settings are correct.
Palo Alto Networks Telemetry Pipeline recommends testing plugins individually
rather than as a group, which
can help identify and isolate issues with each plugin.
## Test a source plugin
To confirm that a source plugin is configured correctly, route data from that source
to a basic test destination.
1. Add the source plugin of your choice to a pipeline and configure its settings
accordingly.
2. Add the
[Standard output](/ingest/pipeline/plugins/destination-plugins/standard-output)
destination plugin
to the same pipeline. This plugin lets you view telemetry data as it passes
through your pipeline in the Palo Alto Networks Telemetry Pipeline web interface.
3. In Palo Alto Networks Telemetry Pipeline, navigate to the
[pipeline details](/ingest/pipeline/navigate#pipeline-details-v2-pipelines) page.
4. In the [**Pipeline Output**](/ingest/pipeline/navigate#pipeline-output-v2-pipelines) section,
click **Get Latest Logs**.
5. Confirm that **Pipeline Output** displays data from your source. For
example, if you're using the [Kubernetes Events](/ingest/pipeline/plugins/source-plugins/kubernetes)
source plugin, this output should include data generated by a Kubernetes cluster.
If **Pipeline Output** displays data from your source, the associated source
plugin is configured correctly. You can either remove the Standard output plugin
from your pipeline or copy the source plugin's configuration settings to use
them in a different pipeline.
## Test a destination plugin
To confirm that a destination plugin is configured correctly, send basic test data
to that destination.
1. Add the destination plugin of your choice to a pipeline and configure its
settings accordingly.
2. Choose a source plugin to generate test data that's compatible with your
destination:
* The [Datagen](/ingest/pipeline/plugins/source-plugins/datagen),
[Dummy HTTP](/ingest/pipeline/plugins/source-plugins/dummy-http),
and [Mock Data](/ingest/pipeline/plugins/source-plugins/mock-data) source plugins
generate test logs.
* The [Dummy logs, metrics, and traces](/ingest/pipeline/plugins/source-plugins/dummy)
source plugin can generate all three telemetry types.
3. Add that source plugin to the same pipeline and configure its settings accordingly.
4. Access the storage location associated with your destination plugin to confirm
whether that destination is receiving test data. For example, if you're using the
[Amazon S3](/ingest/pipeline/plugins/destination-plugins/amazon-s3) destination
plugin, look for test logs in your S3 bucket.
If your destination is receiving test data, the associated destination plugin is
configured correctly. You can either remove the testing source plugin from your
pipeline or copy the destination plugin's configuration settings to use them in
a different pipeline.
# Processing rules
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules
Transform the data that passes through your telemetry pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
```mermaid actions={false} theme={null}
flowchart LR
accTitle: Pipeline flow
accDescr: A simplified representation of a telemetry pipeline, which includes a source plugin, parser, processing rules, and destination plugin.
subgraph Pipeline flow
direction LR
A(Source plugin )
B(Parser )
C(Processing rules)
D(Destination plugin )
A --> B --> C --> D
style C stroke-width:4px
end
```
Processing rules transform the data that passes through your telemetry pipeline.
You can use a variety of rules to perform different operations on data in transit
between its source and its destination.
Some example use cases for processing rules include:
* Adding a new field to each log for easier debugging and troubleshooting.
* Redacting sensitive values to preserve user privacy.
* Removing unnecessary fields to improve the signal-to-noise ratio of your data.
* Converting data from one format to another.
* Turning unstructured data into structured data.
* Aggregating logs into metrics to reduce data volume while retaining key
insights.
## Overview
```mermaid actions={false} theme={null}
graph TB
accTitle: Processing rules diagram.
accDescr: Data transforms as it passes through the logic of a processing rule.
raw{"{'event': 'login', 'token': 'hunter2'} "} --> rule[Processing rules]
subgraph rule[Rule: redact/mask value]
direction LR
logic[key: tokenregex: ^.+$replaceChar: *]
end
rule --> processed{"{'event': 'login', 'token': '*******'} "}
style raw stroke:#495057,stroke-width:2px
style rule stroke:#495057,stroke-width:2px
style processed stroke:#495057,stroke-width:2px
style logic stroke-dasharray: 5 5
```
Each built-in processing rule transforms data in a specific way. You can combine
multiple processing rules to create complex transformation logic suited for
your telemetry data and storage format.
Processing rules are applied at the [plugin](/ingest/pipeline/plugins) level,
and each plugin can have multiple associated processing rules. Any rules associated
with a [source plugin](/ingest/pipeline/plugins/source-plugins) are applied after the
data from that plugin has been parsed by a [file-based parser](/ingest/pipeline/v2/build/parsers),
if applicable. Any rules associated with a
[destination plugin](/ingest/pipeline/plugins/destination-plugins) are applied before
the data leaves your pipeline.
## Format
Processing rules are run one at a time, from top to bottom. If you add multiple
processing rules to the same pipeline for the same [telemetry type](#telemetry-types),
the output from your first rule becomes the input for your second rule, the
output from your second rule becomes the input for your third rule, and so on.
Most processing rules are compatible with most data formats. Processing rules
are also designed to skip any incompatible records or records that can't be
processed, which means you can create rules even if they only apply to a subset
of your data. For example, you can apply a broad rule to remove a certain field from your
logs even if some logs that travel through your pipeline don't contain that field.
### Telemetry types
> Requires Core Operator version 3.1.0 or later and pipeline agent version 24.7.3 or later.
Processing rules support logs, metrics, and traces. You can create processing rules
for multiple telemetry types within the same pipeline, but each processing rule
is applied only to its specified telemetry type. For example, if you create a
[search/replace value](/ingest/pipeline/processing-rules/search-replace-value)
processing rule for metrics, this rule won't affect any logs or traces that
pass through your pipeline, even if those logs or traces contain a matching key.
> [!NOTE]
>
> When raw log data passes through at least one processing rule, the data
> receives a new `log` field for each event. This `log` field lets you treat each event
> as a single unit of data.
>
> Structured log data such as JSON doesn't receive a `log` field
> because you can already break structured data into discrete events.
### Regex engines
> Requires Palo Alto Networks Telemetry Pipeline version 2.9.0 or later.
Some processing rules, like [block records](/ingest/pipeline/processing-rules/block-records)
and [rename keys](/ingest/pipeline/processing-rules/rename-keys),
accept regular expressions. For most of these rules, you can specify one of the
following engines to parse your rule:
* [PCRE2](https://www.pcre.org/current/doc/html/) (default)
* [Oniguruma](https://github.com/kkos/oniguruma)
* [POSIX](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/regex.h.html)
* [GNU](https://www.gnu.org/software/gnulib/manual/html_node/Regular-expressions.html)
* [TRE](https://github.com/laurikari/tre/)
### Record accessor syntax
If your raw data is in JSON format, you can use record accessor syntax to
extract nested fields within a larger JSON object.
To extract a nested field inside a standard object, use the following syntax:
```text theme={null}
$objectName.fieldName
```
To extract a nested field inside an array, use the following syntax:
```text theme={null}
$objectName.arrayName[X]
```
For example, given the following JSON object:
```json theme={null}
{
"log": "1234",
"kubernetes": {
"pod_name": "mypod-0",
"labels": [
{
"app": "myapp",
"env": "prod"
}
]
}
}
```
The expression `$kubernetes.pod_name` resolves to `mypod-0`, and the expression
`$kubernetes.labels[0]` resolves to `"app": "myapp"`.
> [!NOTE]
>
> If the name of a field or parent object contains periods, wrap the name in
> quotes. For example, to access the field `k8s.pod.uid` inside the object
> `attributes`, use the expression `$attributes."k8s.pod.uid"`.
## Add processing rules to your pipeline
1. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
2. Open the project that contains the pipeline to which you want to add processing
rules.
3. Navigate to **Core Instances**, then select the pipeline to which you want to
add processing rules.
4. Click **Edit**.
5. Click the Edit processing rules node in
the middle of the configuration diagram.
6. In the dialog that appears, select an option from the **Telemetry type** tab.
7. Click **Add New Rule** to open the processing rules menu.
8. Select a processing rule from the available list.
9. Configure the available settings for that processing rule, and then click
**Apply**.
10. Optional: Repeat steps 5 through 8 to add additional processing rules. If you
add multiple rules, you can drag them to change the order in which they run.
11. Optional: Add test input and then click
**Preview Output** to preview the output
of your processing rules.
12. Click **Apply Processing Rules** to
finalize your processing rules, and then click
**Save and Deploy** to save
your pipeline settings.
> [!NOTE]
>
> Use the toggle next to a processing rule to enable or disable that rule.
## Use pipeline logs as preview input data
You can use the **Input** and **Output** panes in the processing rules builder to
preview the effects of your processing rules. When you edit processing rules for
most pipelines, or when you use the processing rules playground, the **Input**
pane displays sample logs by default.
However, when you edit certain eligible pipelines, the **Input** pane
automatically fetches the latest logs from that pipeline. You can also manually
fetch logs from eligible pipelines to use as preview input data in the processing
rules playground or when editing any other pipelines.
> [!NOTE]
>
> To be an eligible preview input source, a pipeline must be active and must include
> the [Standard output](/ingest/pipeline/plugins/destination-plugins/standard-output)
> destination plugin. This plugin is necessary because Cortex XCOR can't access the
> telemetry data that passes through your pipelines without it.
To use a pipeline's logs as preview input data, choose an eligible pipeline from the
**Select pipeline** drop-down menu, then click **Get Latest Logs**. This takes a
snapshot of the logs currently passing through your pipeline and displays that
snapshot in the **Input** pane.
If you click **Preview Output**,
the **Output** pane will show how the logs in that snapshot would change based on the
processing rules that you've configured. However, processing rules won't actually
modify the previewed logs unless you save and apply changes to the pipeline from which
those logs originate.
To use sample logs as preview input, open the **Select pipeline** drop-down
menu and click **Sample logs**. You can also overwrite the logs in the **Input**
pane with any text of your choosing.
## Save and load templates
To create a template from your current processing rule settings, click
**Export** to save a JSON template file
to your device. You can also click **Save**
to save your template within the Palo Alto Networks Telemetry Pipeline web interface, which makes
that template available to any other users in your current project.
To load an existing template, click **Import**
and select a JSON template file stored on your device, or use the **Select Template**
drop-down menu to choose one of the templates available in your current project.
Cortex XCOR also offers several processing rule templates in the
[`processing-templates` GitHub repository](https://github.com/chronosphereio/processing-templates).
## Available processing rules
Palo Alto Networks Telemetry Pipeline offers the following processing rules:
| Processing rule | Description |
| - | - |
| [**Set key/value**](/ingest/pipeline/processing-rules/add-set-key-value) | Adds the same key-value pair to every record. |
| [**Aggregate records**](/ingest/pipeline/processing-rules/aggregate-records) | Transforms incoming logs into computed metrics at periodic intervals. |
| [**Allow keys**](/ingest/pipeline/processing-rules/allow-keys) | Preserves any keys that match a specified regular expression, and removes all other keys. |
| [**Allow records**](/ingest/pipeline/processing-rules/allow-records) | Preserves any records that contain a key whose value matches a specified regular expression, and removes all other records. |
| [**Block keys**](/ingest/pipeline/processing-rules/block-keys) | Removes keys that match a regular expression. |
| [**Block records**](/ingest/pipeline/processing-rules/block-records) | Removes records that contain a key whose value matches a specified regular expression. |
| [**Copy keys**](/ingest/pipeline/processing-rules/copy-keys) | Copies the value of a specified source key to the value of a specified destination key. |
| [**Custom Lua**](/ingest/pipeline/processing-rules/custom-lua) | Write custom Lua scripts to transform your telemetry data. |
| [**Decode CSV**](/ingest/pipeline/processing-rules/decode-csv) | Transforms log data from CSV format to JSON. |
| [**Decode JSON**](/ingest/pipeline/processing-rules/decode-json) | Transforms an escaped JSON string into a structured JSON object. |
| [**Deduplicate records**](/ingest/pipeline/processing-rules/deduplicate-records) | Searches for any records that contain identical key-value data within a specified time frame, then removes all but the earliest of those records. |
| [**Delete key**](/ingest/pipeline/processing-rules/delete-key) | Deletes a specified key and its associated value from all records. |
| [**Encode CSV**](/ingest/pipeline/processing-rules/encode-csv) | Transforms log data from JSON to CSV format. |
| [**Encode JSON**](/ingest/pipeline/processing-rules/encode-json) | Transforms a JSON object into an escaped string. |
| [**Extract keys/values**](/ingest/pipeline/processing-rules/extract-keys-values) | Uses a regular expression to search for key-value pairs inside a string, then creates a structured object to store those key-value pairs. |
| [**Flatten subrecord**](/ingest/pipeline/processing-rules/flatten-subrecord) | Uses regular expression to search for key-value pairs inside a JSON object, then either moves or copies any applicable key-value pairs to the top level of the record. |
| [**Hash key**](/ingest/pipeline/processing-rules/hash-key) | Copies the value of a specified source key, hashes that value, then stores the hashed copy in a specified destination key. |
| [**Join records**](/ingest/pipeline/processing-rules/join-records) | Combined values from multiple records into an array of values within a single record. |
| [**Lift submap**](/ingest/pipeline/processing-rules/lift-submap) | Uses regular expressions to search for key-value pairs inside a JSON object, then either moves or copies any applicable key-value pairs out of the JSON object and into a higher level of the record. |
| [**Multiline join**](/ingest/pipeline/processing-rules/multiline-join) | Combines multiple logs into a single log by looking for repeating patterns in log data. |
| [**Nest keys**](/ingest/pipeline/processing-rules/nest-keys) | Moves the value of a specified source key into an object nested under a specified destination key. |
| [**Parse**](/ingest/pipeline/processing-rules/parse) | Uses a regular expression to search for values inside a string and assign a key to each value, then stores those key-value pairs in a structured object. |
| [**Parse number**](/ingest/pipeline/processing-rules/parse-number) | Uses a regular expression to transform a key's value from a string to a number. |
| [**Random sampling**](/ingest/pipeline/processing-rules/random-sampling) | Preserves a percentage of records that pass through your pipeline and discards the rest. |
| [**Redact/mask value**](/ingest/pipeline/processing-rules/redact-mask-value) | Obscures all or part of a specified key's value by replacing the original string with a series of repeated characters. |
| [**Rename keys**](/ingest/pipeline/processing-rules/rename-keys) | Changes the name of a specified key. |
| [**Search/replace value**](/ingest/pipeline/processing-rules/search-replace-value) | Uses regular expressions to search for a value inside a string, then replaces that value with a different specified value. |
| [**Split record**](/ingest/pipeline/processing-rules/split-record) | Splits an array of JSON objects into a series of standalone records. |
# Set key/value
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/add-set-key-value
Learn about the set key/value processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The set key/value [processing rule](/ingest/pipeline/processing-rules)
adds the same key-value pair to every record that passes through your pipeline. If a
record contains a matching key, this rule overwrites that key's associated value with
the value you specify.
## Configuration parameters
Use the parameters in this section to configure the set key/value processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Key** | `key` | Required. The key to add to each record. You can use [record accessor syntax](/ingest/pipeline/processing-rules#record-accessor-syntax) to add or overwrite keys nested inside a parent object. | *none* |
| **Value** | `value` | Required. The value to associate with your key. This value is identical for every instance of **Key**. | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the set key/value rule lets you add identifying information to events,
such as including the source from which they originate or their associated user
action.
For example, given this sample log data:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user_id":3,"page_id":30,"action":"purchase", "source": "storefront"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user_id":4,"page_id":10,"action":"purchase", "source": "storefront"}
{"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", "source": "storefront"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user_id":1,"page_id":30,"action":"purchase", "source": "storefront"}
{"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", "source": "storefront"}
{"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"}
```
A rule with the **Key** value `source` and the **Value** value `acme-wholesale` returns the
following result:
```json theme={null}
{"source":"acme-wholesale","user_id":3,"page_id":30,"action":"purchase","timestamp":"2023-03-28T09:08:41.64283645Z"}
{"source":"acme-wholesale","user_id":4,"page_id":10,"action":"purchase","timestamp":"2023-03-28T09:08:42.643343109Z"}
{"source":"acme-wholesale","user_id":1,"page_id":50,"action":"click","timestamp":"2023-03-28T09:08:48.643600498Z"}
{"source":"acme-wholesale","user_id":5,"page_id":40,"action":"purchase","timestamp":"2023-03-28T09:08:50.643773688Z"}
{"source":"acme-wholesale","user_id":1,"page_id":30,"action":"purchase","timestamp":"2023-03-28T09:08:51.643932272Z"}
{"source":"acme-wholesale","user_id":2,"page_id":40,"action":"click","timestamp":"2023-03-28T09:08:56.644080944Z"}
{"source":"acme-wholesale","user_id":3,"page_id":30,"action":"click","timestamp":"2023-03-28T09:09:03.64425954Z"}
{"source":"acme-wholesale","user_id":1,"page_id":20,"action":"view","timestamp":"2023-03-28T09:09:03.644317046Z"}
{"source":"acme-wholesale","user_id":2,"page_id":50,"action":"purchase","timestamp":"2023-03-28T09:09:10.64447719Z"}
{"source":"acme-wholesale","user_id":2,"page_id":10,"action":"view","timestamp":"2023-03-28T09:09:17.644810963Z"}
{"source":"acme-wholesale","user_id":1,"page_id":50,"action":"view","timestamp":"2023-03-28T09:09:20.644994805Z"}
```
A `source` key is now included for each record, with the value `acme-wholesale`.
Records that already had a key named `source` had their values replaced with the new
value.
# Aggregate records
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/aggregate-records
Learn about the aggregate records processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The aggregate records [processing rule](/ingest/pipeline/processing-rules)
transforms incoming logs into computed metrics at periodic intervals, and then
deletes the original logs.
> [!WARNING]
>
> When the aggregate records rule waits for data to accumulate during the
> specified time window, the pipeline [buffers](/ingest/pipeline/v2/configure/backpressure)
> that data. Increasing the value of the **Time window** parameter also increases
> the memory load on your pipeline. For example, if 100,000 records pass through
> your pipeline during the specified time period, and those records are 1 kB
> each, the aggregate records rule will add approximately 100 MB of memory
> load.
## Configuration parameters
Use the parameters in this section to configure the aggregate records processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Time window** | `window` | Required. How long to wait (in seconds) for data to accumulate in your pipeline before computing metrics from that data. For each interval that elapses, a new set of metrics is computed. | *none* |
| **Select keys** | `keys` | Required. Any logs that contain matching values for all of the specified keys will be grouped together during compute operations. This parameter must be formatted as a JSON array of strings, like `["keyName1","keyName2"]`. | *none* |
| **Compute keys** | `compute` | Required. The keys and computed metrics to include in your output data. This parameter must be formatted as a JSON object. For more information, see [Compute syntax](#compute-syntax). | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Compute syntax
The aggregate records processing rule offers three compute functions:
`sum`, `average`, and `count`. To use these functions, the **Compute keys**
configuration parameter expects a JSON object with the following syntax:
```json theme={null}
{"newKey1":["count"],"newKey2":["average","KEY_TO_COMPUTE"],"newKey3":["sum","KEY_TO_COMPUTE"]}
```
The resulting computed metrics are formatted as a JSON object with the following
characteristics:
```json theme={null}
{
"selectKey": "value",
"newKey1": "countMetric",
"newKey2": "averageMetric",
"newKey3": "sumMetric",
}
```
* `"selectKey": "value"`: This key and value match the **Select keys**
parameter, and together represent the log groups for which metrics are computed.
If **Select keys** includes multiple keys, all keys and their corresponding values
are included.
* `countMetric`: The number of times that `"selectKey": "value"` occurred within
the specified time window.
* `averageMetric`: The mean value of *`KEY_TO_COMPUTE`* within the specified time
window and group.
* `sumMetric`: The sum of all *`KEY_TO_COMPUTE`* values within the specified time
window and group.
## Example
Using the aggregate records rule lets you retain information about the logs that
pass through your pipeline without needing to retain each individual log.
For example, given this sample JSON data:
```json theme={null}
{"name": "Sophia", "profession": "designer", "age": 29,"projects": 2}
{"name": "William", "profession": "programmer", "age": 45,"projects": 0}
{"name": "Mia", "profession": "chef", "age": 32,"projects": 5}
{"name": "Benjamin", "profession": "architect", "age": 51,"projects": 1}
{"name": "Ava", "profession": "designer", "age": 27,"projects": 1}
{"name": "Michael", "profession": "programmer", "age": 38,"projects": 3}
{"name": "Abigail", "profession": "designer", "age": 42,"projects": 0}
{"name": "Daniel", "profession": "architect", "age": 35,"projects": 4}
{"name": "Emma", "profession": "programmer", "age": 48,"projects": 1}
{"name": "Jacob", "profession": "chef", "age": 31,"projects": 2}
{"name": "Olivia", "profession": "designer", "age": 24,"projects": 2}
{"name": "Matthew", "profession": "chef", "age": 39,"projects": 0}
{"name": "Isabella", "profession": "programmer", "age": 28,"projects": 3}
{"name": "Ethan", "profession": "architect", "age": 46,"projects": 1}
{"name": "Avery", "profession": "designer", "age": 33,"projects": 1}
```
A processing rule with the **Time window** value `60`, the **Select keys** value
`["profession"]`, and the **Compute keys** value
`{"headcount":["count"],"averageAge":["average","age"],"totalProjects":["sum","projects"]}`
returns the following result:
```json theme={null}
{"headcount":5,"averageAge":31,"totalProjects":6,"profession":"designer"}
{"headcount":4,"averageAge":39.75,"totalProjects":7,"profession":"programmer"}
{"headcount":3,"averageAge":34,"totalProjects":7,"profession":"chef"}
{"headcount":3,"averageAge":44,"totalProjects":6,"profession":"architect"}
```
Because the original data set's `profession` key had four possible values, this
rule created four groups (`designer`, `programmer`, `chef`, and `architect`), and
then computed the following metrics for each group:
* `averageAge`: The mean `age` value of every person within that group.
* `headcount`: The number of people within that group.
* `totalProjects`: The combined number of projects completed by the people within
that group.
After computing these metrics, this rule deleted the original logs.
# Allow keys
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/allow-keys
Learn about the allow keys processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The allow keys [processing rule](/ingest/pipeline/processing-rules) preserves any keys
that match a specified regular expression, and then removes all other keys in
each record.
## Configuration parameters
Use the parameters in this section to configure the allow keys processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Regex** | `regex` | Required. The regular expression that determines which keys to preserve. | *none* |
| **Match case** checkbox | `matchCase` | Indicates whether the regular expression is case-sensitive. | Not selected |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Nested access pattern** | `nestedPath` | The key of the highest object level to evaluate. If specified, the allow keys rule ignores any keys not contained within the specified object. If unspecified, this rule evaluates all top-level keys, but no keys nested within top-level keys. You can also use [record accessor syntax](/ingest/pipeline/processing-rules#record-accessor-syntax) to reference keys nested within another nested object. | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the allow keys rule lets you pare down telemetry data by retaining only
the data you explicitly choose to keep.
### Flat example
For example, given this sample log data:
```json theme={null}
{"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"}
```
A processing rule with the **Regex** value `user` returns the following result:
```json theme={null}
{"user_id":3}
{"user_id":4}
{"user_id":1}
{"user_id":5}
{"user_id":1}
{"user_id":2}
{"user_id":3}
{"user_id":1}
{"user_id":2}
{"user_id":2}
{"user_id":1}
```
### Nested example
You can also use the allow keys rule to selectively retain information within a
nested object. For example, given this sample log data:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"vip":"no","id":3},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"vip":"yes","id":4},"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"vip":"no","id":1},"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"vip":"yes","id":5},"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"vip":"no","id":1},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"vip":"yes","id":2},"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"vip":"no","id":3},"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"vip":"no","id":1},"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"vip":"yes","id":2},"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"vip":"yes","id":2},"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"vip":"no","id":1},"page_id":50,"action":"view"}
```
A processing rule with the **Regex** value `vip` and the **Nested access pattern**
value `user` returns the following result:
```json theme={null}
{"page_id":30,"action":"purchase","timestamp":"2023-03-28T09:08:41.64283645Z","user":{"vip":"no"}}
{"page_id":10,"action":"purchase","timestamp":"2023-03-28T09:08:42.643343109Z","user":{"vip":"yes"}}
{"page_id":50,"action":"click","timestamp":"2023-03-28T09:08:48.643600498Z","user":{"vip":"no"}}
{"page_id":40,"action":"purchase","timestamp":"2023-03-28T09:08:50.643773688Z","user":{"vip":"yes"}}
{"page_id":30,"action":"purchase","timestamp":"2023-03-28T09:08:51.643932272Z","user":{"vip":"no"}}
{"page_id":40,"action":"click","timestamp":"2023-03-28T09:08:56.644080944Z","user":{"vip":"yes"}}
{"page_id":30,"action":"click","timestamp":"2023-03-28T09:09:03.64425954Z","user":{"vip":"no"}}
{"page_id":20,"action":"view","timestamp":"2023-03-28T09:09:03.644317046Z","user":{"vip":"no"}}
{"page_id":50,"action":"purchase","timestamp":"2023-03-28T09:09:10.64447719Z","user":{"vip":"yes"}}
{"page_id":10,"action":"view","timestamp":"2023-03-28T09:09:17.644810963Z","user":{"vip":"yes"}}
{"page_id":50,"action":"view","timestamp":"2023-03-28T09:09:20.644994805Z","user":{"vip":"no"}}
```
This rule retained the `vip` field within the `user` object and removed all other
fields within `user`. However, because the processing rule's scope was limited to
`user`, the rule didn't affect the `timestamp`, `page_id`, or `action` fields.
## Related rules
For a processing rule with the opposite effect, see
[block keys](/ingest/pipeline/processing-rules/block-keys).
# Allow records
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/allow-records
Learn about the allow records processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The allow records [processing rule](/ingest/pipeline/processing-rules) preserves any
records that contain a key whose value matches a specified regular expression, and
then removes all other records.
## Configuration parameters
Use the parameters in this section to configure the allow records processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Key** | `key` | Required. The key whose value to validate against. If this key isn't present in a given record, that record is removed. | `log` |
| **Regex** | `regex` | Required. The regular expression that determines which records to preserve. This expression is evaluated against the value of the specified key. | *none* |
| **Match case** checkbox | `matchCase` | Indicates whether the regular expression is case-sensitive. | Not selected |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the allow records rule lets you pare down telemetry data by retaining only
the records with key-value pairs that you explicitly choose to keep.
For example, given this sample log data:
```json theme={null}
{"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"}
```
A processing rule with the **Key** value `action` and the **Regex** value `purchase`
returns the following result:
```json theme={null}
{"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"}
```
This rule retained the records associated with user purchases and removed the records
associated with other actions, such as pageviews or clicks.
## Related rules
For a processing rule with the opposite effect, see
[block records](/ingest/pipeline/processing-rules/block-records).
# Block keys
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/block-keys
Learn about the block keys processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The block keys [processing rule](/ingest/pipeline/processing-rules) removes any keys
that match a specified regular expression, and then preserves all other keys in
each record.
## Configuration parameters
Use the parameters in this section to configure the block keys processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Regex** | `regex` | Required. The regular expression that determines which keys to remove. | *none* |
| **Match case** checkbox | `matchCase` | Indicates whether the regular expression is case-sensitive. | Not selected |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Nested access pattern** | `nestedPath` | The key of the highest object level to evaluate. If specified, the block keys rule ignores any keys not contained within the specified object. If unspecified, this rule evaluates all top-level keys, but no keys nested within top-level keys. You can also use [record accessor syntax](/ingest/pipeline/processing-rules#record-accessor-syntax) to reference keys nested within another nested object. | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the block keys rule lets you pare down telemetry data by eliminating data
you don't want to keep.
### Flat example
For example, given this sample log data:
```json theme={null}
{"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"}
```
A processing rule with the **Regex** value `page_id` returns the following result:
```json theme={null}
{"action":"purchase","user_id":3,"timestamp":"2023-03-28T09:08:41.64283645Z"}
{"action":"purchase","user_id":4,"timestamp":"2023-03-28T09:08:42.643343109Z"}
{"action":"click","user_id":1,"timestamp":"2023-03-28T09:08:48.643600498Z"}
{"action":"purchase","user_id":5,"timestamp":"2023-03-28T09:08:50.643773688Z"}
{"action":"purchase","user_id":1,"timestamp":"2023-03-28T09:08:51.643932272Z"}
{"action":"click","user_id":2,"timestamp":"2023-03-28T09:08:56.644080944Z"}
{"action":"click","user_id":3,"timestamp":"2023-03-28T09:09:03.64425954Z"}
{"action":"view","user_id":1,"timestamp":"2023-03-28T09:09:03.644317046Z"}
{"action":"purchase","user_id":2,"timestamp":"2023-03-28T09:09:10.64447719Z"}
{"action":"view","user_id":2,"timestamp":"2023-03-28T09:09:17.644810963Z"}
{"action":"view","user_id":1,"timestamp":"2023-03-28T09:09:20.644994805Z"}
```
This rule removed the `page_id` key from each log and retained all other keys.
### Nested example
You can also use the allow keys rule to selectively remove information within a
nested object. For example, given this sample log data:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"vip":"no","id":3},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"vip":"yes","id":4},"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"vip":"no","id":1},"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"vip":"yes","id":5},"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"vip":"no","id":1},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"vip":"yes","id":2},"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"vip":"no","id":3},"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"vip":"no","id":1},"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"vip":"yes","id":2},"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"vip":"yes","id":2},"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"vip":"no","id":1},"page_id":50,"action":"view"}
```
A processing rule with the **Regex** value `vip` and the **Nested access pattern**
value `user` returns the following result:
```json theme={null}
{"user":{"id":3},"action":"purchase","page_id":30,"timestamp":"2023-03-28T09:08:41.64283645Z"}
{"user":{"id":4},"action":"purchase","page_id":10,"timestamp":"2023-03-28T09:08:42.643343109Z"}
{"user":{"id":1},"action":"click","page_id":50,"timestamp":"2023-03-28T09:08:48.643600498Z"}
{"user":{"id":5},"action":"purchase","page_id":40,"timestamp":"2023-03-28T09:08:50.643773688Z"}
{"user":{"id":1},"action":"purchase","page_id":30,"timestamp":"2023-03-28T09:08:51.643932272Z"}
{"user":{"id":2},"action":"click","page_id":40,"timestamp":"2023-03-28T09:08:56.644080944Z"}
{"user":{"id":3},"action":"click","page_id":30,"timestamp":"2023-03-28T09:09:03.64425954Z"}
{"user":{"id":1},"action":"view","page_id":20,"timestamp":"2023-03-28T09:09:03.644317046Z"}
{"user":{"id":2},"action":"purchase","page_id":50,"timestamp":"2023-03-28T09:09:10.64447719Z"}
{"user":{"id":2},"action":"view","page_id":10,"timestamp":"2023-03-28T09:09:17.644810963Z"}
{"user":{"id":1},"action":"view","page_id":50,"timestamp":"2023-03-28T09:09:20.644994805Z"}
```
This rule removed the `vip` key within the `user` object and retained all other
keys within `user`. However, because the processing rule's scope was limited to
`user`, the rule didn't affect the `timestamp`, `page_id`, or `action` fields.
## Related rules
For a processing rule with the opposite effect, see
[allow keys](/ingest/pipeline/processing-rules/allow-keys).
# Block records
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/block-records
Learn about the block records processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The block records [processing rule](/ingest/pipeline/processing-rules) removes any
records that contain a key whose value matches a specified regular expression, and
then preserves all other records.
## Configuration parameters
Use the parameters in this section to configure the block records processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Key** | `key` | Required. The key whose value to validate against. If this key isn't present in a given record, that record is preserved. | `log` |
| **Regex** | `regex` | Required. The regular expression that determines which records to remove. This expression is evaluated against the value of the specified key. | *none* |
| **Match case** checkbox | `matchCase` | Indicates whether the regular expression is case-sensitive. | Not selected |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the block records rule lets you pare down telemetry data by eliminating
records with data you don't want to keep.
For example, given this sample log data:
```json theme={null}
{"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"}
```
A processing rule with the **Key** value `action` and the **Regex** value `purchase`
returns the following result:
```json theme={null}
{"user_id":1,"page_id":50,"action":"click","timestamp":"2023-03-28T09:08:48.643600498Z"}
{"user_id":2,"page_id":40,"action":"click","timestamp":"2023-03-28T09:08:56.644080944Z"}
{"user_id":3,"page_id":30,"action":"click","timestamp":"2023-03-28T09:09:03.64425954Z"}
{"user_id":1,"page_id":20,"action":"view","timestamp":"2023-03-28T09:09:03.644317046Z"}
{"user_id":2,"page_id":10,"action":"view","timestamp":"2023-03-28T09:09:17.644810963Z"}
{"user_id":1,"page_id":50,"action":"view","timestamp":"2023-03-28T09:09:20.644994805Z"}
```
This rule removed the records associated with user purchases and preserved the records
associated with other actions, such as pageviews or clicks.
## Related rules
For a processing rule with the opposite effect, see
[allow records](/ingest/pipeline/processing-rules/allow-records).
# Copy keys
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/copy-keys
Learn about the copy keys processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The copy keys [processing rule](/ingest/pipeline/processing-rules) copies the value of
a specified source key to the value of a specified destination key. This destination
can either be a new or existing key.
## Configuration parameters
Use the parameters in this section to configure the copy keys processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key whose value to copy. | *none* |
| **Destination key** | `dst` | Required. The key whose value is set to match the source key. If no matching key exists, this rule creates a new key and then set its value accordingly. | *none* |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Regex mode** checkbox | `regexMode` | Indicates whether the values of the source key and destination key are regular expressions. If selected, **Source key** is treated as a regular expression and **Destination key** is treated as a substitution pattern. | Not selected |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the block keys rule lets you copy the same value across multiple keys or
create a new key with the same value as an existing key.
For example, given the following sample website log data:
```json theme={null}
{"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"}
```
A processing rule with the **Source key** value `page_id` and the
**Destination key** value `product_id` returns the following result:
```json theme={null}
{"user_id":3,"product_id":30,"page_id":30,"action":"purchase","timestamp":"2023-03-28T09:08:41.64283645Z"}
{"user_id":4,"product_id":10,"page_id":10,"action":"purchase","timestamp":"2023-03-28T09:08:42.643343109Z"}
{"user_id":1,"product_id":50,"page_id":50,"action":"click","timestamp":"2023-03-28T09:08:48.643600498Z"}
{"user_id":5,"product_id":40,"page_id":40,"action":"purchase","timestamp":"2023-03-28T09:08:50.643773688Z"}
{"user_id":1,"product_id":30,"page_id":30,"action":"purchase","timestamp":"2023-03-28T09:08:51.643932272Z"}
{"user_id":2,"product_id":40,"page_id":40,"action":"click","timestamp":"2023-03-28T09:08:56.644080944Z"}
{"user_id":3,"product_id":30,"page_id":30,"action":"click","timestamp":"2023-03-28T09:09:03.64425954Z"}
{"user_id":1,"product_id":20,"page_id":20,"action":"view","timestamp":"2023-03-28T09:09:03.644317046Z"}
{"user_id":2,"product_id":50,"page_id":50,"action":"purchase","timestamp":"2023-03-28T09:09:10.64447719Z"}
{"user_id":2,"product_id":10,"page_id":10,"action":"view","timestamp":"2023-03-28T09:09:17.644810963Z"}
{"user_id":1,"product_id":50,"page_id":50,"action":"view","timestamp":"2023-03-28T09:09:20.644994805Z"}
```
This rule copied the value of each log's `page_id` key to the value of a new key
called `product_id`.
# Custom Lua
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/custom-lua
Learn about the custom Lua processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can use the custom Lua [processing rule](/ingest/pipeline/processing-rules) to
write your own Lua scripts for transforming telemetry data.
This rule uses [LuaJIT 5.1](https://www.lua.org/manual/5.1/manual.html#5) and runs
in protected mode to ensure that malformed Lua code doesn't harm pipelines.
## Configuration parameters
Use the parameters in this section to configure the custom Lua processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Script** | `script` | Required. Your custom Lua script. | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Best practices
To ensure that custom Lua scripts run efficiently within your pipelines, Cortex XCOR
recommends following these best practices:
* Test new scripts in the processing rules playground. Before adding a
custom Lua script to an active pipeline, try running the script in the
processing rules playground in the Palo Alto Networks Telemetry Pipeline UI. This lets you test
your script on sample input data, view the script's transformed output, and
catch syntax errors.
* Add `print` and `error` statements to your scripts. These statements help
you track the value of variables and see details about specific errors when
they occur.
* Use profiling. In the processing rules playground, you can toggle the
**Enable profiling** setting to view more information about a script's
transformed output, including how long it took for that script to run.
## Example scripts
The following examples show several possible types of Lua scripts you can incorporate into
your pipeline.
### Conditional statement
You can use conditional statements to transform data that meets certain criteria.
This example script looks for a key named `log`, and then determines whether
its value is `line`. If both of these conditions are true, the script sets
the value of `log` to `Y`.
```lua theme={null}
return function(tag, ts, record)
if record['log'] ~= nil and record['log'] == 'line' then
record['log'] = 'Y'
end
return 1, ts, record
end
```
### Reference to a secret
If your pipeline includes [secrets](/ingest/pipeline/v2/configure/secrets), you can reference
these secrets through Lua scripts. Because secrets are stored as environment variables
within a pipeline, this example accesses that environment variable, and then stores its
value in a new variable named `secret`.
Additionally, this script calls the `resolve` function only if the `secret` key
hasn't been defined before, which helps improve performance.
```lua theme={null}
function resolve(SECRET_)
local token = os.getenv(SECRET_)
if token == nil
then error(string.format("Could not resolve token"))
else
return token
end
end
local secret = nil
return function(tag, ts, record, code)
if secret == nil then
secret = resolve("SECRET_")
record.new_field = secret
else
record.new_field = secret
end
return code, ts, record
end
```
### Call to a third-party API
You can use Lua scripts to call a third-party HTTP API, and then use data from that
API to perform various actions.
This example imports the Lua JSON library to support the JSON response returned
by a specific API, then uses a separate function to call that API, and then
creates a new key to store the value of a successful API response.
```lua theme={null}
local json = require 'json'
local function try_curl(url, max_retries, timeout)
local retries = 0
while retries < max_retries do
local success, result = pcall(function()
local command = string.format('curl -s -L --max-time %d %s', timeout, url)
local proc = io.popen(command)
local output = proc:read('*a')
proc:close()
return output
end)
if success and result ~= "" then
return result
end
retries = retries + 1
if retries < max_retries then
os.execute("sleep 1") -- Wait for 1 second before retrying
end
end
return nil
end
return function(tag, ts, record, code)
if record.___dummyFlush__ then
return 1, ts, record
end
local url = 'https://gist.githubusercontent.com/agup006/7fbc70a9a821bb39977504afb9ec290e/raw/9ced93796b9eb5a8d0b0d69bdeed630d5c7f2744/test.json'
local max_retries = 3
local timeout = 10 -- seconds
local response = try_curl(url, max_retries, timeout)
if response then
local success, result = pcall(json.decode, response)
if success then
record.json = result
else
record.json = { message = "failed to parse JSON" }
end
else
record.json = { message = "failed to connect" }
end
return code, ts, record
end
```
### Reading a pipeline file
You can use pipeline files to store arbitrary data, including JSON, and use a
Lua script to access that data.
This example imports the Lua JSON library, then uploads a file called `schema`,
and then converts and returns the data stored in that file.
> [!NOTE]
>
> The processing rules playground can't access pipeline files. To test a Lua script
> that reads files, Palo Alto Networks Telemetry Pipeline recommends creating
> a small pipeline that uses mock
> data.
```lua theme={null}
local json = require 'json'
local file_path = "/config/schema"
local file = io.open(file_path, "r")
if not file then
error("Could not open file at " .. file_path)
end
local jsonschema_content = file:read("*all")
file:close()
local jsonschema = json.decode(jsonschema_content)
if not jsonschema then
error("Failed to parse JSON from file at " .. file_path)
end
return function(tag, ts, record, code)
if record.___dummyFlush__ then
return 1, ts, record
end
return code, ts, jsonschema
end
```
# Decode CSV
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/decode-csv
Learn about the decode CSV processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The decode CSV [processing rule](/ingest/pipeline/processing-rules) transforms log data
from CSV format to JSON. Depending on whether you specify header information, the
resulting JSON object includes either a set of key-value pairs or an array
that splits comma-separated values into individual strings. Additionally, the
resulting output always includes a string of the original CSV log data.
## Configuration parameters
Use the parameters in this section to configure the decode CSV processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key to store your original CSV log entry. Don't change this setting from its default value. | `log` |
| **Destination key** | `dst` | Required. The key to store your transformed JSON data. Don't change this setting from its default value. | `decoded_csv` |
| **Parse header** checkbox | `parseHeader` | Indicates whether the first entry in your CSV data contains headers. If selected, the decode CSV rule uses these headers as keys to store the values of subsequent rows of data. | Not selected |
| **Preset header** | `header` | A list of headers to use as keys for storing the values of each row's data. Use a comma to separate the names of your headers, but don't use spaces between each name. This list must contain the same number of headers as there are columns of data. For example, if your CSV logs contain seven columns of data, you must specify seven header names to use as keys. | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
> [!NOTE]
>
> If you enable both **Parse header** and **Preset header**, the **Parse header**
> setting takes precedence. For best results, enable one setting at a time rather
> than using both simultaneously.
## Examples
Using the decode CSV rule lets you turn CSV-stored log data into a more traditional
log format for storage and analysis.
### Without headers
If you don't specify header information, this rule transforms CSV data into an
array. For example, given this sample CSV data:
```text theme={null}
2023-03-28T09:08:41.64283645Z,3,30,purchase
2023-03-28T09:08:42.643343109Z,4,10,purchase
2023-03-28T09:08:48.643600498Z,1,50,click
2023-03-28T09:08:50.643773688Z,5,40,purchase
2023-03-28T09:08:51.643932272Z,1,30,purchase
2023-03-28T09:08:56.644080944Z,2,40,click
2023-03-28T09:09:03.64425954Z,3,30,click
2023-03-28T09:09:03.644317046Z,1,20,view
2023-03-28T09:09:10.64447719Z,2,50,purchase
2023-03-28T09:09:17.644810963Z,2,10,view
2023-03-28T09:09:20.644994805Z,1,50,view
```
A processing rule with the **Source key** value `log` and the **Destination key**
value `decoded_csv` returns the following result:
```json theme={null}
{"log":"2023-03-28T09:08:41.64283645Z,3,30,purchase","decoded_csv":["2023-03-28T09:08:41.64283645Z","3","30","purchase"]}
{"log":"2023-03-28T09:08:42.643343109Z,4,10,purchase","decoded_csv":["2023-03-28T09:08:42.643343109Z","4","10","purchase"]}
{"log":"2023-03-28T09:08:48.643600498Z,1,50,click","decoded_csv":["2023-03-28T09:08:48.643600498Z","1","50","click"]}
{"log":"2023-03-28T09:08:50.643773688Z,5,40,purchase","decoded_csv":["2023-03-28T09:08:50.643773688Z","5","40","purchase"]}
{"log":"2023-03-28T09:08:51.643932272Z,1,30,purchase","decoded_csv":["2023-03-28T09:08:51.643932272Z","1","30","purchase"]}
{"log":"2023-03-28T09:08:56.644080944Z,2,40,click","decoded_csv":["2023-03-28T09:08:56.644080944Z","2","40","click"]}
{"log":"2023-03-28T09:09:03.64425954Z,3,30,click","decoded_csv":["2023-03-28T09:09:03.64425954Z","3","30","click"]}
{"log":"2023-03-28T09:09:03.644317046Z,1,20,view","decoded_csv":["2023-03-28T09:09:03.644317046Z","1","20","view"]}
{"log":"2023-03-28T09:09:10.64447719Z,2,50,purchase","decoded_csv":["2023-03-28T09:09:10.64447719Z","2","50","purchase"]}
{"log":"2023-03-28T09:09:17.644810963Z,2,10,view","decoded_csv":["2023-03-28T09:09:17.644810963Z","2","10","view"]}
{"log":"2023-03-28T09:09:20.644994805Z,1,50,view","decoded_csv":["2023-03-28T09:09:20.644994805Z","1","50","view"]}
```
This rule copied each row of CSV data to the `log` key and used the comma-separated
row values to create the `decoded_csv` array.
### With preset headers
If you specify header information in the **Preset header** setting, CSV data
becomes a series of key-value pairs. For example, given this sample CSV data:
```text theme={null}
2023-03-28T09:08:41.64283645Z,3,30,purchase
2023-03-28T09:08:42.643343109Z,4,10,purchase
2023-03-28T09:08:48.643600498Z,1,50,click
2023-03-28T09:08:50.643773688Z,5,40,purchase
2023-03-28T09:08:51.643932272Z,1,30,purchase
2023-03-28T09:08:56.644080944Z,2,40,click
2023-03-28T09:09:03.64425954Z,3,30,click
2023-03-28T09:09:03.644317046Z,1,20,view
2023-03-28T09:09:10.64447719Z,2,50,purchase
2023-03-28T09:09:17.644810963Z,2,10,view
2023-03-28T09:09:20.644994805Z,1,50,view
```
A processing rule with the **Source key** value `log`, the **Destination key**
value `decoded_csv`, and the **Preset header** value `time,user,page,result`
returns the following result:
```json theme={null}
{"log":"2023-03-28T09:08:41.64283645Z,3,30,purchase","decoded_csv":{"result":"purchase","user":"3","time":"2023-03-28T09:08:41.64283645Z","page":"30"}}
{"log":"2023-03-28T09:08:42.643343109Z,4,10,purchase","decoded_csv":{"result":"purchase","user":"4","time":"2023-03-28T09:08:42.643343109Z","page":"10"}}
{"log":"2023-03-28T09:08:48.643600498Z,1,50,click","decoded_csv":{"result":"click","user":"1","time":"2023-03-28T09:08:48.643600498Z","page":"50"}}
{"log":"2023-03-28T09:08:50.643773688Z,5,40,purchase","decoded_csv":{"result":"purchase","user":"5","time":"2023-03-28T09:08:50.643773688Z","page":"40"}}
{"log":"2023-03-28T09:08:51.643932272Z,1,30,purchase","decoded_csv":{"result":"purchase","user":"1","time":"2023-03-28T09:08:51.643932272Z","page":"30"}}
{"log":"2023-03-28T09:08:56.644080944Z,2,40,click","decoded_csv":{"result":"click","user":"2","time":"2023-03-28T09:08:56.644080944Z","page":"40"}}
{"log":"2023-03-28T09:09:03.64425954Z,3,30,click","decoded_csv":{"result":"click","user":"3","time":"2023-03-28T09:09:03.64425954Z","page":"30"}}
{"log":"2023-03-28T09:09:03.644317046Z,1,20,view","decoded_csv":{"result":"view","user":"1","time":"2023-03-28T09:09:03.644317046Z","page":"20"}}
{"log":"2023-03-28T09:09:10.64447719Z,2,50,purchase","decoded_csv":{"result":"purchase","user":"2","time":"2023-03-28T09:09:10.64447719Z","page":"50"}}
{"log":"2023-03-28T09:09:17.644810963Z,2,10,view","decoded_csv":{"result":"view","user":"2","time":"2023-03-28T09:09:17.644810963Z","page":"10"}}
{"log":"2023-03-28T09:09:20.644994805Z,1,50,view","decoded_csv":{"result":"view","user":"1","time":"2023-03-28T09:09:20.644994805Z","page":"50"}}
```
This rule copied each row of CSV data to the `log` key and assigned each row's
comma-separated values to a series of key-value pairs in `decoded_csv`.
### With parsed headers
If you enable the **Parse header** setting, CSV data becomes a series of key-value
pairs with keys based on the parsed header row. For example, given this sample
CSV data:
```text theme={null}
timestamp,user_id,page_id,action
2023-03-28T09:08:41.64283645Z,3,30,purchase
2023-03-28T09:08:42.643343109Z,4,10,purchase
2023-03-28T09:08:48.643600498Z,1,50,click
2023-03-28T09:08:50.643773688Z,5,40,purchase
2023-03-28T09:08:51.643932272Z,1,30,purchase
2023-03-28T09:08:56.644080944Z,2,40,click
2023-03-28T09:09:03.64425954Z,3,30,click
2023-03-28T09:09:03.644317046Z,1,20,view
2023-03-28T09:09:10.64447719Z,2,50,purchase
2023-03-28T09:09:17.644810963Z,2,10,view
2023-03-28T09:09:20.644994805Z,1,50,view
```
A processing rule with the **Source key** value `log`, the **Destination key**
value `decoded_csv`, and the **Parse header** value enabled returns the
following result:
```json theme={null}
{"log":"2023-03-28T09:08:41.64283645Z,3,30,purchase","decoded_csv":{"timestamp":"2023-03-28T09:08:41.64283645Z","user_id":"3","action":"purchase","page_id":"30"}}
{"log":"2023-03-28T09:08:42.643343109Z,4,10,purchase","decoded_csv":{"timestamp":"2023-03-28T09:08:42.643343109Z","user_id":"4","action":"purchase","page_id":"10"}}
{"log":"2023-03-28T09:08:48.643600498Z,1,50,click","decoded_csv":{"timestamp":"2023-03-28T09:08:48.643600498Z","user_id":"1","action":"click","page_id":"50"}}
{"log":"2023-03-28T09:08:50.643773688Z,5,40,purchase","decoded_csv":{"timestamp":"2023-03-28T09:08:50.643773688Z","user_id":"5","action":"purchase","page_id":"40"}}
{"log":"2023-03-28T09:08:51.643932272Z,1,30,purchase","decoded_csv":{"timestamp":"2023-03-28T09:08:51.643932272Z","user_id":"1","action":"purchase","page_id":"30"}}
{"log":"2023-03-28T09:08:56.644080944Z,2,40,click","decoded_csv":{"timestamp":"2023-03-28T09:08:56.644080944Z","user_id":"2","action":"click","page_id":"40"}}
{"log":"2023-03-28T09:09:03.64425954Z,3,30,click","decoded_csv":{"timestamp":"2023-03-28T09:09:03.64425954Z","user_id":"3","action":"click","page_id":"30"}}
{"log":"2023-03-28T09:09:03.644317046Z,1,20,view","decoded_csv":{"timestamp":"2023-03-28T09:09:03.644317046Z","user_id":"1","action":"view","page_id":"20"}}
{"log":"2023-03-28T09:09:10.64447719Z,2,50,purchase","decoded_csv":{"timestamp":"2023-03-28T09:09:10.64447719Z","user_id":"2","action":"purchase","page_id":"50"}}
{"log":"2023-03-28T09:09:17.644810963Z,2,10,view","decoded_csv":{"timestamp":"2023-03-28T09:09:17.644810963Z","user_id":"2","action":"view","page_id":"10"}}
{"log":"2023-03-28T09:09:20.644994805Z,1,50,view","decoded_csv":{"timestamp":"2023-03-28T09:09:20.644994805Z","user_id":"1","action":"view","page_id":"50"}}
```
This rule treated the first row of CSV data as a set of headers, then created a
series of key-value pairs from subsequent rows by using header names as keys.
This rule also copied each row of CSV data to the `log` key, except for the row
that contained header names.
## Related rules
For a processing rule with the opposite effect, see
[encode CSV](/ingest/pipeline/processing-rules/encode-csv).
# Decode JSON
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/decode-json
Learn about the decode JSON processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The decode JSON [processing rule](/ingest/pipeline/processing-rules) transforms an
escaped JSON string into a structured JSON object. The resulting output includes both
the original string and a new JSON object assigned to the key of your choosing.
## Configuration parameters
Use the parameters in this section to configure the decode JSON processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key that contains the escaped JSON string to transform. | `log` |
| **Destination key** | `dst` | Required. The key to store your transformed JSON object. If a key with this name already exists, the decode JSON rule will overwrite it. | `decoded_json` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the decode JSON rule lets you extract embedded data from a string and turn
it into parsable key-value pairs. You can then use these key-value pairs in other
processing rules or for general storage and analysis.
For example, given the following sample website log data:
```json theme={null}
{"log": "{\"timestamp\":\"2023-03-28T09:08:41.64283645Z\",\"user_id\":3,\"page_id\":30,\"action\":\"purchase\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:08:42.643343109Z\",\"user_id\":4,\"page_id\":10,\"action\":\"purchase\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:08:48.643600498Z\",\"user_id\":1,\"page_id\":50,\"action\":\"click\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:08:50.643773688Z\",\"user_id\":5,\"page_id\":40,\"action\":\"purchase\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:08:51.643932272Z\",\"user_id\":1,\"page_id\":30,\"action\":\"purchase\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:08:56.644080944Z\",\"user_id\":2,\"page_id\":40,\"action\":\"click\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:09:03.64425954Z\",\"user_id\":3,\"page_id\":30,\"action\":\"click\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:09:03.644317046Z\",\"user_id\":1,\"page_id\":20,\"action\":\"view\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:09:10.64447719Z\",\"user_id\":2,\"page_id\":50,\"action\":\"purchase\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:09:17.644810963Z\",\"user_id\":2,\"page_id\":10,\"action\":\"view\"}\n"}
{"log": "{\"timestamp\":\"2023-03-28T09:09:20.644994805Z\",\"user_id\":1,\"page_id\":50,\"action\":\"view\"}\n"}
```
A processing rule with the **Source key** value `log` and the **Destination key**
value `output` returns the following result:
```json theme={null}
{"output":{"page_id":30,"action":"purchase","timestamp":"2023-03-28T09:08:41.64283645Z","user_id":3},"log":"{\"timestamp\":\"2023-03-28T09:08:41.64283645Z\",\"user_id\":3,\"page_id\":30,\"action\":\"purchase\"}\n"}
{"output":{"page_id":10,"action":"purchase","timestamp":"2023-03-28T09:08:42.643343109Z","user_id":4},"log":"{\"timestamp\":\"2023-03-28T09:08:42.643343109Z\",\"user_id\":4,\"page_id\":10,\"action\":\"purchase\"}\n"}
{"output":{"page_id":50,"action":"click","timestamp":"2023-03-28T09:08:48.643600498Z","user_id":1},"log":"{\"timestamp\":\"2023-03-28T09:08:48.643600498Z\",\"user_id\":1,\"page_id\":50,\"action\":\"click\"}\n"}
{"output":{"page_id":40,"action":"purchase","timestamp":"2023-03-28T09:08:50.643773688Z","user_id":5},"log":"{\"timestamp\":\"2023-03-28T09:08:50.643773688Z\",\"user_id\":5,\"page_id\":40,\"action\":\"purchase\"}\n"}
{"output":{"page_id":30,"action":"purchase","timestamp":"2023-03-28T09:08:51.643932272Z","user_id":1},"log":"{\"timestamp\":\"2023-03-28T09:08:51.643932272Z\",\"user_id\":1,\"page_id\":30,\"action\":\"purchase\"}\n"}
{"output":{"page_id":40,"action":"click","timestamp":"2023-03-28T09:08:56.644080944Z","user_id":2},"log":"{\"timestamp\":\"2023-03-28T09:08:56.644080944Z\",\"user_id\":2,\"page_id\":40,\"action\":\"click\"}\n"}
{"output":{"page_id":30,"action":"click","timestamp":"2023-03-28T09:09:03.64425954Z","user_id":3},"log":"{\"timestamp\":\"2023-03-28T09:09:03.64425954Z\",\"user_id\":3,\"page_id\":30,\"action\":\"click\"}\n"}
{"output":{"page_id":20,"action":"view","timestamp":"2023-03-28T09:09:03.644317046Z","user_id":1},"log":"{\"timestamp\":\"2023-03-28T09:09:03.644317046Z\",\"user_id\":1,\"page_id\":20,\"action\":\"view\"}\n"}
{"output":{"page_id":50,"action":"purchase","timestamp":"2023-03-28T09:09:10.64447719Z","user_id":2},"log":"{\"timestamp\":\"2023-03-28T09:09:10.64447719Z\",\"user_id\":2,\"page_id\":50,\"action\":\"purchase\"}\n"}
{"output":{"page_id":10,"action":"view","timestamp":"2023-03-28T09:09:17.644810963Z","user_id":2},"log":"{\"timestamp\":\"2023-03-28T09:09:17.644810963Z\",\"user_id\":2,\"page_id\":10,\"action\":\"view\"}\n"}
{"output":{"page_id":50,"action":"view","timestamp":"2023-03-28T09:09:20.644994805Z","user_id":1},"log":"{\"timestamp\":\"2023-03-28T09:09:20.644994805Z\",\"user_id\":1,\"page_id\":50,\"action\":\"view\"}\n"}
```
This rule retained the original `log` string and created a new JSON object
called `output` that contains a structured version of the same key-value pairs
that are embedded in `log`.
## Related rules
For a processing rule with the opposite effect, see
[encode JSON](/ingest/pipeline/processing-rules/encode-json).
For a processing rule with a similar effect that works for any string, see
[extract keys/values](/ingest/pipeline/processing-rules/extract-keys-values).
# Deduplicate records
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/deduplicate-records
Learn about the deduplicate records processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The deduplicate records [processing rule](/ingest/pipeline/processing-rules) looks for
any records that contain identical key-value data during a specified time frame, then
removes all but the first occurrence of those records within that time frame.
> [!WARNING]
>
> When the deduplicate records rule waits for data to accumulate during the
> specified time window, the pipeline [buffers](/ingest/pipeline/v2/configure/backpressure)
> that data. Increasing the value of the **Time window** parameter also increases
> the memory load on your pipeline. For example, if 100,000 records pass through
> your pipeline during the specified time period, and those records are 1 kB
> each, the deduplicate records rule will add approximately 100 MB of memory
> load.
## Configuration parameters
Use the parameters in this section to configure the deduplicate records processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Time window** | `window` | Required. How long to wait (in seconds) for data to accumulate in your pipeline before searching for duplicate records. For example, for a window length of `5`, two records with an identical key-value pair are considered duplicates if they both occur within the same five-second period, but not if they occur within the same 10-second period. | *none* |
| **Select key** | `key` | Required. The key to use in your comparison. If multiple records have the same value assigned to this key, this rule removes all but the earliest record to contain that key-value pair within the specified time frame. You can also use [record accessor syntax](/ingest/pipeline/processing-rules#record-accessor-syntax) to reference keys nested within another nested object. | *none* |
| **Ignore records without key** checkbox | `skipMissing` | If selected, skips any records that don't contain your specified **Select key**. Palo Alto Networks Telemetry Pipeline recommends selecting this checkbox to prevent processing errors. | Selected / `true` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the deduplicate records rule lets you remove redundant information from
your pipeline and reduce the amount of data that reaches your backend.
For example, given the following sample log data:
```json lines theme={null}
{"message": "All endpoints are functional."}
{"message": "All endpoints are functional."}
{"message": "All endpoints are functional."}
{"message": "All endpoints are functional."}
{"message": "The /purchase endpoint is unavailable."}
{"message": "The /purchase endpoint is unavailable."}
{"message": "The /purchase endpoint is unavailable."}
{"message": "The /purchase endpoint is partly unavailable."}
{"message": "The /purchase endpoint has been reset."}
{"message": "All endpoints are functional."}
{"message": "All endpoints are functional."}
```
A processing rule with the **Time window** value `5` and the **Source key** value
`message` returns the following result:
```json theme={null}
{"message":"All endpoints are functional."}
{"message":"The /purchase endpoint is unavailable."}
{"message":"The /purchase endpoint is partly unavailable."}
{"message":"The /purchase endpoint has been reset."}
{"message":"All endpoints are functional."}
```
This rule removed all but the first instance of any logs with identical
`message` values that appeared within the specified time frame. Because more
than five seconds elapsed between the value `All endpoints are functional` on
line 1 and the same value on line 10, this rule retained both the log on line 1
and the log on line 10. However, since fewer than five seconds elapsed between
the value `All endpoints are functional` on line 10 and the same value on line 11,
this rule removed the log on line 11.
# Delete key
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/delete-key
Learn about the delete key processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The delete keys [processing rule](/ingest/pipeline/processing-rules) deletes a
specified key and its associated value from every record that passes through your
pipeline.
## Configuration parameters
Use the parameters in this section to configure the delete key processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Key** | `key` | Required. The key to delete from your records. You can use [record accessor syntax](/ingest/pipeline/processing-rules#record-accessor-syntax) to reference keys nested within another object. | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the block keys rule lets you pare down telemetry data by eliminating
key-value pairs you don't want to keep.
For example, given the following sample website log data:
```json theme={null}
{"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"}
```
A processing rule with the **Key** value `user_id` returns the following result:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","action":"purchase","page_id":30}
{"timestamp":"2023-03-28T09:08:42.643343109Z","action":"purchase","page_id":10}
{"timestamp":"2023-03-28T09:08:48.643600498Z","action":"click","page_id":50}
{"timestamp":"2023-03-28T09:08:50.643773688Z","action":"purchase","page_id":40}
{"timestamp":"2023-03-28T09:08:51.643932272Z","action":"purchase","page_id":30}
{"timestamp":"2023-03-28T09:08:56.644080944Z","action":"click","page_id":40}
{"timestamp":"2023-03-28T09:09:03.64425954Z","action":"click","page_id":30}
{"timestamp":"2023-03-28T09:09:03.644317046Z","action":"view","page_id":20}
{"timestamp":"2023-03-28T09:09:10.64447719Z","action":"purchase","page_id":50}
{"timestamp":"2023-03-28T09:09:17.644810963Z","action":"view","page_id":10}
{"timestamp":"2023-03-28T09:09:20.644994805Z","action":"view","page_id":50}
```
This rule removed the `user_id` key and its associated values from each log entry.
# Encode CSV
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/encode-csv
Learn about the encode CSV processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The encode CSV [processing rule](/ingest/pipeline/processing-rules) transforms log data
from JSON to CSV format. The resulting output includes both the original JSON data
and a string of comma-separated values assigned to a key you specify.
## Configuration parameters
Use the parameters in this section to configure the encode CSV processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key of the JSON data to transform. This JSON data must be either an array of strings or an object that contains key-value pairs. | *none* |
| **Destination key** | `dst` | Required. The key to store your string of comma-separated values. If a key with this name already exists, the encode CSV rule will overwrite it. | `encoded_csv` |
| **Header** | `header` | The header row for your comma-separated values. If **Source key** is a JSON object that contains key-value pairs, set this value to a list of the names of each key. Items in this list must be separated by commas and should match the name and order that the keys appear within their original JSON object. | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the encode CSV rule lets you turn JSON data into comma-separated values that
can be fed into databases and spreadsheet software.
### Array of strings
If your JSON data is an array of strings, don't use the **Header** parameter.
For example, given this sample JSON data:
```json theme={null}
{"ingredients":["pasta","tomato","basil","olive oil","parmesan"]}
{"ingredients":["potatoes","butter","salt","chives","sour cream","bacon bits","shredded cheese"]}
{"ingredients":["cereal","milk"]}
{"ingredients":["bread","mayo","mustard","lettuce","tomato","deli meat","pickle"]}
```
A processing rule with the **Source key** value `ingredients` and the **Destination key**
value `encoded_csv` returns the following result:
```json theme={null}
{"encoded_csv":"pasta,tomato,basil,olive oil,parmesan\n","ingredients":["pasta","tomato","basil","olive oil","parmesan"]}
{"encoded_csv":"potatoes,butter,salt,chives,sour cream,bacon bits,shredded cheese\n","ingredients":["potatoes","butter","salt","chives","sour cream","bacon bits","shredded cheese"]}
{"encoded_csv":"cereal,milk\n","ingredients":["cereal","milk"]}
{"encoded_csv":"bread,mayo,mustard,lettuce,tomato,deli meat,pickle\n","ingredients":["bread","mayo","mustard","lettuce","tomato","deli meat","pickle"]}
```
This rule retained the original `ingredients` array and created a new key called
`encoded_csv` to store the converted comma-separated values.
### Key-value pairs
If your JSON data is an object that contains key-value pairs, you must use the
**Header** parameter. For example, given this sample website log data:
```json theme={null}
{"log":{"timestamp":"2023-03-28T09:08:41.64283645Z","user_id":"3","action":"purchase","page_id":"30"}}
{"log":{"timestamp":"2023-03-28T09:08:42.643343109Z","user_id":"4","action":"purchase","page_id":"10"}}
{"log":{"timestamp":"2023-03-28T09:08:48.643600498Z","user_id":"1","action":"click","page_id":"50"}}
{"log":{"timestamp":"2023-03-28T09:08:50.643773688Z","user_id":"5","action":"purchase","page_id":"40"}}
{"log":{"timestamp":"2023-03-28T09:08:51.643932272Z","user_id":"1","action":"purchase","page_id":"30"}}
{"log":{"timestamp":"2023-03-28T09:08:56.644080944Z","user_id":"2","action":"click","page_id":"40"}}
{"log":{"timestamp":"2023-03-28T09:09:03.64425954Z","user_id":"3","action":"click","page_id":"30"}}
{"log":{"timestamp":"2023-03-28T09:09:03.644317046Z","user_id":"1","action":"view","page_id":"20"}}
{"log":{"timestamp":"2023-03-28T09:09:10.64447719Z","user_id":"2","action":"purchase","page_id":"50"}}
{"log":{"timestamp":"2023-03-28T09:09:17.644810963Z","user_id":"2","action":"view","page_id":"10"}}
{"log":{"timestamp":"2023-03-28T09:09:20.644994805Z","user_id":"1","action":"view","page_id":"50"}}
```
A processing rule with the **Source key** value `log`, the **Destination key**
value `encoded_csv`, and the **Header** value `timestamp,user_id,action,page_id`
returns the following result:
```json theme={null}
{"log":{"page_id":"30","action":"purchase","timestamp":"2023-03-28T09:08:41.64283645Z","user_id":"3"},"encoded_csv":"timestamp,user_id,action,page_id\n2023-03-28T09:08:41.64283645Z,3,purchase,30\n"}
{"log":{"page_id":"10","action":"purchase","timestamp":"2023-03-28T09:08:42.643343109Z","user_id":"4"},"encoded_csv":"2023-03-28T09:08:42.643343109Z,4,purchase,10\n"}
{"log":{"page_id":"50","action":"click","timestamp":"2023-03-28T09:08:48.643600498Z","user_id":"1"},"encoded_csv":"2023-03-28T09:08:48.643600498Z,1,click,50\n"}
{"log":{"page_id":"40","action":"purchase","timestamp":"2023-03-28T09:08:50.643773688Z","user_id":"5"},"encoded_csv":"2023-03-28T09:08:50.643773688Z,5,purchase,40\n"}
{"log":{"page_id":"30","action":"purchase","timestamp":"2023-03-28T09:08:51.643932272Z","user_id":"1"},"encoded_csv":"2023-03-28T09:08:51.643932272Z,1,purchase,30\n"}
{"log":{"page_id":"40","action":"click","timestamp":"2023-03-28T09:08:56.644080944Z","user_id":"2"},"encoded_csv":"2023-03-28T09:08:56.644080944Z,2,click,40\n"}
{"log":{"page_id":"30","action":"click","timestamp":"2023-03-28T09:09:03.64425954Z","user_id":"3"},"encoded_csv":"2023-03-28T09:09:03.64425954Z,3,click,30\n"}
{"log":{"page_id":"20","action":"view","timestamp":"2023-03-28T09:09:03.644317046Z","user_id":"1"},"encoded_csv":"2023-03-28T09:09:03.644317046Z,1,view,20\n"}
{"log":{"page_id":"50","action":"purchase","timestamp":"2023-03-28T09:09:10.64447719Z","user_id":"2"},"encoded_csv":"2023-03-28T09:09:10.64447719Z,2,purchase,50\n"}
{"log":{"page_id":"10","action":"view","timestamp":"2023-03-28T09:09:17.644810963Z","user_id":"2"},"encoded_csv":"2023-03-28T09:09:17.644810963Z,2,view,10\n"}
{"log":{"page_id":"50","action":"view","timestamp":"2023-03-28T09:09:20.644994805Z","user_id":"1"},"encoded_csv":"2023-03-28T09:09:20.644994805Z,1,view,50\n"}
```
This rule retained the original `log` object and created a new key called `encoded_csv`
to store the converted comma-separated values. Additionally, the first instance
of `encoded_csv` contains a header row, which is also separated by commas.
## Related rules
For a processing rule with the opposite effect, see
[decode CSV](/ingest/pipeline/processing-rules/decode-csv).
# Encode JSON
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/encode-json
Learn about the encode JSON processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The encode JSON [processing rule](/ingest/pipeline/processing-rules) transforms a JSON
object into an escaped string. The resulting output includes both the original JSON
object and a new string assigned to a key you specify.
## Configuration parameters
Use the parameters in this section to configure the encode JSON processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key that contains the JSON object to transform. | *none* |
| **Destination key** | `dst` | Required. The key to store your escaped JSON string. If a key with this name already exists, the encode JSON rule will overwrite it. | `encoded_json` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the encode JSON rule lets you condense a structured object into a single,
condensed value.
For example, given the following sample website log data:
```json theme={null}
{"event":{"timestamp":"2023-03-28T09:08:41.64283645Z","page_id":30,"user_id":3,"action":"purchase"}}
{"event":{"timestamp":"2023-03-28T09:08:42.643343109Z","page_id":10,"user_id":4,"action":"purchase"}}
{"event":{"timestamp":"2023-03-28T09:08:48.643600498Z","page_id":50,"user_id":1,"action":"click"}}
{"event":{"timestamp":"2023-03-28T09:08:50.643773688Z","page_id":40,"user_id":5,"action":"purchase"}}
{"event":{"timestamp":"2023-03-28T09:08:51.643932272Z","page_id":30,"user_id":1,"action":"purchase"}}
{"event":{"timestamp":"2023-03-28T09:08:56.644080944Z","page_id":40,"user_id":2,"action":"click"}}
{"event":{"timestamp":"2023-03-28T09:09:03.64425954Z","page_id":30,"user_id":3,"action":"click"}}
{"event":{"timestamp":"2023-03-28T09:09:03.644317046Z","page_id":20,"user_id":1,"action":"view"}}
{"event":{"timestamp":"2023-03-28T09:09:10.64447719Z","page_id":50,"user_id":2,"action":"purchase"}}
{"event":{"timestamp":"2023-03-28T09:09:17.644810963Z","page_id":10,"user_id":2,"action":"view"}}
{"event":{"timestamp":"2023-03-28T09:09:20.644994805Z","page_id":50,"user_id":1,"action":"view"}}
```
A processing rule with the **Source key** value `event` and the **Destination key**
value `stored_string` returns the following result:
```json theme={null}
{"stored_string":"{\"action\":\"purchase\",\"page_id\":30,\"timestamp\":\"2023-03-28T09:08:41.64283645Z\",\"user_id\":3}","event":{"page_id":30,"user_id":3,"action":"purchase","timestamp":"2023-03-28T09:08:41.64283645Z"}}
{"stored_string":"{\"action\":\"purchase\",\"page_id\":10,\"timestamp\":\"2023-03-28T09:08:42.643343109Z\",\"user_id\":4}","event":{"page_id":10,"user_id":4,"action":"purchase","timestamp":"2023-03-28T09:08:42.643343109Z"}}
{"stored_string":"{\"action\":\"click\",\"page_id\":50,\"timestamp\":\"2023-03-28T09:08:48.643600498Z\",\"user_id\":1}","event":{"page_id":50,"user_id":1,"action":"click","timestamp":"2023-03-28T09:08:48.643600498Z"}}
{"stored_string":"{\"action\":\"purchase\",\"page_id\":40,\"timestamp\":\"2023-03-28T09:08:50.643773688Z\",\"user_id\":5}","event":{"page_id":40,"user_id":5,"action":"purchase","timestamp":"2023-03-28T09:08:50.643773688Z"}}
{"stored_string":"{\"action\":\"purchase\",\"page_id\":30,\"timestamp\":\"2023-03-28T09:08:51.643932272Z\",\"user_id\":1}","event":{"page_id":30,"user_id":1,"action":"purchase","timestamp":"2023-03-28T09:08:51.643932272Z"}}
{"stored_string":"{\"action\":\"click\",\"page_id\":40,\"timestamp\":\"2023-03-28T09:08:56.644080944Z\",\"user_id\":2}","event":{"page_id":40,"user_id":2,"action":"click","timestamp":"2023-03-28T09:08:56.644080944Z"}}
{"stored_string":"{\"action\":\"click\",\"page_id\":30,\"timestamp\":\"2023-03-28T09:09:03.64425954Z\",\"user_id\":3}","event":{"page_id":30,"user_id":3,"action":"click","timestamp":"2023-03-28T09:09:03.64425954Z"}}
{"stored_string":"{\"action\":\"view\",\"page_id\":20,\"timestamp\":\"2023-03-28T09:09:03.644317046Z\",\"user_id\":1}","event":{"page_id":20,"user_id":1,"action":"view","timestamp":"2023-03-28T09:09:03.644317046Z"}}
{"stored_string":"{\"action\":\"purchase\",\"page_id\":50,\"timestamp\":\"2023-03-28T09:09:10.64447719Z\",\"user_id\":2}","event":{"page_id":50,"user_id":2,"action":"purchase","timestamp":"2023-03-28T09:09:10.64447719Z"}}
{"stored_string":"{\"action\":\"view\",\"page_id\":10,\"timestamp\":\"2023-03-28T09:09:17.644810963Z\",\"user_id\":2}","event":{"page_id":10,"user_id":2,"action":"view","timestamp":"2023-03-28T09:09:17.644810963Z"}}
{"stored_string":"{\"action\":\"view\",\"page_id\":50,\"timestamp\":\"2023-03-28T09:09:20.644994805Z\",\"user_id\":1}","event":{"page_id":50,"user_id":1,"action":"view","timestamp":"2023-03-28T09:09:20.644994805Z"}}
```
This rule retained the original `event` object and created a new key called
`stored_string` to store the same key-value pairs as an embedded string.
## Related rules
For a processing rule with the opposite effect, see
[decode JSON](/ingest/pipeline/processing-rules/decode-json).
# Extract keys/values
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/extract-keys-values
Learn about the extract keys/values processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The extract keys/values [processing rule](/ingest/pipeline/processing-rules) uses a
regular expression to search for key-value pairs inside a string, then creates a
structured object to store those key-value pairs. Additionally, the resulting
output always includes a string of the original unstructured data.
The resulting output includes both the original JSON data
and a string of comma-separated values assigned to a key you specify.
## Configuration parameters
Use the parameters in this section to configure the extract keys/values processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key whose value contains key-value pairs to extract. | *none* |
| **Destination key** | `dst` | Required. The key of the object to store your structured key-value pairs. If you specify the name of an existing key, the original value of the key is overwritten. | *none* |
| **Regex** | `regex` | Required. The regular expression for extracting key-value pairs from the value of **Source key**. This expression must have two capture groups: the result of the first capture group becomes the name of a key, and the result of the second capture group becomes that key's value. | *none* |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the extract keys/values rule lets you extract embedded data from a string and turn
it into parsable key-value pairs. You can then use these key-value pairs in other
processing rules or for general storage and analysis.
For example, given the following sample website log data:
```json theme={null}
{"log": "user_id:3,page_id:30,action:purchase"}
{"log": "user_id:4,page_id:10,action:purchase"}
{"log": "user_id:1,page_id:50,action:click"}
{"log": "user_id:5,page_id:40,action:purchase"}
{"log": "user_id:1,page_id:30,action:purchase"}
{"log": "user_id:2,page_id:40,action:click"}
{"log": "user_id:3,page_id:30,action:click"}
{"log": "user_id:1,page_id:20,action:view"}
{"log": "user_id:2,page_id:50,action:purchase"}
{"log": "user_id:2,page_id:10,action:view"}
{"log": "user_id:1,page_id:50,action:view"}
```
A processing rule with the **Source key** value `log`, the **Destination key**
value `extracted`, the **Regex** value `(\w+):(\w+)`, and the **Regex
engine** value `PCRE2` returns the following result:
```json theme={null}
{"extracted":{"action":"purchase","user_id":"3","page_id":"30"},"log":"user_id:3,page_id:30,action:purchase"}
{"extracted":{"action":"purchase","user_id":"4","page_id":"10"},"log":"user_id:4,page_id:10,action:purchase"}
{"extracted":{"action":"click","user_id":"1","page_id":"50"},"log":"user_id:1,page_id:50,action:click"}
{"extracted":{"action":"purchase","user_id":"5","page_id":"40"},"log":"user_id:5,page_id:40,action:purchase"}
{"extracted":{"action":"purchase","user_id":"1","page_id":"30"},"log":"user_id:1,page_id:30,action:purchase"}
{"extracted":{"action":"click","user_id":"2","page_id":"40"},"log":"user_id:2,page_id:40,action:click"}
{"extracted":{"action":"click","user_id":"3","page_id":"30"},"log":"user_id:3,page_id:30,action:click"}
{"extracted":{"action":"view","user_id":"1","page_id":"20"},"log":"user_id:1,page_id:20,action:view"}
{"extracted":{"action":"purchase","user_id":"2","page_id":"50"},"log":"user_id:2,page_id:50,action:purchase"}
{"extracted":{"action":"view","user_id":"2","page_id":"10"},"log":"user_id:2,page_id:10,action:view"}
{"extracted":{"action":"view","user_id":"1","page_id":"50"},"log":"user_id:1,page_id:50,action:view"}
```
This rule extracted key-value pairs from the string stored in the `log` key and
stored those key-value pairs in a new structured object named `extracted`.
## Related rules
For a processing rule that performs a similar operation on escaped JSON strings,
see [decode JSON](/ingest/pipeline/processing-rules/decode-json). For a processing
rule that performs a similar operation on data not already formatted as key-value
pairs, see [parse](/ingest/pipeline/processing-rules/parse).
# Flatten subrecord
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/flatten-subrecord
Learn about the flatten subrecord processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The flatten subrecord [processing rule](/ingest/pipeline/processing-rules) uses regular
expressions to search for key-value pairs inside a JSON object, then either moves or
copies any applicable key-value pairs to the top level of the record.
## Configuration parameters
Use the parameters in this section to configure the flatten subrecord processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Key** | `key` | Required. The key of the object that contains key-value pairs to move or copy. You can also use [record accessor syntax](/ingest/pipeline/processing-rules#record-accessor-syntax) to reference keys nested in another nested object. | *none* |
| **Regex** | `regex` | Required. The regular expression that determines which key-value pairs to move or copy. A value of `^.+$` matches all key-value pairs contained by the specified object. | `^.+$` |
| **Replacement key** | `keyReplacement` | Required. The regular expression that sets the naming pattern for keys that are moved or copied. A value of `%1` preserves all keys' original names. | `%1` |
| **Keep original** checkbox | `keepOrig` | If selected, preserves the object specified in **Key**. If unselected, the flatten subrecord rule moves any applicable key-value pairs to the top level of the record, and then removes the object specified in **Key**. | Not selected |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the flatten subrecord rule lets you restructure your telemetry data by
pulling key-value pairs out of a nested object and storing them as flat data
at the record's root.
### Move key-value pairs
For example, given this sample log data:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"account":{"vip":"no","id":3},"device":"mobile"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"account":{"vip":"yes","id":4},"device":"desktop"},"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"account":{"vip":"yes","id":5},"device":"mobile"},"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"account":{"vip":"no","id":1},"device":"other"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"account":{"vip":"yes","id":2},"device":"mobile"},"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"account":{"vip":"no","id":3},"device":"desktop"},"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"account":{"vip":"yes","id":2},"device":"desktop"},"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"account":{"vip":"yes","id":2},"device":"other"},"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"account":{"vip":"no","id":1},"device":"mobile"},"page_id":50,"action":"view"}
```
A processing rule with the **Key** value `$user.account`, the **Regex** value `id`,
and the **Replacement key** value `user.%1` returns the following result:
```json theme={null}
{"user.id":3,"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"device":"mobile"},"action":"purchase","page_id":30}
{"user.id":4,"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"device":"desktop"},"action":"purchase","page_id":10}
{"user.id":1,"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"device":"desktop"},"action":"click","page_id":50}
{"user.id":5,"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"device":"mobile"},"action":"purchase","page_id":40}
{"user.id":1,"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"device":"other"},"action":"purchase","page_id":30}
{"user.id":2,"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"device":"mobile"},"action":"click","page_id":40}
{"user.id":3,"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"device":"desktop"},"action":"click","page_id":30}
{"user.id":1,"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"device":"desktop"},"action":"view","page_id":20}
{"user.id":2,"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"device":"desktop"},"action":"purchase","page_id":50}
{"user.id":2,"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"device":"other"},"action":"view","page_id":10}
{"user.id":1,"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"device":"mobile"},"action":"view","page_id":50}
```
This rule searched for applicable key-value pairs inside the `account` object,
moved `id` up into a new key named `user.id` at the record's top level,
and then removed `account` and the key-value pairs it originally contained.
### Copy key-value pairs
You can also use the **Keep original** setting to copy key-value pairs out of an
object instead of moving them. For example, given this sample log data:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"account":{"vip":"no","id":3},"device":"mobile"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"account":{"vip":"yes","id":4},"device":"desktop"},"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"account":{"vip":"yes","id":5},"device":"mobile"},"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"account":{"vip":"no","id":1},"device":"other"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"account":{"vip":"yes","id":2},"device":"mobile"},"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"account":{"vip":"no","id":3},"device":"desktop"},"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"account":{"vip":"yes","id":2},"device":"desktop"},"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"account":{"vip":"yes","id":2},"device":"other"},"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"account":{"vip":"no","id":1},"device":"mobile"},"page_id":50,"action":"view"}
```
A processing rule with the **Key** value `$user.account`, the **Regex** value `id`, the
**Replacement key** value `user.%1`, and the **Keep original** setting enabled
returns the following result:
```json theme={null}
{"user.id":3,"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"device":"mobile","account":{"vip":"no","id":3}},"action":"purchase","page_id":30}
{"user.id":4,"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"device":"desktop","account":{"vip":"yes","id":4}},"action":"purchase","page_id":10}
{"user.id":1,"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"device":"desktop","account":{"vip":"no","id":1}},"action":"click","page_id":50}
{"user.id":5,"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"device":"mobile","account":{"vip":"yes","id":5}},"action":"purchase","page_id":40}
{"user.id":1,"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"device":"other","account":{"vip":"no","id":1}},"action":"purchase","page_id":30}
{"user.id":2,"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"device":"mobile","account":{"vip":"yes","id":2}},"action":"click","page_id":40}
{"user.id":3,"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"device":"desktop","account":{"vip":"no","id":3}},"action":"click","page_id":30}
{"user.id":1,"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"device":"desktop","account":{"vip":"no","id":1}},"action":"view","page_id":20}
{"user.id":2,"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"device":"desktop","account":{"vip":"yes","id":2}},"action":"purchase","page_id":50}
{"user.id":2,"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"device":"other","account":{"vip":"yes","id":2}},"action":"view","page_id":10}
{"user.id":1,"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"device":"mobile","account":{"vip":"no","id":1}},"action":"view","page_id":50}
```
This rule searched for applicable key-value pairs inside the `account` object,
copied `id` into a new key named `user.id` at the record's top level, but
did not remove `account` and the key-value pairs it originally contained.
## Related rules
For a processing rule with a similar effect, see
[lift submap](/ingest/pipeline/processing-rules/lift-submap). For a processing
rule with the opposite effect, see [nest keys](/ingest/pipeline/processing-rules/nest-keys).
# Hash key
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/hash-key
Learn about the hash key processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The hash key [processing rule](/ingest/pipeline/processing-rules) copies the value of a
specified source key, hashes that value, then stores the hashed copy in a specified
destination key.
> [!NOTE]
>
> Unless you configure this rule to overwrite the specified source key, the resulting
> output will still include the source key and its original, un-hashed value.
## Configuration parameters
Use the parameters in this section to configure the hash key processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key whose value to hash. The value of this key must be a string and not a number, Boolean, array, or object. | *none* |
| **Destination key** | `dst` | The key that stores the hashed value of **Source key**. If you specify the name of an existing key, the hash keys rule overwrites the original value of that key. If you don't specify a key name, this rule creates a new key with the name `_SOURCE_HASH_`, where `SOURCE` is the name of your **Source Key** and `HASH` is the name of your **Hash algorithm**. | *none* |
| **Encoding algorithm** | `encoding` | Required. The scheme to store your hashed value. Accepted values: `Base64`, `Binary`, `Hexadecimal`. | `Hexadecimal` |
| **Hash algorithm** | `algo` | Required. The algorithm to hash your value. Accepted values: `MD5`, `SHA256`. | `SHA256` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the hash keys rule lets you store values in hashed format, which can help
validate the authenticity and integrity of your data.
For example, given the following sample website log data:
```json theme={null}
{"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"}
```
A processing rule with the **Source key** value `action`, the **Encoding algorithm**
value `Hexadecimal`, and the **Hash algorithm** value `SHA256` returns the following
result:
```json theme={null}
{"user_id":3,"page_id":30,"action":"purchase","action_sha256":"7048dc8aa7663e713097535171b4ed72ab015705a885de9636e66d4b1fa18804","timestamp":"2023-03-28T09:08:41.64283645Z"}
{"user_id":4,"page_id":10,"action":"purchase","action_sha256":"7048dc8aa7663e713097535171b4ed72ab015705a885de9636e66d4b1fa18804","timestamp":"2023-03-28T09:08:42.643343109Z"}
{"user_id":1,"page_id":50,"action":"click","action_sha256":"e5c7ffac26fed654fe62045898f55b551a0dc120badf3d116bcd364418f3ec16","timestamp":"2023-03-28T09:08:48.643600498Z"}
{"user_id":5,"page_id":40,"action":"purchase","action_sha256":"7048dc8aa7663e713097535171b4ed72ab015705a885de9636e66d4b1fa18804","timestamp":"2023-03-28T09:08:50.643773688Z"}
{"user_id":1,"page_id":30,"action":"purchase","action_sha256":"7048dc8aa7663e713097535171b4ed72ab015705a885de9636e66d4b1fa18804","timestamp":"2023-03-28T09:08:51.643932272Z"}
{"user_id":2,"page_id":40,"action":"click","action_sha256":"e5c7ffac26fed654fe62045898f55b551a0dc120badf3d116bcd364418f3ec16","timestamp":"2023-03-28T09:08:56.644080944Z"}
{"user_id":3,"page_id":30,"action":"click","action_sha256":"e5c7ffac26fed654fe62045898f55b551a0dc120badf3d116bcd364418f3ec16","timestamp":"2023-03-28T09:09:03.64425954Z"}
{"user_id":1,"page_id":20,"action":"view","action_sha256":"2bcb43cbc8f6b7ef66331532881143fcbae60a879db3a8fb853f645bb24c2b3c","timestamp":"2023-03-28T09:09:03.644317046Z"}
{"user_id":2,"page_id":50,"action":"purchase","action_sha256":"7048dc8aa7663e713097535171b4ed72ab015705a885de9636e66d4b1fa18804","timestamp":"2023-03-28T09:09:10.64447719Z"}
{"user_id":2,"page_id":10,"action":"view","action_sha256":"2bcb43cbc8f6b7ef66331532881143fcbae60a879db3a8fb853f645bb24c2b3c","timestamp":"2023-03-28T09:09:17.644810963Z"}
{"user_id":1,"page_id":50,"action":"view","action_sha256":"2bcb43cbc8f6b7ef66331532881143fcbae60a879db3a8fb853f645bb24c2b3c","timestamp":"2023-03-28T09:09:20.644994805Z"}
```
This rule hashed the value of `action` from each log entry and stored the hashed
value in a new key named `action_sha256`.
# Join records
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/join-records
Learn about the join records processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The join records [processing rule](/ingest/pipeline/processing-rules) combines values
from multiple records into an array of values within a single record.
> [!NOTE]
>
> To determine which values to combine, this rule checks the timestamp of each record,
> then combines values from records that occur within the same nanosecond. This timestamp
> is a piece of metadata that Palo Alto Networks Telemetry Pipeline assigns to all records that
> pass through a pipeline, and is unrelated to any keys within the record itself.
## Configuration parameters
Use the parameters in this section to configure the join records processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `key` | Required. The key that contains values to join in an array. The resulting array will be assigned to a key with the same name. | *none* |
| **Skip records where the specified key is missing** checkbox | `skipMissing` | Indicates whether to modify the record if the key isn't found. | Not selected |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the join records processing rule lets you restructure your telemetry data
by turning multiple standalone events into a combined array. For example, given
these sample logs:
```json theme={null}
{"log":{"user_id":3,"action":"purchase"}}
{"log":{"user_id":4,"action":"click"}}
{"log":{"user_id":1,"action":"view"}}
{"log":{"user_id":5,"action":"click"}}
{"log":{"user_id":2,"action":"click"}}
```
A processing rule with the **Source key** value `log` returns the following result:
```json theme={null}
{"log":[{"user_id":3,"action":"purchase"},{"user_id":4,"action":"click"},{"user_id":1,"action":"view"}]}
{"log":[{"user_id":5,"action":"click"},{"user_id":2,"action":"click"}]}
```
This rule combined the `log` key from multiple standalone records into a series
of unified `log` arrays. Because the first three events occurred within the same
nanosecond, their `log` values were combined within one array, and because the
fourth and fifth events occurred one nanosecond later, their `log` values were
combined within another array.
## Related rules
For a processing rule with the opposite effect, see
[split record](/ingest/pipeline/processing-rules/split-record).
# Lift submap
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/lift-submap
Learn about the lift submap processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The lift submap [processing rule](/ingest/pipeline/processing-rules) uses regular
expressions to search for key-value pairs inside a JSON object, then either moves or
copies any applicable key-value pairs out of the JSON object and into a higher level
of the record.
## Configuration parameters
Use the parameters in this section to configure the lift submap processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Key** | `key` | Required. The key of the object that contains key-value pairs to move or copy. You can also use [record accessor syntax](/ingest/pipeline/processing-rules#record-accessor-syntax) to reference keys nested within another nested object. | *none* |
| **Regex** | `regex` | Required. The regular expression that determines which key-value pairs to move or copy. A value of `^.+$` matches all key-value pairs contained within the specified object. | `^.+$` |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Levels** | `levels` | Required. How many levels to lift the applicable key-value pairs. For example, the a value of `1` either moves or copies any applicable key-value pairs up one level into the parent object of **Key**. A value of `3` either moves or copies any applicable key-value pairs up three levels into the great-grandparent object of **Key**. | `1` |
| **Replacement key** | `keyReplacement` | Required. The regular expression that sets the naming pattern for any keys that get moved or copied. A value of `%1` preserves the original names of all keys. | `%1` |
| **Keep original** checkbox | `keepOrig` | If selected, preserves the object specified in **Key**. If unselected, moves any applicable key-value pairs into a higher level of the record, and then remove the object specified in **Key**. | Not selected |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the lift submap rule lets you restructure your telemetry data by pulling
key-value pairs out of a nested object and storing them as flat data in a higher
level of the record. You can use this rule to simplify deeply nested data and
store key-value pairs in more accessible locations.
### Move key-value pairs
For example, given this sample log data:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"account":{"vip":"no","id":3},"device":"mobile"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"account":{"vip":"yes","id":4},"device":"desktop"},"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"account":{"vip":"yes","id":5},"device":"mobile"},"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"account":{"vip":"no","id":1},"device":"other"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"account":{"vip":"yes","id":2},"device":"mobile"},"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"account":{"vip":"no","id":3},"device":"desktop"},"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"account":{"vip":"yes","id":2},"device":"desktop"},"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"account":{"vip":"yes","id":2},"device":"other"},"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"account":{"vip":"no","id":1},"device":"mobile"},"page_id":50,"action":"view"}
```
A processing rule with the **Key** value `$user.account`, the **Regex** value `id`,
the **Levels** value `1`, and the **Replacement key** value `account.%1` returns the
following result:
```json theme={null}
{"user":{"account.id":3,"device":"mobile"},"timestamp":"2023-03-28T09:08:41.64283645Z","action":"purchase","page_id":30}
{"user":{"account.id":4,"device":"desktop"},"timestamp":"2023-03-28T09:08:42.643343109Z","action":"purchase","page_id":10}
{"user":{"account.id":1,"device":"desktop"},"timestamp":"2023-03-28T09:08:48.643600498Z","action":"click","page_id":50}
{"user":{"account.id":5,"device":"mobile"},"timestamp":"2023-03-28T09:08:50.643773688Z","action":"purchase","page_id":40}
{"user":{"account.id":1,"device":"other"},"timestamp":"2023-03-28T09:08:51.643932272Z","action":"purchase","page_id":30}
{"user":{"account.id":2,"device":"mobile"},"timestamp":"2023-03-28T09:08:56.644080944Z","action":"click","page_id":40}
{"user":{"account.id":3,"device":"desktop"},"timestamp":"2023-03-28T09:09:03.64425954Z","action":"click","page_id":30}
{"user":{"account.id":1,"device":"desktop"},"timestamp":"2023-03-28T09:09:03.644317046Z","action":"view","page_id":20}
{"user":{"account.id":2,"device":"desktop"},"timestamp":"2023-03-28T09:09:10.64447719Z","action":"purchase","page_id":50}
{"user":{"account.id":2,"device":"other"},"timestamp":"2023-03-28T09:09:17.644810963Z","action":"view","page_id":10}
{"user":{"account.id":1,"device":"mobile"},"timestamp":"2023-03-28T09:09:20.644994805Z","action":"view","page_id":50}
```
This rule searched for applicable key-value pairs inside the `account` object,
moved `id` up one level into a new key named `account.id`, and then removed
`account` and the key-value pairs it originally contained.
### Copy key-value pairs
You can also use the **Keep original** setting to copy key-value pairs out of an
object instead of moving them. For example, given this sample log data:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"account":{"vip":"no","id":3},"device":"mobile"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"account":{"vip":"yes","id":4},"device":"desktop"},"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"account":{"vip":"yes","id":5},"device":"mobile"},"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"account":{"vip":"no","id":1},"device":"other"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"account":{"vip":"yes","id":2},"device":"mobile"},"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"account":{"vip":"no","id":3},"device":"desktop"},"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"account":{"vip":"yes","id":2},"device":"desktop"},"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"account":{"vip":"yes","id":2},"device":"other"},"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"account":{"vip":"no","id":1},"device":"mobile"},"page_id":50,"action":"view"}
```
A processing rule with the **Key** value `$user.account`, the **Regex** value `id`,
the **Levels** value `1`, the **Replacement key** value `account.%1`, and the
**Keep original** setting enabled returns the following result:
```json theme={null}
{"user":{"account":{"id":3,"vip":"no"},"account.id":3,"device":"mobile"},"timestamp":"2023-03-28T09:08:41.64283645Z","action":"purchase","page_id":30}
{"user":{"account":{"id":4,"vip":"yes"},"account.id":4,"device":"desktop"},"timestamp":"2023-03-28T09:08:42.643343109Z","action":"purchase","page_id":10}
{"user":{"account":{"id":1,"vip":"no"},"account.id":1,"device":"desktop"},"timestamp":"2023-03-28T09:08:48.643600498Z","action":"click","page_id":50}
{"user":{"account":{"id":5,"vip":"yes"},"account.id":5,"device":"mobile"},"timestamp":"2023-03-28T09:08:50.643773688Z","action":"purchase","page_id":40}
{"user":{"account":{"id":1,"vip":"no"},"account.id":1,"device":"other"},"timestamp":"2023-03-28T09:08:51.643932272Z","action":"purchase","page_id":30}
{"user":{"account":{"id":2,"vip":"yes"},"account.id":2,"device":"mobile"},"timestamp":"2023-03-28T09:08:56.644080944Z","action":"click","page_id":40}
{"user":{"account":{"id":3,"vip":"no"},"account.id":3,"device":"desktop"},"timestamp":"2023-03-28T09:09:03.64425954Z","action":"click","page_id":30}
{"user":{"account":{"id":1,"vip":"no"},"account.id":1,"device":"desktop"},"timestamp":"2023-03-28T09:09:03.644317046Z","action":"view","page_id":20}
{"user":{"account":{"id":2,"vip":"yes"},"account.id":2,"device":"desktop"},"timestamp":"2023-03-28T09:09:10.64447719Z","action":"purchase","page_id":50}
{"user":{"account":{"id":2,"vip":"yes"},"account.id":2,"device":"other"},"timestamp":"2023-03-28T09:09:17.644810963Z","action":"view","page_id":10}
{"user":{"account":{"id":1,"vip":"no"},"account.id":1,"device":"mobile"},"timestamp":"2023-03-28T09:09:20.644994805Z","action":"view","page_id":50}
```
This rule searched for applicable key-value pairs inside the `account` object,
moved `id` up one level into a new key named `account.id`, but did not remove
`account` and the key-value pairs it originally contained.
## Related rules
For a processing rule with a similar effect, see
[flatten subrecord](/ingest/pipeline/processing-rules/flatten-subrecord). For a
processing rule with the opposite effect, see [nest keys](/ingest/pipeline/processing-rules/nest-keys).
# Multiline join
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/multiline-join
Learn about the multiline join processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The multiline join [processing rule](/ingest/pipeline/processing-rules) combines
multiple logs into a single log by looking for repeating patterns in log data.
## Configuration parameters
Use the parameters in this section to configure the multiline join processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key that contains the log data to combine. This key's value must be a string, as the rule can't parse standard JSON objects, but it can parse [escaped JSON strings](/ingest/pipeline/processing-rules/encode-json). | `log` |
| **Regex** | `regex` | Required. The regular expression that determines which logs to combine. When a log that contains a matching string is found, that log plus all subsequent logs are combined until another log is reached that also contains a matching string. The new matching log becomes the start of the next combined log, and the pattern repeats. | *none* |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Maximum lines** | `lineLimit` | Required. The maximum number of logs that can be combined into a single log. This setting is a failsafe designed to prevent the rule from falling into an endless loop if it can't find the specified **Regex** pattern after a certain number of logs. | `1000` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the multiline join processing rule lets you group related logs together.
You can use this rule to combine data that was inadvertently split into multiple
parts, like a stack trace where each line of the message was assigned to its
own log.
### JSON logs
For example, given this sample log data:
```json theme={null}
{"inventory":"fruit:apricot"}
{"inventory":"vegetable:artichoke"}
{"inventory":"vegetable:asparagus"}
{"inventory":"fruit:banana"}
{"inventory":"vegetable:butternut_squash"}
{"inventory":"fruit:cantaloupe"}
{"inventory":"vegetable:cauliflower"}
{"inventory":"vegetable:corn"}
{"inventory":"vegetable:cucumber"}
{"inventory":"fruit:durian"}
{"inventory":"vegetable:daikon"}
{"inventory":"fruit:elderberry"}
{"inventory":"vegetable:edamame"}
```
A processing rule with the **Source key** value `inventory` and the **Regex** value
`fruit` returns the following result:
```json theme={null}
{"inventory":"fruit:apricot\nvegetable:artichoke\nvegetable:asparagus"}
{"inventory":"fruit:banana\nvegetable:butternut_squash"}
{"inventory":"fruit:cantaloupe\nvegetable:cauliflower\nvegetable:corn\nvegetable:cucumber"}
{"inventory":"fruit:durian\nvegetable:daikon"}
{"inventory":"fruit:elderberry\nvegetable:edamame"}
```
This rule searched for logs in the `inventory` key that contained the string
`fruit`, then combined each of those logs with any subsequent logs that didn't
contain the string `fruit`. After the rule found another log that contained
the string `fruit`, it started over and repeated the same pattern.
### Raw logs
> [!NOTE]
>
> To combine raw logs, always use the value `log` for **Source key**.
You can also use the multiline join rule to combine raw logs. For example,
given this sample log data:
```text theme={null}
Exception in thread "main" java.lang.RuntimeException:
at com.storefront.module.Checkout.paymentProcess(Checkout.java:71)
at com.storefront.module.Checkout.billingAddress(Checkout.java:435)
at com.storefront.module.Checkout.shippingAddress(Checkout.java:742)
at com.storefront.module.Checkout.main(Checkout.java:6)
Exception in thread "main" java.lang.NullPointerException:
at com.storefront.module.Listing.productPhoto(Listing.java:84)
at com.storefront.module.Listing.productColorway(Listing.java:219)
Exception in thread "main" java.lang.RuntimeException:
at com.storefront.module.Settings.country(Settings.java:149)
at com.storefront.module.Settings.currencyType(Settings.java:736)
at com.storefront.module.Settings.main(Checkout.java:11)
```
A processing rule with the **Source key** value `log` and the **Regex** value
`exception` returns the following result:
```json theme={null}
{"log":"Exception in thread \"main\" java.lang.RuntimeException:\n at com.storefront.module.Checkout.paymentProcess(Checkout.java:71)\n at com.storefront.module.Checkout.billingAddress(Checkout.java:435)\n at com.storefront.module.Checkout.shippingAddress(Checkout.java:742)\n at com.storefront.module.Checkout.main(Checkout.java:6)"}
{"log":"Exception in thread \"main\" java.lang.NullPointerException:\n at com.storefront.module.Listing.productPhoto(Listing.java:84)\n at com.storefront.module.Listing.productColorway(Listing.java:219)"}
{"log":"Exception in thread \"main\" java.lang.RuntimeException:\n at com.storefront.module.Settings.country(Settings.java:149)\n at com.storefront.module.Settings.currencyType(Settings.java:736)\n at com.storefront.module.Settings.main(Checkout.java:11)"}
```
Palo Alto Networks Telemetry Pipeline assigned a new `log` key to each raw event. After that
transformation, this rule searched for logs with the `log` key that contained
the string `exception`, then combined each of those logs with any subsequent
logs that didn't contain the string `exception`. After the rule found another
log that contained the string `exception`, it started over and repeated the same
pattern.
# Nest keys
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/nest-keys
Learn about the nest keys processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The nest keys [processing rule](/ingest/pipeline/processing-rules) moves the value of a
specified source key into an object nested under a specified destination key.
## Configuration parameters
Use the parameters in this section to configure the nest keys processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key to nest under **Destination key**. This can be either a flat key-value pair or the key to an object. | *none* |
| **Destination key** | `dst` | Required. The key of the object to store your nested data. If no matching key exists, create a new key and set its value accordingly. | *none* |
| **Match case** checkbox | `matchCase` | Indicates whether the regular expression is case-sensitive. | Not selected |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Regex mode** checkbox | `regexMode` | Indicates whether to treat the value of **Source key** as a regular expression. | Not selected / `false` |
| **Merge** checkbox | `merge` | If selected, and if **Destination key** is the key to an existing object that already contains data, the nest keys rule moves the new nested data into **Destination key** without overwriting its original data. However, if **Destination key** is a flat key-value pair, its value is overwritten and replaced with a new object. | Not selected |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the nest keys processing rule lets you restructure your telemetry data
by storing key-value pairs inside a parent object.
### New object
For example, given this sample log data:
```json theme={null}
{"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"}
```
A processing rule with the **Source key** value `user_id` and the **Destination key**
value `account` returns the following result:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user_id":3,"account":{"user_id":3},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user_id":4,"account":{"user_id":4},"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user_id":1,"account":{"user_id":1},"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user_id":5,"account":{"user_id":5},"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user_id":1,"account":{"user_id":1},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user_id":2,"account":{"user_id":2},"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user_id":3,"account":{"user_id":3},"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user_id":1,"account":{"user_id":1},"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user_id":2,"account":{"user_id":2},"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user_id":2,"account":{"user_id":2},"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user_id":1,"account":{"user_id":1},"page_id":50,"action":"view"}
```
This rule moved the `user_id` key-value pair into a new object named `account`.
### Merge into existing object
You can also use the **Merge** setting to nest data within an existing object.
For example, given this sample log data:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"account":{"vip":"no","id":3},"device":"mobile"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"account":{"vip":"yes","id":4},"device":"desktop"},"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"account":{"vip":"yes","id":5},"device":"mobile"},"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"account":{"vip":"no","id":1},"device":"other"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"account":{"vip":"yes","id":2},"device":"mobile"},"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"account":{"vip":"no","id":3},"device":"desktop"},"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"account":{"vip":"no","id":1},"device":"desktop"},"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"account":{"vip":"yes","id":2},"device":"desktop"},"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"account":{"vip":"yes","id":2},"device":"other"},"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"account":{"vip":"no","id":1},"device":"mobile"},"page_id":50,"action":"view"}
```
A processing rule with the **Source key** value `action`, the **Destination key**
value `user`, and the **Merge** setting enabled returns the following result:
```json theme={null}
{"user":{"account":{"id":3,"vip":"no"},"action":"purchase","device":"mobile"},"timestamp":"2023-03-28T09:08:41.64283645Z","page_id":30,"action":"purchase"}
{"user":{"account":{"id":4,"vip":"yes"},"action":"purchase","device":"desktop"},"timestamp":"2023-03-28T09:08:42.643343109Z","page_id":10,"action":"purchase"}
{"user":{"account":{"id":1,"vip":"no"},"action":"click","device":"desktop"},"timestamp":"2023-03-28T09:08:48.643600498Z","page_id":50,"action":"click"}
{"user":{"account":{"id":5,"vip":"yes"},"action":"purchase","device":"mobile"},"timestamp":"2023-03-28T09:08:50.643773688Z","page_id":40,"action":"purchase"}
{"user":{"account":{"id":1,"vip":"no"},"action":"purchase","device":"other"},"timestamp":"2023-03-28T09:08:51.643932272Z","page_id":30,"action":"purchase"}
{"user":{"account":{"id":2,"vip":"yes"},"action":"click","device":"mobile"},"timestamp":"2023-03-28T09:08:56.644080944Z","page_id":40,"action":"click"}
{"user":{"account":{"id":3,"vip":"no"},"action":"click","device":"desktop"},"timestamp":"2023-03-28T09:09:03.64425954Z","page_id":30,"action":"click"}
{"user":{"account":{"id":1,"vip":"no"},"action":"view","device":"desktop"},"timestamp":"2023-03-28T09:09:03.644317046Z","page_id":20,"action":"view"}
{"user":{"account":{"id":2,"vip":"yes"},"action":"purchase","device":"desktop"},"timestamp":"2023-03-28T09:09:10.64447719Z","page_id":50,"action":"purchase"}
{"user":{"account":{"id":2,"vip":"yes"},"action":"view","device":"other"},"timestamp":"2023-03-28T09:09:17.644810963Z","page_id":10,"action":"view"}
{"user":{"account":{"id":1,"vip":"no"},"action":"view","device":"mobile"},"timestamp":"2023-03-28T09:09:20.644994805Z","page_id":50,"action":"view"}
```
This rule moved the `action` key-value pair into the `user` object, but kept the
existing key-value pairs that were already stored in `user`.
## Related rules
For a processing rule with the opposite effect, see
[flatten subrecord](/ingest/pipeline/processing-rules/flatten-subrecord)
or [lift submap](/ingest/pipeline/processing-rules/lift-submap).
# Parse
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/parse
Learn about the parse processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The parse [processing rule](/ingest/pipeline/processing-rules) uses a regular
expression to search for values inside a string and to assign a key to each value,
then stores those key-value pairs in a structured object. Additionally, the
resulting output always includes the original string.
## Configuration parameters
Use the parameters in this section to configure the parse processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key whose value contains data to parse. | *none* |
| **Destination key** | `dst` | Required. The key of the object to store your structured key-value pairs. This rule can't overwrite an existing key, so this value must be a unique name within your telemetry data. | *none* |
| **Regex** | `regex` | Required. The regular expression for extracting values from the value of **Source key** and assigning keys to those values. | *none* |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the parse processing rule lets you extract any data from a string and
turn that data into parsable key-value pairs. You can then use these key-value
pairs in other processing rules or for general storage and analysis.
For example, given the following sample website logs:
```json theme={null}
{"log":"198.143.234.244 - - [18/Mar/2012:13:55:36 -0700] \"GET /lease.pdf HTTP/1.0\" 200 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.3; Trident/4.0)\""}
{"log":"66.216.63.42 - Lucille [18/Mar/2012:15:07:29 -0700] \"DELETE /lease.pdf HTTP/1.0\" 200 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_3; like Mac OS X) AppleWebKit/533.11 (KHTML, like Gecko) Chrome/52.0.3189.332 Mobile Safari/536.3\""}
{"log":"70.137.97.47 - - [18/Mar/2012:19:21:04 -0700] \"GET /lease.pdf HTTP/1.0\" 404 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.3; Trident/4.0)\""}
{"log":"7.160.29.68 - Michael [19/Mar/2012:01:38:17 -0700] \"POST /lease.pdf HTTP/1.0\" 200 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (U; Linux i585 x86_64; en-US) Gecko/20130401 Firefox/60.7\""}
{"log":"31.119.193.169 - - [19/Mar/2012:08:33:29 -0700] \"GET /lease.pdf HTTP/1.0\" 200 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (iPad; CPU iPad OS 7_9_0 like Mac OS X) AppleWebKit/602.13 (KHTML, like Gecko) Chrome/50.0.2327.233 Mobile Safari/534.2\""}
```
A processing rule with the **Source key** value `log`, the **Destination key**
value `parsed`, the **Regex** value
`^(?[^ ]*) [^ ]* (?[^ ]*) \[(?[^\]]*)\] "(?\S+)(?: +(?[^ ]*) +\S*)?" (?[^ ]*) (?[^ ]*)(?: "(?[^\"]*)" "(?.*)")?$`,
and the **Regex engine**
value `PCRE2` returns the following result:
```json theme={null}
{"parsed":{"host":"198.143.234.244","time":"18/Mar/2012:13:55:36 -0700","path":"/lease.pdf","code":"200","user":"-","agent":"Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.3; Trident/4.0)","method":"GET","referer":"bluth-homes.oc","size":"5689972"},"log":"198.143.234.244 - - [18/Mar/2012:13:55:36 -0700] \"GET /lease.pdf HTTP/1.0\" 200 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.3; Trident/4.0)\""}
{"parsed":{"host":"66.216.63.42","time":"18/Mar/2012:15:07:29 -0700","path":"/lease.pdf","code":"200","user":"Lucille","agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_3; like Mac OS X) AppleWebKit/533.11 (KHTML, like Gecko) Chrome/52.0.3189.332 Mobile Safari/536.3","method":"DELETE","referer":"bluth-homes.oc","size":"5689972"},"log":"66.216.63.42 - Lucille [18/Mar/2012:15:07:29 -0700] \"DELETE /lease.pdf HTTP/1.0\" 200 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_3; like Mac OS X) AppleWebKit/533.11 (KHTML, like Gecko) Chrome/52.0.3189.332 Mobile Safari/536.3\""}
{"parsed":{"host":"70.137.97.47","time":"18/Mar/2012:19:21:04 -0700","path":"/lease.pdf","code":"404","user":"-","agent":"Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.3; Trident/4.0)","method":"GET","referer":"bluth-homes.oc","size":"5689972"},"log":"70.137.97.47 - - [18/Mar/2012:19:21:04 -0700] \"GET /lease.pdf HTTP/1.0\" 404 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.3; Trident/4.0)\""}
{"parsed":{"host":"7.160.29.68","time":"19/Mar/2012:01:38:17 -0700","path":"/lease.pdf","code":"200","user":"Michael","agent":"Mozilla/5.0 (U; Linux i585 x86_64; en-US) Gecko/20130401 Firefox/60.7","method":"POST","referer":"bluth-homes.oc","size":"5689972"},"log":"7.160.29.68 - Michael [19/Mar/2012:01:38:17 -0700] \"POST /lease.pdf HTTP/1.0\" 200 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (U; Linux i585 x86_64; en-US) Gecko/20130401 Firefox/60.7\""}
{"parsed":{"host":"31.119.193.169","time":"19/Mar/2012:08:33:29 -0700","path":"/lease.pdf","code":"200","user":"-","agent":"Mozilla/5.0 (iPad; CPU iPad OS 7_9_0 like Mac OS X) AppleWebKit/602.13 (KHTML, like Gecko) Chrome/50.0.2327.233 Mobile Safari/534.2","method":"GET","referer":"bluth-homes.oc","size":"5689972"},"log":"31.119.193.169 - - [19/Mar/2012:08:33:29 -0700] \"GET /lease.pdf HTTP/1.0\" 200 5689972 \"bluth-homes.oc\" \"Mozilla/5.0 (iPad; CPU iPad OS 7_9_0 like Mac OS X) AppleWebKit/602.13 (KHTML, like Gecko) Chrome/50.0.2327.233 Mobile Safari/534.2\""}
```
This rule extracted values from the string stored in the `log` key, assigned a key
to each value, then stored the resulting key-value pairs in a new structured object
named `parsed`.
## Related rules
This rule is a modified version of the [parsers](/ingest/pipeline/v2/build/parsers) feature.
For a processing rule that performs a similar operation on embedded data already
formatted as key-value pairs, see [extract keys/values](/ingest/pipeline/processing-rules/extract-keys-values).
# Parse number
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/parse-number
Learn about the parse number processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The parse number [processing rule](/ingest/pipeline/processing-rules) uses a regular
expression to transform a key's value from a string to a number.
## Configuration parameters
Use the parameters in this section to configure the parse number processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Key** | `key` | Required. The key whose value contains a number to parse. | *none* |
| **Regex** | `regex` | Required. The regular expression for extracting numbers from the value of **Key**. | `[+-]?([0-9]+([.][0-9]*)?\|[.][0-9]+)` |
| **Numeric base** | `base` | Required. The base system of the number stored in **Key**. As part of the parsing process, this rule converts each number from its original base system to decimal. | `10` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the parse number process rule lets you extract numeric data from a string,
which makes it possible to perform math operations on that data.
### Decimal
For example, given these sample logs:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user_id":3,"action":"purchase","price":"$057.99"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user_id":4,"action":"purchase","price":"$173.28"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user_id":5,"action":"purchase","price":"$004.72"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user_id":1,"action":"purchase","price":"$096.65"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user_id":2,"action":"purchase","price":"$020.11"}
```
A processing rule with the **Key** value `price`, the **Regex** value
`[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)`, and the **Numeric base** value `10` returns
the following result:
```json theme={null}
{"user_id":3,"price":57.99,"timestamp":"2023-03-28T09:08:41.64283645Z","action":"purchase"}
{"user_id":4,"price":173.28,"timestamp":"2023-03-28T09:08:42.643343109Z","action":"purchase"}
{"user_id":5,"price":4.72,"timestamp":"2023-03-28T09:08:50.643773688Z","action":"purchase"}
{"user_id":1,"price":96.65,"timestamp":"2023-03-28T09:08:51.643932272Z","action":"purchase"}
{"user_id":2,"price":20.11,"timestamp":"2023-03-28T09:09:10.64447719Z","action":"purchase"}
```
This rule transformed the value of each `price` key from a string to a number, and
discarded non-numeric characters and leading zeroes contained in the original string.
### Binary
You can also the **Numeric base** setting to parse numbers in other base formats,
like binary. For example, given these sample logs:
```json theme={null}
{"node":"1001010100010110"}
{"node":"1001000001100010"}
{"node":"1011010010011110"}
{"node":"1101010111111011"}
{"node":"0000000011011000"}
```
A processing rule with the **Key** value `node`, the **Regex** value
`[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)`, and the **Numeric base** value `2` returns
the following result:
```json theme={null}
{"node":38166}
{"node":36962}
{"node":46238}
{"node":54779}
{"node":216}
```
This rule transformed the value of each `node` key from a string to a number,
then converted that number from binary to decimal.
# Random sampling
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/random-sampling
Learn about the random sampling processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The random sampling [processing rule](/ingest/pipeline/processing-rules) preserves a
percentage of records that pass through your pipeline, and then discards the
rest. These records are chosen at random from the total number of records that
accumulate in your pipeline between sampling intervals.
> [!WARNING]
>
> When the random sampling rule waits for data to accumulate during the
> specified time window, the pipeline [buffers](/ingest/pipeline/v2/configure/backpressure)
> that data. Increasing the value of the **Time window** parameter also increases
> the memory load on your pipeline. For example, if 100,000 records pass through
> your pipeline during the specified time period, and those records are 1 kB
> each, the random sampling rule will add approximately 100 MB of memory
> load.
## Configuration parameters
Use the parameters in this section to configure the random sampling processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Time window in seconds** | `window` | Required. How long to wait (in seconds) for data to accumulate in your pipeline before taking a sample. Depending on how quickly data accumulates in your pipeline, increasing or decreasing the time between samples can affect how much data is preserved. | *none* |
| **Sample %** | `percentage` | Required. The percentage of data to preserve. Within each batch of accumulated data, the individual records to preserve are chosen randomly, and the rest are discarded. This value must be a positive integer between `1` and `100`. | *none* |
| **Seed for random number generator** | `seed` | A seed to affect the random number generator that determines which records to preserve. This value must be a positive integer. | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the random sampling rule lets you reduce the size of your telemetry data
while still retaining a general snapshot of events that occur during a specified
time frame. For example, given this sample website log data:
```json lines theme={null}
{"page_id":9,"action":"view"}
{"page_id":1,"action":"purchase"}
{"page_id":20,"action":"view"}
{"page_id":14,"action":"click"}
{"page_id":9,"action":"click"}
{"page_id":5,"action":"click"}
{"page_id":14,"action":"purchase"}
{"page_id":16,"action":"purchase"}
{"page_id":14,"action":"click"}
{"page_id":2,"action":"view"}
{"page_id":14,"action":"click"}
{"page_id":11,"action":"click"}
{"page_id":13,"action":"click"}
{"page_id":8,"action":"click"}
{"page_id":20,"action":"purchase"}
{"page_id":4,"action":"click"}
{"page_id":17,"action":"view"}
{"page_id":2,"action":"view"}
{"page_id":15,"action":"click"}
{"page_id":15,"action":"purchase"}
{"page_id":11,"action":"purchase"}
{"page_id":13,"action":"view"}
{"page_id":1,"action":"click"}
{"page_id":15,"action":"click"}
{"page_id":1,"action":"click"}
{"page_id":3,"action":"purchase"}
{"page_id":18,"action":"purchase"}
{"page_id":11,"action":"purchase"}
{"page_id":11,"action":"view"}
{"page_id":12,"action":"click"}
```
A processing rule with the **Time window in seconds** value `60` and the **Sample %** value
`10` returns the following result:
```json theme={null}
{"action":"click","page_id":15}
{"action":"purchase","page_id":15}
{"action":"click","page_id":12}
```
This rule retained 10% of logs that accumulated within a 60-second time frame.
Since all of the sample logs accumulated within this time frame, and the original
sample contained 30 logs, three random logs were retained and the other 27 logs
were discarded.
# Redact/mask value
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/redact-mask-value
Learn about the redact/mask value processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The redact/mask value [processing rule](/ingest/pipeline/processing-rules) obscures all
or part of a specified key's value by replacing the original string with a series of
repeated characters.
## Configuration parameters
Use the parameters in this section to configure the redact/mask value processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Key** | `key` | Required. The key whose value to redact. The value of this key must be a string and not a number, Boolean, array, or object. You can also use [record accessor syntax](/ingest/pipeline/processing-rules#record-accessor-syntax) to reference keys nested within an object. | *none* |
| **Regex** | `regex` | Required. The regular expression that determines which strings to redact. You can use this parameter to selectively redact certain strings while other parts of **Key** intact. To redact the entire value of **Key**, use the regular expression `^.+$`. | *none* |
| **Replacement** | `replaceChar` | Required. The string that replaces any redacted characters in the value of **Key**. | `*` |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Match case** checkbox | `matchCase` | Indicates whether the regular expression is case-sensitive. | Not selected |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the redact/mask value rule lets you remove private or sensitive information
from your telemetry data.
### Full redaction
You can obscure the entire value of a specified key. For example, given
this sample log data:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","user":{"device":"mobile","ip":"149.206.93.24"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","user":{"device":"desktop","ip":"107.30.35.78"},"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","user":{"device":"desktop","ip":"255.255.239.8"},"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","user":{"device":"mobile","ip":"166.128.199.193"},"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","user":{"device":"other","ip":"212.96.55.27"},"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","user":{"device":"mobile","ip":"18.87.158.235"},"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","user":{"device":"desktop","ip":"200.101.159.250"},"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","user":{"device":"desktop","ip":"95.208.154.180"},"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","user":{"device":"desktop","ip":"227.14.218.76"},"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","user":{"device":"other","ip":"158.229.53.77"},"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","user":{"device":"mobile","ip":"48.30.70.51"},"page_id":50,"action":"view"}
```
A processing rule with the **Key** value `$user.ip`, the **Regex** value `^.+$`,
and the **Replacement** value `0` returns the following result:
```json theme={null}
{"user":{"ip":"0000000000000","device":"mobile"},"timestamp":"2023-03-28T09:08:41.64283645Z","action":"purchase","page_id":30}
{"user":{"ip":"000000000000","device":"desktop"},"timestamp":"2023-03-28T09:08:42.643343109Z","action":"purchase","page_id":10}
{"user":{"ip":"0000000000000","device":"desktop"},"timestamp":"2023-03-28T09:08:48.643600498Z","action":"click","page_id":50}
{"user":{"ip":"000000000000000","device":"mobile"},"timestamp":"2023-03-28T09:08:50.643773688Z","action":"purchase","page_id":40}
{"user":{"ip":"000000000000","device":"other"},"timestamp":"2023-03-28T09:08:51.643932272Z","action":"purchase","page_id":30}
{"user":{"ip":"0000000000000","device":"mobile"},"timestamp":"2023-03-28T09:08:56.644080944Z","action":"click","page_id":40}
{"user":{"ip":"000000000000000","device":"desktop"},"timestamp":"2023-03-28T09:09:03.64425954Z","action":"click","page_id":30}
{"user":{"ip":"00000000000000","device":"desktop"},"timestamp":"2023-03-28T09:09:03.644317046Z","action":"view","page_id":20}
{"user":{"ip":"0000000000000","device":"desktop"},"timestamp":"2023-03-28T09:09:10.64447719Z","action":"purchase","page_id":50}
{"user":{"ip":"0000000000000","device":"other"},"timestamp":"2023-03-28T09:09:17.644810963Z","action":"view","page_id":10}
{"user":{"ip":"00000000000","device":"mobile"},"timestamp":"2023-03-28T09:09:20.644994805Z","action":"view","page_id":50}
```
This rule redacted each user's IP address by replacing the value of `ip` with a
string of zeroes.
### Selective redaction
You can also redact specific strings while leaving other strings intact. For example,
given this sample log data:
```json theme={null}
{"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"}
```
A processing rule with the **Key** value `action`, the **Regex** value `purchase`,
and the **Replacement** value `*` returns the following result:
```json theme={null}
{"action":"********","timestamp":"2023-03-28T09:08:41.64283645Z","user_id":3,"page_id":30}
{"action":"********","timestamp":"2023-03-28T09:08:42.643343109Z","user_id":4,"page_id":10}
{"action":"click","timestamp":"2023-03-28T09:08:48.643600498Z","user_id":1,"page_id":50}
{"action":"********","timestamp":"2023-03-28T09:08:50.643773688Z","user_id":5,"page_id":40}
{"action":"********","timestamp":"2023-03-28T09:08:51.643932272Z","user_id":1,"page_id":30}
{"action":"click","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":"view","timestamp":"2023-03-28T09:09:03.644317046Z","user_id":1,"page_id":20}
{"action":"********","timestamp":"2023-03-28T09:09:10.64447719Z","user_id":2,"page_id":50}
{"action":"view","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}
```
This rule redacted certain strings within the `action` key by replacing any instances
of `purchase` with a string of asterisks. However, other strings within the value
of `action` were unaffected.
# Rename keys
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/rename-keys
Learn about the rename keys processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The rename keys [processing rule](/ingest/pipeline/processing-rules) changes the name
of a specified key.
## Configuration parameters
Use the parameters in this section to configure the rename keys processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `src` | Required. The key whose name to change. | *none* |
| **Destination key** | `dst` | Required. The new name for your key. If a key with this name already exists, the rule changes the name of **Source key** to this name, which overwrites the original value of **Destination key**. | *none* |
| **Match case** checkbox | `matchCase` | Indicates whether the regular expression is case-sensitive. | Not selected |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Regex mode** checkbox | `regexMode` | Indicates whether the values of the source key and destination key are regular expressions. If selected, **Source key** is treated as a regular expression and **Destination key** is treated as a substitution pattern. | Not selected |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the rename keys rule lets you update the keys that store your telemetry
data and retain the values of those keys.
For example, given the following sample website log data:
```json theme={null}
{"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"}
```
A processing rule with the **Source key** value `user_id` and the
**Destination key** value `account` returns the following result:
```json theme={null}
{"timestamp":"2023-03-28T09:08:41.64283645Z","account":3,"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:42.643343109Z","account":4,"page_id":10,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:48.643600498Z","account":1,"page_id":50,"action":"click"}
{"timestamp":"2023-03-28T09:08:50.643773688Z","account":5,"page_id":40,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:51.643932272Z","account":1,"page_id":30,"action":"purchase"}
{"timestamp":"2023-03-28T09:08:56.644080944Z","account":2,"page_id":40,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.64425954Z","account":3,"page_id":30,"action":"click"}
{"timestamp":"2023-03-28T09:09:03.644317046Z","account":1,"page_id":20,"action":"view"}
{"timestamp":"2023-03-28T09:09:10.64447719Z","account":2,"page_id":50,"action":"purchase"}
{"timestamp":"2023-03-28T09:09:17.644810963Z","account":2,"page_id":10,"action":"view"}
{"timestamp":"2023-03-28T09:09:20.644994805Z","account":1,"page_id":50,"action":"view"}
```
This rule changed the name of each `user_id` key to `account`, but kept the original
value associated with those keys.
# Search/replace value
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/search-replace-value
Learn about the search/replace value processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The search/replace value [processing rule](/ingest/pipeline/processing-rules) uses
regular expressions to search for a value inside a string, then replaces that value
with a different specified value.
## Configuration parameters
Use the parameters in this section to configure the search/replace value processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Key** | `key` | Required. The key whose value contains the string to replace. | *none* |
| **Regex** | `regex` | Required. The regular expression that determines which values to replace. You can use capture groups to specify more than one value. | *none* |
| **Match case** checkbox | `matchCase` | Indicates whether the regular expression is case-sensitive. | Not selected |
| **Maximum number of substitutions** | `submax` | The maximum number of substitutions that this rule will perform within a given record. | *none* |
| **Replacement value** | `replacement` | Required. The regular expression substitution pattern to replace the values specified by **Regex**. You can use the `%` character to use capture groups in your substitution pattern. | *none* |
| **Regex engine** | `regexEngine` | Required. The [engine](/ingest/pipeline/processing-rules#regex-engines) to parse your regular expression. Accepted values: `GNU`, `Oniguruma`, `PCRE2`, `POSIX`, `TRE`. | `PCRE2` |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Examples
Using the search/replace value rule lets you modify and overwrite your telemetry
data.
### Basic substitution
For example, given these sample logs:
```json theme={null}
{"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"}
```
A processing rule with the **Key** value `action`, the **Regex** value `purchase`,
and the **Replacement** value `checkout` returns the following result:
```json theme={null}
{"user_id":3,"page_id":30,"timestamp":"2023-03-28T09:08:41.64283645Z","action":"checkout"}
{"user_id":4,"page_id":10,"timestamp":"2023-03-28T09:08:42.643343109Z","action":"checkout"}
{"user_id":1,"page_id":50,"timestamp":"2023-03-28T09:08:48.643600498Z","action":"click"}
{"user_id":5,"page_id":40,"timestamp":"2023-03-28T09:08:50.643773688Z","action":"checkout"}
{"user_id":1,"page_id":30,"timestamp":"2023-03-28T09:08:51.643932272Z","action":"checkout"}
{"user_id":2,"page_id":40,"timestamp":"2023-03-28T09:08:56.644080944Z","action":"click"}
{"user_id":3,"page_id":30,"timestamp":"2023-03-28T09:09:03.64425954Z","action":"click"}
{"user_id":1,"page_id":20,"timestamp":"2023-03-28T09:09:03.644317046Z","action":"view"}
{"user_id":2,"page_id":50,"timestamp":"2023-03-28T09:09:10.64447719Z","action":"checkout"}
{"user_id":2,"page_id":10,"timestamp":"2023-03-28T09:09:17.644810963Z","action":"view"}
{"user_id":1,"page_id":50,"timestamp":"2023-03-28T09:09:20.644994805Z","action":"view"}
```
This rule searched for the string `purchase` within the value of the `action` key,
then replaced any matching strings with the value `checkout`.
### Capture groups
You can also use capture groups for more complex replacements. For example,
given these sample logs:
```json theme={null}
{"event":"Sign-on detected from user 'Alice' to server 83ad48."}
{"event":"Sign-on detected from user 'Bob' to server d6f442."}
{"event":"Sign-on detected from user 'Carol' to server fb65ee."}
{"event":"Sign-on detected from user 'Dave' to server e6ec7d."}
{"event":"Sign-on detected from user 'Erin' to server b0692c."}
{"event":"Sign-on detected from user 'Frank' to server 1c7cd2."}
{"event":"Sign-on detected from user 'Grace' to server 9626a3."}
```
A processing rule with the **Key** value `event`, the **Regex** value
`Sign-on detected from user '(.*)' to server (.*).`, and the **Replacement** value
`login: %1 at %2` returns the following result:
```json theme={null}
{"event":"login: Alice at 83ad48"}
{"event":"login: Bob at d6f442"}
{"event":"login: Carol at fb65ee"}
{"event":"login: Dave at e6ec7d"}
{"event":"login: Erin at b0692c"}
{"event":"login: Frank at 1c7cd2"}
{"event":"login: Grace at 9626a3"}
```
This rule searched for username and server name strings within the value of the
`event` key, then replaced the value of `event` with a shorter message that
still retained the names contained in the original message.
# Split record
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/processing-rules/split-record
Learn about the split record processing rule in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
The split record [processing rule](/ingest/pipeline/processing-rules) splits an array
of JSON objects into a series of standalone records.
## Configuration parameters
Use the parameters in this section to configure the split record processing rule. The
Palo Alto Networks Telemetry Pipeline web interface uses the items in the **Name** column to
describe these parameters. [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
use the items in the **Key** column as YAML keys.
| Name | Key | Description | Default |
| - | - | - | - |
| **Source key** | `key` | Required. The key that contains the array to split. | *none* |
| **Preserve non-array data** checkbox | `skipMissing` | If selected, the split record rule preserves instances of **Source key** that contain non-array data. If unselected, this rule removes instances of **Source key** that contain non-array data. | Not selected |
| **Preserve empty arrays** checkbox | `skipEmpty` | If selected, this rule preserves instances of **Source key** that contain an empty array. If unselected, this rule removes instances of **Source key** that contain an empty array. | Not selected |
| **Preserve original array** checkbox | `keepOrig` | If selected, this rule includes the full body of the original array inside each split object. If no **Destination key** is set or if **Destination key** is the same as **Source key**, the original array won't be preserved. | Not selected |
| **Destination key** | `dest` | The key to store the resulting split object. If unspecified, each split object is stored in a key with the same name as **Source key**. | *none* |
| **Comment** | `comment` | A custom note or description of the rule's function. This text is displayed next to the rule's name in the **Actions** list in the processing rules interface. | *none* |
## Example
Using the split record processing rule lets you restructure your telemetry data
by turning a combined array of events into multiple standalone events. For example,
given these sample logs:
```json theme={null}
{"events":[
{"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"}
]}
```
A processing rule with the **Source key** value `events` and the **Destination key**
value `log` returns the following result:
```json theme={null}
{"log":{"action":"purchase","user_id":3,"timestamp":"2023-03-28T09:08:41.64283645Z","page_id":30}}
{"log":{"action":"purchase","user_id":4,"timestamp":"2023-03-28T09:08:42.643343109Z","page_id":10}}
{"log":{"action":"click","user_id":1,"timestamp":"2023-03-28T09:08:48.643600498Z","page_id":50}}
{"log":{"action":"purchase","user_id":5,"timestamp":"2023-03-28T09:08:50.643773688Z","page_id":40}}
{"log":{"action":"purchase","user_id":1,"timestamp":"2023-03-28T09:08:51.643932272Z","page_id":30}}
{"log":{"action":"click","user_id":2,"timestamp":"2023-03-28T09:08:56.644080944Z","page_id":40}}
{"log":{"action":"click","user_id":3,"timestamp":"2023-03-28T09:09:03.64425954Z","page_id":30}}
{"log":{"action":"view","user_id":1,"timestamp":"2023-03-28T09:09:03.644317046Z","page_id":20}}
{"log":{"action":"purchase","user_id":2,"timestamp":"2023-03-28T09:09:10.64447719Z","page_id":50}}
{"log":{"action":"view","user_id":2,"timestamp":"2023-03-28T09:09:17.644810963Z","page_id":10}}
{"log":{"action":"view","user_id":1,"timestamp":"2023-03-28T09:09:20.644994805Z","page_id":50}}
```
This rule assigned each object in the original `events` array to a series of keys
named `log`.
## Related rules
For a processing rule with the opposite effect, see
[join records](/ingest/pipeline/processing-rules/join-records).
# Supply chain security
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/security
Reference the Palo Alto Networks Telemetry Pipeline public keys.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Part of security is ensuring that the software supply chain is as secure as possible.
As part of secure development practices, Palo Alto Networks Telemetry Pipeline provides the
following keys you
can use to verify the signatures of Palo Alto Networks Telemetry Pipeline software.
## Cosign keys
[Cosign](https://edu.chainguard.dev/open-source/sigstore/cosign/an-introduction-to-cosign/)
is a tool to sign, verify, and store software artifacts in an OCI (Open Container
Initiative) registry. You can use a tool like the
[Kubernetes Policy Controller](https://docs.sigstore.dev/policy-controller/overview/)
to verify supply chain metadata from Cosign.
The Palo Alto Networks Telemetry Pipeline public Cosign key is available
[here](https://storage.googleapis.com/calyptia_public_resources_bucket/cosign.pub).
## GPG keys
GPG (GNU privacy guard) is an open source implementation of the OpenPGP protocol.
You can verify the signature of Palo Alto Networks Telemetry Pipeline packages to ensure that the
signature is valid.
### Artifacts released on or after 2026-03-24
Use the following GPG key to verify Palo Alto Networks Telemetry Pipeline software packages released
on or after 2026-03-24:
```text expandable theme={null}
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGnC7BsBEAClg8NHbhbkfNWGga3MWQQVw90j5Mt7mfjoxlYUHnUAyFTIYltj
V9aSYHb317kK3y/cbmi7/W23E4F4WhBh81dDjCKAwz0oLawd8oObTkVy//23mhg4
O+CdW6vLmIEKe9xMKR60TMmT5wdmYKuF0lrpGghrZjj1gQFpmgiBy637Va/3SvTh
0pe5PyaOB7Mcw6bOaO7N2dVCDXXZyFH783OyxNWkq9QsG3/1fXSnfqLZM9+iQzQU
bpHBVEA/AUzuWjqsQCp3BESjSIVAHhmbAa6kqvthpeUHSUE4F4h76C8DovDxmXGR
4ku4A/FgeU4vB72bqL4CmQLESWEFKduyqfYDV3gCW+XcKppoOBfT7YrX0sntVGil
frHlFhS7lrHfkYO4sFwtwsrR5GJem4J6P0XuiGHd1Mf03jfzoXGkhNas9wKTmbV4
nGnGD97lFcL8W+nvCv5oCQ2fgY2LjtaEIFNmF3BJFcRoRk+R+7lhb8LdxFrbuJLH
YZi0UBcHLpECXKO/svnTe/BtFprTmpbPAOir6K8ZW8OyjNmfl8/8CvLOSQ27z8uF
TTHCOaWiOV0sXxgOSACGfcsIL/bjSLMshFTuSpDWpg76hf9ZkFeolBJ/ihYAla3Q
09axEcZWIdS1X3Usjua7Tn+kRcV+xdlXzXC5NirnCVeq/2jY3agy3UbsrQARAQAB
tDRDYWx5cHRpYSBSZWxlYXNlcyA8ZW50ZXJwcmlzZS1yZWxlYXNlc0BjYWx5cHRp
YS5jb20+iQJ0BBMBCABeFiEEvT7lcYkwNwhNTR/PF8YicL6I/s8FAmnC7BsbFIAA
AAAABAAObWFudTIsMi41KzEuMTIsMCwzAxsvBAUJB4TOAAULCQgHAgIiAgYVCgkI
CwIEFgIDAQIeBwIXgAAKCRAXxiJwvoj+z8XxEACOWh0R8k858+re6+KWDcEYxcPK
YQ7eh0Aca8G7ikLoXwKun7h7QS90f+GgZYXnDPljiabTotTN+/cZSIzwOqWDZnq6
gxbHw9b7Mmr6BU0aMgDpknK5OmT7W/HabSfZPqOt7QTZj7wbYdnOiVA4XCnC5T4L
4PfeN9Zk+yNw6SSdnN6TKNyVJYN0Gw1+UWbDU1xCv54jkQreOjiSi0Gx3ojwZzfJ
zHB2TTmJ6M+tnd+GPyJpP1KkoBeFtrHvZwJP/OsTg9fHcYUGzBgqior7Ep9kia9p
+G6RYF1rw2OpeLgtLbgezJQVTCGDJ/u59/6/Hp8V9erHjaQVNb9CO8f7hZ4eO1jk
H6vm39I9yzhADU8cr8rbK0x15LwYolHPyTKfmd5jKikrh70cv+pyaMGuly47MrUG
nk9qX3S6kA2I8lHvuCDE2uhkL9Rny617ZfQNRiyGZ/dTyaDapAnkklyxks5LQrbG
kONzFOHEE5uugHNfDBIQV9mNOie0pFC6CXzyiYDlsYuavSaF1beANY6xVtXM71m+
RE+YFmrsMSm/dUJ3WYztcCVjIKDc+tmpsp5OW6Ew8Iiry4RLliMUBSXpJ0L4txYq
kncVhaDgdY0j+YstgZfZ6KQTNVycxDwb/Un+zoY4/R3MCxPswtPkEsLyneIVD65Z
8XIVsFxF/IqrVYMYkLkCDQRpwuwbARAA2g2vOZT7OsretkyJpkbw2VRx85vXR25P
f+JlMLMUio3O4K+IOJ6yE1Q08tXRdqT0lvFoFSiMotg/Hsh9+Tq7E/Gay3zkDiBv
3AEKC5r7v8udzvZKeyPeRTj/GaE9FkR4o2qs9dOjY7i5k8Y1W1e6ZbioznbhInAC
gHu0JZ4jy/PUycbP6SjG3Azx14PDEWXY5f0nlQ8AgdAzUfBtNcjHsJGlv574ViU8
bZzvXtXyQoaSwDek/+ompoPF/qIB+vyPkAcdJqZCphwaOVgCVaT4KY54xTs2J585
3T4kNlz4CW1anlqfrsrAR/uvx83lD1uZi5jU5lt97I52SDfX48chsJelbQCiDnHx
wZ+B2vVjPtRK2tmbHSI3Xp1QwIVpvF78BwowxuE0hSWiuCA5IVhFYG4OoX95hv67
gaqQjlBAgJmbeT1a4XDyDU+HoCRMUYeaJmVu1ecGl/vFccUBs3w9nQz/ziddj1db
2Mpab5qe7hBW4n8QF8j5aEiejIQvDg+Stdz+NvPmZa+UEgM9yaLKbW5klR1vF99s
wmUoI5oQuJvX0n+fw0VjHQUB9wzw40RtplDrGJicoBfYXai01GHm6BNCdZgnSHmY
SUlQZKePshFBemvY+d4SHRs/vt6G23hQJqRexe48auIqLNJQLYecPFntY+rTkAdI
lHol1UHVEr0AEQEAAYkEjgQYAQgAQhYhBL0+5XGJMDcITU0fzxfGInC+iP7PBQJp
wuwbGxSAAAAAAAQADm1hbnUyLDIuNSsxLjEyLDAsMwIbLgUJB4TOAAJACRAXxiJw
voj+z8F0IAQZAQgAHRYhBDzWFPakNZ8mpZNlW3zldFDizbTiBQJpwuwbAAoJEHzl
dFDizbTi6O8P/3+1GL13J/KO4Rg9p/lX5liBos7RUgB/dZgI5pVEu5xUPa468Bgt
G3Y2A/TpBuo99iQHi0Dcvg7/diQZ4XVscRhT0SSnlShWn2mQmMxy9Q+DiMe10vvE
ZiO5PEaK8zAJuFdDSIFK2RVNSGvAwyuraX6FBVWrNYiuF1as4u7JOMlj0BCmpRtv
fFsFE3yzuGt5i0UnMy7bYG9BZSrNg6/ppw3Ot+l1JaXX3R5uJaS4GIGRFPYh+aYb
d+W/cWizRyMl8idXMwxZJlt7rCZ1+6VlcrqLRe6eNe6jajkPVvR0zCx9QzST92Oq
ouvX3uN++VCZtCn2U/eJ/3zImSHfd0n+0Prp0DfjLpw/WyFhhO9zhLdM6Rn5zv9l
/iY2rcFbA6SsS9fDa4Rp4GDk7BbGw4DtjwECdoB8JjWo6peM815G9EEvfpYIGKC+
G/fily9HkD8NwJBYGnXay5Ypzsqq+1KMfWuddv4/RocEv4xAhM28BqiqBSA2ufdl
4QxV+l78i99ze+Gter7bZPe7G+ZWhEH6CFQ20drB3D9Frf2ASjNtwZmLdUgTrxSM
vGbHJV/UQhT+1Iz/tAUW7uhLQyRdY5v3FHjjdd+XQIXiizcUNMfU4k8W4f1J9yc9
+fwj8L0NufwkukAvELEISJU7dJtnf6v/OS+/BfQCMKIoHnP6EMl3fe5TXbYP/0wt
mY7rPdFDDASE+zYXtZqA9Z2tFL+DYkoSxljaxM39VZY+L9usJhwOxQeUpu9T/Rs+
jn8psPbtPzOatTdrjZ5q1V4CgyM8wA8YWnmkxnMWaNz+579l05W+v4sIfrALBg7+
QI2LDOuBsTOf72w16OhY1yrnjoCbCbPDDWmc6NfeblOdZMcdu9fHfa1Sxsxekmdi
xVeMFW+nIxZj6WZB3zM0behMbkKUVaqJURlMZARW9kU3/WzU04zcHCAEgD86WEC3
u/GHmGQRPhLH3i7I9gatg9wpVEzB7zi/CqHCHyDqMswLGo0WACUy52orKe4RDuvl
HTsfy3Xq16S3QMVMxE6gYokjQhLCFYmx0wM9YKK7YgrEIpQvaMkFgzP+qryowXJ/
MrWBnt7+p1RUPhohKq3e9TpPlSXcGdCpwrbtTEBOfU6j7GyhNC+HuS9Tq3WZUNY4
VXV5iR1SYRo0gel8LiEn17K9ijSO2Dfq5IFoORYqeQjit14rAF3o/3aVjDjZ3b7r
8SYDaWsUqjBDtzoDlTg5eECnPXTGPD5nf5hf+483nPCZ7dzB7yTJduSXKdZKA986
LzEN2BZ60NoGW6zIjhEQdhEBT6PXCWTQvrgJDDbcc3cNYeXfIC0uGMiUH0vADkzM
19LZ1COhlt2MRlu7sFA/2ufrCWwgDMF8GdW1Ygm1
=o9Md
-----END PGP PUBLIC KEY BLOCK-----
```
When you verify the Palo Alto Networks Telemetry Pipeline public GPG key,
the information output to your
terminal should match this key fingerprint:
```text theme={null}
pub rsa4096 2026-03-24 [SCEAR] [expires: 2030-03-23]
BD3EE571893037084D4D1FCF17C62270BE88FECF
uid Calyptia Releases
sub rsa4096 2026-03-24 [SEA] [expires: 2030-03-23]
3CD614F6A4359F26A593655B7CE57450E2CDB4E2
```
### Artifacts released before 2026-03-24
Use the following GPG key to verify Palo Alto Networks Telemetry Pipeline software packages released
before 2026-03-24:
```text expandable theme={null}
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGI8PcIBEADZ0fizLscKGjhrg0tC5IZUTasN3uJIqNtAIRl48Zr26UYPsnjE
TIXiANnruf0OzEm2f9KsfVETubawAV/b1gMGcv7vYVm6IxDvWQpUb01ooPvzqH6d
Gn2Gq7LTq5t2+/1MZii0ZNkaoKsB6GiGO1gJE0flGvCASE3m0wPbZv+Q5sJ8wNcu
uL/lDurM8twKJAQVBPaXadY1dxl0UDOF0w+vTtTxFAHh0apNqNYQLXjjc2TcaDdL
MnLg6AUGBZhhgIPECdG6XLxkVGqTMLBhBEtohMtVGznRr5gicIn0jX57ueDiftuc
QOnm/ZEvBuiNAW6PRtvuqW/+PHZ1pVUP1z1rcCWqYJK471I5W11r1BH738arJy1T
kzciHjraum10dDLoB0Ly/NDf/0XFkLS4A009BRxo4N6FRVN8OP6t8zktxAZTuawH
MTpTJD8+lGJju4R/AA+H01m3cixM4ffy1zuwqlH4IWRlkysRwlHtxfu+9PYA7GjX
d+uQJPKYYAaG7LloTIxcQ01yZ63FB97CLAd05Bmq3eQpQw/9iP8OP6Ska827Gjfg
0pgG4HEOk2ykyCFeSj8vW4frzhhas/YuDvKhxXZf8jaKJFAbxuHW4rBv5OUUckCw
PQDEiIsB465eIIaSrjjD9yhZKB9BBFAPHCvptbjvhvQ/x0MxSEcVOv81LQARAQAB
tDRDYWx5cHRpYSBSZWxlYXNlcyA8ZW50ZXJwcmlzZS1yZWxlYXNlc0BjYWx5cHRp
YS5jb20+iQJUBBMBCAA+FiEECKp3AN5X5P1iQ9xRuOWmBtZ6eVIFAmI8PcICGwMF
CQeGH1MFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQuOWmBtZ6eVIC1BAAjsPs
nUz4OxS8JrLho68hNa+4xaWrlXqVt47MfHbOl0RplH0iKa/E47nRYJ10QdGaPKZG
60prudoS7kfrD9qrONcuJPYa1XeB6fYs1K3yaDcEbTGCtJtICChrBvLkfwK0CcIF
H4NzFLaSJOJLDtC0gFW6A7kWzosjK7WJ5fwr/JWwND62usTwrCCHHRX/u6ecI6PT
RakzUl3SVhAmEstoiX/X7wZw6PF/hNqV7T9CtbsVy8DpCGamCccCrrDHb3WZpFpR
cb4pxBIeXtP5dzmK0RKRuaKQtcfx7bYuqpNB89fzPkaBoER0VLuAvY3ml336WJn6
WG9lyJI/N97bXWe/dYqo/xb1isVWHT0mYXP7a3M3wcKMeyW0ZYQ8m+jJXnhlG45h
Vqwub+UL0ymi6JuopQH6kDVMGjFoG1oU14RJMABbvLoDBPtdP03No6jxCkqVHZTL
OPV5hNbYX0fevHIKT6L0Wj42uExIb27M23c4iaDgAboewNF3vCVw9McuWTrp+5bL
HCIjYhPSN7Uu/62+KlGWI1d8MeigWyHOX9QisVrm7e/eTvGkciVvQAs2S1v7yqGc
DgBTscOR0ie7XBDy57JrLMrt540Lfc1WaarfAJVqEg+XeU9zwKhw3IYiMULi8+5t
doPOndkv/rZNQnNdoj7DSx5zBHhpGL/rDA2Ovf+5Ag0EYjw9wgEQALY1aY+G1AOe
LpB/3Ptdw2vpqEViJx47FrEoMeIQunKJ2nxQ5Zxxyy8qnbYmpD399wteN8u++kPw
uxeNhEPVjJd/hZ+aKiSdIIAQw9LabAU9zGkyTcipRU/FpfGb97PShnEKn5y8l+5J
VOifBP2pfazwoFEZ38rkhMg9qnn9yU+WffzNvLAK9QiYywMSgwkQyEoK5DOLusLr
y0b5CU7CyE/WCo1NWI6vKEMb20D/bFpYbLzTP80h5SaUY7jrl4YVx6pkDnbuv0cF
5XRROGZWFORx0jqSFI3r5m+2Bfua/pMrBSIrqy8n9nB0T0Q4c/6JJugnIk0ujgpz
ZiHFox6fo5mWA5kbrb9UkdOoCCC6gXWcwcRdLy6DnkRROFdOTB2j3wph6pzNVfJx
Er97yymS1FrwxUDVgWNQm6pIaJPnF1ttVAs7ofHPSs9jyA0jnFlEhw9Zsu+jhUBS
BQYjqb/Xma+YegZHK9lcOLpPHxI9mJnWKYbmaz7fXL4aRoYVscKDAvpByxphRoVi
+AB6P7I/dkk/cj6W6kDAbr5f3htUFRYl7I4CoC/GaDxTFU7DyiWpeqyUZ83074Di
zplgCBJ5D7A9+6ZdppfidX4jBbrg1mNihHgMfnZ1W2OQkRli+2BnA8x3HxfFZo10
Ay9Uz6LwLyc9SoziOeupddl5YBlvdVnhABEBAAGJAjwEGAEIACYWIQQIqncA3lfk
/WJD3FG45aYG1np5UgUCYjw9wgIbDAUJB4YfUwAKCRC45aYG1np5UglyD/9Xs1ZW
6vNbY4jvQkLoboOE6QMRM9rmsRxq8mHoTrcXS8nlh/4TaUSn/IX8QFNel4PKT7bo
TYfds5xONC59Nw7LJUs6VPdg8I6L3w7WE94uAweLVa3Dr5/mKJ5khK63XBhywGK4
DO4o3RHWdbgfHBo3dOT9C3TYJSc/O2IQEPINQkDYz4MnUOQvZbPU34GkOVCPK73b
m/Kw9mRADcwuLKP7hN1JH4RZfGCr5TgaYQABNa/k/wG63QND9+20nUhbUFvCQqnL
t3FPcJYkArbSigivmrbwNvlhzmAuS0m1iutVhlAtgBw3DaF8VAaf6pYQBNKk804W
XzqjH2dys8ZEALDFwW1y4J91MjM24ziHXrAY3/cnwN530QF/HLeE+lqeIXpm5Hi1
BdD26CXrRRrtfTjAHG/mZwkA7mA6GR7cpQWJ4d1gorKj3ofTOKcakIoD1yk/x4X1
nN2gI7le7dV0YuzLncGh51bnCmBSYbnoD+vZ88LbB5IjOZRYYwSOLyyCFfwVzLDG
eCPl42gf2624An19rUlCMoBom0CFblN8tlmWu7FSgD3zd3u7cAG5ktOiLtad98xB
PmdXROjwdDdvPiBiC36Wf6qhshQKJ2OEK/x0He3Vd6vXQyV8SFIAukv9bWZEbhFr
nnZ6mGB2zREpsL/HoaG4no46tHvWfhanTEGEoA==
=33Bk
-----END PGP PUBLIC KEY BLOCK-----
```
When you verify the Palo Alto Networks Telemetry Pipeline public GPG key,
the information output to your
terminal should match this key fingerprint:
```text theme={null}
pub rsa4096 2022-03-24 [SC] [expires: 2026-03-24]
08AA 7700 DE57 E4FD 6243 DC51 B8E5 A606 D67A 7952
uid Calyptia Releases
sub rsa4096 2022-03-24 [E] [expires: 2026-03-24]
```
## SBOM and other reports
Software bill of materials (SBOMs) are generated for each release, along with Common
Vulnerabilities and Exposures (CVE) reports at the time of release. To access these
materials, contact [Cortex XCOR Support](/support).
# Palo Alto Networks Telemetry Pipeline v2
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2
Learn how to get started with Palo Alto Networks Telemetry Pipeline v2.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Palo Alto Networks Telemetry Pipeline v2 lets you control your observability data's journey
from collection to processing to routing.

**** Palo Alto Networks Telemetry Pipeline v2
deploys on your infrastructure
to streamline the way you process logs, metrics, events, traces, and security data.
* Run Palo Alto Networks Telemetry Pipeline v2 in a
[Kubernetes cluster](/ingest/pipeline/v2/install/install-operator/kubernetes-cluster)
or any [Linux](/ingest/pipeline/v2/install/install-operator/linux) environment,
including virtual machines.
* Automate pipeline management through [resource profiles](/ingest/pipeline/v2/configure/resource-profiles),
[autoscaling](/ingest/pipeline/v2/configure/scaling), and [rollback](/ingest/pipeline/v2/configure/history-rollback).
**** You can make decisions about how to collect,
aggregate, and format your telemetry data, and then discard any data you don't need.
* Use [parsers](/ingest/pipeline/v2/build/parsers) to add structure to unstructured data.
* Build [processing rules](/ingest/pipeline/processing-rules) using a library
of predefined, configurable actions, or write your own
[custom Lua scripts](/ingest/pipeline/processing-rules/custom-lua).
**** Pipelines let you connect any source with any
destination to send your telemetry data wherever you need it to go.
* Work with out-of-the-box [plugins](/ingest/pipeline/plugins) for popular [sources](/ingest/pipeline/plugins/source-plugins)
and [destinations](/ingest/pipeline/plugins/destination-plugins).
* Take advantage of open standards, like Prometheus and OpenTelemetry.
# Palo Alto Networks Telemetry Pipeline architecture
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/architecture
Learn how Palo Alto Networks Telemetry Pipeline components create and run pipelines in a cluster.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Palo Alto Networks Telemetry Pipeline uses different components to create, modify, and
run pipelines.
```mermaid actions={false} theme={null}
flowchart TB
accTitle: Palo Alto Networks Telemetry Pipeline architecture diagram
accDescr: An diagram of Palo Alto Networks Telemetry Pipeline architecture.
subgraph cluster ["Kubernetes or K3s cluster"]
direction TB
subgraph namespace [Namespace]
direction TB
operator(Core Operator)
CRDs@{shape: lined-cylinder, label: "Pipeline custom resources"}
instance(Core Instance)
operator-."watches"-.->CRDs
instance--"creates and updates"---->CRDs
subgraph daemonset ["Pipeline (DaemonSet)"]
pod3([Pod])
end
subgraph statefulset ["Pipeline (StatefulSet)"]
pod4([Pod])
pod5([Pod])
end
subgraph deployment ["Pipeline (Deployment)"]
pod1([Pod])
pod2([Pod])
end
operator--"creates and modifies"--->deployment
operator--"creates and modifies"--->statefulset
operator--"creates and modifies"--->daemonset
end
end
subgraph chronosphere [Palo Alto Networks Telemetry Pipeline]
backend[Palo Alto Networks Telemetry Pipeline backend]
frontend[Palo Alto Networks Telemetry Pipeline web interface]
frontend --"modifies"-->backend
end
instance<-."syncs status"-..->backend
instance--"fetches config"--->backend
backend ~~~ CLI((Pipeline CLI)) --"modifies"--> backend
CLI ~~~ backend
CLI --"modifies"--> instance
style namespace stroke:#5a78c4,stroke-dasharray: 5 5
classDef greenFill stroke:#000,fill:#007A3D,stroke-width:2px,color:#FFFFFF
class pod1,pod2,pod3,pod4,pod5,frontend,backend greenFill;
classDef greenLine stroke:#007A3D,stroke-width:2px
class pod1,pod2,pod3,pod4,pod5 greenLine;
classDef blueFill fill:#5a78c4,stroke-width:2px,color:#FFFFFF
class daemonset,deployment,statefulset,CLI blueFill;
classDef blueLine stroke:#5a78c4,stroke-width:2px
class cluster,daemonset,deployment,statefulset,chronosphere,CLI blueLine;
```
Palo Alto Networks Telemetry Pipeline is built on Kubernetes. You can either
[install Palo Alto Networks Telemetry Pipeline](/ingest/pipeline/v2/install) in an
existing Kubernetes cluster or in a Linux environment. If you install Palo Alto Networks
Telemetry Pipeline in a Linux environment, the installer automatically deploys a K3s
cluster, then installs Palo Alto Networks Telemetry Pipeline components in that cluster.
Each Palo Alto Networks Telemetry Pipeline installation includes a Core Operator, which is a
[Kubernetes operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)
that creates and modifies pipelines. A different component called a Core Instance
creates and updates the custom resources that the Core Operator uses when it creates
or modifies pipelines. The Core Instance also syncs the status of your cluster
with the Palo Alto Networks Telemetry Pipeline backend.
Each pipeline is a workload that runs within your cluster and contains one or more Pods.
By default, pipelines run as
[Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/),
but other [workload types](/ingest/pipeline/v2/configure/kubernetes/workloads) are
supported as well.
You can use [Pipeline CLI](/ingest/pipeline/pipeline-cli) and the
[Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/) to configure your
Palo Alto Networks Telemetry Pipeline installation and to create and modify pipelines.
# Build telemetry pipelines
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/build
Learn how to build telemetry pipelines to collect, transform, and route telemetry data.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can use Palo Alto Networks Telemetry Pipeline to collect, transform, and route
telemetry data.
```mermaid actions={false} theme={null}
flowchart LR
accTitle: Pipeline data flow
accDescr: A diagram of a telemetry pipeline. Data originates from one or more source plugins (and each plugin can have an attached parser), then passes through processing rules, then continues to one or more destination plugins.
subgraph Pipeline data flow
direction LR
source1(Source plugin )
source2(Source plugin )
source3(Source plugin )
parser1([Parser ])
parser2([Parser ])
parser3([Parser ])
processing1[/Processing rules /]
processing2[/Processing rules /]
processing3[/Processing rules /]
processing4[/Processing rules /]
processing5[/Processing rules /]
destination1(Destination plugin )
destination2(Destination plugin )
node(( ))
source1 --> parser1 --> processing1
source2 --> parser2 --> processing2
source3 --> parser3 --> processing3
processing1 --- node
processing2 --- node
processing3 --- node
node --> processing4
node --> processing5
processing4 --> destination1
processing5 --> destination2
end
data1((Data))
data2((Data))
data3((Data))
data4((Data))
data5((Data))
data1 -.-> source1
data2 -.-> source2
data3 -.-> source3
destination1 -.-> data4
destination2 -.-> data5
style data1 stroke-dasharray: 5 5
style data2 stroke-dasharray: 5 5
style data3 stroke-dasharray: 5 5
style data4 stroke-dasharray: 5 5
style data5 stroke-dasharray: 5 5
style node stroke-width: 0, fill:none
```
When you [create a pipeline](/ingest/pipeline/v2/build/create-modify), you must include at
least one [source plugin](/ingest/pipeline/plugins/source-plugins) and at least
one [destination plugin](/ingest/pipeline/plugins/destination-plugins). You also
have the option to add [parsers](/ingest/pipeline/v2/build/parsers) and [processing rules](/ingest/pipeline/processing-rules)
that transform the data passing through your pipeline.
## Get started
> [card] [Automated Kubernetes logging](/ingest/pipeline/v2/build/automated-logging)
> [card] [Create, modify, or delete pipelines](/ingest/pipeline/v2/build/create-modify)
> [card] [Parsers](/ingest/pipeline/v2/build/parsers)
> [card] [Plugins](/ingest/pipeline/plugins)
> [card] [Processing rules](/ingest/pipeline/processing-rules)
> [card] [Troubleshoot a pipeline](/ingest/pipeline/v2/build/troubleshoot)
# Automated Kubernetes logging
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/build/automated-logging
Use Palo Alto Networks Telemetry Pipeline to route logs from a Kubernetes cluster.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can use automated logging to route Kubernetes data through Palo Alto Networks
Telemetry Pipeline. Automated logging pulls logs from services running inside the
Kubernetes cluster where you deployed a Core Instance, then sends those logs to
one or more destinations.
## Enable automated logging
To enable automated logging in Palo Alto Networks Telemetry Pipeline:
1. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
2. Open the project that contains the Core Instance where you want to set up
automated logging.
3. Go to **Core Instances**, then click the name of the Core Instance where you'd
like to set up automated logging.
4. Next to **Kubernetes Namespaces**, click the
Expand icon, then click **Automate logging**.
5. In the dialog that appears, select one of the available
[destinations](/ingest/pipeline/plugins/destination-plugins)
to determine where your logs will be sent.
6. Configure the settings for your chosen destination plugin, then click **Save**.
## Modify automated logging settings
> [!NOTE]
>
> If you're trying to modify these settings immediately after enabling automated logging
> in a Core Instance, you might need to refresh your browser to make these menus
> appear.
After you've set up automated logging, you can add additional destinations to
your Core Instance or adjust the settings for any existing destinations. To
modify automated logging settings in Palo Alto Networks Telemetry Pipeline:
1. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
2. Open the project that contains the Core Instance whose automated logging settings
you want to modify.
3. Go to **Core Instances**, then click the name of the Core Instance whose
automated logging settings you want to modify.
4. Under **Kubernetes Namespaces**, click any item in the **Destinations** list.
This opens the pipeline builder.
5. Use the pipeline builder to modify your Kubernetes sources, destination plugins,
or [processing rules](/ingest/pipeline/processing-rules#add-processing-rules-to-your-pipeline).
## Disable automated logging
> [!WARNING]
>
> If you disable automated logging, any destination settings you've configured
> will be deleted permanently. To re-enable automated logging, you'll need to reconfigure
> your destination settings.
To disable automated logging in Palo Alto Networks Telemetry Pipeline:
1. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
2. Open the project that contains the Core Instance where you want to disable
automated logging.
3. Go to **Core Instances**, then click the name of the Core Instance where you'd
like to disable automated logging.
4. Next to **Kubernetes Namespaces**, click
**Disable **.
# Create and modify pipelines
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/build/create-modify
Learn how to create, modify, and delete custom pipelines.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can use Palo Alto Networks Telemetry Pipeline to create, modify, and delete
pipelines.
## Create a pipeline
Select from the following methods to create a pipeline.
> [tab] Web interface
>
> To create a pipeline using the Palo Alto Networks Telemetry Pipeline web interface:
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project where you want to deploy a new pipeline.
> 3. Go to **Core Instances**, and then click the name of the Core Instance running
> in the environment where you want to deploy a new pipeline.
> 4. In the **Data Pipelines** section, click **Create Data Pipeline**.
> 5. In the dialog that appears, configure the following options:
> * **Name**: The name to give your pipeline.
> * **Service type**: The [Service type](/ingest/pipeline/v2/configure/networking#service-types)
> to use for your pipeline.
> * **Workload type**: The [Workload type](/ingest/pipeline/v2/configure/kubernetes/workloads)
> to use for your pipeline.
> * **Storage class**: ([StatefulSet](/ingest/pipeline/v2/configure/kubernetes/workloads#additional-settings-for-statefulset-pipelines)
> pipelines only) The [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/)
> to use for each Pod's [PersistentVolume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/).
> After you set this value for a StatefulSet pipeline, you can't modify it.
> * **Retention policy when scaled**: ([StatefulSet](/ingest/pipeline/v2/configure/kubernetes/workloads#additional-settings-for-statefulset-pipelines)
> pipelines only) Specifies whether Kubernetes should retain or delete the
> [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
> (PVC) associated with each affected Pod if the StatefulSet pipeline is scaled down.
> * **Retention policy when deleted**: ([StatefulSet](/ingest/pipeline/v2/configure/kubernetes/workloads#additional-settings-for-statefulset-pipelines)
> pipelines only) Specifies whether Kubernetes should retain or delete each Pod's PVC
> if the StatefulSet pipeline is deleted.
> 6. Click **Save and continue**.
> 7. Add and configure your [source plugins](/ingest/pipeline/plugins/source-plugins) and
> [destination plugins](/ingest/pipeline/plugins/destination-plugins).
> 8. Add [processing rules](/ingest/pipeline/processing-rules) to transform the telemetry
> data as it passes through your pipeline.
> 9. Click **Save and Deploy** to finish creating your pipeline.
> [tab] Pipeline CLI
>
> To create a pipeline using [Pipeline CLI](/ingest/pipeline/pipeline-cli):
>
> 1. Create a [pipeline configuration file](/ingest/pipeline/v2/configure/config-files).
> For example, this configuration file specifies a pipeline that uses
> [mock data](/ingest/pipeline/plugins/source-plugins/mock-data) as a source
> and [standard output](/ingest/pipeline/plugins/destination-plugins/standard-output)
> as a destination:
>
> ```yaml theme={null}
> 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).*$
> ```
>
> 2. Run the following command:
>
> ```shell /INSTANCE/ /PIPELINE/ /VERSION/ /CONFIG/ theme={null}
> calyptia create pipeline \
> --core-instance INSTANCE \
> --name PIPELINE \
> --image ghcr.io/chronosphereio/core/calyptia-fluent-bit:VERSION
> --config-file CONFIG \
> ```
>
> Replace the following:
>
> * *`INSTANCE`*: The name of your Core Instance.
>
> * *`PIPELINE`*: The name to give your new pipeline.
>
> * *`VERSION`*: Optional: The latest version of the pipeline agent.
> You can find this value in the **Pipeline agent** column of the
> [Palo Alto Networks Telemetry Pipeline component versions](/ingest/pipeline/v2/component-versions)
> table.
> For example, if the latest version of the pipeline agent is 1.23.0, provide the
> value `1.23.0` to use the Red Hat UBI [agent image](/ingest/pipeline/v2/configure/agent-image)
> or `1.23.0-distroless` to use the distroless agent image.
>
> If you don't specify a version number, Palo Alto Networks Telemetry Pipeline
> uses the latest version
> of the Red Hat UBI agent image by default.
>
> * *`CONFIG`*: Optional: The name of your
> [pipeline configuration file](/ingest/pipeline/v2/configure/config-files). If you don't
> specify a configuration file, Palo Alto Networks Telemetry Pipeline
> creates an empty placeholder
> that you can [modify at a later time](/ingest/pipeline/v2/configure/config-files#modify-a-pipelines-configuration-file).
>
> If you specify a configuration file, you can also add the `--skip-config-validation`
> flag to skip the validation process for that file.
>
> Palo Alto Networks Telemetry Pipeline assigns a full name to each pipeline using the
> `[core-instance-name]-[pipeline_name]` naming schema, where `[core-instance-name]`
> is the name of your Core Instance and `[pipeline-name]` is the short name you gave
> your pipeline during the `calyptia create` process.
## Modify a pipeline
Select from the following methods to modify a pipeline.
> [!NOTE]
>
> To upgrade a pipeline to the latest version, you must use Pipeline CLI. For
> more information, see [Upgrade a pipeline](/ingest/pipeline/v2/install/upgrade#upgrade-a-pipeline).
> [tab] Web interface
>
> To modify a pipeline in the Palo Alto Networks Telemetry Pipeline web interface:
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline that you want to modify.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline you want to modify.
> 4. Under **Data Pipelines**, click the name of the pipeline that you want to modify.
> 5. Click **Edit**.
> 6. Configure the [source](/ingest/pipeline/plugins/source-plugins),
> [destination](/ingest/pipeline/plugins/destination-plugins),
> and [processing rules](/ingest/pipeline/processing-rules) for your pipeline.
> 7. Click **Save and Deploy** to save your changes.
> 8. To manage advanced pipeline settings, go to the
> **Advanced Settings** page.
> The settings on this page include:
> * [Replicas](/ingest/pipeline/v2/configure/scaling)
> * [Deployment strategy](/ingest/pipeline/v2/configure/deployment-strategies)
> * [Version](/ingest/pipeline/v2/component-versions) and [agent image type](/ingest/pipeline/v2/configure/agent-image)
> * [Files](/ingest/pipeline/v2/configure/files)
> * [Secrets](/ingest/pipeline/v2/configure/secrets)
> [tab] Pipeline CLI
>
> To modify a pipeline using Pipeline CLI, follow these guides:
>
> * [Modify a pipeline's configuration file](/ingest/pipeline/v2/configure/config-files#modify-a-pipelines-configuration-file)
> * [Add a file to a pipeline](/ingest/pipeline/v2/configure/files#add-a-file-to-a-pipeline)
> * [Add a secret to a pipeline](/ingest/pipeline/v2/configure/secrets#add-a-secret)
> * [Update a pipeline's parsers](/ingest/pipeline/v2/build/parsers#custom-parsers)
> * [Add or remove replicas](/ingest/pipeline/v2/configure/scaling#fixed-number-of-replicas)
> * [Enable horizontal pod autoscaling](/ingest/pipeline/v2/configure/scaling#horizontal-pod-autoscaling)
> * [Modify a pipeline's Service type](/ingest/pipeline/v2/configure/networking#modify-the-service-type-of-an-existing-pipeline)
> * [Modify a pipeline's deployment strategy](/ingest/pipeline/v2/configure/deployment-strategies)
> * [Create pipeline sidecars](/ingest/pipeline/v2/configure/kubernetes/sidecars#create-a-sidecar)
> * [Set pipeline tolerations](/ingest/pipeline/v2/configure/kubernetes/tolerations#pipeline-tolerations)
> * [Pause a pipeline](/ingest/pipeline/v2/configure/scaling#pause-a-pipeline)
## Delete a pipeline
Select from the following methods to delete a pipeline.
> [tab] Web interface
>
> To delete a pipeline in the Palo Alto Networks Telemetry Pipeline web interface:
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline that you want to delete.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline you want to delete.
> 4. Under **Data Pipelines**, find the pipeline that you want to delete, and
> then click
> **Settings >
> Delete**.
> 5. In the confirmation dialog that appears, click **Delete**
> to permanently delete your pipeline.
> [tab] Pipeline CLI
>
> To delete a pipeline using [Pipeline CLI](/ingest/pipeline/pipeline-cli):
>
> 1. Run the following command:
>
> ```shell /PIPELINE/ theme={null}
> calyptia delete pipeline PIPELINE
> ```
>
> Replace *`PIPELINE`* with either the name or [unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
> of the pipeline to delete.
>
> 2. Optional: If you installed Palo Alto Networks Telemetry Pipeline in a Kubernetes cluster, use
> `kubectl` to delete the CRDs associated with your pipeline. This ensures no
> stray pipeline resources persist in your cluster. To do so, run the following
> command:
>
> ```shell /NAME/ theme={null}
> kubectl delete pipeline NAME
> ```
>
> Replace *`NAME`* with the name of the pipeline you deleted in the previous
> step.
# Parsers
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/build/parsers
Use Palo Alto Networks Telemetry Pipeline to parse data.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
```mermaid actions={false} theme={null}
flowchart LR
accTitle: Pipeline flow
accDescr: A simplified representation of a telemetry pipeline, which includes a source plugin, parser, processing rules, and destination plugin.
subgraph Pipeline flow
direction LR
A(Source plugin )
B(Parser)
C(Processing rules )
D(Destination plugin )
A --> B --> C --> D
style B stroke-width:4px
end
```
The telemetry data emitted by different sources often has inconsistent
information and formats, which can cause problems if data from
multiple sources passes through a single pipeline. It can also be difficult to
analyze and process raw, unstructured data.
Parsers address these issues by transforming your telemetry data into a
predictable, structured format.
> [!NOTE]
>
> The [parse](/ingest/pipeline/processing-rules/parse) processing rule
> transforms data in a similar way.
## Overview
All pipelines include a `parsers.conf` file with a list of default parsers for
transforming common telemetry formats, including Docker, Apache,
and NGINX logs. You can also create [your own parsers](#custom-parsers)
and add them to a pipeline's parsers file.
Parsers are applied at the [source plugin](/ingest/pipeline/plugins/source-plugins) level.
Even though a `parsers.conf` file can include multiple parsers, you can only
[apply](#apply-a-parser-to-a-source-plugin) a single parser to each source
within a pipeline.
> [!WARNING]
>
> When a parser is applied to a source plugin, parsing operations are performed on
> all data ingested by that plugin. Trying to ingest data that isn't compatible
> with the plugin's parser will cause errors.
You can also use parsers and [processing rules](/ingest/pipeline/processing-rules)
in tandem. File-based parsers are applied to data first, and then any
processing rules are applied to the resulting parsed data.
## Parser syntax
The default `parsers.conf` file included with each pipeline is identical to
the [default Fluent Bit `parsers.conf` file](https://github.com/fluent/fluent-bit/blob/master/conf/parsers.conf).
Each parser begins with the `[PARSER]` header and then lists its associated
key-value pairs. For example, this is the default NGINX parser:
```ini theme={null}
[PARSER]
Name nginx
Format regex
Regex ^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?[^\]]*)\] "(?\S+)(?: +(?[^\"]*?)(?: +\S*)?)?" (?[^ ]*) (?[^ ]*)(?: "(?[^\"]*)" "(?[^\"]*)")
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z
```
## Custom parsers
You can add new parsers or modify existing parsers in a pipeline's `parsers.conf` file.
> [!NOTE]
>
> Due to Kubernetes [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/)
> storage limitations, the total size of a pipeline and its associated resources
> can't exceed 1 MiB. This limit includes the combined size of
> [configuration files](/ingest/pipeline/v2/configure/config-files), [secrets](/ingest/pipeline/v2/configure/secrets),
> parsers, and [any other files](/ingest/pipeline/v2/configure/files).
### Parser settings
Parsers in Palo Alto Networks Telemetry Pipeline use the same settings as parsers in Fluent Bit.
To learn more, consult the Fluent Bit
[parser configuration parameters](https://docs.fluentbit.io/manual/pipeline/parsers/configuring-parser#configuration-parameters)
documentation.
### Update parsers file
To add a custom parser to a pipeline, you'll need to update the parsers file
for that pipeline.
1. In [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command to
return the contents of your pipeline's
current parsers file:
```shell theme={null}
calyptia get pipeline_file --pipeline PIPELINE --name parsers --only-contents > parsers.conf
```
Replace *`PIPELINE`* with the name or
[unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids) of your pipeline.
2. Modify the contents of `parsers.conf` to include any custom parsers.
3. Run the following command to replace the original parsers file with your newly
modified version:
```shell theme={null}
calyptia update pipeline_file --pipeline PIPELINE --file ./parsers.conf
```
Replace *`PIPELINE`* with the name or
[unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids) of your pipeline.
## Apply a parser to a source plugin
To apply a parser to a source plugin, add a `parser` key to the YAML entry for
that plugin in your pipeline's [configuration file](/ingest/pipeline/v2/configure/config-files).
For example, the following snippet shows a source plugin that uses a parser named
`custom_parser`:
```yaml filename="my-pipeline.yaml" theme={null}
pipeline:
inputs:
- Name: forward
parser: custom_parser
port: "5170"
tls.verify: on
tls.debug: "1"
<...>
```
The value of `parser` must match the `Name` value of one of the entries in that
pipeline's `parser.conf` file. For example, to use the NGINX parser shown in
this guide's [Syntax example](#parser-syntax), set `parser` to `nginx`.
A source plugin can only use a single parser, but you can apply a parser to
each source plugin within a pipeline. Parsers operate independently between plugins;
any two source plugins within the same pipeline can use different parsers or can
use the same parser.
# Troubleshooting pipelines
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/build/troubleshoot
Learn how to troubleshoot pipelines in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Use this information to help troubleshoot your pipelines.
> [!NOTE]
>
> If you need additional assistance, contact [Cortex XCOR Support](/support).
> As part of the support process, Cortex XCOR Support recommends downloading and running the
> [`support.sh`](https://raw.githubusercontent.com/calyptia/charts/master/support.sh)
> script, which gathers information about your Palo Alto Networks Telemetry Pipeline installation
> and packages this information into an archive that you can attach to your ticket.
>
> However, be aware that the output generated by the `support.sh` script can include
> any information related to your Palo Alto Networks Telemetry Pipeline installation, including the
> values of secrets or authentication credentials you've stored. Before
> sending this output to Cortex XCOR Support, be sure to redact any sensitive
> information accordingly.
## Problems with data ingestion
If you're having trouble with data ingestion in your pipeline, follow the troubleshooting
procedures that correspond to your source type:
* **Push-based**: Agents, network devices, and services send data through various
protocols (including TCP, HTTP, UDP, and OTLP) to a pipeline.
* **Pull-based**: A pipeline retrieves data from a SaaS service, Kafka, Prometheus,
cloud storage, or other location.
### Push-based sources
To troubleshoot pushed-based sources, follow each of these procedures:
1. [Simplify your pipeline](#simplify-your-pipeline).
2. [Examine your service, host, port, and protocol](#examine-your-service-host-port-and-protocol).
3. [Review your firewalls](#review-firewalls).
4. [Verify your SSL/TLS settings](#verify-ssltls).
#### Simplify your pipeline
Simplifying your pipeline can help you narrow down the
cause of any issues. You can either perform these actions on an existing pipeline,
or create a new test pipeline that meets these criteria.
1. Choose one source to keep for your pipeline, then remove all other sources.
2. Set your pipeline's destination to [standard output](/ingest/pipeline/plugins/destination-plugins/standard-output).
This destination lets you view real-time logs generated by your pipeline.
3. Turn off or remove any active processing rules.
4. Review the logs generated by your pipeline. You can use any of the following
methods to do so:
> [tab] Web
>
> 1. Sign in to the [Palo Alto Networks Telemetry Pipeline UI](https://core.calyptia.com/)
> 2. Open the project that contains the pipeline whose logs you want to view.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline whose logs you want to view.
> 4. In the **Data Pipelines** section, click the name of your pipeline.
> 5. In the [**Pipeline Output**](/ingest/pipeline/navigate#pipeline-output-v2-pipelines) section,
> click **Get Latest Logs**.
> [tab] kubectl
>
> 1. Run the following command to retrieve the replicas of a pipeline:
>
> ```shell theme={null}
> kubectl get pods
> ```
>
> 2. To display logs in your terminal, run the following command:
>
> ```shell theme={null}
> kubectl logs POD
> ```
>
> Replace *`POD`* with the name of the pod where your pipeline is deployed.
>
> 3. Optional: Run the following command to follow a stream of data
> in real time:
>
> ```shell theme={null}
> kubectl logs -f POD
> ```
>
> Replace *`POD`* with the name of the pod where your pipeline is deployed.
#### Examine your service, host, port, and protocol
To examine your service, host, port, and protocol, perform these steps:
1. Run the following command to view the services configured by your
pipeline's Core Instance:
```shell theme={null}
kubectl get svc
```
2. Review the output of the previous step to find information about your pipeline,
including its host, port, and protocol. For example, a pipeline named `mypipe`
in a Core Instance named `instance` would have the following service name and
associated information:
`instance-mypipe-PORT-PROTOCOL-UUID`
3. If the output of step 1 includes a `pending` notice for the external IP,
recreate the pipeline.
4. If you're working in a Kubernetes cluster and don't see any active services,
ensure your cluster policies and governance tools aren't blocking
service creation.
#### Review firewalls
To review your firewalls, perform these steps:
1. If you're working in a cloud environment, certain inbound ports might be blocked
by default. Communicate with your cloud provider to confirm that traffic can flow
through the required port and protocol for your pipeline.
2. If your Linux server or Kubernetes cluster is deployed in a virtual private
cloud (VPC), confirm that external push-based sources can access the host through
the VPC and load balancer.
#### Verify SSL/TLS
To verify your SSL/TLS settings, perform these steps:
1. Confirm that your pipeline is using SSL/TLS version 1.2 or later.
2. Confirm that the certificate for your pipeline and the certificate for your
push-based source are the same.
3. Use the `tls.verify off` setting to temporarily turn off certificate validation,
which helps confirm or rule out issues with a parent certificate.
### Pull-based sources
To troubleshoot pull-based sources, follow each of these procedures:
1. [Simplify your pipeline](#simplify-your-pipeline-2).
2. [Test connectivity](#test-connectivity).
3. [Review your firewalls](#review-firewalls-2).
4. [Validate credentials and authorization](#validate-credentials-and-authorization).
#### Simplify your pipeline
Simplifying your pipeline can help you narrow down the
cause of any issues. You can either perform these actions on an existing pipeline,
or create a new test pipeline that meets these criteria.
1. Choose one source to keep for your pipeline, then remove all other sources.
2. Set your pipeline's destination to [standard output](/ingest/pipeline/plugins/destination-plugins/standard-output).
This destination lets you view real-time logs generated by your pipeline.
3. Turn off or remove any active processing rules.
4. Review the logs generated by your pipeline. You can use any of the following
methods to do so:
> [tab] Web
>
> 1. Sign in to the [Palo Alto Networks Telemetry Pipeline UI](https://core.calyptia.com/)
>
> 2. Open the project that contains the pipeline whose logs you want to view.
>
> 3. Go to **Core Instances**, then click the name of the Core Instance where you
> deployed the pipeline whose logs you want to view.
>
> 4. In the **Data Pipelines** section, click the name of your pipeline.
>
> 5. In the [**Pipeline Output**](/ingest/pipeline/navigate#pipeline-output-v2-pipelines)
> section, click **Get Latest Logs**.
> [tab] kubectl
>
> 1. Run the following command to retrieve the replicas of a pipeline:
>
> ```shell theme={null}
> kubectl get pods
> ```
>
> 2. To display logs in your terminal, run the following command:
>
> ```shell theme={null}
> kubectl logs POD
> ```
>
> Replace *`POD`* with the name of the pod where your pipeline is deployed.
>
> 3. Optional: Run this command to follow a stream of data
> in real time:
>
> ```shell theme={null}
> kubectl logs -f POD
> ```
>
> Replace *`POD`* with the name of the pod where your pipeline is deployed.
#### Test connectivity
To test connectivity, perform these steps:
1. From the server where your Core Instance is deployed, run this command to confirm
your pipeline can access the push-based source:
```shell theme={null}
ping SOURCE
```
Replace *`SOURCE`* with the IP or host of the push-based source.
2. From the server of your push-based source, run the following command to confirm
that the source can access your pipeline:
```shell theme={null}
ping PIPELINE
```
Replace *`PIPELINE`* with the IP or host of your pipeline.
#### Review firewalls
Confirm there aren't any firewalls blocking outbound traffic from the push-based
source.
#### Validate credentials and authorization
Confirm your push-based source isn't generating HTTP `401 Unauthorized` status codes
or any other errors that indicate issues with credentials and authorization.
## Problems sending data to a destination
If you're having trouble using your pipeline to send data to a destination,
follow each of these troubleshooting procedures:
1. [Simplify your pipeline](#simplify-your-pipeline-3).
2. [Review your logs for console errors](#review-your-logs-for-console-errors).
### Simplify your pipeline
Simplifying your pipeline can help you narrow down the
cause of any issues. You can either perform these actions on an existing pipeline,
or create a new test pipeline that meets these criteria.
1. Set your pipeline's source to [Mock Data](/ingest/pipeline/plugins/source-plugins/mock-data).
This source sends `{"message": "dummy"}` to the specified output at
one-second intervals.
2. Add [standard output](/ingest/pipeline/plugins/destination-plugins/standard-output) as a
destination. This destination lets you view real-time logs generated by your pipeline.
3. Turn off or remove any active processing rules.
4. Review the logs generated by your pipeline. You can use any of the following
methods to do so:
> [tab] Web
>
> 1. Sign in to the [Palo Alto Networks Telemetry Pipeline UI](https://core.calyptia.com/)
>
> 2. Open the project that contains the pipeline whose logs you want to view.
>
> 3. Go to **Core Instances**, then click the name of the Core Instance where you
> deployed the pipeline whose logs you want to view.
>
> 4. In the **Data Pipelines** section, click the name of your pipeline.
>
> 5. In the [**Pipeline Output**](/ingest/pipeline/navigate#pipeline-output-v2-pipelines)
> section, click **Get Latest Logs**.
> [tab] kubectl
>
> 1. Run the following command to retrieve the replicas of a pipeline:
>
> ```shell theme={null}
> kubectl get pods
> ```
>
> 2. To display logs in your terminal, run the following command:
>
> ```shell theme={null}
> kubectl logs POD
> ```
>
> Replace *`POD`* with the name of the pod where your pipeline is deployed.
>
> 3. Optional: Run the following command to follow a stream of data in real time:
>
> ```shell theme={null}
> kubectl logs -f POD
> ```
>
> Replace *`POD`* with the name of the pod where your pipeline is deployed.
### Review your logs for console errors
Your pipeline's logs might display certain errors. Use the following table
to determine what each error means and how to troubleshoot it.
| Console output | Cause | How to troubleshoot |
| - | - | - |
| `400: Error` | Incorrect data format | • Verify the format of the logs you're routing. |
| `401: Unauthorized` | Incorrect credentials when routing data | • Review your authorization settings. • Review your pipeline secrets. |
| SSL/TLS error | Certificate error | • Verify your certificate settings. • Temporarily turn off TLS, then see if the issue persists. |
| No log messages displayed in output | Data routing or pipeline thrashing | • Ensure you're running the right query in your backend. • Add `log_level: debug` as a parameter to your pipeline output. • Use `kubectl get` and `kubectl describe` to review the performance and attributes of your pods. |
| `200: OK` or `204: No Content`, but no log messages displayed in output | Wrong query | • Ensure you're running the right query in your backend. |
# Palo Alto Networks Telemetry Pipeline component versions
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/component-versions
Reference the version numbers for individual Palo Alto Networks Telemetry Pipeline components.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Each release of Palo Alto Networks Telemetry Pipeline includes several components with
their own distinct version numbers. To complete certain tasks, you might need to
reference the latest version of a particular component rather than the latest version
of Palo Alto Networks Telemetry Pipeline itself.
> [!NOTE]
>
> The pipeline agent listed here is distinct from [Core Agent](/ingest/pipeline/v2/fleets/agent#core-agent),
> which is a type of agent you can manage in [fleets](/ingest/pipeline/v2/fleets).
>
> For information about Core Agent and corresponding versions of Fluent Bit, see
> [Version equivalents between Core Agent and Fluent Bit](/ingest/pipeline/v2/fleets/agent/version-equivalents).
The following table lists the individual component versions associated with previous
parent versions of Palo Alto Networks Telemetry Pipeline.
| Palo Alto Networks Telemetry Pipeline parent version | Pipeline infrastructure, Core Operator, and Pipeline CLI | Pipeline agent | Processing rules |
| - | - | - | - |
| **2.86.0** | 3.103.0 | 26.4.4 | 6.9.39 |
| **2.84.0** | 3.100.0 | 26.4.2 | 6.9.36 |
| **2.83.0** | 3.99.0 | 26.4.1 | 6.9.36 |
| **2.82.0** | 3.98.0 | 26.3.6 | 6.9.36 |
| **2.81.0** | 3.97.0 | 26.3.5 | 6.9.36 |
| **2.80.0** | 3.96.0 | 26.3.3 | 6.9.36 |
| **2.79.0** | 3.95.0 | 26.3.2 | 6.9.36 |
| **2.78.0** | 3.94.0 | 26.3.1 | 6.9.36 |
| **2.77.0** | 3.93.0 | 26.2.2 | 6.9.36 |
| **2.76.0** | 3.92.0 | 26.2.2 | 6.9.36 |
| **2.75.0** | 3.91.0 | 26.2.1 | 6.9.35 |
| **2.74.0** | 3.90.0 | 26.1.6 | 6.9.35 |
| **2.73.0** | 3.87.0 | 26.1.3 | 6.9.33 |
| **2.72.0** | 3.86.0 | 26.1.2 | 6.9.33 |
| **2.71.0** | 3.85.0 | 26.1.1 | 6.9.33 |
| **2.70.0** | 3.84.0 | 25.12.6 | 6.9.32 |
| **2.69.0** | 3.83.0 | 25.12.5 | 6.9.31 |
| **2.68.0** | 3.82.0 | 25.12.3 | 6.9.30 |
| **2.67.0** | 3.81.0 | 25.12.2 | 6.9.29 |
| **2.66.0** | 3.79.0 | 25.11.3 | 6.9.27 |
| **2.65.0** | 3.78.0 | 25.11.2 | 6.9.26 |
| **2.64.0** | 3.77.0 | 25.11.1 | 6.9.25 |
| **2.63.0** | 3.76.0 | 25.10.7 | 6.9.24 |
| **2.62.0** | 3.75.0 | 25.10.5 | 6.9.23 |
| **2.61.0** | 3.74.0 | 25.10.2 | 6.9.22 |
| **2.60.0** | 3.73.0 | 25.10.1 | 6.9.21 |
| **2.59.0** | 3.72.0 | 25.9.4 | 6.9.20 |
| **2.58.0** | 3.71.0 | 25.9.3 | 6.9.19 |
| **2.57.0** | 3.70.0 | 25.9.2 | 6.9.18 |
| **2.56.0** | 3.69.0 | 25.9.1 | 6.9.17 |
| **2.55.0** | 3.68.0 | 25.8.3 | 6.9.16 |
| **2.54.0** | 3.67.0 | 25.8.2 | 6.9.15 |
| **2.53.0** | 3.66.0 | 25.8.1 | 6.9.14 |
| **2.52.0** | 3.64.0 | 25.7.3 | 6.9.13 |
| **2.51.0** | 3.63.0 | 25.7.3 | 6.9.12 |
| **2.50.0** | 3.62.0 | 25.7.2 | 6.9.11 |
| **2.49.0** | 3.61.0 | 25.7.2 | 6.9.10 |
| **2.48.0** | 3.60.0 | 25.7.2 | 6.9.9 |
| **2.47.0** | 3.59.0 | 25.7.1 | 6.9.8 |
| **2.46.0** | 3.58.0 | 25.6.5 | 6.9.7 |
| **2.45.0** | 3.56.0 | 25.6.5 | 6.9.6 |
| **2.43.1** | 3.55.0 | 25.6.2 | 6.9.5 |
| **2.44.0** | 3.54.0 | 25.6.2 | 6.9.4 |
| **2.42.0** | 3.53.0 | 25.5.1 | 6.9.2 |
| **2.41.0** | 3.47.0 | 25.4.5 | 6.9.2 |
| **2.40.0** | 3.46.0 | 25.4.2 | 6.9.1 |
| **2.39.0** | 3.44.0 | 25.4.2 | 6.9.0 |
| **2.38.0** | 3.43.0 | 25.4.1 | 6.7.0 |
| **2.37.0** | 3.42.0 | 25.4.1 | 6.6.0 |
| **2.36.0** | 3.41.0 | 25.4.1 | 6.5.0 |
| **2.35.0** | 3.39.0 | 25.3.8 | 6.5.0 |
| **2.34.0** | 3.37.0 | 25.3.8 | 6.4.0 |
| **2.33.0** | 3.36.0 | 25.3.5 | 6.4.0 |
| **2.32.0** | 3.35.0 | 25.3.3 | 6.3.0 |
| **2.31.0** | 3.33.0 | 25.3.2 | 6.2.0 |
| **2.30.0** | 3.30.0 | 25.2.2 | 6.1.0 |
| **2.29.1** | 3.26.0 | 25.2.1 | 5.2.4 |
| **2.28.0** | 3.24.0 | 25.1.1 | 5.2.4 |
| **2.27.0** | 3.23.0 | 25.1.1 | 5.2.3 |
| **2.26.0** | 3.20.0 | 25.1.1 | 5.2.3 |
| **2.25.0** | 3.19.0 | 25.1.1 | 5.2.3 |
| **2.24.0** | 3.17.0 | 24.12.2 | 5.2.2 |
| **2.23.0** | 3.17.0 | 24.12.2 | 5.2.1 |
| **2.22.0** | 3.13.0 | 24.12.1 | 5.2.1 |
| **2.21.0** | 3.12.0 | 24.11.1 | 5.2.1 |
| **2.20.0** | 3.8.0 | 24.11.1 | 5.1.1 |
| **2.19.0** | 3.7.0 | 24.10.4 | 5.1.0 |
| **2.18.0** | 3.5.0 | 24.10.3 | 5.1.0 |
| **2.17.0** | 3.4.1 | 24.9.2 | 5.0.1 |
| **2.15.0** | 3.3.3 | 24.9.1 | 5.0.1 |
| **2.14.0** | 3.3.1 | 24.7.4 | 5.0.1 |
| **2.13.0** | 1.19.0 | 24.5.6 | 4.1.3 |
| **2.12.0** | 1.17.4 | 24.4.4 | 4.1.1 |
| **2.11.0** | 1.17.0 | 24.3.5 | 4.0.0 |
| **2.10.0** | 1.16.1 | 24.3.1 | 4.0.0 |
# Palo Alto Networks Telemetry Pipeline concepts
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/concepts
Learn more about different components, concepts, and terms in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Palo Alto Networks Telemetry Pipeline includes several distinct components, utilities,
and features that combine to form a unified product. This guide describes some
of the most common concepts you'll encounter while using Palo Alto Networks Telemetry Pipeline.
## Pipeline
A [pipeline](/ingest/pipeline/v2/build), also known as a telemetry pipeline, is a data management
tool for collecting, transforming, and routing telemetry data. Pipelines support
all telemetry types, including logs, metrics, and traces.
A pipeline consists of one or more [source plugins](#source-plugin), one or more
[destination plugins](#destination-plugin), and any active [parsers](#parser) or
[processing rules](#processing-rule).
Each pipeline is a Kubernetes workload that contains one or more Pods.
By default, pipelines run as
[Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/),
but other [workload types](/ingest/pipeline/v2/configure/kubernetes/workloads) are also supported.
### Health check pipeline
Health check pipelines are automated diagnostic tools that collect information
about the environment where you installed Palo Alto Networks Telemetry Pipeline. Unlike standard
pipelines, health check pipelines don't transport telemetry data.
If health checks are enabled when you create a [Core Instance](#core-operators-and-core-instances),
that Core Instance deploys a health check pipeline to ensure that any standard
pipelines you deploy will function properly.
## Plugin
A plugin is an extension that connects your pipeline to other tools
or platforms. These plugins are located at the beginning and end of each pipeline,
and create the openings through which your data flows.
### Source plugin
A [source plugin](/ingest/pipeline/plugins/source-plugins), also known as an input
plugin, is an opening that lets telemetry data enter your pipeline. These
plugins are located at the beginning of each pipeline.
Pipelines can include one or more source plugins, including plugins that correspond
to different tools or platforms. This makes it possible to feed data from
multiple sources into the same pipeline.
### Destination plugin
A [destination plugin](/ingest/pipeline/plugins/destination-plugins), also known
as an output plugin, is an opening that lets telemetry data exit your pipeline.
These plugins are located at the end of each pipeline.
Pipelines can include one or more destination plugins, including plugins that
correspond to different tools or platforms. This makes it possible to collect
data within a single pipeline, then send that data to multiple destinations.
## Parser
A [parser](/ingest/pipeline/v2/build/parsers) is a tool that turns unstructured data
into structured data.
These parsers are applied at the source plugin level, which
means that any data that passes through an applicable source plugin is parsed
before it enters your pipeline.
## Processing rule
A [processing rule](/ingest/pipeline/processing-rules) is a tool that transforms
data as it passes through your telemetry pipeline. You can use multiple processing
rules within the same pipeline to perform complex operations.
Cortex XCOR offers a variety of predefined processing rules with configurable
settings, each designed to perform a particular action. You can also create your own
processing rules by writing [custom Lua](/ingest/pipeline/processing-rules/custom-lua)
scripts.
Any active processing rules are applied to data after it enters your pipeline
through a source plugin, but before it leaves your pipeline through a destination
plugin.
## Core Operators and Core Instances
Palo Alto Networks Telemetry Pipeline is built on Kubernetes and takes advantage of many built-in
Kubernetes features. If you install Palo Alto Networks Telemetry Pipeline in a Linux environment,
Palo Alto Networks Telemetry Pipeline first creates a [K3s](https://k3s.io/) cluster in that
environment.
To manage your pipelines and associated resources, Palo Alto Networks Telemetry Pipeline uses two
components that work in tandem:
* A [Core Operator](#core-operator)
* A [Core Instance](#core-instance)
These components run in your Kubernetes or K3s
cluster, and you can interact with them to [configure](/ingest/pipeline/v2/configure) the
behavior of the pipelines you deploy in that cluster.
For a diagram that outlines how these components interact, see
[Palo Alto Networks Telemetry Pipeline architecture](/ingest/pipeline/v2/architecture).
### Core Operator
Each Core Operator is a [Kubernetes operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)
for managing Palo Alto Networks Telemetry Pipeline resources. After you
[install a Core Operator](/ingest/pipeline/v2/install/install-operator),
that Core Operator registers itself with the Kubernetes API. That Core Operator
can then create and modify pipelines in your Kubernetes or K3s cluster. When a
Core Operator creates or modifies pipelines, it refers to the resources managed
by its corresponding Core Instance.
> [!NOTE]
>
> You must [install a Core Operator](/ingest/pipeline/v2/install/install-operator) in each
> Kubernetes cluster or Linux environment where you want to use Palo Alto Networks
> Telemetry Pipeline. If you have multiple clusters or environments, you'll need to install
> multiple Core Operators.
### Core Instance
Each Core Instance creates the underlying Kubernetes resources for your
pipelines and syncs those resources with the Palo Alto Networks Telemetry Pipeline backend. When
you make changes to Palo Alto Networks Telemetry Pipeline settings, your Core Instance updates the
resources that the corresponding Core Operator uses when it creates or modifies
pipelines.
In [Pipeline CLI](/ingest/pipeline/pipeline-cli) and the [Palo Alto Networks Telemetry Pipeline web interface](/ingest/pipeline/navigate),
Core Instances also represent a conceptual grouping of pipelines within a Kubernetes
or K3s cluster. For example, to perform certain pipeline operations, you'll need
to specify the associated Core Instance that runs in the same cluster where the
pipeline was deployed.
> [!NOTE]
>
> You must [create a Core Instance](/ingest/pipeline/v2/install/create-instance)
> for each Core Operator you install.
## Fleet
A fleet is a collection of multiple [agents](#agent) that are governed by a shared
set of configuration settings. This grouping makes it possible to control a large
number of distributed agents from a single, centralized location.
Fleets are a feature of Palo Alto Networks Telemetry Pipeline, but aren't pipelines
themselves. Fleets and their constituent agents also follow a unique installation
process that doesn't involve [Core Operators or Core Instances](#core-operators-and-core-instances).
### Agent
An agent is a standalone tool for collecting telemetry data. These agents are
functionally similar to pipelines, but they're not identical, and each tool has
its own trade-offs. It's also possible to send data from an agent to a pipeline.
Agents can take advantage of [parsers](#parser), but not
[processing rules](#processing-rule). Additionally, agents use a different set of
[plugins](#plugin) than pipelines do.
# Configure Palo Alto Networks Telemetry Pipeline
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure
Learn how to configure Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
After you've [installed](/ingest/pipeline/v2/install) Palo Alto Networks Telemetry Pipeline,
you can customize and configure its behavior.
> [card] [Agent image type](/ingest/pipeline/v2/configure/agent-image)
> [card] [Backpressure](/ingest/pipeline/v2/configure/backpressure)
> [card] [Deployment strategies](/ingest/pipeline/v2/configure/deployment-strategies)
> [card] [Files](/ingest/pipeline/v2/configure/files)
> [card] [Helm reference](/ingest/pipeline/v2/configure/helm)
> [card] [History and rollback](/ingest/pipeline/v2/configure/history-rollback)
> [card] [Kubernetes settings](/ingest/pipeline/v2/configure/kubernetes)
> [card] [Metadata](/ingest/pipeline/v2/configure/metadata)
> [card] [Networking](/ingest/pipeline/v2/configure/networking)
> [card] [Pipeline configuration files](/ingest/pipeline/v2/configure/config-files)
> [card] [Resource profiles](/ingest/pipeline/v2/configure/resource-profiles)
> [card] [Scaling and replicas](/ingest/pipeline/v2/configure/scaling)
> [card] [Secrets](/ingest/pipeline/v2/configure/secrets)
# Agent image type
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/agent-image
Choose the image type for your pipeline agent in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
One [component](/ingest/pipeline/v2/component-versions) of Palo Alto Networks
Telemetry Pipeline is the agent that powers each pipeline. Palo Alto Networks
maintains two versions of this agent that are built from distinct container images.
Set the image type for this pipeline agent when you
[create](/ingest/pipeline/v2/build/create-modify#create-a-pipeline)
a new pipeline, or change the image type when you [upgrade](/ingest/pipeline/v2/install/upgrade#upgrade-a-pipeline)
an existing pipeline.
The agent image that you choose doesn't affect the features available to that
pipeline. All [plugins](/ingest/pipeline/plugins), [parsers](/ingest/pipeline/v2/build/parsers),
[processing rules](/ingest/pipeline/processing-rules), and
[configuration options](/ingest/pipeline/v2/configure) are compatible with all agent image types.
The following pipeline agent image types are available:
* Red Hat UBI (default)
* Distroless
## Red Hat UBI
The Red Hat UBI pipeline agent is based on the
[Red Hat Universal Base Image](https://catalog.redhat.com/en/software/base-images),
which is itself based on Red Hat Enterprise Linux.
This is the default agent image in Palo Alto Networks Telemetry Pipeline.
Pipelines that use the Red Hat UBI agent image have access to several utilities
bundled with the Red Hat-supplied container image, including debugging
tools, which makes this agent image ideal for development environments. However,
the Red Hat UBI agent image has more package dependencies than the distroless agent
image, which means it might not be suitable in environments with strict security
requirements.
## Distroless
The distroless pipeline agent is based on the
[distroless](https://github.com/GoogleContainerTools/distroless)
container image published by Google, which is itself based on Debian.
The distroless agent image has fewer package dependencies than the Red Hat UBI
agent image, which reduces the risk of underlying security vulnerabilities and
makes it ideal for production environments. However, pipelines that use the
distroless agent image are harder to debug than pipelines that use the Red Hat
UBI agent image.
# Backpressure
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/backpressure
Learn how to manage data backpressure in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
When a telemetry pipeline ingests data, it's possible for the volume of incoming
data to exceed that pipeline's throughput. This creates a condition known as
*backpressure*, where data accumulates faster than the pipeline can process
and route that data to its intended destination.
> [!WARNING]
>
> Although some amount of backpressure is normal and expected, unmanaged or excessive
> backpressure can result in data loss.
## Overview
If a pipeline needs to buffer data, it stores the data in memory until that
pipeline is ready to process and route the data to its intended destination.
After it processes and routes the data, the pipeline flushes that data from memory.
Pipelines with the StatefulSet [workload](/ingest/pipeline/v2/configure/kubernetes/workloads)
type use a [hybrid](#hybrid-buffering-for-statefulsets) buffer by storing a parallel
copy of buffered data in the file system, which creates a persistent backup that
mirrors the data written to memory.
If the volume of incoming data exceeds a pipeline's throughput, the amount of
data in temporary storage will increase accordingly. This is what creates
backpressure, but pipelines are designed to accommodate a certain amount of
backpressure without issue. To draw a comparison with pipes that carry water,
temporary storage is like the basin of a sink: if water flows faster than it drains,
the basin will fill up and store the extra water until it reaches the drain.
However, if a pipeline continues buffering new data to temporary storage faster
than it can remove old data, that storage will eventually reach capacity.
This is the point at which backpressure becomes an urgent problem because
the buffered data is like a sink that's about to overflow. When a pipeline's temporary
storage is at capacity, it will stop buffering new data, which prevents an overflow
but can cause data loss.
### Push-based sources versus pull-based sources
When a pipeline stops buffering new data, the potential for data loss partly
depends on whether its associated source plugins are
[push-based or pull-based](/ingest/pipeline/plugins/source-plugins#push-based-and-pull-based-source-plugins).
For push-based source plugins, which passively receive data, Cortex XCOR has no
control over the behavior of that data source. Some sources might pause the flow
of data if they detect an interruption, but other sources might continue attempting
to send data to the unavailable pipeline, which can cause data loss.
For pull-based source plugins, which either actively fetch data or generate test
data, Palo Alto Networks Telemetry Pipeline can control communication between the source and itself.
If a pipeline is unavailable, Palo Alto Networks Telemetry Pipeline pauses the flow
of data, then resumes fetching data when the pipeline is ready to ingest it
again. This behavior can add temporary latency if the source buffers a large
amount of data during the pipeline's downtime, but avoids major data loss.
### Hybrid buffering for StatefulSets
In a StatefulSet pipeline, each
[chunk](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks)
of buffered data is always stored in the file system. If the pipeline has enough space
in memory, an identical chunk of that buffered data is also written to memory. If
the pipeline doesn't have enough space in memory, the chunk of buffered data
remains only in the file system until there is enough space to write an identical
chunk to memory.
Chunks that are stored simultaneously in memory and in the file system are known as `up`
chunks, and chunks that are stored only in the file system are known as `down`
chunks. Unlike `down` chunks, pipelines can access data in `up` chunks directly. A
`down` chunk in the file system becomes an `up` chunk when a copy of the `down` chunk
is written to memory.
After an `up` chunk is processed and routed, the associated buffered data both
in memory and in the file system is flushed.
## Manage backpressure
The available methods for managing backpressure vary depending on your pipeline's
[workload](/ingest/pipeline/v2/configure/kubernetes/workloads) type. Because of this,
choosing the right workload type is also a key part of managing backpressure.
> [!NOTE]
>
> The primary factors that contribute to backpressure are independent of Palo Alto
> Networks Telemetry Pipeline, like the amount of data that your sources emit and your
> destinations' capacity to receive data. To manage these factors, configure your sources
> and destinations directly.
### Deployment pipelines
Pipelines with the Deployment workload type store buffered data only in memory.
Use the following methods to manage backpressure for Deployment pipelines:
* Set the `mem_buf_limit` configuration parameter to enforce a limit for how much
data a source plugin can buffer to memory. When this limit is reached,
the pipeline will stop buffering new data from that source plugin.
* Configure [resource profiles](/ingest/pipeline/v2/configure/resource-profiles) to set
thresholds for a pipeline's resource usage.
* [Scale](/ingest/pipeline/v2/configure/scaling) pipelines to increase their throughput.
However, keep in mind that adding replicas to a pipeline increases its
resource usage, and that scaling won't alleviate destination-level bottlenecks.
* Monitor the latency added by any active [processing rules](/ingest/pipeline/processing-rules).
Complex processing operations can add delays and reduce throughput.
### StatefulSet pipelines
Pipelines with the StatefulSet workload type use a [hybrid approach](#hybrid-buffering-for-statefulsets)
that stores buffered data both in memory and in the file system.
Use the following methods to manage backpressure for StatefulSet pipelines:
* Configure [resource profiles](/ingest/pipeline/v2/configure/resource-profiles) to set
thresholds for a pipeline's resource usage.
* Set the `resources.storage.backlogMemLimit` resource profile parameter to
increase or decrease the amount of memory allocated for storing buffered data.
When this limit is reached, any new data will be buffered solely to the
file system, assuming the file system has enough available free space.
This parameter sets a per-pipeline limit instead of a per-plugin limit.
* Set the `resources.storage.volumeSize` resource profile parameter to increase
or decrease the size of the persistent file system for each pipeline Pod.
* Set the `resources.storage.maxChunksUp` resource profile parameter to
increase or decrease the number of
[chunks](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks)
that the pipeline can buffer to memory. When this limit is reached, any new
data is buffered only to the file system, assuming the file system has
enough available free space. This parameter sets a per-pipeline limit instead of
a per-plugin limit.
* [Scale](/ingest/pipeline/v2/configure/scaling) pipelines to increase their throughput.
However, adding replicas to a pipeline increases its resource usage, and scaling
won't alleviate bottlenecks caused by destinations.
* Monitor the latency added by any active [processing rules](/ingest/pipeline/processing-rules).
Complex processing operations can add delays and reduce throughput.
> [!NOTE]
>
> The `mem_buf_limit` configuration parameter has no effect on source plugins in
> StatefulSet pipelines.
### DaemonSet pipelines
Pipelines with the DaemonSet workload type store buffered data only in memory.
Use the following methods to manage backpressure for DaemonSet pipelines:
* Set the `mem_buf_limit` configuration parameter to enforce a limit for how much
data a source plugin can buffer to memory. When this limit
is reached, the pipeline will stop buffering new data from that source plugin.
* Configure [resource profiles](/ingest/pipeline/v2/configure/resource-profiles) to set
thresholds for a pipeline's resource usage.
* Monitor the latency added by any active [processing rules](/ingest/pipeline/processing-rules).
Complex processing operations can add delays and reduce throughput.
> [!NOTE]
>
> DaemonSet pipelines use a static number of replicas, which means they can't be
> scaled.
# Pipeline configuration files
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/config-files
Use configuration files to customize your pipelines.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
In Palo Alto Networks Telemetry Pipeline, the settings for each pipeline are stored
inside a dedicated configuration file. These files must follow a standard
[format](#format), but you can customize their contents to control how your
pipeline gathers, modifies, and sends data.
> [!NOTE]
>
> Due to Kubernetes [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/)
> storage limitations, the total size of a pipeline and its associated resources
> can't exceed 1 MiB. This limit includes the combined size of configuration files,
> [secrets](/ingest/pipeline/v2/configure/secrets), [parsers](/ingest/pipeline/v2/build/parsers),
> and [any other files](/ingest/pipeline/v2/configure/files).
## Modify a pipeline's configuration file
Use one of these methods to modify a pipeline's configuration file.
> [tab] Web interface
>
> When you modify a pipeline by using the Palo Alto Networks Telemetry Pipeline web interface, that
> pipeline's configuration file updates to reflect your changes, even if you didn't
> edit the file directly.
>
> You can also edit configuration files directly in the **Advanced Settings**
> section of the pipeline builder, either by pasting raw YAML into the text field
> or by using **Import** to select a YAML file from your device. If the configuration
> settings you specify are valid, the pipeline builder continuously saves any changes
> you make and updates your pipeline accordingly.
> [tab] Pipeline CLI
>
> In [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command:
>
> ```shell /NAME/ /FILE/ theme={null}
> calyptia update pipeline NAME --config-file FILE
> ```
>
> Replace the following values:
>
> * *`NAME`*: The name of the pipeline whose configuration file you want to update.
> * *`FILE`*: The new configuration file to use for that pipeline. This must be a
> `.yaml` file.
## Format
Configuration files follow standard YAML conventions and use the `.yaml` file
extension. Regardless of a pipeline's individual settings, all configuration
files adhere to the same core format:
```yaml filename="example-pipeline.yaml" theme={null}
pipeline:
inputs:
- Name: source1
setting: value
setting: value
processors:
<...>
- Name: source2
setting: value
setting: value
setting: value
setting: value
processors:
<...>
outputs:
- Name: destination1
setting: value
processors:
<...>
- Name: destination2
setting: value
setting: value
setting: value
processors:
<...>
```
> [!NOTE]
>
> Configuration files use two spaces per indent, not four.
## Sections
All configuration files include a `pipeline` section, an `inputs` section, and
an `outputs` section. Additionally, each input or output can contain an associated
`processors` section.
### Pipeline
The `pipeline` section is the top-level section in a configuration file. It's a
parent to the `inputs` section and the `outputs` section.
### Inputs
The `inputs` section is a sequence of mappings that contains one or more sources
of telemetry data. Each mapping corresponds to a single
[source plugin](/ingest/pipeline/plugins/source-plugins), and includes
key-value pairs to configure the settings for that plugin, plus an optional
`processors` object.
### Outputs
The `outputs` section is a sequence of mappings that contains one or more destinations
for your telemetry data. Each mapping corresponds to a single
[destination plugin](/ingest/pipeline/plugins/destination-plugins), and includes
key-value pairs to configure the settings for that plugin, plus an optional
`processors` object.
### Processors
Each `processors` section is a child to one of the mappings within the `inputs`
section or `outputs` section. These sections contain
[processing rules](/ingest/pipeline/processing-rules) to modify the
telemetry data passing through each input or output.
Because processing rules run separately for different types of telemetry data,
a `processors` section is grouped into subsections for `logs`, `metrics`, and
`traces`, where applicable. Each telemetry type subsection includes an
`actions` object, which is a sequence of mappings that contains one or more
processing rules and each rule's associated settings.
> [!NOTE]
>
> If an input or output doesn't have processing rules associated with a particular
> type of telemetry data, the subsection for that telemetry type is omitted.
These sections adhere to the following format:
```yaml filename="example-pipeline.yaml" theme={null}
pipeline:
<...>
processors:
logs:
- name: calyptia
actions:
- type: rule1
opts:
setting: value
setting: value
setting: value
- type: rule2
opts:
setting: value
setting: value
metrics:
- name: calyptia
actions:
- type: rule1
opts:
setting: value
setting: value
- type: rule2
opts:
setting: value
traces:
- name: calyptia
actions:
- type: rule1
opts:
setting: value
setting: value
- type: rule2
opts:
setting: value
setting: value
setting: value
```
# Pipeline deployment strategies
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/deployment-strategies
Set deployment strategies for pipelines in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Deployment strategies govern how a pipeline's [replicas](/ingest/pipeline/v2/configure/scaling)
behave during the [upgrade](/ingest/pipeline/v2/install/upgrade) process. Palo Alto
Networks Telemetry Pipeline offers these deployment strategies:
* **Rolling Update**: Default. Individually upgrades and restarts each replica of
a pipeline. This ensures that at least one replica is always running, which
lets telemetry data continue to flow without interruption. If a pipeline has
only one replica, this strategy creates a new, upgraded replica, and then destroys
the old replica.
* **Hot Reload**: Upgrades all of a pipeline's replicas simultaneously
without restarting any of them. During this upgrade process, pipelines continue
to run and they attempt to maintain the flow of telemetry data.
## Modify a pipeline's deployment strategy
Use one of these methods to modify a pipeline's deployment strategy.
> [tab] Web interface
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline whose deployment strategy you want
> to modify.
> 3. Go to **Core Instances**, and then click the name of the Core Instance associated
> with the pipeline whose deployment strategy you want to modify.
> 4. In the **Data Pipelines** section, click the name of the pipeline whose deployment strategy
> you want to modify.
> 5. Click **Advanced Settings**.
> 6. In the **Deployment Strategy** section, select either **Rolling Update** or **Hot Reload**.
> 7. To save your changes, click **Update**.
> [tab] Pipeline CLI
>
> In [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command:
>
> ```shell /PIPELINE/ /OPTION/ theme={null}
> calyptia update pipeline PIPELINE --deployment-strategy OPTION
> ```
>
> Replace the following:
>
> * *`PIPELINE`*: The name or [unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
> of your pipeline.
> * *`OPTION`*: The deployment strategy to use for that pipeline. Possible values
> are `rollingupdate` and `hotReload`.
# Files
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/files
Add files to pipelines in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
In addition to the [YAML configuration file](/ingest/pipeline/v2/configure/config-files)
that govern a pipeline's settings, you can optionally add other kinds of files
to pipelines, such as [parsers](/ingest/pipeline/v2/build/parsers), certificates, and
[custom Lua](/ingest/pipeline/processing-rules/custom-lua) scripts.
> [!NOTE]
>
> Due to Kubernetes [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/)
> storage limitations, the total size of a pipeline and its associated resources
> can't exceed 1 MiB. This limit includes the combined size of
> [configuration files](/ingest/pipeline/v2/configure/config-files), [secrets](/ingest/pipeline/v2/configure/secrets),
> [parsers](/ingest/pipeline/v2/build/parsers), and any other files.
## Add a file to a pipeline
To add a file to a pipeline, use one of these methods:
> [tab] Web interface
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline that you want to add a file to.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline that you want to add a file to.
> 4. Under **Data Pipelines**, click the name of the pipeline that you want to add
> a file to.
> 5. Click **Advanced Settings**.
> 6. Under **Pipeline Files**, click **Upload File**.
> 7. Use one of these methods to upload a file:
> * Click **Select File** to choose a file from your device.
> * Enter a value in **File name** field and add content to the large text field to create
> a new file with that name and content.
> 8. Optional: To encrypt your file, select the **Encrypt file** checkbox.
> 9. Click **Upload File**.
> [tab] Pipeline CLI
>
> Run the following [Pipeline CLI](/ingest/pipeline/pipeline-cli) command:
>
> ```shell theme={null}
> calyptia create pipeline_file --pipeline PIPELINE --file FILEPATH
> ```
>
> Replace the following:
>
> * *`PIPELINE`*: The name or [unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
> of your pipeline.
> * *`FILEPATH`*: The path to the file to add, relative to your current directory.
>
> To encrypt your file, add the `--encrypt-files` flag.
## Add a file to a Core Instance
> [!NOTE]
>
> Adding a file to a Core Instance doesn't circumvent the 1 MiB resource limit
> for pipelines. If you add a file to a Core Instance, that file becomes a resource
> for every pipeline associated with that Core Instance, which increases the resource
> utilization for each pipeline accordingly.
You can also add a file to a [Core Instance](/ingest/pipeline/v2/concepts#core-operators-and-core-instances),
which makes that file available to all pipelines associated with that Core Instance. To do
so, use one of these methods:
> [tab] Web interface
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the Core Instance that you want to add a file to.
> 3. Go to **Core Instances**, then click the name of the Core Instance that
> you want to add a file to.
> 4. Click **Advanced Settings**.
> 5. Under **Pipeline Files**, click **Upload File**.
> 6. Use one of these methods to upload a file:
> * Click **Select File** to choose a file from your device.
> * Enter a value in **File name** field and add content to the large text field to create
> a new file with that name and content.
> 7. Optional: To encrypt your file, select the **Encrypt file** checkbox.
> 8. Click **Upload File**.
> [tab] Pipeline CLI
>
> Run the following [Pipeline CLI](/ingest/pipeline/pipeline-cli) command:
>
> ```shell theme={null}
> calyptia create core_instance_file --core-instance INSTANCE --file FILEPATH
> ```
>
> Replace the following:
>
> * *`INSTANCE`*: The name of your Core Instance.
> * *`FILEPATH`*: The path to the file to add, relative to your current directory.
>
> To encrypt your file, add the `--encrypt-files` flag.
## Reference a file
After you've added a file to a pipeline, you can reference it in a
pipeline's [configuration file](/ingest/pipeline/v2/configure/config-files) by using the
following variable:
```text theme={null}
{{ files.FILENAME }}
```
Replace *`FILENAME`* with the name of your file.
## File encryption
For encrypted files, Palo Alto Networks Telemetry Pipeline uses RSA‑OAEP
encryption with a 2048-bit key.
Files are unencrypted by default, but you can choose to encrypt a file when you
add to it a pipeline or Core Instance.
# Configure Palo Alto Networks Telemetry Pipeline using Helm
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/helm
Use Helm to configure Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
If you used Helm to [install Core Operators](/ingest/pipeline/v2/install/install-operator/kubernetes-cluster)
and [create Core Instances](/ingest/pipeline/v2/install/create-instance),
you can also use Helm to configure your Palo Alto Networks Telemetry Pipeline installation
and to perform various pipeline operations.
## Specify configurations
You can use the `helm upgrade -i` shell command to specify your configuration by
passing a YAML file or specific flags to the command.
> [tab] YAML file
>
> Provide a YAML file that specifies the values of parameters while installing the
> chart. For example:
>
> ```shell theme={null}
> helm upgrade -i core-instance calyptia/core-instance --values FILE
> ```
>
> Replace *`FILE`* with the name of your YAML file.
> [tab] Shell command
>
> Specify each parameter using `helm upgrade -i`, and supply arguments using
> `--set key=value[,key=value]`. For example:
>
> ```shell theme={null}
> helm upgrade -i core-instance calyptia/core-instance --set name="core-instance" --set cloudToken="CLOUD_TOKEN" --set coreInstance="CORE_INSTANCE"
> ```
>
> Replace *`CLOUD_TOKEN`* and *`CORE_INSTANCE`* in accordance with the parameter details.
## Container image configuration
Palo Alto Networks Telemetry Pipeline uses [Bitnami](https://github.com/bitnami/charts/tree/main/bitnami/common/)
conventions to configure container images.
### Global settings
To set global settings for your container images, use the `global.imageRegistry` parameter:
```shell theme={null}
global:
imageRegistry: ""
imagePullSecrets: []
storageClass: ""
pullPolicy: IfNotPresent
```
If the global container registry requires authentication, you can provide pull
secrets in the `global.imagePullSecrets` parameter.
### Individual settings
To set individual settings for your container images, find that image's key
nested under the `images` key. For example, you can modify the `fromCloud`
image using the parameters in `images.fromCloud`:
```shell theme={null}
images:
fromCloud:
registry: ghcr.io
repository: calyptia/core-operator/sync-from-cloud
tag: 3.23.0
pullSecrets: []
```
If a container image requires authentication, you can provide pull secrets in
that image's `pullSecrets` parameter. that image's `pullSecrets` parameter. For example,
to include pull secrets in the `fromCloud` container, store their values in
`images.fromCloud.pullSecrets`.
## Services and ports
The Helm chart for Palo Alto Networks Telemetry Pipeline provides the following Kubernetes Services:
* `cloud-api`: Corresponds to the Palo Alto Networks Telemetry Pipeline backend (`cloud-api.calyptia.com`).
Default port: `5000`.
* `core`: Corresponds to the Palo Alto Networks Telemetry Pipeline web interface (`core.calyptia.com`).
Default port: `3000`.
Both of these Kubernetes Services use the `LoadBalancer`
[Service type](/ingest/pipeline/v2/configure/networking#service-types) by default.
## Troubleshooting
If you need assistance, contact [Cortex XCOR Support](/support).
As part of the support process, Cortex XCOR Support recommends downloading and running the
[`support.sh`](https://raw.githubusercontent.com/calyptia/charts/master/support.sh)
script, which gathers information about your Palo Alto Networks Telemetry Pipeline installation
and packages this information into an archive that you can attach to your ticket.
However, be aware that the output generated by the `support.sh` script can include
any information related to your Palo Alto Networks Telemetry Pipeline installation, including the
values of secrets or authentication credentials you've stored. Before
sending this output to Cortex XCOR Support, be sure to redact any sensitive
information accordingly.
## Parameter details
The following sections list the configuration parameters of the
Palo Alto Networks Telemetry Pipeline
Helm charts and their default values. A default value of `""` indicates an empty string.
Palo Alto Networks Telemetry Pipeline uses three Helm charts in combination:
* [`core-crd`](#core-crd-parameters)
* [`core-operator`](#core-operator-parameters)
* [`core-instance`](#core-instance-parameters)
### `core-crd` parameters
The `core-crd` chart packages the Custom Resource Definitions (CRDs) used by the
Palo Alto Networks Telemetry Pipeline operator, also known as a
[Core Operator](/ingest/pipeline/v2/concepts#core-operators-and-core-instances).
#### Common
These parameters configure general settings:
| Parameter | Description | Default value |
| - | - | - |
| `enabled` | If `true`, enables this chart. If `false`, disables this chart. | `true` |
| `pipelineServiceType` | Specifies the default [Service type](/ingest/pipeline/v2/configure/networking#service-types) to use for new pipelines. | `LoadBalancer` |
#### Images
The parameters in this table configure the default images for pipelines and ingest
checks:
| Parameter | Description | Default value |
| - | - | - |
| `images.hotReload.registry` | The registry that stores the container image to use for pipelines during a hot reload. | `ghcr.io` |
| `images.hotReload.repository` | The repository that stores the container image to use for pipelines during a hot reload. | `calyptia/configmap-reload` |
| `images.hotReload.tag` | The tag associated with the container image to use for pipelines during a hot reload. To use the Red Hat UBI [agent image](/ingest/pipeline/v2/configure/agent-image), provide only a version number (for example, `1.2.3`). To use the distroless agent image, append `-distroless` to the version number (for example, `1.2.3-distroless`). | latest [version](/ingest/pipeline/v2/component-versions) |
| `images.fluentBit.registry` | The registry that stores the standard container image to use for pipelines. | `ghcr.io` |
| `images.fluentBit.repository` | The repository that stores the standard container image to use for pipelines. | `calyptia/core/calyptia-fluent-bit` |
| `images.fluentBit.tag` | The tag associated with the standard container image to use for pipelines. To use the Red Hat UBI [agent image](/ingest/pipeline/v2/configure/agent-image), provide only a version number (for example, `1.2.3`). To use the distroless agent image, append `-distroless` to the version number (for example, `1.2.3-distroless`). | latest [version](/ingest/pipeline/v2/component-versions) |
### `core-operator` parameters
The `core-operator` chart packages the Palo Alto Networks Telemetry Pipeline
operator, also known as a
[Core Operator](/ingest/pipeline/v2/concepts#core-operators-and-core-instances).
#### Global image
The parameters in this table configure the settings for pipeline images:
| Parameter | Description | Default value |
| - | - | - |
| `global.imageRegistry` | The registry that stores pipeline images. This value overrides any registries set within associated Core Instances. | `""` |
| `global.imagePullSecrets` | An array of the key names for pull secrets to use across all images. Any values in this array are added to the list of pull secret names specified in each image's `pullSecrets` parameter; they don't override per-image settings. | `["regcreds"]` |
| `global.pullPolicy` | Sets the pull policy used by Kubernetes. If a value is specified, this setting overrides the associated `pullPolicy` in any per-image settings. | `""` |
#### Deployment
The parameters in this table configure the Core Operator:
| Parameter | Description | Default value |
| - | - | - |
| `enabled` | If `true`, enables this chart. If `false`, disables this chart. | `true` |
| `images.operator.registry` | The registry that stores the operator image. This value can be overridden by `global.imageRegistry`. | `ghcr.io` |
| `images.operator.repository` | The repository that stores the operator image. | `calyptia/core-operator` |
| `images.operator.tag` | The tag associated with the operator image. | latest [version](/ingest/pipeline/v2/component-versions) |
| `images.operator.pullSecrets` | An array of the key names for pull secrets to use in the specified image. Any values in this array are added to the list of pull secret names specified in `global.image.pullSecrets`. | `[]` |
| `images.operator.pullPolicy` | Sets the pull policy used by Kubernetes for the specified image. This value can be overwritten by a value set in `global.image.pullPolicy`. | `IfNotPresent` |
| `commonAnnotations` | Specifies [annotations](/ingest/pipeline/v2/configure/kubernetes/annotations) to add to all resources, with the exception of the Core Operator Pod. | `{}` |
| `podAnnotations` | Specifies annotations to add to the Core Operator Pod. | `{}` |
| `namespaceOverride` | If a value is set, this parameter overrides the namespace specified by the `.Release.Namespace` variable. | `""` |
| `calyptiaTolerations` | Specifies [tolerations](/ingest/pipeline/v2/configure/kubernetes/tolerations) to add to the Core Operator Pod. | `""` |
| `restartPolicy` | Sets the restart policy for the Core Operator Pod. | `Always` |
#### Resources
The parameters in this table define
[resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
for the Core Operator:
| Parameter | Description | Default value |
| - | - | - |
| `resources.limits.cpu` | Sets the Core Operator's CPU limit. | `500m` |
| `resources.limits.memory` | Sets the Core Operator's memory limit. | `512Mi` |
| `resources.requests.cpu` | Sets the Core Operator's CPU request. | `10m` |
| `resources.requests.memory` | Sets the Core Operator's memory limit. | `64Mi` |
#### Probes
The parameters in this table configure probes to monitor the health of the Core
Operator:
| Parameter | Description | Default value |
| - | - | - |
| `readinessProbe.httpGet.path` | The HTTP path of the readiness probe. | `/readyz` |
| `readinessProbe.httpGet.port` | The port associated with the readiness probe. | `8081` |
| `readinessProbe.initialDelaySeconds` | The initial delay for the readiness probe, in seconds. | `5` |
| `readinessProbe.periodSeconds` | Specifies how often to run the readiness probe, in seconds. | `10` |
| `livenessProbe.httpGet.path` | The HTTP path of the liveness probe. | `/healthz` |
| `livenessProbe.httpGet.port` | The port associated with the liveness probe. | `8081` |
| `livenessProbe.initialDelaySeconds` | Specifies the initial delay for the liveness probe, in seconds. | `15` |
| `livenessProbe.periodSeconds` | Specifies how often to run the liveness probe, in seconds. | `20` |
#### RBAC
The parameters in this table configure
[role-based access control (RBAC)](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
settings:
| Parameter | Description | Default value |
| - | - | - |
| `rbac.create` | Specifies whether to create RBAC resources. | `true` |
| `serviceAccount.create` | If `true`, create a ServiceAccount for the operator. If `false`, don't create a ServiceAccount. | `true` |
| `serviceAccount.name` | If `serviceAccount.create` is `true`, specifies the name to give that ServiceAccount. | `""` |
| `serviceAccount.annotations` | Specifies [annotations](/ingest/pipeline/v2/configure/kubernetes/annotations) to add to the ServiceAccount. | `{}` |
| `fullnameOverride` | If set, overrides the default value of the `serviceAccount.name` parameter. | `""` |
| `nameOverride` | If set, overrides the default value of the `fullnameOverride` parameter. | `""` |
#### Pull secrets
The parameters in this table configure the secrets used to pull images from a
private registry:
| Parameter | Description | Default value |
| - | - | - |
| `imageCredentials.secretName` | The name of the secret. This value must refer to an existing `pullSecret`. | *none* |
| `imageCredentials.registry` | The image registry. This value must match the `registry` value of the images you're trying to pull. | *none* |
| `imageCredentials.username` | The username to sign in to the registry. | *none* |
| `imageCredentials.password` | The password to sign in to the registry. | *none* |
| `imageCredentials.email` | The email address to sign in to the registry. | *none* |
### `core-instance` parameters
The `core-instance` chart governs an associated
[Core Instance](/ingest/pipeline/v2/concepts#core-operators-and-core-instances), which
syncs Palo Alto Networks Telemetry Pipeline between your local environment and the
Palo Alto Networks Telemetry Pipeline backend.
#### Global image
The parameters in this table configure the settings for pipeline images:
| Parameter | Description | Default value |
| - | - | - |
| `global.imageRegistry` | The registry that stores pipeline images. This value overrides any registries set within associated Core Instances. | `""` |
| `global.imagePullSecrets` | An array of the key names for pull secrets to use across all images. Any values in this array are added to the list of pull secret names specified in each image's `pullSecrets` parameter; they don't override per-image settings. | `["regcreds"]` |
| `global.pullPolicy` | Sets the pull policy used by Kubernetes. If a value is specified, this setting overrides the associated `pullPolicy` in any per-image settings. | `""` |
#### Deployment
The parameters in this table configure the Core Instance:
| Parameter | Description | Default value |
| - | - | - |
| `enabled` | If `true`, enables this chart. If `false`, disables this chart. | `true` |
| `coreInstance` | Sets the name of the Core Instance. | `""` |
| `cloudToken` | Your Palo Alto Networks Telemetry Pipeline API token in plain text. Only use this parameter if `cloudTokenSec.name` and `cloudTokenSec.key` aren't set. | `""` |
| `cloudTokenSec.name` | The name of the [Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/secret/) that stores your Palo Alto Networks Telemetry Pipeline API token. Only use this parameter if `cloudToken` isn't set. | `nil` |
| `cloudTokenSec.key` | The key of the Kubernetes secret that stores your Palo Alto Networks Telemetry Pipeline API token. Only use this parameter if `cloudToken` isn't set. | `nil` |
| `cloudUrl` | The URL of the Palo Alto Networks Telemetry Pipeline backend. | `https://cloud-api.calyptia.com` |
| `images.fromCloud.registry` | The registry that stores the `fromCloud` container image, which is a synchronization container that communicates with the Palo Alto Networks Telemetry Pipeline backend. This value can be overridden by `global.imageRegistry`. | `ghcr.io` |
| `images.fromCloud.repository` | The repository that stores the `fromCloud` container image. | `calyptia/core-operator/sync-from-cloud` |
| `images.fromCloud.tag` | The tag associated with the `fromCloud` container image. | latest [version](/ingest/pipeline/v2/component-versions) |
| `images.fromCloud.pullSecrets` | The names of the pull secrets to use to fetch the `fromCloud` image. Any values in this array are added to the list of pull secret names specified in `global.image.pullSecrets`. | `[]` |
| `images.fromCloud.pullPolicy` | Sets the pull policy for the `fromCloud` container image. This value can be overridden by `global.image.pullPolicy`. | `IfNotPresent` |
| `images.toCloud.registry` | The registry that stores the `toCloud` container image, which is a synchronization container that communicates with the Palo Alto Networks Telemetry Pipeline backend. This value can be overridden by `global.imageRegistry`. | `ghcr.io` |
| `images.toCloud.repository` | The repository that stores the `fromCloud` container image. | `calyptia/core-operator/sync-to-cloud` |
| `images.toCloud.tag` | The tag associated with the `toCloud` container image. | latest [version](/ingest/pipeline/v2/component-versions) |
| `images.toCloud.pullSecrets` | The names of the pull secrets to use to fetch the `toCloud` image. Any values in this array are added to the list of pull secret names specified in `global.image.pullSecrets`. | `[]` |
| `images.toCloud.pullPolicy` | Sets the pull policy for the `toCloud` container image. This value can be overridden by `global.image.pullPolicy`. | `IfNotPresent` |
| `images.hotReload.registry` | The registry that stores the container image to use for pipelines during a hot reload. This value can be overridden by `global.imageRegistry`. | `ghcr.io` |
| `images.hotReload.repository` | The repository that stores the container image to use for pipelines during a hot reload. | `calyptia/configmap-reload` |
| `images.hotReload.tag` | The tag associated with the container image to use for pipelines during a hot reload. | latest [version](/ingest/pipeline/v2/component-versions) |
| `interval` | Specifies how often to sync data to and from the Palo Alto Networks Telemetry Pipeline backend. Possible units of measurement are `ns` (nanoseconds), `us` or `µs` (microseconds), `ms` (milliseconds), `s` (seconds), `m` (minutes), and `h` (hours). | `15s` |
| `probeIntervalSec` | Specifies how often to run liveness and readiness probes, in seconds. If set to `0`, both probes are disabled. | `5` |
| `commonAnnotations` | Specifies [annotations](/ingest/pipeline/v2/configure/kubernetes/annotations) to add to the Core Instance Pods created by this chart, but not to pipeline Pods. To add annotations to pipeline Pods, use `calyptiaAnnotations`. This value must follow `annotation1=value1,annotation2=value2` syntax. | `{}` |
| `namespaceOverride` | If a value is set, this parameter overrides the namespace specified by the `.Release.Namespace` variable. | `""` |
| `fromCloud.debugPort` | The debug port for the `fromCloud` container. | `5334` |
| `fromCloud.resources` | The resources for the `fromCloud` container. | `{}` |
| `toCloud.debugPort` | The debug port for the `toCloud` container. | `15334` |
| `toCloud.resources` | The resources for the `toCloud` container. | `{}` |
| `cloudTimeout` | Specifies the HTTP timeout for requests to the Palo Alto Networks Telemetry Pipeline backend, in seconds. If set to `0`, the timeout is disabled. | `0` |
#### Pipeline
The parameters in this table configure pipelines deployed within the associated Core
Instance:
| Parameter | Description | Default value |
| - | - | - |
| `clusterLogging` | If `true`, enables [automated Kubernetes logging](/ingest/pipeline/v2/build/automated-logging). If `false`, disables automated Kubernetes logging. | `false` |
| `calyptiaAnnotations` | Specifies [annotations](/ingest/pipeline/v2/configure/kubernetes/annotations) to add to pipeline Pods. This value must follow `annotation1=value1,annotation2=value2` syntax. However, if you're using Helm through the command line, you must escape any commas with a backslash (`\`) to prevent Helm from incorrectly splitting the string into multiple values. For example, `--set calyptiaAnnotations='annotation1=value1\,annotation2=value2'` is valid syntax. | `""` |
| `calyptiaTolerations` | Specifies [tolerations](/ingest/pipeline/v2/configure/kubernetes/tolerations) to add to pipeline Pods. Only use this setting if you haven't already configured per-pipeline tolerations. This value must follow the [toleration string syntax](/ingest/pipeline/v2/configure/kubernetes/tolerations#toleration-string-syntax). | `""` |
| `enableHealthCheckPipeline` | If `true`, creates a [health check pipeline](/ingest/pipeline/v2/concepts#health-check-pipeline) in the Core Instance. If `false`, doesn't create a health check pipeline. | `false` |
| `healthCheckPipelinePort` | The [frontend port](/ingest/pipeline/v2/configure/networking#ports) for the health check pipeline. | `2020` |
| `healthCheckPipelineServiceType` | The [Service](/ingest/pipeline/v2/configure/networking#service-types) type to use for the health check pipeline. | `LoadBalancer` |
| `skipServiceCreation` | If `true`, no [Service](/ingest/pipeline/v2/configure/networking#service-types) is created for the pipeline. If `false`, creates a Service for the pipeline. | `false` |
| `notls` | If `true`, disables TLS verification for pipeline configuration settings. If `false`, enables TLS verification for pipeline configuration settings. | `true` |
| `httpProxy` | Sets the `HTTP_PROXY` environment variable for pipeline containers. | `""` |
| `httpsProxy` | Sets the `HTTPS_PROXY` environment variable for pipeline containers. | `""` |
| `noProxy` | Sets the `NO_PROXY` environment variable for pipeline containers. | `""` |
| `cloudProxy` | Specifies the HTTP proxy to use when connecting to the Palo Alto Networks Telemetry Pipeline backend. | `""` |
#### RBAC
The parameters in this table configure
[role-based access control (RBAC)](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
settings:
| Parameter | Description | Default value |
| - | - | - |
| `rbac.create` | If `true`, creates RBAC resources. If `false`, doesn't create RBAC resources. | `true` |
| `serviceAccount.create` | If `true`, creates a ServiceAccount for the operator. If `false`, doesn't create a ServiceAccount. | `true` |
| `serviceAccount.name` | If `serviceAccount.create` is `true`, specifies the name to give that ServiceAccount. | `""` |
| `serviceAccount.annotations` | Specifies [annotations](/ingest/pipeline/v2/configure/kubernetes/annotations) to add to the ServiceAccount. | `{}` |
| `fullnameOverride` | If set, overrides the default value of the `serviceAccount.name` parameter. | `""` |
| `nameOverride` | If set, overrides the default value of the `fullnameOverride` parameter. | `""` |
#### Pull secrets
The parameters in this table configure the secrets used to pull images from a
private registry:
| Parameter | Description | Default value |
| - | - | - |
| `imageCredentials.secretName` | The name of the secret. This value must refer to an existing `pullSecret`. | *none* |
| `imageCredentials.registry` | The image registry. This value must match the `registry` value of the images you're trying to pull. | *none* |
| `imageCredentials.username` | The username to log in to the registry. | *none* |
| `imageCredentials.password` | The password to log in to the registry. | *none* |
| `imageCredentials.email` | The email address to log in to the registry. | *none* |
# History and rollback
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/history-rollback
View your pipeline history and revert to previous versions.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Palo Alto Networks Telemetry Pipeline saves a history of each pipeline's configuration settings
and statuses over time.
## View configuration history
To view the configuration history for a specific pipeline, use the following
command:
```shell theme={null}
calyptia get pipeline_config_history --pipeline PIPELINE_ID
```
Replace *`PIPELINE_ID`* with the [pipeline ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
of your pipeline.
This command returns a list of configuration IDs that correspond to different
snapshots from that pipeline's configuration history. Its output
will be similar to the following:
```text theme={null}
ID AGE
7c636cb9-2734-4168-81e3-3a84208049ae 36 seconds
1542066b-c2ff-4908-bd81-4d815f9ae22a 1 minute
7a3d0d8d-2e7a-4443-b5be-11b86942499c 5 minutes
237e3f6f-52e9-4dea-a7da-070a58bf4884 15 hours
```
### Limit results
Use the `--last` flag to display only a subset of configuration snapshots. For example, to
return a list of the last five snapshots, run:
```shell theme={null}
calyptia get pipeline_config_history --pipeline example-pipeline --last 5
```
### View specific changes
Use the `-o yaml` flag to view the specific changes over time to that
pipeline's [configuration file](/ingest/pipeline/v2/configure/config-files):
```shell theme={null}
calyptia get pipeline_config_history --pipeline example-pipeline -o yaml
```
## Roll back pipeline configuration history
> [!WARNING]
>
> If you used the `--skip-config-validation` flag when you created or modified
> a pipeline, you must also include that flag when you run the `rollout` command
> for that pipeline.
To roll back a pipeline to a previous configuration, use the following command:
```shell theme={null}
calyptia rollout pipeline PIPELINE_ID --to-config-id CONFIG_ID
```
Replace the following:
* *`PIPELINE_ID`*: The [pipeline ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
of your pipeline.
* *`CONFIG_ID`*: The [configuration ID](#view-configuration-history)
you want to roll your pipeline back to.
### Roll back a specific number of steps
In addition to using the history ID of a previous configuration, you can also
specify the number of steps you want to roll back through the configuration history
of a pipeline. To do so, use the following command:
```shell theme={null}
calyptia rollout pipeline PIPELINE_ID --steps-back COUNT
```
Replace the following:
* *`PIPELINE_ID`*: The [pipeline ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
of your pipeline.
* *`COUNT`*: The number of steps to roll back through the pipeline's configuration
history. This must be an integer value.
## View status history
To view the status history for a specific pipeline, use one of these methods:
> [tab] Web interface
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline whose status you want to view.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline whose status you want to view.
> 4. Under **Data Pipelines**, find the pipeline whose status you want to view, and
> then click
** Settings >
> Status History**.
>
> The pane that appears shows a list of statuses changes over time for that pipeline.
> [tab] Pipeline CLI
>
> Run the following [Pipeline CLI](/ingest/pipeline/pipeline-cli) command:
>
> ```shell theme={null}
> calyptia get pipeline_status_history --pipeline PIPELINE_ID
> ```
>
> Replace *`PIPELINE_ID`* with the [pipeline ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
> of your pipeline.
>
> This command returns a list of statuses and corresponding configuration
> IDs over time for that pipeline. Its output will be similar to the following:
>
> ```text theme={null}
> STATUS CONFIG ID AGE
> STARTED 237e3f6f-52e9-4dea-a7da-070a58bf4884 15 hours
> NEW 237e3f6f-52e9-4dea-a7da-070a58bf4884 15 hours
> ```
# Kubernetes deployment settings
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/kubernetes
Configure your Kubernetes deployment settings in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Because all Palo Alto Networks Telemetry Pipeline installations are
[deployed on top of Kubernetes](/ingest/pipeline/v2/concepts#core-operators-and-core-instances), you
can use [Pipeline CLI](/ingest/pipeline/pipeline-cli) to manage different Kubernetes deployment
settings.
> [card] [Annotations](/ingest/pipeline/v2/configure/kubernetes/annotations)
> [card] [Namespaces](/ingest/pipeline/v2/configure/kubernetes/namespaces)
> [card] [Pods and containers](/ingest/pipeline/v2/configure/kubernetes/pods-containers)
> [card] [Resource labels](/ingest/pipeline/v2/configure/kubernetes/resource-labels)
> [card] [Sidecars](/ingest/pipeline/v2/configure/kubernetes/sidecars)
> [card] [Tolerations](/ingest/pipeline/v2/configure/kubernetes/tolerations)
> [card] [Workloads](/ingest/pipeline/v2/configure/kubernetes/workloads)
# Annotations
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/kubernetes/annotations
Configure Kubernetes annotations in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
[Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)
let you attach custom metadata to Palo Alto Networks Telemetry Pipeline
resources. These annotations won't
affect the behavior of Palo Alto Networks Telemetry Pipeline.
> [tab] Pipeline CLI
>
> [Pipeline CLI](/ingest/pipeline/pipeline-cli) lets you specify tolerations for new resources.
> However, you can't use Pipeline CLI to add or modify tolerations for an existing
> resource.
>
> When you create a new resource, add the `--annotations` flag to your operation,
> and include an annotations string.
>
> The string that specifies your annotations must follow this syntax:
>
> ```text theme={null}
> annotation1=value1,annotation2=value2
> ```
> [tab] Helm
>
> Helm lets you add annotations to new resources, and add or modify annotations
> for existing resources.
>
> To do so, add the following key-value pair to your Helm chart:
>
> ```yaml theme={null}
> calyptiaAnnotations: STRING
> ```
>
> Replace *`STRING`* with the string that specifies your annotations.
>
> The string that specifies your annotations must follow this syntax:
>
> ```text theme={null}
> annotation1=value1,annotation2=value2
> ```
>
> However, if you're using Helm through the command line, you must escape any
> commas with a backslash (`\`) to prevent Helm from incorrectly splitting the
> string into multiple values. For example,
> `--set calyptiaAnnotations='annotation1=value1\,annotation2=value2'` is valid syntax.
# Namespaces
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/kubernetes/namespaces
Configure Kubernetes namespaces in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
By default, Palo Alto Networks Telemetry Pipeline creates its resources in the `calyptia`
[namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/).
You can use the `--kube-namespace` flag to set a different namespace when you
[install](/ingest/pipeline/v2/install/install-operator) or [upgrade](/ingest/pipeline/v2/install/upgrade)
Palo Alto Networks Telemetry Pipeline. However, like other types of Kubernetes CRDs,
[Core Operator](/ingest/pipeline/v2/concepts#core-operator) CRDs don't support namespace scoping.
# Pods and containers
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/kubernetes/pods-containers
Configure Kubernetes Pods and containers in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Palo Alto Networks Telemetry Pipeline uses [Pods](https://kubernetes.io/docs/concepts/workloads/pods/)
and [containers](https://kubernetes.io/docs/concepts/containers/) to manage different
components of Palo Alto Networks Telemetry Pipeline.
## Pods
Use the information in this section to perform operations related to Pods.
### Specify pipeline Pod termination time
You can specify how long Kubernetes should wait before forcefully terminating the
Pod that runs a pipeline. To do so, add the following flag to a `create pipeline`
or `update pipeline` command:
```shell /VALUE/ theme={null}
calyptia {create|update} pipeline --termination-grace-period-seconds VALUE
```
Replace *`VALUE`* with a non-negative integer, which represents a time in seconds.
If unspecified, the default value is `30`.
For more information, see the `terminationGracePeriodSeconds`
entry in the [Kubernetes API documentation](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#pod-v1-core).
## Containers
Use the information in this section to perform operations related to containers.
### Configure container lifecycle
You can configure a pipeline container to execute certain actions in response to
lifecycle events. To do so, add the following flag to a `create pipeline` or
`update pipeline` command:
```shell /JSON/ theme={null}
calyptia {create|update} pipeline --lifecycle JSON
```
Replace *`JSON`* with a JSON object that contains your lifecycle settings. You can
also pass an empty JSON object (`{}`) to remove any existing lifecycle settings.
For more information, see the `Lifecycle` entry in the
[Kubernetes API documentation](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#lifecycle-v1-core).
### View `from-cloud` and `to-cloud` container logs
Each [Core Instance](/ingest/pipeline/v2/concepts#core-instance) Pod includes two containers
that synchronize pipeline resources.
* The `from-cloud` container receives updates from the Palo Alto Networks Telemetry Pipeline
backend and pushes those updates to your Kubernetes cluster.
* The `to-cloud` container sends information about changes within
your cluster to the Palo Alto Networks Telemetry Pipeline backend.
You can use the following kubectl command to view logs from each of these containers:
```shell /POD/ /CONTAINER/ theme={null}
kubectl logs POD CONTAINER
```
Replace the following values:
* *`POD`*: The name of the Core Instance Pod.
* *`CONTAINER`*: Either `from-cloud` or `to-cloud`.
# Resource labels
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/kubernetes/resource-labels
Learn about the labels assigned to Palo Alto Networks Telemetry Pipeline resources.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Because Palo Alto Networks Telemetry Pipeline is a collection of Kubernetes resources,
Palo Alto Networks Telemetry Pipeline uses the
[Kubernetes labeling system](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)
to categorize and identify these resources. You can't change these labels yourself,
but Palo Alto Networks Telemetry Pipeline applies labels consistently across
resources, which means you can
use them to select specific resources while performing Kubernetes operations.
## Label format and types
Palo Alto Networks Telemetry Pipeline resource labels use a key-value pair format separated by an
equal sign (`key=value`). All resource of the same type receive the same set of
keys, but certain keys' values contain information unique to a particular
instance of a resource, like a name or UUID.
## List of resource labels
Each resource in Palo Alto Networks Telemetry Pipeline receives the following labels:
| Resource type | Labels |
| - | - |
| Core Operator pod | `calyptia.core=core-operator` `control-plane=controller-manager` |
| Core Operator metrics service | `calyptia.core=core-operator` `control-plane=controller-manager` |
| Core Instance pod | `app.kubernetes.io/part-of=calyptia` |
| Core Instance metrics service | *none* |
| Pipeline pod | `app.kubernetes.io/component=calyptia-core` `core-pipeline=[PIPELINE NAME]` |
| Cluster logging pipeline pod | `app.kubernetes.io/component=calyptia-core` `core-pipeline=[INSTANCE NAME]-cluster-logging-[UUID]` |
| Pipeline service | `app.kubernetes.io/created-by=core-operator` `app.kubernetes.io/managed-by=core-operator` `app.kubernetes.io/part-of=calyptia` `calyptia.core=core-operator` |
| Health check pod | `app.kubernetes.io/component=calyptia-core` `core-pipeline=[INSTANCE NAME]-health-check-[UUID]` |
| Health check service | `calyptia.core=core-operator` |
# Pipeline sidecars
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/kubernetes/sidecars
Learn about pipeline sidecars in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can use [Kubernetes sidecar containers](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/)
to add, update, and remove additional
[containers](/ingest/pipeline/v2/configure/kubernetes/pods-containers) parallel to your pipeline's
primary container. These pipeline sidecars let you add monitoring containers, include
proxy servers, run support services, and implement service meshes.
## Sidecar specification files
Each pipeline sidecar is governed by a JSON specification file. The following example
shows the format and sample content of a basic specification file:
```json filename="sidecar.json" theme={null}
{
"name": "example-sidecar",
"image": "nginx:latest",
"imagePullPolicy": "IfNotPresent",
"command": ["/bin/sh"],
"args": ["-c", "sleep", "infinity"]
}
```
To create a sidecar, you must include a specification file. However, you can also use
the [`calyptia update sidecar`](#update-a-sidecar) command to update the
specification file for an existing sidecar.
## Create a sidecar
> [!NOTE]
>
> You can only create sidecars for existing pipelines. If you attempt to create
> a sidecar for a pipeline that doesn't exist, the operation will fail.
To create a pipeline sidecar, run the following command:
```shell theme={null}
calyptia create sidecar --pipeline NAME --spec FILE_NAME.json
```
Replace the following:
* *`NAME`*: The name of the pipeline to create a sidecar for.
* *`FILE_NAME`*: Your [sidecar specification file](#sidecar-specification-files), which
must include a `.json` file extension.
### Multiple sidecars
You can add multiple sidecars to a single pipeline. Each sidecar operates
independently and can have its own [specification file](#sidecar-specification-files),
[volumes](#volumes), and [probes](#probes).
The following example shows the process of adding multiple sidecars to a pipeline
named `myPipeline`:
```shell theme={null}
calyptia create sidecar --pipeline myPipeline --spec sidecar1.json
calyptia create sidecar --pipeline myPipeline --spec sidecar2.json
calyptia create sidecar --pipeline myPipeline --spec sidecar3.json
```
## Optional configuration
Pipeline sidecars support these optional configuration settings.
### Volumes
You can use [Kubernetes ConfigMaps](https://kubernetes.io/docs/concepts/configuration/configmap/)
to mount volumes to a sidecar.
> [!NOTE]
>
> Pipeline sidecars only support ConfigMap volumes, and no other types of volumes.
>
> Additionally, before you create a sidecar that will reference a ConfigMap, you must
> create the required ConfigMap in the Kubernetes cluster that contains your pipeline.
> The ConfigMap must also exist in the same namespace as your pipeline.
The following example shows a [sidecar specification file](#sidecar-specification-files)
that includes mounted volumes:
```json filename="sidecarWithVolumes.json" theme={null}
{
"name": "envoy-sidecar",
"image": "envoyproxy/envoy:v1.28-latest",
"imagePullPolicy": "IfNotPresent",
"command": [
"/usr/local/bin/envoy",
"-c",
"/etc/envoy/envoy.yaml",
"--service-cluster",
"proxy-service"
],
"ports": [
{
"name": "proxy",
"containerPort": 10000,
"protocol": "TCP"
},
{
"name": "admin",
"containerPort": 9901,
"protocol": "TCP"
}
],
"volumeMounts": [
{
"name": "envoy-config",
"mountPath": "/etc/envoy",
"readOnly": true
}
],
"volumes": [
{
"name": "envoy-config",
"configMap": {
"name": "envoy-config"
}
}
]
}
```
### Probes
Pipeline sidecars support liveness, readiness, and startup probes. For more information,
refer to the
[Kubernetes probe documentation.](https://kubernetes.io/docs/concepts/configuration/liveness-readiness-startup-probes/).
Each probe's configuration must be a valid Kubernetes probe specification.
Invalid probe configurations cause the sidecar creation or update process to fail.
Additionally, the port specifications for each probe must be valid numbers.
The following example shows a [sidecar specification file](#sidecar-specification-files)
that includes all three types of probes:
```json filename="sidecarWithProbes.json" theme={null}
{
"name": "probe-sidecar",
"image": "nginx:latest",
"imagePullPolicy": "IfNotPresent",
"ports": [
{
"name": "http",
"containerPort": 80,
"protocol": "TCP"
}
],
"livenessProbe": {
"httpGet": {
"path": "/",
"port": 80,
"httpHeaders": [
{
"name": "Custom-Header",
"value": "test"
}
]
},
"initialDelaySeconds": 10,
"timeoutSeconds": 1,
"periodSeconds": 10,
"successThreshold": 1,
"failureThreshold": 3
},
"readinessProbe": {
"httpGet": {
"path": "/",
"port": 80
},
"initialDelaySeconds": 5
},
"startupProbe": {
"exec": {
"command": [
"/bin/sh",
"-c",
"test -f /var/run/nginx.pid"
]
},
"periodSeconds": 5
}
}
```
## Manage sidecars
Use these commands to manage existing pipeline sidecars.
### List sidecars
To list all sidecars associated with a pipeline, run the following command:
```shell theme={null}
calyptia get sidecar --pipeline NAME
```
Replace *`NAME`* with the name of your pipeline.
### Update a sidecar
You can update an existing sidecar by modifying its [specification file](#sidecar-specification-files).
These changes can include updates to its image, [volumes](#volumes), and [probes](#probes).
To update a sidecar, run the following command:
```shell theme={null}
calyptia update sidecar --sidecar ID --spec FILE_NAME.json
```
Replace the following:
* *`ID`*: The ID of the sidecar to update.
* *`FILE_NAME`*: Your updated [sidecar specification file](#sidecar-specification-files), which
must include a `.json` file extension.
### Delete a sidecar
Deleting a sidecar removes that sidecar container from all pipeline replicas.
To delete a sidecar, run the following command:
```shell theme={null}
calyptia delete sidecar --sidecar ID --yes
```
Replace *`ID`* with the ID of the sidecar to delete.
[Deleting a pipeline](/ingest/pipeline/v2/build/create-modify#delete-a-pipeline)
removes any sidecars for that pipeline.
## Troubleshoot
Use these troubleshooting methods if you have any issues while creating or updating a
sidecar:
* Consult the pipeline's logs and status information.
* Confirm that the sidecar's [specification file](#sidecar-specification-files) is valid.
* Search your Kubernetes pod events for any errors.
* Ensure that the sidecar image is accessible to your Kubernetes cluster.
# Tolerations
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/kubernetes/tolerations
Configure Kubernetes tolerations in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
[Tolerations and taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
are Kubernetes features that lets you control which nodes your pipelines run on.
You can use tolerations to schedule your pipelines on Kubernetes nodes with matching
taints.
In Palo Alto Networks Telemetry Pipeline, you can set tolerations for Core Instances
and for individual pipelines. Any tolerations set for a Core Instance apply to
all pipelines associated with that Core Instance, but tolerations set for an individual
pipeline override any tolerations set for its corresponding Core Instance.
> [!NOTE]
>
> To set corresponding taints on nodes, use the
> [`kubectl taint`](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_taint/)
> command.
## Toleration parameters
Tolerations in Palo Alto Networks Telemetry Pipeline use the following parameters:
| Parameter | Description |
| - | - |
| `key` | Required for tolerations with the `Equal` operator. The key to evaluate against matching taints. If a toleration with the `Equal` operator omits this parameter, that toleration will match all keys and values. |
| `operator` | Required. The operator that determines whether a toleration matches a taint. Possible values are `Equal` and `Exists`. `Equal`: The toleration matches a taint if the taint has a key-value pair identical to the toleration's `key` and `value` parameters. `Exists`: The toleration matches a taint if the taint has a key with the same name as the toleration's `key` parameter. |
| `value` | Required for tolerations with the `Exists` operator, but must be omitted for tolerations with the `Equal` operator. The value to evaluate against matching taints. |
| `effect` | Required. The effect to evaluate against matching taints. Possible values are `NoSchedule`, `PreferNoSchedule`, and `NoExecute`. `NoSchedule`: Except for pods with a matching toleration, no new pods will be scheduled onto nodes with this taint. `PreferNoSchedule`: The scheduler will try to avoid placing new non-matching pods on nodes with this taint. `NoExecute`: Pods that are already running on a node will be evicted if they don't have a matching toleration, and pods with a matching toleration will be evicted after the duration of `tolerationSeconds`, if set. |
| `tolerationSeconds` | For tolerations with the `NoExecute` effect, defines how long (in seconds) pods with a matching toleration will remain bound before being evicted. If this parameter is omitted, pods with a matching toleration will remain bound indefinitely. |
## Pipeline tolerations
Use the following information to modify tolerations for individual pipelines.
### Set tolerations for a pipeline
To set tolerations for a new pipeline:
1. Create a [JSON file](#toleration-json-syntax) with your toleration specifications.
2. Use Pipeline CLI to either [create a pipeline](/ingest/pipeline/v2/build/create-modify#create-a-pipeline)
or [modify a pipeline](/ingest/pipeline/v2/build/create-modify#modify-a-pipeline), and add
the following flag to the associated command:
```shell /FILE/ theme={null}
--tolerations-spec FILE
```
Replace *`FILE`* with the path to your tolerations JSON file.
### Remove tolerations from a pipeline
To remove tolerations from a pipeline:
1. Create a JSON file with an empty array (`[]`).
2. Use Pipeline CLI to [modify a pipeline](/ingest/pipeline/v2/build/create-modify#modify-a-pipeline),
and add the following flag to that command:
```shell /EMPTY-ARRAY/ theme={null}
--tolerations-spec EMPTY-ARRAY
```
Replace *`EMPTY-ARRAY`* with the path to your JSON file with an empty array.
## Core Instance tolerations
Use one of these methods to set tolerations for a Core Instance.
> [tab] Pipeline CLI
>
> [Pipeline CLI](/ingest/pipeline/pipeline-cli) lets you specify tolerations for new Core Instances.
> However, you can't use Pipeline CLI to add or modify tolerations for an existing Core
> Instance.
>
> To specify tolerations for a new Core Instance, use the `--tolerations` flag:
>
> ```shell theme={null}
> calyptia create core_instance operator --name INSTANCE --tolerations STRING
> ```
>
> Replace the following values:
>
> * *`INSTANCE`*: The name for your new Core Instance.
> * *`STRING`*: The string that specifies your tolerations.
> [tab] Helm
>
> Helm lets you specify tolerations for new Core Instances, and add or modify tolerations
> for an existing Core Instance.
>
> To do so, add the following key-value pair to your Helm chart:
>
> ```shell theme={null}
> calyptiaTolerations: "STRING"
> ```
>
> Replace *`STRING`* with the string that specifies your tolerations.
### Toleration string syntax
The string that specifies your tolerations must follow this syntax:
```shell theme={null}
key1=operator:value1:effect:tolerationSeconds,key2=operator:value2:effect:tolerationSeconds
```
You can also leave certain sections of this string blank to omit certain toleration
parameters as permitted. For example, `foo=Exists::PreferNoSchedule` is a valid
toleration string.
Because `tolerationSeconds` isn't a required parameter and only applies to the
`NoExecute` effect, you can omit the `:tolerationSeconds` portion of this syntax
as necessary. Additionally, tolerations with the `Exists` operator must omit the
`value` portion of this syntax but retain its preceding colon.
For example, this is a valid toleration string:
```shell theme={null}
foo=Equal:bar:NoExecute:3600,baz=Exists::PreferNoSchedule
```
### Toleration JSON syntax
> [!NOTE]
>
> Per-pipeline tolerations require Palo Alto Networks Telemetry Pipeline v2.34.0 or later.
The JSON file that specifies your tolerations must follow this syntax:
```json theme={null}
[
{
"key": "abc",
"operator": "abc",
"value": "abc",
"effect": "abc",
"tolerationSeconds": 123
},
{
"key": "xyz",
"operator": "xyz",
"value": "xyz",
"effect": "xyz",
"tolerationSeconds": 456
}
]
```
Each toleration must be a structured object, and multiple tolerations must be
stored as items within an array of structured objects. If a specific toleration
doesn't need a particular parameter, omit that parameter entirely.
For example, this is a valid toleration JSON file:
```json filename="tolerations.json" theme={null}
[
{
"key": "foo",
"operator": "Equal",
"value": "bar",
"effect": "NoExecute",
"tolerationSeconds": 3600,
},
{
"key": "baz",
"operator": "Exists",
"effect": "PreferNoSchedule"
}
]
```
# Workloads
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/kubernetes/workloads
Learn about different workload types in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
In Palo Alto Networks Telemetry Pipeline, you can use the PipelineKind attribute
to specify [workload](https://kubernetes.io/docs/concepts/workloads/controllers/)
types for pipelines.
Pipelines can run as the following workload types:
* **[Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)**:
A pipeline run as a Deployment has a configurable number of
[replica Pods](/ingest/pipeline/v2/configure/scaling). If you don't specify a workload type,
new pipelines run as Deployments by default.
* **[StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/)**:
A pipeline run as a StatefulSet has a configurable number of replica Pods, similar to
a Deployment pipeline, but each Pod has persistent data storage and a stable identity.
* **[DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/)**:
A pipeline run as a DaemonSet adds a Pod to every node in the Kubernetes
cluster where it's deployed.
## Set a pipeline's workload type
To set the workload type for a new pipeline, use the `--kind` flag in
[Pipeline CLI](/ingest/pipeline/pipeline-cli):
```shell /INSTANCE/ /PIPELINE/ /WORKLOAD/ theme={null}
calyptia create pipeline \
--core-instance INSTANCE \
--name PIPELINE \
--kind WORKLOAD
```
Replace the following:
* *`INSTANCE`*: The name of your Core Instance.
* *`PIPELINE`*: The name to give your new pipeline.
* *`WORKLOAD`*: The workload type for your pipeline. Possible values: `deployment`,
`statefulSet`, or `daemonSet`.
> [!NOTE]
>
> After you create a pipeline, you can't change its workload type.
### Additional settings for StatefulSet pipelines
There are several additional settings unique to StatefulSet pipelines, including
one required setting:
```shell /CLASS/ /POLICY1/ /POLICY2/ theme={null}
--storage-class CLASS \
--pvc-retention-policy-when-scaled POLICY1 \
--pvc-retention-policy-when-deleted POLICY2
```
* *`CLASS`*: Required. The [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/)
to use for each Pod's [PersistentVolume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/).
After you set this value for a StatefulSet pipeline, you can't modify it.
* *`POLICY1`*: Specifies whether Kubernetes should retain or delete the
[PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
(PVC) associated with each affected Pod if the StatefulSet pipeline is scaled down.
Possible values: `Retain` (default) and `Delete`. To use this flag, you must
be running Kubernetes v1.32 or newer and must enable the `StatefulSetAutoDeletePVC`
feature gate in Kubernetes.
* *`POLICY2`*: Specifies whether Kubernetes should retain or delete each Pod's PVC
if the StatefulSet pipeline is deleted. Possible values: `Retain` (default)
and `Delete`. To use this flag, you must be running Kubernetes v1.32 or newer
and must enable the `StatefulSetAutoDeletePVC` feature gate in Kubernetes.
> [!NOTE]
>
> If you're using Kubernetes v1.31 or earlier, you can't set the `--pvc` flags to
> specify how Kubernetes handles PVC cleanup because older versions of Kubernetes
> don't handle PVC cleanup. Instead, Palo Alto Networks Telemetry Pipeline
> handles the cleanup process by
> deleting PVCs for deleted pipelines and retaining PVCs for scaled-down pipelines.
>
> If you're using Kubernetes v1.32 or later but don't enable the `StatefulSetAutoDeletePVC`
> feature gate, or if you attempt to set the `--pvc` flags in Kubernetes v1.31 or earlier,
> neither Kubernetes nor Palo Alto Networks Telemetry Pipeline handles PVC cleanup. In this scenario,
> all PVCs persist until you delete them manually.
For example, the following command creates a StatefulSet pipeline named `my-pipeline`
associated with a Core Instance named `my-instance`. It uses a StorageClass named
`standard`, and Palo Alto Networks Telemetry Pipeline will retain PVCs for
any scaled-down pods but delete
all PVCs if the pipeline is deleted.
```shell theme={null}
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
```
# Pipeline metadata
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/metadata
Access pipeline metadata in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Use the information on this page to access pipeline metadata.
## Get pipeline IDs
After you [create a pipeline](/ingest/pipeline/v2/build/create-modify), Palo Alto
Networks Telemetry Pipeline assigns that pipeline a unique numerical ID.
To retrieve a list of IDs for all pipelines associated with a
[Core Instance](/ingest/pipeline/v2/concepts#core-instance),
run the following [Pipeline CLI](/ingest/pipeline/pipeline-cli) command:
```shell theme={null}
calyptia get pipelines --core-instance INSTANCE --show-ids
```
Replace *`INSTANCE`* with the name of your Core Instance.
## Back up pipeline configuration files
> Requires Pipeline CLI version 3.17.0 or later.
You can run the following script to back up the [configuration files](/ingest/pipeline/v2/configure/config-files)
for each pipeline across all of your Core Instances:
```shell theme={null}
curl -sSfL https://raw.githubusercontent.com/chronosphereio/calyptia-cli/refs/heads/main/dump-all-pipelines.sh | bash
```
The resulting configuration files are stored in your current working directory,
with a subfolder for each Core Instance that contains the configuration files
for all of its associated pipelines.
# Networking
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/networking
Configure networking settings in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Use the information on this page to configure different networking settings in
Palo Alto Networks Telemetry Pipeline.
## Ports
Pipelines use various ports (also referred to as *endpoints*) to send and
receive data. These ports correspond to different components of each pipeline.
### View pipeline ports
To view a list of open ports for a pipeline, use the following command:
```shell theme={null}
calyptia get endpoints --pipeline PIPELINE
```
Replace *`PIPELINE`* with the name or
[unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids) of your pipeline.
Each item in the resulting list includes a protocol type,
[a frontend port, and a backend port](#frontend-and-backend-ports).
### Plugins
Most [source plugins](/ingest/pipeline/plugins/source-plugins) and some
[destination plugins](/ingest/pipeline/plugins/destination-plugins) expose
an associated port. Plugins that expose a port will set a default value for that
port, but you can override this value when you configure plugins through the
Palo Alto Networks Telemetry Pipeline web interface or through
[pipeline configuration files](/ingest/pipeline/v2/configure/config-files).
### Health check pipelines
By default, the [health check pipeline](/ingest/pipeline/v2/concepts#health-check-pipeline)
within each Core Instance exposes an HTTP server on TCP port `2020`.
### Frontend and backend ports
Each pipeline component uses a triplet that consists of a frontend port, a backend
port, and a protocol type. Frontend ports are exposed externally and let pipelines
communicate with different services to send and receive telemetry data. Backend
ports are only used within a pipeline's internal Kubernetes infrastructure to forward
traffic to pods.
When you set a port number for a pipeline component, the same port number is
applied to both the frontend and backend ports for that component. These frontend
and backend port numbers stay in sync unless a conflict triggers
[automatic reassignment](#automatic-reassignment) for the frontend port.
#### Uniqueness
Within a single pipeline, each backend port must use a unique port number and protocol.
Within a [Core Instance](/ingest/pipeline/v2/concepts#core-instance), backend ports can
overlap across the pipelines associated with that Core Instance, but each frontend port
in the Core Instance must use a unique port number and protocol. However, different
components or pipelines can share a port number if one port uses TCP and the other uses UDP.
For example, two pipelines associated with the same Core Instance can't both have plugins
that expose TCP port `1600`, but Pipeline A can expose TCP port `1600` and Pipeline
B can expose UDP port `1600`. Similarly, Pipeline C can't have two different plugins
that expose TCP port `1850`, but it can have one plugin that exposes TCP port `1850`
and another plugin that exposes TCP port `1851`.
#### Automatic reassignment
If two pipeline components associated with the same Core Instance try to claim the same port,
Palo Alto Networks Telemetry Pipeline resolves this conflict by reassigning the
[frontend port](#frontend-and-backend-ports) of the newer component to a different
port number.
This reassignment process increments the frontend port number of the newer
component by one until it finds a non-conflicting port. For example, if Pipeline
B has a plugin whose frontend and backend port are set to TCP port `2200`, but
that port number is already in use by Pipeline A, Palo Alto Networks Telemetry Pipeline will attempt
to reassign the frontend port of Pipeline B's plugin to TCP port `2201`. If TCP
port `2201` is also already in use, Palo Alto Networks Telemetry Pipeline will attempt to reassign
the frontend port to TCP port `2202` instead.
As a result of this reassignment process, a component can have a different frontend
port number and backend port number. In the previous example, if
Palo Alto Networks Telemetry Pipeline
successfully reassigned Pipeline B's plugin on the first attempt, then that plugin's
frontend port number would be `2201` and its backend port number would still be `2200`.
## Proxies
Use the information in this section to configure proxies in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> Configuring a proxy affects all pipelines associated with the specified
> [Core Instance](/ingest/pipeline/v2/concepts#core-instance).
### Configure a proxy between pipelines and their connected services
You can set up an HTTPS proxy between your pipelines and their connected
services, such as sources and destinations. To do so, use the following command:
```shell copy /INSTANCE/ /PROXY/ theme={null}
calyptia update core_instance operator INSTANCE --https-proxy "PROXY"
```
Replace the following values:
* *`INSTANCE`*: The name of the Core Instance associated with your pipelines.
* *`PROXY`*: The proxy to use (for example, `http://localhost:3128`).
You can also specify an HTTP proxy with the `--http-proxy` flag.
### Configure a proxy between pipelines and the Palo Alto Networks Telemetry Pipeline backend
You can set up a proxy between your pipelines and the Palo Alto Networks Telemetry
Pipeline backend. To do so, use the following command:
```shell copy /INSTANCE/ /PROXY/ theme={null}
calyptia update core_instance operator INSTANCE --cloud-proxy "PROXY"
```
* *`INSTANCE`*: The name of the Core Instance associated with your pipelines.
* *`PROXY`*: The proxy to use (for example, `http://localhost:3128`).
## Service types
Each pipeline uses one of the available
[Kubernetes Service](https://kubernetes.io/docs/concepts/services-networking/service/)
types. The Service types supported by Palo Alto Networks Telemetry Pipeline are:
* [`ClusterIP`](https://kubernetes.io/docs/concepts/services-networking/service/#type-clusterip)
* [`LoadBalancer`](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer)
* [`NodePort`](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport)
### Create a pipeline with a specific Service type
When [creating a pipeline](/ingest/pipeline/v2/build/create-modify#create-a-pipeline),
use the `--service-type` flag to specify its Service type:
```shell theme={null}
calyptia create pipeline --name PIPELINE --core-instance INSTANCE --service-type TYPE
```
Replace the following values:
* *`PIPELINE`*: A short name you'd like to give your pipeline.
* *`INSTANCE`*: The name of your Core Instance.
* *`TYPE`*: The Service type for your pipeline (`ClusterIP`, `LoadBalancer`, or
`NodePort`).
> [!NOTE]
>
> If you don't specify a Service type, new pipelines use the `LoadBalancer` Service
> by default.
### Modify the Service type of an existing pipeline
To modify the Service type of an existing pipeline, use the following command:
```shell theme={null}
calyptia update pipeline PIPELINE --service-type TYPE
```
Replace the following values:
* *`PIPELINE`*: The name or [unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
of your existing pipeline.
* *`TYPE`*: The Service type for your pipeline (`ClusterIP`, `LoadBalancer`, or
`NodePort`).
> [!NOTE]
>
> Modifying a pipeline's Service type affects all [ports](/ingest/pipeline/v2/configure/networking#ports)
> within that pipeline.
# Resource profiles
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/resource-profiles
Optimize pipeline performance with resource profiles.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Palo Alto Networks Telemetry Pipeline uses templates called *resource profiles*
to configure settings related to buffering and resource consumption. You can
choose between several predefined resource profiles or create your own resource
profiles that meet your requirements for performance and reliability.
> [!WARNING]
>
> To avoid the potential for data loss, avoid using improperly configured
> resource profiles or resource profiles incompatible with your environment,
> including profiles that exceed your available resources. Additionally, updating
> the resource profile for an existing pipeline causes that pipeline to update and
> potentially restart, which can interrupt the flow of data through that pipeline.
## Predefined resource profiles
The following predefined resource profiles are available in Palo Alto Networks Telemetry Pipeline:
* `best-effort-low-resource`
* `high-performance-guaranteed-delivery`
* `high-performance-optimal-throughput`
If you don't specify a resource profile when you create a pipeline,
Palo Alto Networks Telemetry Pipeline
uses the `best-effort-low-resource` profile by default.
Each resource profile uses the following values:
| Type | Description |
| - | - |
| `best-effort-low-resource` | - `StorageMaxChunksUp`: `128` - `StorageSyncFull`: `false` - `StorageBacklogMemLimit`: `5M` - `StorageVolumeSize`: `250Mi` - `CPULimit`: `0` - `CPURequest`: `0` - `MemoryLimit`: `0` - `MemoryRequest`: `0` |
| `high-performance-guaranteed-delivery` | - `StorageMaxChunksUp`: `256` - `StorageSyncFull`: `false` - `StorageBacklogMemLimit`: `256M` - `StorageVolumeSize`: `512Mi` - `CPULimit`: `0` - `CPURequest`: `0` - `MemoryLimit`: `0` - `MemoryRequest`: `0` |
| `high-performance-optimal-throughput` | - `StorageMaxChunksUp`: `0` - `StorageSyncFull`: `false` - `StorageBacklogMemLimit`: `""` - `StorageVolumeSize`: `128Mi` - `CPULimit`: `0` - `CPURequest`: `0` - `MemoryLimit`: `0` - `MemoryRequest`: `0` |
You can't edit these predefined resource profiles, but you can
[define new resource profiles](#define-a-new-resource-profile).
## Settings
Each resource profile includes the following settings:
| Name in Pipeline CLI | JSON configuration key | Description | Possible values |
| - | - | - | - |
| `STORAGE-SYNC-FULL` | `resources.storage.syncFull` | Determines how often the memory buffer and file system buffer are synchronized. If `true`, uses the `full` [Fluent Bit `storage.sync` mode](https://docs.fluentbit.io/manual/administration/buffering-and-storage#service-section-configuration), which synchronizes after every write operation. If `false`, uses the `normal` mode, which synchronizes at regular intervals. This setting affects only [StatefulSet pipelines](/ingest/pipeline/v2/configure/kubernetes/workloads). If unspecified, defaults to `false`. | `true`, `false` |
| `STORAGE-BACKLOG-MEM-LIMIT` | `resources.storage.backlogMemLimit` | Required. Sets the amount of memory allocated for storing buffered data. This setting only affects [StatefulSet pipelines](/ingest/pipeline/v2/configure/kubernetes/workloads), but it's still required in all resource profile definitions. | Memory in MB |
| `STORAGE-VOLUME-SIZE` | `resources.storage.volumeSize` | Required. Sets the size of the storage volume in each pipeline Pod. Pipelines with the Deployment or DaemonSet [workload type](/ingest/pipeline/v2/configure/kubernetes/workloads) use an ephemeral storage volume. Pipelines with the StatefulSet workload type use a persistent storage volume. | Volume size in Mi/Gi/Ti |
| `STORAGE-MAX-CHUNKS-UP` | `resources.storage.maxChunksUp` | Sets the maximum number of [chunks](https://docs.fluentbit.io/manual/administration/buffering-and-storage#chunks) that can be buffered in memory. This setting only affects [StatefulSet pipelines](/ingest/pipeline/v2/configure/kubernetes/workloads). If unspecified, defaults to `0`. | Any integer greater than or equal to `0` |
| `CPU-LIMIT` | `resources.cpu.limit` | Required. Sets the [CPU limit](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). | Any [Kubernetes CPU value](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) |
| `CPU-REQUEST` | `resources.cpu.request` | Required. Sets the [CPU request](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). | Any [Kubernetes CPU value](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) |
| `MEM-LIMIT` | `resources.memory.limit` | Required. Sets the [memory limit](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). | Any [Kubernetes memory value](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) |
| `MEM-REQUEST` | `resources.memory.request` | Required. Sets the [memory request](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). | [Kubernetes memory value](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) |
> [!NOTE]
>
> A value of `0` sets an unlimited upper bound.
## Pipeline CLI commands
Use the following [Pipeline CLI](/ingest/pipeline/pipeline-cli) commands to interact with
resource profiles.
### Specify the resource profile for a new pipeline
Set the resource profile for a new pipeline by using the following command:
```shell /INSTANCE/ /PIPELINE/ /PROFILE/ theme={null}
calyptia create pipeline --core-instance INSTANCE --name PIPELINE --resource-profile PROFILE
```
Replace the following:
* *`INSTANCE`*: The name of your Core Instance.
* *`PIPELINE`*: A name for your new pipeline.
* *`PROFILE`*: The name of the resource profile to use.
### View the resource profile of an existing pipeline
Use the following command to view the active resource profile of an existing pipeline:
```shell /PIPELINE/ theme={null}
calyptia get pipeline PIPELINE --output-format yaml
```
Replace *`PIPELINE`* with the name of your pipeline.
In the resulting YAML output, the `resourceProfile` key contains details about the
pipeline's active resource profile, including its name and settings.
### Update the resource profile for an existing pipeline
Update the resource profile for an existing pipeline by using the following command:
```shell /PIPELINE/ /PROFILE/ theme={null}
calyptia update pipeline PIPELINE --resource-profile PROFILE
```
Replace the following:
* *`PIPELINE`*: The name or [unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
of your pipeline.
* *`PROFILE`*: The name of the resource profile to use.
### Define a new resource profile
Use the following command to define your own resource profiles in
Palo Alto Networks Telemetry Pipeline:
```shell /INSTANCE/ /PROFILE/ /FILE_NAME/ theme={null}
calyptia create resource_profile --core-instance INSTANCE --name PROFILE --spec FILE_NAME
```
Replace the following:
* *`INSTANCE`*: The name of your Core Instance.
* *`PROFILE`*: A name for your new resource profile.
* *`FILE_NAME`*: The JSON file that defines your resource profile.
This is an example of a resource profile with a valid JSON structure:
```json theme={null}
{
"resources": {
"storage": {
"syncFull": false,
"backlogMemLimit": "5M",
"volumeSize": "250Mi",
"maxChunksUp": 128
},
"cpu": {
"limit": "0",
"request": "0"
},
"memory": {
"limit": "0",
"request": "0"
}
}
}
```
### Change the settings of a resource profile
> Requires Palo Alto Networks Telemetry Pipeline v2.48.0 or later.
Use the following command to change the settings of an existing resource profile:
```shell /PROFILE/ /FILE_NAME/ theme={null}
calyptia update resource_profile --core-instance INSTANCE --name PROFILE --spec FILE_NAME
```
Replace the following:
* *`INSTANCE`*: The name of your Core Instance.
* *`PROFILE`*: The name of the resource profile to update.
* *`FILE_NAME`*: The JSON file that defines the new settings for your resource
profile.
If any pipelines are using the specified resource profile, changes to the resource
profile are applied to those pipelines accordingly.
### List available resource profiles
Use the following command to list the resource profiles associated with a
specified Core Instance:
```shell /INSTANCE/ theme={null}
calyptia get resource_profiles --core-instance INSTANCE
```
Replace *`INSTANCE`* with the name of the Core Instance.
You can also add the `--show-ids` flag to print the unique IDs associated with
each resource profile.
### Get details about a resource profile
Use the following command to get details about a specific resource profile:
```shell /ID/ theme={null}
calyptia get resource_profile ID
```
Replace *`ID`* with the unique ID of that resource profile.
### Delete a resource profile
Use the following command to delete a specific resource profile:
```shell /ID/ theme={null}
calyptia delete resource_profile ID
```
Replace *`ID`* with the unique ID of that resource profile.
# Scaling and replicas
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/scaling
Learn how Palo Alto Networks Telemetry Pipeline uses scaling and replicas.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> The information on this page applies to pipelines with the Deployment or
> StatefulSet [workload type](/ingest/pipeline/v2/configure/kubernetes/workloads), but not
> pipelines with the DaemonSet workload type.
Palo Alto Networks Telemetry Pipeline uses replica pods to scale pipelines. Each pipeline
needs at least one replica to function. If a pipeline has more than one replica,
any ingested data is balanced between those replicas accordingly.
You can assign a [fixed number of replicas](#fixed-number-of-replicas) to
a pipeline, or [enable horizontal pod autoscaling](#horizontal-pod-autoscaling)
to automatically add and remove replicas in response to utilization changes.
## Fixed number of replicas
Use one of the following methods to set a fixed number of replicas for your pipelines:
> [!NOTE]
>
> For replica counts with a volume over 100 TB a day, contact
> [Cortex XCOR Support](/support) prior to scaling up to ensure stability.
> [tab] Web interface
>
> 1. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline that you want to modify.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline that you want to modify.
> 4. Under **Data Pipelines**, click the name of the pipeline that you want to
> modify.
> 5. Go to ** Advanced Settings**.
> 6. Increase the **Replicas** field to the amount you want, and then click
> **Apply**.
> [tab] Pipeline CLI
>
> Use the `update` command to scale an existing pipeline:
>
> ```shell theme={null}
> calyptia update pipeline PIPELINE_NAME_OR_ID --replicas NUM_OF_REPLICAS
> ```
>
> To examine the number of replicas for a given pipeline, run:
>
> ```shell theme={null}
> calyptia get pipelines --core-instance CORE_INSTANCE
> ```
>
> The output is similar to the following:
>
> ```text theme={null}
> NAME REPLICAS STATUS AGE
> pipeline-name 3 STARTED 15 hours
> ```
## Horizontal pod autoscaling
> Requires Core Instance version 2.12.3 or later.
Pipelines support [horizontal pod autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
(HPA), which enables Palo Alto Networks Telemetry Pipeline to add and remove replicas as needed.
### Enable horizontal pod autoscaling
To enable HPA, [create or modify a pipeline](/ingest/pipeline/v2/build/create-modify)
through [Pipeline CLI](/ingest/pipeline/pipeline-cli) and include the
`--min-replicas` and `--max-replicas` flags. You must assign a value greater than
`0` to `--min-replicas`, and the value of `--max-replicas` must be greater than or
equal to the value of `--min-replicas`. For example:
```shell /PIPELINE/ theme={null}
calyptia update pipeline PIPELINE --min-replicas 2 --max-replicas 6
```
Replace *`PIPELINE`* with the name or [unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
of the pipeline you want to modify.
### Configure horizontal pod autoscaling
To configure HPA, use the following flags when you create or update a pipeline through [Pipeline CLI](/ingest/pipeline/pipeline-cli):
| Flag | Description | Value |
| - | - | - |
| `--max-replicas` | The maximum number of replicas to which the autoscaler can scale up. | Example: `6` |
| `--min-replicas` | The minimum number of replicas to which the autoscaler can scale down. | Example: `3` |
| `--scale-up-type` | The type of scale-up policy to implement. If you include this flag, you must also include `--scale-up-value` and `--scale-up-period-seconds`. | `Pods` or `Percent` |
| `--scale-up-value` | The amount of change to implement through scale-up policies. Requires `--scale-up-type`. | Must be greater than `0`. |
| `--scale-up-period-seconds` | The window of time for which the scale-up policy should hold true, in seconds. Requires `--scale-up-type`. | Must be greater than `0`. Example: `30` |
| `--scale-down-type` | The type of scale-down policy to implement. If you include this flag, you must also include `--scale-down-value` and `--scale-down-period-seconds`. | `Pods` or `Percent` |
| `--scale-down-value` | The amount of change to implement through scale-down policies. Requires `--scale-down-type`. | Must be greater than `0`. Example: `15` |
| `--scale-down-period-seconds` | The window of time for which the scale-down policy should hold true, in seconds. Requires `--scale-down-type`. | Must be greater than `0`. Example: `30` |
| `--utilization-cpu-average` | The target percentage value for average CPU utilization. The autoscaler attempts to maintain equilibrium around this value by scaling pipelines up or down accordingly. | Example: `25` |
| `--utilization-memory-average` | The target percentage value for average memory utilization. The autoscaler attempts to maintain equilibrium around this value by scaling pipelines up or down accordingly. | Example: `30` |
Scale-up and scale-down policies are optional. If you set a scale-up or
scale-down policy, you must specify the type, value, and period for that policy in
the same command. For example:
```shell /PIPELINE/ theme={null}
calyptia update pipeline PIPELINE --scale-up-type Pods --scale-up-value 2 --scale-up-period-seconds 30
```
### Disable horizontal pod autoscaling
To disable HPA, update a pipeline through [Pipeline CLI](/ingest/pipeline/pipeline-cli)
and include the `--disable-hpa` flag:
```shell /PIPELINE/ theme={null}
calyptia update pipeline PIPELINE --disable-hpa
```
This flag resets the minimum and maximum replica counts, scaling policies, and
utilization targets for the pipeline, and deletes the autoscaler from the cluster.
The pipeline then runs with the [fixed number of replicas](#fixed-number-of-replicas)
set by its `--replicas` value.
You can't combine `--disable-hpa` with any other HPA flag in the same command. To
re-enable HPA later, run the `update pipeline` command again with the
`--min-replicas` and `--max-replicas` flags.
## Pause a pipeline
You can pause a pipeline by setting its replicas to zero, which temporarily
prevents that pipeline from routing or processing data. Use one of these methods
to pause a pipeline:
> [tab] Web interface
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline that you want to pause.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline you want to pause.
> 4. Under **Data Pipelines**, find the pipeline that you want to pause, and
> then click
** Settings >
> Pause**.
> 5. In the dialog that appears, click **Yes** to confirm your choice.
> [tab] Pipeline CLI
>
> In [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command:
>
> ```shell /PIPELINE/ theme={null}
> calyptia update pipeline PIPELINE --replicas 0
> ```
>
> Replace *`PIPELINE`* with the name or [unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
> of the pipeline you want to pause.
### Unpause a pipeline
If a pipeline is paused, use one of these methods to unpause it:
> [tab] Web interface
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline that you want to unpause.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline you want to unpause.
> 4. Under **Data Pipelines**, find the pipeline that you want to unpause, and
> then click
** Settings >
> Resume**.
> 5. In the dialog that appears, click **Yes** to confirm your choice.
> [tab] Pipeline CLI
>
> In [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command:
>
> ```shell /PIPELINE/ /REPLICAS/ theme={null}
> calyptia update pipeline PIPELINE --replicas REPLICAS
> ```
>
> Replace the following values:
>
> * *`PIPELINE`*: The name or [unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
> of the pipeline you want to unpause.
> * *`REPLICAS`*: An integer value greater than zero.
# Secrets
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/secrets
Learn how to use secrets in your Palo Alto Networks Telemetry Pipeline pipelines.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
When creating custom pipelines you might have settings that you don't want to store
in plain text or share with other users of the pipeline. Prevent this by using
secrets in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> Due to Kubernetes [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/)
> storage limitations, the total size of a pipeline and its associated resources
> can't exceed 1 MiB. This limit includes the combined size of
> [configuration files](/ingest/pipeline/v2/configure/config-files), secrets, [parsers](/ingest/pipeline/v2/build/parsers),
> and [any other files](/ingest/pipeline/v2/configure/files).
## Secret storage
Palo Alto Networks Telemetry Pipeline encrypts all stored secrets using RSA public key cryptography.
For every [Core Instance](/ingest/pipeline/v2/concepts#core-operators-and-core-instances)
you create, Palo Alto Networks Telemetry Pipeline generates a public key and a private key.
Palo Alto Networks Telemetry Pipeline stores the public key in the Palo Alto Networks
Telemetry Pipeline backend, and the private key
is stored solely in your local environment.
If you add a secret to a Core Instance or any of its pipelines, Palo Alto Networks
Telemetry Pipeline encrypts that secret with the Core Instance's public key, then
stores the encrypted version in the Telemetry Pipeline backend. When your Core
Instance fetches information from the Telemetry Pipeline backend, it uses its private
key to decrypt any encrypted secrets. Decrypted secrets are then stored within that
Core Instance as Kubernetes
[Secrets](https://kubernetes.io/docs/concepts/configuration/secret/), which take the
form of plain text.
> [!WARNING]
>
> Palo Alto Networks Telemetry Pipeline doesn't store private keys or unencrypted secrets
> in the Palo Alto Networks Telemetry Pipeline backend. If you delete or modify the private key
> for a Core Instance,
> any attempts to decrypt secrets will fail due to incompatibility with the associated
> public key.
>
> As a protective measure, Palo Alto Networks Telemetry Pipeline recommends
> [backing up your private key](#back-up-and-restore-a-private-key) in case you
> need to restore it later.
The following diagrams illustrate the secret generation and usage.
### Encryption
```mermaid actions={false} theme={null}
graph TB
accTitle: How Palo Alto Networks Telemetry Pipeline encrypts secret keys
accDescr: After a Palo Alto Networks Telemetry Pipeline user creates or updates a secret, Palo Alto Networks Telemetry Pipeline encrypts that secret using a public key, then stores the encrypted secret.
A[User]--Creates or updates secret-->B((Palo Alto Networks Telemetry Pipeline));
B-.Uses public key to encrypt secret.->C[Aggregator public key]
C-.Stores encrypted secret.->B
style A stroke:#495057,stroke-width:2px
style B stroke:#495057,stroke-width:2px
style C stroke:#495057,stroke-width:2px
```
### Decryption
```mermaid actions={false} theme={null}
graph TB
accTitle: How Core Instances decrypt secret keys
accDescr: Palo Alto Networks Telemetry Pipeline sends the encrypted pipeline secret to a Core Instance, and then that Core Instance decrypts that secret using a private key.
A((Palo Alto Networks Telemetry Pipeline))-.Sends encrypted pipeline secret.->B[Core Instance]
B--Fetches pipeline secret-->A
B--Uses private key to decrypt secret-->C[Aggregator private key]
C-.Sends decrypted secret.->B
style A stroke:#495057,stroke-width:2px
style B stroke:#495057,stroke-width:2px
style C stroke:#495057,stroke-width:2px
```
## Add a secret
You can add a secret to an individual pipeline or to a [Core Instance](/ingest/pipeline/v2/concepts#core-operators-and-core-instances).
Adding a secret to a Core Instance makes that secret available to all pipelines
associated with that Core Instance.
### Pipelines
Use one of the following methods to add a secret to a pipeline.
> [tab] Web
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline that you want to add a secret to.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline that you want to add a secret to.
> 4. Under **Data Pipelines**, click the name of the pipeline that you want to add
> a secret to.
> 5. Click **Advanced Settings**.
> 6. In the **Add new secret** section, enter values for the **Name** and **Value**
> fields.
> 7. Click **Add secret** to save the secret.
> [tab] Pipeline CLI
>
> To add secrets to a pipeline in [Pipeline CLI](/ingest/pipeline/pipeline-cli),
> use the following flags with the `create pipeline` or `update pipeline` command:
>
> ```shell /FILE/ /FORMAT/ theme={null}
> calyptia {create|update} pipeline \
> --secrets-file FILE \
> --secrets-format FORMAT
> ```
>
> Replace the following:
>
> * *`FILE`*: The name of the file that contains your secrets.
> * *`FORMAT`*: The format of the file that contains your secrets. Possible values:
> `auto`, `env`, `json`, or `yaml`.
### Core Instance
Use one of the following methods to add a secret to a Core Instance.
> [tab] Web
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the Core Instance that you want to add a secret to.
> 3. Go to **Core Instances**, then click the name of the Core Instance that you
> want to add a secret to.
> 4. Click **Advanced Settings**.
> 5. In the **Add new secret** section, enter values for the **Name** and **Value**
> fields.
> 6. Click **Add secret** to save the secret.
>
> Any secrets you add are visible in the **Older Secrets** table.
> [tab] Pipeline CLI
>
> To add a secret to a Core Instance in [Pipeline CLI](/ingest/pipeline/pipeline-cli),
> use the following command:
>
> ```shell /INSTANCE/ /SECRET_KEY/ /SECRET_VALUE/ theme={null}
> calyptia create core_instance_secret \
> --core-instance INSTANCE \
> --key SECRET_KEY \
> --value SECRET_VALUE
> ```
>
> Replace the following:
>
> * *`INSTANCE`*: The name of your Core Instance.
>
> * *`SECRET_KEY`*: The key of your secret's key-value pair.
>
> * *`SECRET_VALUE`*: The value of your secret's key-value pair.
>
> > [!NOTE]
> >
> > To add multiple secrets to a Core Instance, repeat this command for each key-value pair.
> [tab] Helm
>
> Core Instance secrets can be added using the `coreSecret` variable in
> [Helm](/ingest/pipeline/v2/configure/helm).
## Update a secret
You can replace the value of an existing secret with an updated value.
> [!NOTE]
>
> Before you update a secret, you won't be able to see its current value. Similarly,
> after you update a secret, you won't be able to see any of its previous values.
### Pipelines
Use one of the following methods to update a secret for a pipeline:
> [tab] Web
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the pipeline whose secret you want to update.
> 3. Go to **Core Instances**, then click the name of the Core Instance associated
> with the pipeline whose secret you want to update.
> 4. Under **Data Pipelines**, click the name of the pipeline whose secret you want
> to update.
> 5. Click **Advanced Settings**.
> 6. In the **Older Secrets** table, find the secret that you want to update,
> then click **Update**.
> 7. Enter a new value in the **Secret value** field, then click **Save changes.**
> [tab] Pipeline CLI
>
> You can update the secret by first listing all secrets, and then updating the secret
> with new values.
>
> To list all the secrets from a pipeline, use the command:
>
> ```shell theme={null}
> calyptia get pipeline_secrets --pipeline PIPELINE_ID --show-ids
> ```
>
> The output is similar to the following:
>
> ```text theme={null}
> ID KEY AGO
> 73a941d6-e658-4f12-a175-97d9063c466f es_http_passwd 5 minutes
> ```
>
> Copy the secret `ID` and use it to update its value:
>
> ```shell theme={null}
> calyptia update pipeline_secret SECRET_ID NEW_VALUE
> ```
### Core Instance
Use one of the following methods to update a secret for a Core Instance:
> [tab] Web
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Open the project that contains the Core Instance whose secret you want to update.
> 3. Go to **Core Instances**, then click the name of the Core Instance whose
> secret you want to update.
> 4. Click **Advanced Settings**.
> 5. In the **Older Secrets** table, find the secret that you want to update,
> then click **Update**.
> 6. Enter a new value in the **Secret value** field, then click **Save changes.**
>
> The secret's name and date it was added display in the **Older Secrets** table.
> [tab] Helm
>
> Core Instance secrets can be updated using the `coreSecret` variable in
> [Helm](/ingest/pipeline/v2/configure/helm).
## Reference a secret
In [pipeline configuration files](/ingest/pipeline/v2/configure/config-files), you can reference
both the values of Palo Alto Networks Telemetry Pipeline-managed secrets and
Kubernetes-managed Secrets.
### Palo Alto Networks Telemetry Pipeline-managed secrets
If you [add a secret](#add-a-secret) to a pipeline or to a Core Instance, you can
use `{{ secrets.key }}` syntax to reference the value of that secret in a configuration
file.
For example, given the following secret:
```text filename="secrets.env" theme={null}
es-password=123456
```
You can reference the value of this secret in a configuration file without specifying
this value in plain text. Instead, use the value `{{ secrets.es-password }}`:
```yaml filename="es-pipeline.yaml" theme={null}
pipeline:
inputs:
- Name: forward
listen: 0.0.0.0
port: "24284"
outputs:
- Name: es
host: hostname.us-east-2.es.amazonaws.com
port: "443"
index: calyptia-core
type: _doc
http_user: es
http_passwd: {{ secrets.es-password }}
Match_Regex: .{0,}
```
From your pipeline's perspective, the `http_passwd` key has a value of `123456`.
### Kubernetes-managed Secrets
If you deployed a pipeline in a Kubernetes cluster, you can reference
the value of Kubernetes-managed [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/)
from that cluster without adding any new secrets to Palo Alto Networks Telemetry Pipeline directly.
To reference the value of a Kubernetes Secret inside a [pipeline configuration file](/ingest/pipeline/v2/configure/config-files),
use the following syntax:
```yaml theme={null}
${SECRET_NAME_PARAMETER}
```
Replace the following:
* *`NAME`*: The name of your Kubernetes Secret.
* *`PARAMETER`*: The name of a key stored within the `data` field of your Kubernetes
Secret.
For example, for the following Kubernetes Secret named `test`:
```yaml filename="test" copy theme={null}
apiVersion: v1
data:
SPECIALSAUCE: ZHVtbXk=
kind: Secret
type: Opaque
```
You can reference the value of `SPECIALSAUCE` in a pipeline configuration file
through `${SECRET_TEST_SPECIALSAUCE}`:
```yaml filename="special-pipeline.yaml" theme={null}
pipeline:
inputs:
- dummy: {"message": "dummy"}
rate: "1"
samples: "0"
start_time_sec: "-1"
start_time_nsec: "-1"
Name: ${SECRET_TEST_SPECIALSAUCE}
```
From your pipeline's perspective, the `Name` key has a value of `ZHVtbXk=`.
## Back up and restore a private key
To prevent issues with [secret storage and decryption](#secret-storage), you can
back up the private keys stored within each Core Instance, then restore these
keys later if needed.
### Back up a private key
To back up the private key for a Core Instance:
1. Run the following kubectl command:
```shell /INSTANCE/ /ENV/ theme={null}
kubectl get secret "calyptia-INSTANCE-ENV-secret" -o jsonpath='{.data.private-key}' | base64 --decode
```
Replace the following values:
* *`INSTANCE`*: The name of the Core Instance whose key you want to back up.
* *`ENV`*: The environment associated with your Core Instance. If you're not
sure what value to use here, your environment is likely `default`.
2. In the resulting output, look for the text that contains your private key:
```text theme={null}
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
```
Your private key is the value between `BEGIN RSA PRIVATE KEY` and `END RSA PRIVATE KEY`.
3. Copy the value of your private key and save it in a trusted, secure location,
like a password manager or cloud secret storage service.
### Restore a private key
To restore a private key that you previously backed up:
1. In kubectl, run the following command to encode your key:
```shell /VALUE/ theme={null}
ENCODED_PRIVATE_KEY=$(echo '-----BEGIN RSA PRIVATE KEY-----
VALUE
-----END RSA PRIVATE KEY-----' | base64)
```
Replace *`VALUE`* with the value of your private key.
2. Run the following command to delete any previously encoded secrets, which might
be inaccurate due to an incorrect or deleted private key:
```shell /INSTANCE/ /ENV/ /NAMESPACE/ theme={null}
kubectl delete secret calyptia-INSTANCE-ENV-secret -n NAMESPACE
```
Replace the following values:
* *`INSTANCE`*: The name of the Core Instance whose key you want to restore.
* *`ENV`*: The environment associated with your Core Instance. If you're not
sure what value to use here, your environment is likely `default`.
* *`NAMESPACE`*: The [namespace](/ingest/pipeline/v2/configure/kubernetes/namespaces)
where you deployed your Core Instance. If you're not sure what value to use
here, your namespace is likely `calyptia`.
3. Run the following command to recreate your secrets using the restored private key:
```shell /INSTANCE/ /ENV/ theme={null}
echo "apiVersion: v1
kind: Secret
metadata:
labels:
app.kubernetes.io/created-by: core-operator
app.kubernetes.io/managed-by: core-operator
app.kubernetes.io/part-of: calyptia
calyptia.core: core-operator
name: calyptia-INSTANCE-ENV-secret
type: Opaque
data:
private-key: $ENCODED_PRIVATE_KEY" | kubectl apply -f -
```
Replace the following values:
* *`INSTANCE`*: The name of the Core Instance whose key you want to restore.
* *`ENV`*: The environment associated with your Core Instance. If you're not
sure what value to use here, your environment is likely `default`.
# Fleets
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets
Learn about fleet management in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
Fleets in Palo Alto Networks Telemetry Pipeline let you manage all of your
[telemetry agents](/ingest/pipeline/v2/fleets/agent), including Fluent Bit and Core
Agent, from a single,
centralized location. By grouping multiple agents under the banner of a unified
fleet, you can perform batch operations across an entire fleet, instead of
individually configuring dozens or hundreds of telemetry agents.
Some of the benefits of using fleets in Palo Alto Networks Telemetry Pipeline are:
* Fleets streamline the process of managing telemetry agents deployed in
different locations, machines, or environments.
* Because all agents within a fleet share the same configuration settings, you
can maintain consistent behavior between a large number of agents and roll out
changes accordingly.
* Updates are pulled from an HTTP endpoint rather than pushed directly to each
agent, which gives you more control over your fleet's network settings and
eliminates the need to open a hole in your firewall.
## View your fleets
Select from the following methods to view your available fleets.
> [tab] Web
>
> To view all of your available fleets using the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/),
> in the navigation menu select **Fleets**.
> [tab] Pipeline CLI
>
> To view all of your available fleets using [Pipeline CLI](/ingest/pipeline/pipeline-cli), run
> the following command:
>
> ```shell theme={null}
> calyptia get fleets
> ```
>
> To view the information about a single fleet, run the following command:
>
> ```shell /NAME/ theme={null}
> calyptia get fleet NAME
> ```
>
> Replace *`NAME`* with the name of the fleet you want to view.
>
> For more information about the subcommands, including their usage and accepted flags,
> see the Pipeline CLI command line help:
>
> ```shell theme={null}
> calyptia get fleets --help
> ```
## Create a fleet
Select from the following methods to create a fleet.
> [tab] Web
>
> To create a new fleet using the Palo Alto Networks Telemetry Pipeline user interface:
>
> 1. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
> 2. Open the project where you want to create a fleet.
> 3. In the navigation menu select **Fleets**, then click
> **Create new fleet**.
> 4. In **Set the name of the Fleet**, enter a name for your new fleet. The fleet name
> must be between eight and 15 characters in length.
> 5. Click **Next**.
> 6. In the **Agent Type** menu, select either **Fluent Bit** or **Core Agent**.
> 7. Use the corresponding instructions to update your Core Agent or Fluent Bit
> configuration.
> 8. Click **Save and deploy**.
> [tab] Pipeline CLI
>
> To create a fleet using [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command:
>
> ```shell /NAME/ /FILE_NAME/ theme={null}
> calyptia create fleet --name NAME --config-file FILE
> ```
>
> Replace the following:
>
> * *`NAME`*: The name for your new fleet.
> * *`FILE_NAME`*: The Fluent Bit or Core Agent configuration file to create your
> fleet.
>
> For more information about the subcommand, including its usage and accepted flags,
> see the Pipeline CLI command line help:
>
> ```shell theme={null}
> calyptia create fleet --help
> ```
## Update a fleet
Select from the following methods to update a fleet.
> [tab] Web
>
> To update a fleet:
>
> 1. In the navigation menu select **Fleets**.
> 2. Find the fleet you want to update in the list of fleets, and click its
** Edit** icon.
> 3. Click **Settings** and make any needed changes.
> 4. Click **Save and deploy**.
> [tab] Pipeline CLI
>
> To update a fleet using [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command:
>
> ```shell theme={null}
> calyptia update fleet
> ```
>
> For more information about the subcommand, including its usage and accepted flags,
> see the Pipeline CLI command line help:
>
> ```shell theme={null}
> calyptia update fleets --help
> ```
## Delete a fleet
Select from the following methods to delete a fleet.
> [tab] Web
>
> To delete a fleet:
>
> 1. In the navigation menu select **Fleets**.
> 2. Find the fleet you want to delete in the list of fleets, and click its
** Delete** icon.
> 3. To permanently delete the fleet, click **Delete**.
> [tab] Pipeline CLI
>
> To delete a fleet using [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command:
>
> ```shell /NAME/ theme={null}
> calyptia delete fleet NAME
> ```
>
> Replace *`NAME`* with the name of the fleet you want to delete.
>
> For more information about the subcommand, including its usage and accepted flags,
> see the Pipeline CLI command line help:
>
> ```shell theme={null}
> calyptia delete fleet --help
> ```
# Add agents to a fleet
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets/add-agent
Learn how to add agents to a fleet in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
After you've [created a fleet](/ingest/pipeline/v2/fleets#create-a-fleet), you can add
[supported telemetry agents](/ingest/pipeline/v2/fleets/agent) to that fleet.
> [!WARNING]
>
> When an agent joins a fleet, that agent's standalone configuration file is
> replaced by the configuration file that governs the entire fleet. Any settings previously
> configured in the standalone configuration file but not
> in the fleet-level configuration file will be permanently overwritten.
>
> Certain settings in an agent's standalone configuration file are necessary part
> of the agent creation process, and can later be overwritten by fleet-level
> settings without issue. However, any text in the original standalone configuration
> file is lost forever, so be sure to save critical key-value information in a separate
> location, or
> [update the fleet-level configuration file](/ingest/pipeline/v2/fleets#update-a-fleet)
> accordingly.
## Add a Fluent Bit agent
> Requires Fluent Bit v2.1.8 or later.
To add a Fluent Bit agent to a fleet:
> [tab] YAML configuration
>
> > [!NOTE]
> >
> > YAML configuration is only supported in Palo Alto Networks Telemetry
> > Pipeline v2.25.0 or later, and requires Fluent Bit v3.2 or later. Additionally, to use YAML
> > configuration files for individual agents in a fleet, the `fleet_config_legacy_format`
> > parameter in that fleet's configuration file must be set to `false`.
>
> 1. If necessary, [install a new Fluent Bit agent](https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bit).
>
> 2. Update the `customs` section in the configuration file for that agent.
>
> ```yaml theme={null}
> customs:
> - name: calyptia
> calyptia_host: HOST
> api_key: 'KEY'
> fleet_name: 'NAME'
> fleet.interval_sec: SECONDS
> fleet.interval_nsec: NANOSECONDS
> fleet_config_legacy_format: false
> ```
>
> Replace the following values:
>
> * *`HOST`*: Your Cortex XCOR hostname. If you don't know your hostname, ask a
> Palo Alto Networks representative for this value.
> * *`KEY`*: The [API token](/ingest/pipeline/pipeline-cli/authenticate) you use to
> authenticate with Palo Alto Networks Telemetry Pipeline.
> * *`NAME`*: The name of the fleet to which your agent will be added.
> * *`SECONDS`*: How often, in seconds, this agent should check for configuration
> updates. If unspecified, defaults to `15`.
> * *`NANOSECONDS`*: How often, in nanoseconds, this agent should check for
> configuration updates. If unspecified, defaults to `0`.
>
> 3. Run the following command:
>
> ```shell theme={null}
> fluent-bit -c CONFIG
> ```
>
> Replace *`CONFIG`* with the name of the configuration file you updated in the
> previous step.
> [tab] Classic configuration
>
> 1. If necessary, [install a new Fluent Bit agent](https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bit).
>
> 2. Update the `[CUSTOM]` section in the configuration file for that agent.
>
> ```shell theme={null}
> [CUSTOM]
> Name calyptia
> Calyptia_Host HOST
> API_Key KEY
> Fleet_Name NAME
> fleet.interval_sec SECONDS
> fleet.interval_nsec NANOSECONDS
> ```
>
> Replace the following values:
>
> * *`HOST`*: Your Cortex XCOR hostname. If you don't know your hostname, ask
> a Palo Alto Networks representative for this value.
> * *`KEY`*: The [API token](/ingest/pipeline/pipeline-cli/authenticate) you use to
> authenticate with Palo Alto Networks Telemetry Pipeline.
> * *`NAME`*: The name of the fleet to which your agent will be added.
> * *`SECONDS`*: How often, in seconds, this agent should check for configuration
> updates. If unspecified, defaults to `15`.
> * *`NANOSECONDS`*: How often, in nanoseconds, this agent should check for
> configuration updates. If unspecified, defaults to `0`.
>
> 3. Run the following command:
>
> ```shell theme={null}
> fluent-bit -c CONFIG
> ```
>
> Replace *`CONFIG`* with the name of the configuration file you updated in the
> previous step.
## Add a Core Agent
> Requires Core Agent v23.4.5 or later.
To add an instance of Core Agent to a fleet:
> [tab] YAML configuration
>
> > [!NOTE]
> >
> > YAML configuration is only supported in Palo Alto Networks Telemetry Pipeline v2.25.0 or later,
> > and requires Core Agent v25.1.1 or later. Additionally, to use YAML
> > configuration files for individual agents in a fleet, the `fleet_config_legacy_format`
> > parameter in that fleet's configuration file must be set to `false`.
>
> 1. If necessary, [install a new instance of Core Agent](https://docs.calyptia.com/calyptia-for-fluent-bit/installation/getting-started-with-fluent-bit).
>
> 2. Update the `customs` section in the configuration file for that agent.
>
> ```yaml theme={null}
> customs:
> - name: calyptia
> calyptia_host: HOST
> api_key: 'KEY'
> fleet_name: 'NAME'
> fleet.interval_sec: SECONDS
> fleet.interval_nsec: NANOSECONDS
> fleet_config_legacy_format: false
> ```
>
> Replace the following values:
>
> * *`HOST`*: Your Cortex XCOR hostname. If you don't know your hostname, ask
> a Palo Alto Networks representative for this value.
> * *`KEY`*: The [API token](/ingest/pipeline/pipeline-cli/authenticate) you use to
> authenticate with Palo Alto Networks Telemetry Pipeline.
> * *`NAME`*: The name of the fleet to which your agent will be added.
> * *`SECONDS`*: How often, in seconds, this agent should check for configuration
> updates. If unspecified, defaults to `15`.
> * *`NANOSECONDS`*: How often, in nanoseconds, this agent should check for
> configuration updates. If unspecified, defaults to `0`.
>
> 3. Run the following command:
>
> ```shell theme={null}
> calyptia-fluent-bit -c CONFIG
> ```
>
> Replace *`CONFIG`* with the name of the configuration file you updated in the
> previous step.
> [tab] Classic configuration
>
> 1. If necessary, [install a new instance of Core Agent](https://docs.calyptia.com/calyptia-for-fluent-bit/installation/getting-started-with-fluent-bit).
>
> 2. Update the `[CUSTOM]` section in the configuration file for that agent.
>
> ```shell theme={null}
> [CUSTOM]
> Name calyptia
> Calyptia_Host HOST
> API_Key KEY
> Fleet_Name NAME
> fleet.interval_sec SECONDS
> fleet.interval_nsec NANOSECONDS
> ```
>
> Replace the following values:
>
> * *`HOST`*: Your Cortex XCOR hostname. If you don't know your hostname, ask
> a Palo Alto Networks representative for this value.
> * *`KEY`*: The [API token](/ingest/pipeline/pipeline-cli/authenticate) you use to
> authenticate with Palo Alto Networks Telemetry Pipeline.
> * *`NAME`*: The name of the fleet to which your agent will be added.
> * *`SECONDS`*: How often, in seconds, this agent should check for configuration
> updates. If unspecified, defaults to `15`.
> * *`NANOSECONDS`*: How often, in nanoseconds, this agent should check for
> configuration updates. If unspecified, defaults to `0`.
>
> 3. Run the following command:
>
> ```shell theme={null}
> calyptia-fluent-bit -c CONFIG
> ```
>
> Replace *`CONFIG`* with the name of the configuration file you updated in the
> previous step.
# Add files to a fleet
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets/add-files
Learn how to add files to a fleet in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
You can add a variety of files to a fleet, including [parsers](/ingest/pipeline/v2/build/parsers),
Lua scripts, and authentication tokens. After you add a file to a fleet, every agent
in that fleet updates its configuration settings and downloads the new file,
which lets those agents access the contents of that file.
To add files to a fleet, use one of the following methods:
> [tab] Web interface
>
> 1. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
> 2. Open the project that contains the fleet that you want to add files to.
> 3. Go to **Fleets**, then click the name of the fleet that you want to add a
> file to.
> 4. Under **Attached File(s)**, click **Attach New File**.
> 5. Use one of these methods to upload a file:
> * Click **Select File** to choose a file from your device.
> * Enter a value in **File name** field and add content to the large text field to create
> a new file with that name and content.
> 6. Click **Upload File**.
> 7. To add multiple files, repeat steps 3 through 5 for each file.
> [tab] Pipeline CLI
>
> In [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command:
>
> ```shell /NAME/ /FILE/ theme={null}
> calyptia create fleet_file --fleet NAME --file FILE
> ```
>
> Replace the following:
>
> * *`NAME`*: The name of the fleet to add the file to.
> * *`FILE`*: The name of the file to add to your fleet.
>
> To add multiple files, repeat this command for each file.
# Agent types
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets/agent
Learn about the types of agents compatible with Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
In addition to creating comprehensive [custom pipelines](/ingest/pipeline/v2/build/create-modify),
you can deploy a standalone agent to collect observability data. Palo Alto Networks
Telemetry Pipeline supports these agent types:
* [Fluent Bit](#fluent-bit)
* [Core Agent](#core-agent)
> [!NOTE]
>
> You can either send data directly from an agent to the destination of your
> choice, or send data from an agent to an intermediary pipeline before it reaches
> its final destination. The latter method lets you take advantage of features
> like [processing rules](/ingest/pipeline/processing-rules).
## Fluent Bit
[Fluent Bit](https://fluentbit.io/) is a lightweight, open source telemetry
agent for logs, metrics, and traces. Although Cortex XCOR now sponsors its
development, Fluent Bit is a [CNCF](https://www.cncf.io/) graduated sub-project and
remains licensed under the terms of the
[Apache License v2.0](https://www.apache.org/licenses/LICENSE-2.0).
For information about setting up and using Fluent Bit, refer to the
[Fluent Bit documentation](https://docs.fluentbit.io/manual).
## Core Agent
Core Agent is an enterprise fork of Fluent Bit available to Palo Alto Networks
Telemetry Pipeline customers.
It offers extended support for maintenance and security fixes.
To compare versions of Fluent Bit and Core Agent, see
[Version equivalents](/ingest/pipeline/v2/fleets/agent/version-equivalents).
For information about installing Core Agent, refer to the following pages:
* [Install in Docker](/ingest/pipeline/v2/fleets/agent/docker-install)
* [Install on Linux (Debian-based)](/ingest/pipeline/v2/fleets/agent/debian-install)
* [Install on Linux (RHEL-based)](/ingest/pipeline/v2/fleets/agent/rhel-install)
* [Install on macOS](/ingest/pipeline/v2/fleets/agent/macos-install)
* [Install on Windows](/ingest/pipeline/v2/fleets/agent/windows-install)
For all other information about using Core Agent, refer to the equivalent
[Fluent Bit documentation](https://docs.fluentbit.io/manual).
# Install Core Agent on Linux (Debian-based)
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets/agent/debian-install
Learn how to install Core Agent on Debian-based Linux distributions.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
In Palo Alto Networks Telemetry Pipeline, you can use [fleets](/ingest/pipeline/v2/fleets)
to manage instances
of Core Agent. Use this guide to install Core Agent on Debian-based Linux distributions.
## Supported environments
Core Agent supports the following Debian-based distributions and architectures:
| Distribution | Architectures |
| - | - |
| Debian 11 (Bullseye) | x86-64, arm64v8 |
| Debian 10 (Buster) | x86-64, arm64v8 |
| Ubuntu 22.04 (Jammy Jellyfish) | x86-64, arm64v8 |
| Ubuntu 20.04 (Focal Fossa) | x86-64, arm64v8 |
| Ubuntu 18.04 (Bionic Beaver) | x86-64, arm64v8 |
| Ubuntu 16.04 (Xenial Xerus) | x86-64 |
## Dependencies
For Debian-based installations, Core Agent has the following general dependencies:
* libc
* libsasl
* libsystemd
* libyaml
* OpenSSL
* zlib
To retrieve a list of specific dependencies for your environment, run the following command:
```shell /PACKAGE/ theme={null}
dpkg -I PACKAGE
```
Replace *`PACKAGE`* with the name of the Core Agent package.
## Validate packages
When retrieving packages from the Core Agent repository, Cortex XCOR uses dual
validation (SHA256) and a GPG key.
### SHA256 check
The SHA256 file is distributed as the `files.sha256` file in the Core Agent repository.
This file contains a list of all included packages.
```shell theme={null}
shasum -a 256 calyptia-fluent-bit-X.
```
## Verify signatures
Core Agent packages are signed with `calyptia.key`. You can use dpkg and apt-key
to verify these signatures.
```shell theme={null}
apt-key add calyptia.key && \
dpkg-sig --list PACKAGE
```
Replace *`PACKAGE`* with the name of the Core Agent package.
## Install
Use these steps to install and enable Core Agent:
1. Run the following command to update your APT package list:
```shell theme={null}
sudo apt-get update
```
2. Run the following command to upgrade your APT packages:
```shell theme={null}
sudo apt-get upgrade
```
3. Run the following command to install Core Agent:
```shell theme={null}
sudo apt-get install calyptia-fluent-bit
```
4. Run the following command to instruct systemd to enable the Core Agent service:
```shell theme={null}
sudo systemctl calyptia-fluent-bit start
```
5. Perform a status check to confirm Core Agent is active. The status check
should return output similar to the following:
```shell theme={null}
sudo service calyptia-fluent-bit status
● calyptia-fluent-bit.service - Calyptia Fluent Bit
Loaded: loaded (/lib/systemd/system/calyptia-fluent-bit.service; disabled; vendor preset: enabled)
Active: active (running) since mié 2016-07-06 16:58:25 CST; 2h 45min ago
Main PID: 6739 (calyptia-fluent-bit)
Tasks: 1
Memory: 656.0K
CPU: 1.393s
CGroup: /system.slice/calyptia-fluent-bit.service
└─6739 /opt/calyptia-fluent-bit/bin/calyptia-fluent-bit -c /etc/calyptia-fluent-bit/calyptia-fluent-bit.conf
```
The default configuration of Core Agent is to collect metrics of CPU usage
and send those metrics to stdout. You can see this outgoing data in your
`/var/log/messages` file.
# Install Core Agent in Docker
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets/agent/docker-install
Learn how to install Palo Alto Networks Telemetry Pipeline Core Agent in Docker.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
> Core Agent v26.3.2 and later does not support Docker.
In Palo Alto Networks Telemetry Pipeline, you can use [fleets](/ingest/pipeline/v2/fleets)
to manage instances
of Core Agent.
Use the following command to install Core Agent in Docker:
```shell /VERSION/ theme={null}
docker run --rm -it ghcr.io/chronosphereio/calyptia-core-agent:VERSION
```
Replace *`VERSION`* with the [latest version](/ingest/pipeline/v2/fleets/agent/version-equivalents)
of Core Agent.
# Install Core Agent on macOS
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets/agent/macos-install
Learn how to install Palo Alto Networks Telemetry Pipeline Core Agent on macOS .
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
> Core Agent v26.3.2 and later does not support macOS.
In Palo Alto Networks Telemetry Pipeline, you can use [fleets](/ingest/pipeline/v2/fleets)
to manage instances
of Core Agent. Use this guide to install Core Agent on macOS.
## Supported architectures
Core Agent supports both x86-64 and Apple Silicon M1 architectures.
## Dependencies
For macOS installations, Core Agent has the following general dependencies:
* libc
* libsasl
* libsystemd
* libyaml
* OpenSSL
* zlib
## Install
Use these steps to install Core Agent:
1. Either download the latest `.pkg` file from the
[Core Agent downloads page](https://calyptia-lts-release-standard.s3.amazonaws.com/index.html),
or run the following command:
```shell /VERSION/ theme={null}
wget https://calyptia-lts-release-standard.s3.amazonaws.com/macos/VERSION/calyptia-fluent-bit-VERSION-apple.pkg
```
Replace both instances of *`VERSION`* with the
[latest version of Core Agent](/ingest/pipeline/v2/fleets/agent/version-equivalents).
2. Run the following command to install Core Agent:
```shell /VERSION/ theme={null}
sudo installer -pkg calyptia-fluent-bit-VERSION-apple.pkg -target /usr/local/bin/
```
Replace *`VERSION`* with the
[latest version of Core Agent](/ingest/pipeline/v2/fleets/agent/version-equivalents).
3. Run the following command to test whether your installation was successful:
```shell theme={null}
calyptia-fluent-bit -i dummy -o stdout -f 1
```
# Install Core Agent on Linux (RHEL-based)
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets/agent/rhel-install
Learn how to install Core Agent on RHEL-based Linux distributions.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
In Palo Alto Networks Telemetry Pipeline, you can use [fleets](/ingest/pipeline/v2/fleets)
to manage instances
of Core Agent. Use this guide to install Core Agent on RHEL-based Linux distributions.
## Supported environments
Core Agent supports the following RHEL-based distributions and architectures:
| Distribution | Architectures |
| - | - |
| Amazon Linux 2023 | x86-64 |
| Amazon Linux 2 | x86-64, arm64v8 |
| CentOS 9 Stream | x86-64, arm64v8 |
| CentOS 8 | x86-64, arm64v8 |
| CentOS 7 | x86-64, arm64v8 |
| CentOS 6 | x86-64 |
| Rocky Linux 10 | x86-64, arm64v8 |
| Rocky Linux 9 | x86-64, arm64v8 |
| Rocky Linux 8 | x86-64, arm64v8 |
| Alma Linux 8 | x86-64, arm64v8 |
| Red Hat Enterprise Linux 10 | x86-64, arm64v8 |
| Red Hat Enterprise Linux 9 | x86-64, arm64v8 |
| Red Hat Enterprise Linux 8 | x86-64, arm64v8 |
| Red Hat Enterprise Linux 7 | x86-64, arm64v8 |
| Red Hat Enterprise Linux 6 | x86-64 |
## Dependencies
For RHEL-based installations, Core Agent has the following general dependencies:
* libc
* libsasl
* libsystemd
* libyaml
* OpenSSL
* zlib
To retrieve a list of specific dependencies for your environment, run the following command:
```shell theme={null}
yum -q deplist PACKAGE
```
Replace *`PACKAGE`* with the name of the Core Agent package.
## Single line install
Palo Alto Networks Telemetry Pipeline provides a basic installation script that's compatible
with most Linux
environments. This script always installs the most recent version of Core Agent.
```shell theme={null}
curl -L https://github.com/calyptia/lts-notifications/releases/latest/download/install-package.sh| bash
```
However, for secure deployments, Palo Alto Networks Telemetry Pipeline recommends following the full
instruction procedures for your Linux environment.
## Mirrors for old CentOS versions
Because CentOS 6, CentOS 7, and CentOS 8 have reached end-of-life, their
default yum repositories are unavailable. To install Core Agent on any of these
distributions, you must configure an appropriate mirror. For example:
```shell theme={null}
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
```
## Verify signatures
Core Agent packages are signed with `calyptia.key`. You can use rpm to verify these
signatures.
```shell theme={null}
rpm --import calyptia.key && \
rpm -K PACKAGE
```
Replace *`PACKAGE`* with the name of the Core Agent package.
## Configure yum
Palo Alto Networks Telemetry Pipeline provides the `calyptia-fluent-bit`
package through a yum repository.
To add the repository reference to your environment, add a new file in
`/etc/yum.repos.d/` with the following content:
```shell /DISTRO/ /VERSION/ theme={null}
[calyptia-fluent-bit]
name = Calyptia Fluent Bit
baseurl = https://calyptia-lts-release-standard.s3.amazonaws.com/linux/25.1.5/DISTRO-VERSION
gpgcheck=1
gpgkey=https://calyptia-lts-release-standard.s3.amazonaws.com/linux/25.1.5/calyptia.key
repo_gpgcheck=1
enabled=1
```
Replace *`DISTRO`* with either `amazonlinux` or `package-centos`, and replace
*`VERSION`* with the relevant version number.
> [!NOTE]
>
> As a security best practice, enable `gpgcheck` and `repo_gpgcheck`. Cortex XCOR
> signs all repository metadata and packages.
## Install
After you've configured your repository, follow these steps.
1. Run the following command to install Core Agent:
```shell theme={null}
sudo yum install calyptia-fluent-bit
```
2. Run the following command to instruct systemd to enable the Core Agent service:
```shell theme={null}
sudo service calyptia-fluent-bit start
```
3. Perform a status check to confirm Core Agent is active. The status check
should return output similar to the following:
```shell theme={null}
● calyptia-fluent-bit.service - Calyptia Fluent Bit
Loaded: loaded (/usr/lib/systemd/system/calyptia-fluent-bit.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2023-06-08 15:55:03 UTC; 9s ago
Docs: https://docs.fluentbit.io/manual/
Main PID: 16631 (calyptia-fluent)
CGroup: /system.slice/calyptia-fluent-bit.service
└─16631 /opt/calyptia-fluent-bit/bin/calyptia-fluent-bit -c //etc/calyptia-fluent-bit/calyptia-fluent-bit.conf
```
The default configuration of Core Agent is to collect metrics of CPU usage
and send those metrics to stdout. You can see this outgoing data in your
`/var/log/messages` file.
## Support for `StartLimitIntervalSec` in RHEL 7
In Core Agent version 25.1.5 or later, the Core Agent systemd file doesn't
include the `StartLimitIntervalSec` configuration in RHEL 7 due to incompatibility
with systemd 219.
RHEL versions that use systemd 230 or later are unaffected by this change.
# Version equivalents between Core Agent and Fluent Bit
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets/agent/version-equivalents
Compare the equivalent versions of Core Agent and Fluent Bit.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
In Palo Alto Networks Telemetry Pipeline, you can use [fleets](/ingest/pipeline/v2/fleets)
to manage instances
of Fluent Bit and Core Agent. Core Agent is based on Fluent Bit, but Core Agent
updates on its own cadence and uses a separate versioning system, which means
the version numbers between the tools aren't identical.
Use the information in this page if you need to reference the
[Fluent Bit documentation](https://docs.fluentbit.io/manual) for equivalent
features in Core Agent.
> [!NOTE]
>
> Core Agent is distinct from the agent that powers standard telemetry pipelines.
>
> For information about pipeline agent versions, see
> [Palo Alto Networks Telemetry Pipeline component versions](/ingest/pipeline/v2/component-versions).
The following table lists each version of Core Agent and its corresponding version
of Fluent Bit:
| Core Agent version | Fluent Bit version |
| - | - |
| 26.3.2 | 4.2.3 |
| 26.3.1 | 4.2.3 |
| 26.1.1 | 4.0.13 |
| 25.11.2 | 4.0.13 |
| 25.6.1 | 3.2.4 |
| 25.1.5 | 3.2.4 |
| 25.1.4 | 3.2.4 |
| 25.1.3 | 3.2.4 |
| 25.1.2 | 3.2.4 |
| 25.1.1 | 3.2.4 |
| 24.4.20 | 3.0.7 |
| 24.4.19 | 3.0.7 |
| 24.4.18 | 3.0.7 |
# Install Core Agent on Windows
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/fleets/agent/windows-install
Learn how to install Palo Alto Networks Telemetry Pipeline Core Agent on Windows.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Telemetry Pipeline users.
> For more information, contact [Cortex XCOR Support](/support).
In Palo Alto Networks Telemetry Pipeline, you can use [fleets](/ingest/pipeline/v2/fleets)
to manage instances
of Core Agent. Use this guide to install Core Agent on Windows.
> [!NOTE]
>
> Not all input and output plugins are supported on Windows. For a list of supported
> plugins, see the
> [Fluent Bit CMake configuration file](https://github.com/fluent/fluent-bit/blob/master/cmake/windows-setup.cmake).
## Supported environments
Core Agent supports the following Windows versions and architectures:
| Version | Architectures |
| - | - |
| Windows Server 2019 | x86, x86-64 |
| Windows 10 1903 | x86, x86-64 |
| Windows Server 2016 | x86-64 |
| Windows Server 2012 R2 | x86-64 |
## Dependencies
For Windows installations, Core Agent has the following general dependencies:
* libc
* libsasl
* libsystemd
* libyaml
* OpenSSL
* zlib
## Install from a ZIP archive
Use these steps to install Core Agent from a ZIP archive.
1. [Download](https://calyptia-lts-release-standard.s3.amazonaws.com/index.html)
a ZIP archive of the latest version of Core Agent. Choose either the 32-bit
or 64-bit archive, depending on your environment.
2. Extract the contents of the ZIP archive.
3. In PowerShell, navigate to the root folder of the extracted files, and then run
the following command:
```shell theme={null}
.\bin\calyptia-fluent-bit.exe -i dummy -o stdout
```
## Install from an EXE or MSI installer
Use these steps to install Core Agent from an EXE or MSI installer.
1. [Download](https://calyptia-lts-release-standard.s3.amazonaws.com/index.html)
an EXE or MSI installer for the latest version of Core Agent.
2. Open the installer that you downloaded. This launches the installation wizard.
3. Click **Next** to proceed. By default, Core Agent is installed to the
`C:\Program Files\calyptia-fluent-bit\` directory.
4. In PowerShell, run the following command:
```shell theme={null}
& "C:\Program Files\fluent-bit\bin\fluent-bit.exe" -i dummy -o stdout
```
## Windows service support
Windows services are long-running background processes, similar to Unix daemons.
You can run Core Agent as a Windows service.
### Register Core Agent as a service
For example, given the following installation layout:
```shell theme={null}
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
```
You can register Core Agent as a Windows service by running the following command:
```shell theme={null}
% sc.exe create fluent-bit binpath= "C:\Program Files\calyptia-fluent-bit\bin\calyptia-fluent-bit.exe -c C:\Program Files\calyptia-fluent-bit\conf\calyptia-fluent-bit.conf"
```
### Start the Core Agent service
To start the Core Agent service, run the following command:
```shell theme={null}
% sc.exe start calyptia-fluent-bit
```
### Auto-start the Core Agent service
To configure the Core Agent service to automatically start on boot, run the
following command:
```shell theme={null}
% sc.exe config calyptia-fluent-bit start= auto
```
### Stop the Core Agent service
To stop the Core Agent service, run the following command:
```shell theme={null}
% sc.exe stop calyptia-fluent-bit
```
# Install Palo Alto Networks Telemetry Pipeline
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install
Deploy Palo Alto Networks Telemetry Pipeline on the platform of your choice.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
You can install Palo Alto Networks Telemetry Pipeline in a Linux environment or inside
a Kubernetes cluster. To complete this installation process, you'll need to
deploy several components that work together to form a functional Palo Alto Networks
Telemetry Pipeline deployment. These components include a
[Core Operator](/ingest/pipeline/v2/concepts#core-operator) ,
a [Core Instance](/ingest/pipeline/v2/concepts#core-instance), and any number of pipelines.
> [!NOTE]
>
> Palo Alto Networks Telemetry Pipeline doesn't offer native support for macOS or Windows. However,
> you can install Palo Alto Networks Telemetry Pipeline on a Linux virtual
> machine or Kubernetes cluster
> running on a macOS or Windows device.
>
> You can also use [Pipeline CLI](/ingest/pipeline/pipeline-cli) in macOS and Windows to manage
> pipelines deployed on an external Linux environment or Kubernetes cluster.
## Install a Core Operator
First, you must [install a Core Operator](/ingest/pipeline/v2/install/install-operator) in
each cluster or environment where you want to use Palo Alto Networks Telemetry Pipeline. These Core
Operators are [Kubernetes operators](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)
that create and modify pipelines.
## Create a Core Instance
Next, for each Core Operator you install, you'll need to
[create a Core Instance](/ingest/pipeline/v2/install/create-instance) in the corresponding
Kubernetes cluster or Linux environment. Core Instances create the underlying
resources for your pipelines and sync those resources with the Palo Alto Networks Telemetry Pipeline
backend.
## Create and manage pipelines
After you install a Core Operator and create a Core Instance, you can
[create pipelines](/ingest/pipeline/v2/build/create-modify) in that environment and
[configure their behavior](/ingest/pipeline/v2/configure).
# Create a Core Instance
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install/create-instance
Learn how to create a Core Instance in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
After you've [installed a Core Operator](/ingest/pipeline/v2/install/install-operator) in
your Kubernetes cluster or Linux environment, you'll need to create a
[Core Instance](/ingest/pipeline/v2/concepts#core-instance) in that
environment before deploying any pipelines.
> [!NOTE]
>
> If you used Pipeline CLI to install your Core Operator in a Kubernetes cluster,
> use Pipeline CLI to create a Core Instance. If you used Helm to install your
> Core Operator in a Kubernetes cluster, use Helm to create a Core Instance.
>
> If you installed your Core Operator in a Linux environment, use Pipeline CLI
> to create a Core Instance.
> [tab] Pipeline CLI
>
> 1. If you're creating a Core Instance in a Linux environment, set your
> [Linux environment variables](/ingest/pipeline/v2/install/environment-variables).
>
> 2. Run the following command to create a new Core Instance:
>
> ```shell theme={null}
> calyptia create core_instance operator --name INSTANCE
> ```
>
> Replace *`INSTANCE`* with the name you'd like to give your new Core Instance.
>
> To create your Core Instance in a specific [namespace](/ingest/pipeline/v2/configure/kubernetes/namespaces),
> add the `--kube-namespace NAMESPACE` flag, and replace *`NAMESPACE`* with the
> namespace where you want to create the Core Instance.
>
> If you're using custom certificates or your own certificate authority, add the
> `--no-tls-verify` flag.
> [tab] Helm
>
> ```shell /INSTANCE/ /TOKEN/ theme={null}
> helm install core-instance calyptia/core-instance --set coreInstance=INSTANCE --set cloudToken=TOKEN
> ```
>
> Replace the following values:
>
> * *`INSTANCE`*: The name for your new Core Instance.
> * *`TOKEN`*: [Your API token](/ingest/pipeline/pipeline-cli/authenticate) to authenticate with
> the Palo Alto Networks Telemetry Pipeline backend.
## Next steps
After you've created a Core Instance, you can [configure](/ingest/pipeline/v2/configure)
its behavior and begin to [create telemetry pipelines](/ingest/pipeline/v2/build/create-modify).
Additionally, you can view and manage your Core Instances in the
[Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
# Linux environment variables
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install/environment-variables
Configure environment variables to use Palo Alto Networks Telemetry Pipeline on Linux.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
To [create a Core Instance](/ingest/pipeline/v2/install/create-instance) on Linux, you
must configure the following environment variables.
Palo Alto Networks Telemetry Pipeline provides these
environment variables as part of the systemd service, using the
`/opt/calyptia/etc/calyptia-custom.conf` file.
| Name | Description |
| - | - |
| `CALYPTIA_CLOUD_PROJECT_TOKEN` | The token used to manage the Core Instance. |
| `CALYPTIA_CORE_INSTANCE_NAME` | Optional: Sets a specific name, otherwise selects a random name. |
| `CALYPTIA_CORE_INSTANCE_NAME_PREFIX` | Optional: The prefix to use for a randomly generated Core Instance name. |
| `CALYPTIA_CLOUD_URL` | The URL of the Palo Alto Networks Telemetry Pipeline backend. Default: `cloud-api.calyptia.com`. |
| `CALYPTIA_CORE_ADDITIONAL_FLAGS` | Optional: Custom flags to assign to the Core Instance. These arguments are passed to [Pipeline CLI](/ingest/pipeline/pipeline-cli) when creating the Core Instance. |
# Install a Core Operator
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install/install-operator
Install a Core Operator to run Palo Alto Networks Telemetry Pipeline in Kubernetes or Linux.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
As the first step of your Palo Alto Networks Telemetry Pipeline deployment, you must install a
[Core Operator](/ingest/pipeline/v2/concepts#core-operators-and-core-instances). This
installation process
differs between Kubernetes and Linux.
## Kubernetes
[Installing a Core Operator in a Kubernetes cluster](/ingest/pipeline/v2/install/install-operator/kubernetes-cluster)
creates a [Kubernetes operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)
within that cluster.
You'll need to install a Core Operator in each cluster where you'd like to use
Palo Alto Networks Telemetry Pipeline. For example, if you have 10 clusters, you must install 10
Core Operators.
## Linux
[Installing a Core Operator on Linux](/ingest/pipeline/v2/install/install-operator/linux)
automatically deploys a K3s cluster in your Linux environment, then creates a Core
Operator within that cluster.
You'll need to install a Core Operator in each Linux environment where you'd
like to use Palo Alto Networks Telemetry Pipeline. For example, if you have 10 Linux virtual
machines, you must install 10 Core Operators, and each of those Core Operators
will run within its own dedicated k3s cluster.
# Install a Core Operator in a Kubernetes cluster
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install/install-operator/kubernetes-cluster
Install a Core Operator to run Palo Alto Networks Telemetry Pipeline in a Kubernetes cluster.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
To get started with Palo Alto Networks Telemetry Pipeline on Kubernetes, you'll need to
install a [Core Operator](/ingest/pipeline/v2/concepts#core-operator)
in each Kubernetes cluster where you want to deploy pipelines.
## Supported Kubernetes distributions
Palo Alto Networks Telemetry Pipeline is compatible with the following distributions of Kubernetes:
* Open Source Kubernetes 1.25 or later
* Amazon Kubernetes Service (EKS)
* Azure Kubernetes Service (AKS)
* Google Kubernetes Engine (GKE)
* Red Hat Open Shift 4.0 or later
## Installation steps
You can use [Pipeline CLI](/ingest/pipeline/pipeline-cli) or Helm to install a Core Operator in
a Kubernetes cluster.
> [!NOTE]
>
> When you install a Core Operator, only deploy a single replica.
> If a Core Operator has multiple replicas, those replicas will conflict with one another.
> [tab] Pipeline CLI
>
> 1. [Review the Palo Alto Networks Telemetry Pipeline installation prerequisites](/ingest/pipeline/v2/install/prereqs).
>
> 2. [Install](/ingest/pipeline/pipeline-cli/install) or [update](/ingest/pipeline/pipeline-cli/install#update-pipeline-cli)
> Pipeline CLI. Because Core Operator versions are dependent on your Pipeline CLI
> version, keeping Pipeline CLI current ensures that you're installing
> the latest version of Core Operator.
>
> 3. If you haven't already, [set an API token in Pipeline CLI](/ingest/pipeline/pipeline-cli/authenticate).
>
> 4. Ensure that the
> [`KUBECONFIG`](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
> environment variable in your cluster is set to a valid configuration file.
>
> 5. Run the following command to install a Core Operator:
>
> ```shell theme={null}
> calyptia install operator
> ```
>
> 6. Optional: Add the `--kube-namespace` command to set that Core Operator's
> [namespace](/ingest/pipeline/v2/configure/kubernetes/namespaces).
>
> 7. Repeat these steps for each Kubernetes cluster where you want to use Palo Alto
> Networks Telemetry Pipeline.
> [tab] Helm
>
> 1. [Review the Palo Alto Networks Telemetry Pipeline installation prerequisites](/ingest/pipeline/v2/install/prereqs).
>
> 2. Ensure that [Helm](https://helm.sh/) is installed and has a valid connection
> to your target cluster.
>
> 3. Ensure that the
> [`KUBECONFIG`](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
> environment variable in your cluster is set to a valid configuration file.
>
> 4. Run the following command to add the Palo Alto Networks Telemetry Pipeline chart repository:
>
> ```shell theme={null}
> helm repo add calyptia https://helm.calyptia.com/
> ```
>
> 5. Run the following command to install the custom resource definitions (CRDs)
> that Palo Alto Networks Telemetry Pipeline relies on:
>
> ```shell theme={null}
> helm install core-crd calyptia/core-crd
> ```
>
> To optionally set a custom registry for your Core Operator, add the flag
> `--set global.imageRegistry='NAME'` to this command. Replace *`NAME`* with
> the name of your custom registry.
>
> 6. Run the following command to install Core Operator:
>
> ```shell theme={null}
> helm install core-operator calyptia/core-operator
> ```
>
> 7. Repeat these steps for each Kubernetes cluster where you want to use Palo Alto
> Networks Telemetry Pipeline.
## View installation logs
After you install a Core Operator in a Kubernetes cluster, use the
following kubectl command to view logs from the installation process:
```shell theme={null}
kubectl logs deploy/calyptia-core-controller-manager
```
## Next steps
After you've installed a Core Operator in your Linux environment, you can
[create a Core Instance](/ingest/pipeline/v2/install/create-instance) in that environment.
# Install a Core Operator on Linux
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install/install-operator/linux
Install a Core Operator to run Palo Alto Networks Telemetry Pipeline on Linux.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
To get started with Palo Alto Networks Telemetry Pipeline on Linux, you'll need to install a
[Core Operator](/ingest/pipeline/v2/concepts#core-operator) in each
Linux environment where you want to deploy pipelines.
## Supported Linux distributions
Palo Alto Networks Telemetry Pipeline is compatible with the following Linux distributions:
* Amazon Linux 2023
* Red Hat Enterprise Linux 7.9, 8.0 or later, and 9.0 or later
* CentOS Linux 8 and 9
* Rocky Linux 9
* Ubuntu Server 20.04 LTS and 24.04 LTS
## Installation steps
To install a Core Operator on Linux:
1. [Review the Palo Alto Networks Telemetry Pipeline installation prerequisites](/ingest/pipeline/v2/install/prereqs).
2. Review the [K3s requirements](https://docs.k3s.io/installation/requirements).
As part of the Core Operator installation process, Palo Alto Networks Telemetry Pipeline deploys
a local K3s cluster in your Linux environment.
3. Run the following command:
```shell theme={null}
curl -sSfL https://calyptia-core.s3.amazonaws.com/install-core.sh | bash
```
This command installs [Pipeline CLI](/ingest/pipeline/pipeline-cli), deploys a K3s cluster,
and installs a Core Operator inside that cluster.
4. Repeat these steps for each Linux environment where you want to use Palo Alto
Networks Telemetry Pipeline. For example, if you have multiple Linux virtual
machines, you must install a dedicated Core Operator inside every virtual machine.
## Health checks
As part of the Core Operator installation process, Palo Alto Networks Telemetry Pipeline performs
the following health checks:
* Checks for `curl`
* Checks for `systemctl`
* Ensures the system meets the basic requirements
* Checks that Federal Information Processing Standards (FIPS) mode isn't enabled
* Checks that a firewall isn't enabled
* Tests connectivity to [https://cloud-api.calyptia.com](https://cloud-api.calyptia.com)
* Tests connectivity to [https://ghcr.io/calyptia/core](https://ghcr.io/calyptia/core)
* Checks SELinux status
If the checks find an issue, an error message outputs to the console. See
[Troubleshoot Palo Alto Networks Telemetry Pipeline installations on Linux](/ingest/pipeline/v2/install/troubleshooting)
for additional help.
## Next steps
After you've installed a Core Operator in your Linux environment, you can
[create a Core Instance](/ingest/pipeline/v2/install/create-instance) in that environment.
# Installation prerequisites
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install/prereqs
Learn about the prerequisites to install Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Review and complete the following prerequisites before installing
Palo Alto Networks Telemetry Pipeline.
## Networking and firewall requirements
If your organization uses outbound firewall rules, you might need to allow the
following URLs.
> [!NOTE]
>
> All of the listed URLs use the TCP protocol and port `443`.
### Palo Alto Networks Telemetry Pipeline backend
The Palo Alto Networks Telemetry Pipeline backend, which manages pipeline infrastructure
and configuration syncing.
```text theme={null}
cloud-api.calyptia.com
```
### Palo Alto Networks Telemetry Pipeline web interface
The Palo Alto Networks Telemetry Pipeline web interface.
```text theme={null}
core.calyptia.com
```
### Helm chart repository
The repository where Palo Alto Networks Telemetry Pipeline Helm charts are
stored. This is applicable to
the Helm installation method for
[Kubernetes environments](/ingest/pipeline/v2/install/install-operator/kubernetes-cluster).
```text theme={null}
helm.calyptia.com
```
### Linux installation script
The repository where the `install-core.sh` script is stored. This is applicable to the
installation process for [Linux environments](/ingest/pipeline/v2/install/install-operator/linux).
```text theme={null}
calyptia-core.s3.amazonaws.com
```
### K3s installation resources
Installation resources for K3s. This is applicable to the installation process for
[Linux environments](/ingest/pipeline/v2/install/install-operator/linux).
```text theme={null}
k3s-ci-builds.s3.amazonaws.com
```
### Docker container images
Registry for Docker container images.
```text theme={null}
*.docker.io
```
### Container registry
The Palo Alto Networks Telemetry Pipeline container registry.
```text theme={null}
ghcr.io/calyptia
```
### Registry tokens
Contains the tokens required from the Palo Alto Networks Telemetry Pipeline container registry.
```text theme={null}
ghcr.io/token?scope=repository:calyptia/core:pull&service=ghcr.io ghcr.io/token?scope=repository:calyptia/core/calyptia-fluent-bit:pull&service=ghcr.io
```
### Manifest and container images
Contains the manifest and container images required from the Palo Alto Networks Telemetry Pipeline
container registry.
```text theme={null}
http://ghcr.io/v2/calyptia/core/manifests/latest
```
### Image layers
Contains the image layers when applying latest updates.
```text theme={null}
pkg-containers.githubusercontent.com/objects.githubusercontent.com
```
# Troubleshoot Palo Alto Networks Telemetry Pipeline installations on Linux
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install/troubleshooting
Steps to troubleshoot Palo Alto Networks Telemetry Pipeline Linux installations
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
As part of the installation process, Palo Alto Networks Telemetry Pipeline performs
[health checks](/ingest/pipeline/v2/install/install-operator/linux#health-checks) on your behalf.
If you encounter any issues when trying to install Palo Alto Networks Telemetry Pipeline,
take the following troubleshooting steps.
1. Check for any warnings or errors in the output of the health checks
that Palo Alto Networks Telemetry Pipeline ran on your behalf.
2. Confirm that you've met the
[networking and OS requirements](/ingest/pipeline/v2/install/prereqs)
for Palo Alto Networks Telemetry Pipeline.
3. Confirm that you've met the
[K3s requirements](https://docs.k3s.io/installation/requirements).
4. Run the following command to disable FIPS mode, and then reboot:
```shell theme={null}
fips-mode-setup --disable
```
5. Run the following command to disable your firewall:
> [tab] RHEL
>
> ```shell theme={null}
> systemctl disable firewalld --now
> ```
> [tab] Ubuntu
>
> ```shell theme={null}
> ufw disable
> ```
6. Verify that SELinux is either disabled or in permissive (not enforcing) mode.
7. For Red Hat Enterprise Linux only, verify that your cryptographic policy is set to
either `default` or `legacy`.
8. For Red Hat Enterprise Linux only, run the following command to disable
`nm-cloud-setup`, then reboot the node:
```shell theme={null}
systemctl disable nm-cloud-setup.service nm-cloud-setup.timer
reboot
```
9. Examine the following K3s network ranges to ensure they aren't conflicting
with your network settings:
* Pods are allocated in the CIDR range `10.42.0.0/16`. Use the
`INSTALL_CALYPTIA_CLUSTER_CIDR` environment variable to override.
* Services are allocated in the CIDR range `10.43.0.0/16`. Use the
`INSTALL_CALYPTIA_SERVICE_CIDR` environment variable to override.
* Cluster DNS is set to `10.43.0.10`. Use the `INSTALL_CALYPTIA_CLUSTER_DNS`
environment variable to override.
* The cluster domain suffix is set to `cluster.local`. Use the
`INSTALL_CALYPTIA_CLUSTER_DOMAIN` environment variable to override.
* Node ports are allocated in the range `30000` to `32767`. Use the
`INSTALL_CALYPTIA_SERVICE_NODE_PORT_RANGE` environment variable to override
during installation.
10. Examine your local `/etc/resolv.conf` configuration to ensure it isn't using
a DNS server or specifying any override that might conflict with K3s.
# Uninstall Palo Alto Networks Telemetry Pipeline
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install/uninstall
Learn how to uninstall Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Use the information on this page to uninstall Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> For best results, use the same method to uninstall
> Palo Alto Networks Telemetry Pipeline that you used
> to install it.
## Uninstall from a Kubernetes cluster
To uninstall Palo Alto Networks Telemetry Pipeline from a Kubernetes cluster,
use one of the following
methods:
> [tab] Pipeline CLI
>
> To uninstall Palo Alto Networks Telemetry Pipeline from a Kubernetes cluster using Pipeline CLI:
>
> 1. [Delete](/ingest/pipeline/v2/build/create-modify#delete-a-pipeline) any active pipelines.
>
> 2. In [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command to verify you
> successfully deleted all pipelines:
>
> ```shell /INSTANCE/ theme={null}
> calyptia get pipelines --core-instance INSTANCE --show-ids
> ```
>
> Replace *`INSTANCE`* with the name of your Core Instance.
>
> 3. Run the following command to delete your Core Instance:
>
> ```shell /INSTANCE/ theme={null}
> calyptia delete core_instance operator INSTANCE
> ```
>
> Replace *`INSTANCE`* with the name of your Core Instance.
>
> 4. Run the following command to uninstall your Core Operator:
>
> ```shell theme={null}
> calyptia uninstall operator
> ```
>
> 5. Optional: Delete the namespace where you installed Palo Alto Networks Telemetry Pipeline. This
> ensures no stray Palo Alto Networks Telemetry Pipeline resources persist in your cluster. To do
> so, run the following `kubectl` command:
>
> ```shell /NAMESPACE/ theme={null}
> kubectl delete namespace NAMESPACE
> ```
>
> Replace *`NAMESPACE`* with the namespace where you installed
> Palo Alto Networks Telemetry Pipeline.
> If you didn't specify a namespace during your Palo Alto Networks Telemetry Pipeline installation,
> it was installed in the `calyptia` namespace.
> [tab] Helm
>
> To uninstall Palo Alto Networks Telemetry Pipeline from a Kubernetes cluster using Helm:
>
> 1. [Delete](/ingest/pipeline/v2/build/create-modify#delete-a-pipeline) any active pipelines.
>
> 2. Run the following command to determine which Helm charts are installed in your
> cluster:
>
> ```shell theme={null}
> helm list -n NAMESPACE
> ```
>
> Replace *`NAMESPACE`* with the namespace where you installed
> Palo Alto Networks Telemetry Pipeline.
>
> 3. Run the following command to uninstall your Core Instance:
>
> ```shell /NAME/ /NAMESPACE/ theme={null}
> helm uninstall NAME -n NAMESPACE
> ```
>
> Replace the following:
>
> * *`NAME`*: The name of your Core Instance, as displayed by
> the output of the previous step.
> * *`NAMESPACE`*: The namespace where you installed Palo Alto Networks Telemetry Pipeline. If you
> didn't specify a namespace during your Palo Alto Networks Telemetry Pipeline installation, it
> was installed in the `calyptia` namespace.
>
> 4. Run the following command to uninstall the CRDs for Palo Alto Networks Telemetry Pipeline:
>
> ```shell theme={null}
> helm uninstall core-crd
> ```
>
> 5. Run the following command to uninstall your Core Operator:
>
> ```shell /NAMESPACE/ theme={null}
> helm uninstall core-operator -n NAMESPACE
> ```
>
> Replace *`NAMESPACE`* with the namespace where you installed
> Palo Alto Networks Telemetry Pipeline.
>
> 6. Run the following command to verify that the uninstall commands removed
> all Helm charts for Palo Alto Networks Telemetry Pipeline:
>
> ```shell theme={null}
> helm list -n NAMESPACE
> ```
>
> Replace *`NAMESPACE`* with the namespace where you installed
> Palo Alto Networks Telemetry Pipeline.
>
> 7. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
>
> 8. Open the project that contains the Core Instance that you want to delete.
>
> 9. Go to **Core Instances**.
>
> 10. In the **Manage your Core Instances** section, find the Core Instance that you
> want to delete, and then click
> **More >
> Delete**.
## Uninstall from Linux
To uninstall Palo Alto Networks Telemetry Pipeline from a Linux environment,
use one of the following
methods:
> [tab] Red Hat Enterprise Linux
>
> To uninstall Palo Alto Networks Telemetry Pipeline from Red Hat Enterprise
> Linux or other Red Hat-based
> distributions:
>
> 1. [Delete](/ingest/pipeline/v2/build/create-modify#delete-a-pipeline) any active pipelines.
>
> 2. In [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command to verify you
> successfully deleted all pipelines:
>
> ```shell /INSTANCE/ theme={null}
> calyptia get pipelines --core-instance INSTANCE --show-ids
> ```
>
> Replace *`INSTANCE`* with the name of your Core Instance.
>
> 3. Run the following command to delete your Core Instance:
>
> ```shell /INSTANCE/ theme={null}
> calyptia delete core_instance operator INSTANCE
> ```
>
> Replace *`INSTANCE`* with the name of your Core Instance.
>
> 4. Run the following command:
>
> ```shell theme={null}
> yum remove calyptia-core-operator
> ```
> [tab] Ubuntu Server Linux
>
> To uninstall Palo Alto Networks Telemetry Pipeline from Ubuntu Server Linux or other Debian-based
> distributions:
>
> 1. [Delete](/ingest/pipeline/v2/build/create-modify#delete-a-pipeline) any active pipelines.
>
> 2. In [Pipeline CLI](/ingest/pipeline/pipeline-cli), run the following command to verify you
> successfully deleted all pipelines:
>
> ```shell /INSTANCE/ theme={null}
> calyptia get pipelines --core-instance INSTANCE --show-ids
> ```
>
> Replace *`INSTANCE`* with the name of your Core Instance.
>
> 3. Run the following command to delete your Core Instance:
>
> ```shell /INSTANCE/ theme={null}
> calyptia delete core_instance operator INSTANCE
> ```
>
> Replace *`INSTANCE`* with the name of your Core Instance.
>
> 4. Run the following command:
>
> ```shell theme={null}
> apt remove calyptia-core-operator
> ```
# Upgrade Palo Alto Networks Telemetry Pipeline
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/install/upgrade
Learn how to upgrade various components of Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Upgrading the various components of Palo Alto Networks Telemetry Pipeline gives you access
to the latest features, fixes, and improvements.
## Upgrade Core Operators and Core Instances
Use the information in this section to upgrade your
[Core Operators and Core Instances](/ingest/pipeline/v2/concepts#core-operators-and-core-instances).
> [!NOTE]
>
> You must use the same method for upgrading your Core Operators and Core Instances
> that you used when you originally installed them.
### Determine your upgrade method
The method you must use for upgrading your Core Operator and Core Instance
depends on the method you used when you installed that Core Operator and Core
Instance, which in turn depends on your environment.
> [tab] Kubernetes cluster
>
> If you installed Palo Alto Networks Telemetry Pipeline in a Kubernetes cluster and aren't sure
> whether you used Pipeline CLI or Helm during that installation process, run the
> following kubectl command:
>
> ```shell theme={null}
> kubectl -n calyptia get deploy calyptia-core-controller-manager --show-labels
> ```
>
> The resulting output shows any labels attached to the `controller-manager`
> resource.
>
> * If the label `app.kubernetes.io/managed-by=Helm` is present, that means you
> used Helm to install Palo Alto Networks Telemetry Pipeline and should continue to use Helm for any
> subsequent upgrades to your Core Operator and Core Instance.
> * If the label `app.kubernetes.io/managed-by=Helm` is **not** present, that
> means you used Pipeline CLI to install Palo Alto Networks Telemetry Pipeline
> and should continue to
> use Pipeline CLI for any subsequent upgrades to your Core Operator and Core Instance.
> [tab] Linux
>
> Palo Alto Networks Telemetry Pipeline supports only Pipeline CLI installation
> in Linux environments, and
> doesn't support Helm installation. If you installed Palo Alto Networks Telemetry Pipeline in a Linux
> environment, continue to use Pipeline CLI for any subsequent upgrades to your Core
> Operator and Core Instance.
### Upgrade your Core Operator and Core Instance
After you [determine your upgrade method](#determine-your-upgrade-method), use
the corresponding steps to upgrade your Core Operator and Core Instance to the latest
available version.
> [tab] Pipeline CLI
>
> If you deployed Palo Alto Networks Telemetry Pipeline inside a Kubernetes
> cluster, Pipeline CLI must have
> access to that cluster. If you deployed Palo Alto Networks Telemetry Pipeline on Linux, you must
> run Pipeline CLI from inside that Linux environment.
>
> 1. [Update Pipeline CLI](/ingest/pipeline/pipeline-cli/install#update-pipeline-cli). Because
> Core Operator and Core Instance versions are dependent on your Pipeline CLI
> version, you must use the latest version of Pipeline CLI to perform upgrades.
>
> > [!WARNING]
> >
> > If you don't update Pipeline CLI, subsequent steps will fail.
>
> 1. Run the following command to install the latest version of Core Operator, which
> overwrites any previously installed versions:
>
> ```shell theme={null}
> calyptia install operator
> ```
>
> 2. Optional: Use the `--kube-namespace` flag to set the Core Operator's
> [namespace](/ingest/pipeline/v2/configure/kubernetes/namespaces).
>
> 3. Run the following command to update your associated Core Instance:
>
> ```shell /INSTANCE/ theme={null}
> calyptia update core_instance operator INSTANCE
> ```
>
> Replace *`INSTANCE`* with the name of the Core Instance you want to update.
> [tab] Helm
>
> 1. Run the following command to upgrade the Palo Alto Networks Telemetry Pipeline chart to
> the latest version:
>
> ```shell theme={null}
> helm repo update calyptia
> ```
>
> 2. Run the following command to upgrade the custom resource definitions (CRDs) that
> Palo Alto Networks Telemetry Pipeline relies on:
>
> ```shell theme={null}
> helm upgrade --install core-crd calyptia/core-crd
> ```
>
> To optionally set a custom registry for your Core Operator, add the flag
> `--set global.imageRegistry='NAME'` to this command. Replace *`NAME`* with
> the name of your custom registry.
>
> 3. Run the following command to upgrade your Core Operator:
>
> ```shell theme={null}
> helm upgrade --install core-operator calyptia/core-operator -n calyptia
> ```
>
> 4. Run the following command to upgrade your Core Instance:
>
> ```shell /INSTANCE/ theme={null}
> helm upgrade --install INSTANCE calyptia/core-instance -n calyptia
> ```
>
> Replace *`INSTANCE`* with the name of the Core Instance you want to update.
## Upgrade a pipeline
Regardless of [what method you used](#determine-your-upgrade-method) to install
and upgrade your Core Operator and Core Instance, you can use either the Palo Alto
Networks Telemetry Pipeline web interface or
[Pipeline CLI](/ingest/pipeline/pipeline-cli) to upgrade pipelines.
> [tab] Web interface
>
> There are two possible methods for upgrading pipelines in the Palo Alto Networks Telemetry Pipeline
> web interface.
>
> **Upgrade to the latest version**
>
> To upgrade a pipeline to the latest version, follow these steps:
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
>
> 2. Go to **Core Instances**, and then click the name of the pipeline you
> want to upgrade.
>
> 3. If a pipeline isn't using the latest agent version, an `Upgrade to available`
> notice is displayed on the [pipeline details](/ingest/pipeline/navigate#pipeline-details-v2-pipelines)
> page. Next to this notice, click **Upgrade** to upgrade the pipeline to the
> latest version.
>
> > [!NOTE]
> >
> > This upgrade method always retains a pipeline's current
> > [agent image type](/ingest/pipeline/v2/configure/agent-image).
>
> **Choose the agent image type and version**
>
> To choose the [agent image type](/ingest/pipeline/v2/configure/agent-image) and version
> for your pipeline, follow these steps:
>
> 1. Sign in to [Palo Alto Networks Telemetry Pipeline](https://core.calyptia.com/).
> 2. Go to **Core Instances**, and then click the name of the pipeline you
> want to upgrade.
> 3. Go to **Advanced Settings**.
> 4. In the **Pipeline Image** section, select an option from the **Version**
> drop-down menu. Version numbers with no suffix (for example, `1.2.3`) use the
> Red Hat UBI agent image, and version numbers with the distroless suffix (for
> example, `1.2.3-distroless`) use the distroless agent image.
> 5. Click **Apply** to save your changes.
> [tab] Pipeline CLI
>
> To upgrade an existing pipeline to the latest version, use the following command
> in Pipeline CLI:
>
> ```shell /PIPELINE/ /VERSION/ theme={null}
> calyptia update pipeline PIPELINE --image ghcr.io/calyptia/core/calyptia-fluent-bit:VERSION
> ```
>
> Replace the following:
>
> * *`PIPELINE`*: The name or [unique ID](/ingest/pipeline/v2/configure/metadata#get-pipeline-ids)
> of your pipeline.
> * *`VERSION`*: The latest version of the pipeline agent. You can find this value in the
> **Pipeline agent** column of the
> [Palo Alto Networks Telemetry Pipeline component versions](/ingest/pipeline/v2/component-versions)
> table.
> For example, if the latest version of the pipeline agent is 1.23.0, provide the
> value `1.23.0` to use the Red Hat UBI [agent image](/ingest/pipeline/v2/configure/agent-image)
> or `1.23.0-distroless` to use the distroless agent image.
### Upgrade multiple pipelines
To upgrade all of your pipelines in a given environment simultaneously, run the
following command:
```shell theme={null}
curl -s https://raw.githubusercontent.com/chronosphereio/calyptia-cli/main/update-all-pipeline-images.sh | bash -s -- ghcr.io/calyptia/core/calyptia-fluent-bit:VERSION
```
Replace *`VERSION`* with the [latest version](/ingest/pipeline/v2/component-versions) of the
pipeline agent. You can find this value in the **Pipeline agent** column of the
[Palo Alto Networks Telemetry Pipeline component versions](/ingest/pipeline/v2/component-versions)
table.
For example, if the latest version of the pipeline agent is 1.23.0, provide the
value `1.23.0` to use the Red Hat UBI [agent image](/ingest/pipeline/v2/configure/agent-image)
or `1.23.0-distroless` to use the distroless agent image.
> [!NOTE]
>
> For critical pipelines, Palo Alto Networks Telemetry Pipeline recommends updating each
> pipeline individually
> instead of using this script.
### Deployment strategies
Deployment strategies govern how a pipeline's replicas behave during the upgrade
process. For more information, see the
[deployment strategies](/ingest/pipeline/v2/configure/deployment-strategies) guide.
# Palo Alto Networks Telemetry Pipeline release notes
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/release-notes
Information about releases of Palo Alto Networks Telemetry Pipeline and its components.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Information for each release is listed by component.
**Version 2.84.0**
Released 2026.04.15
## Pipeline agent
* Various performance improvements.
**Version 2.83.0**
Released 2026.04.07
## Web interface
* Various bug fixes and performance improvements.
**Version 2.82.0**
Released 2026.04.02
## Pipeline infrastructure
* Various performance improvements.
**Version 2.81.0**
Released 2026.03.27
## Pipeline agent
* Various performance and security improvements.
## Pipeline infrastructure
* Various performance and security improvements.
**Version 2.80.0**
Released 2026.03.25
> [!NOTE]
>
> The [GPG key for verifying Palo Alto Networks Telemetry Pipeline software packages](/ingest/pipeline/security#gpg-keys)
> has changed. For this and future releases, use the updated key.
## Pipeline agent
* Updated the dependencies for the [distroless](/ingest/pipeline/v2/configure/agent-image#distroless)
pipeline agent image.
**Version 2.79.0**
Released 2026.03.17
## Pipeline infrastructure
* Various security improvements.
**Version 2.78.0**
Released 2026.03.10
## Pipeline infrastructure
* Various security improvements.
**Version 2.77.0**
Released 2026.03.03
## Pipeline infrastructure
* Various performance and stability improvements.
**Version 2.76.0**
Released 2026.02.17
## Pipeline infrastructure
* Various performance improvements.
**Version 2.75.0**
Released 2026.02.10
## Pipeline infrastructure
* Various performance and stability improvements.
**Version 2.74.0**
Released 2026.02.03
## Web interface
* *Fix*: Updated the default parameter values for the Cortex XCOR Logs destination
plugin to fix incompatibility issues.
## Pipeline infrastructure
* Added the [Cortex XSIAM](/ingest/pipeline/plugins/destination-plugins/cortex-xsiam)
destination plugin.
* *Fix*: Updated the dependencies for the [distroless](/ingest/pipeline/v2/configure/agent-image#distroless)
pipeline agent image, which patches vulnerabilities related to
[CVE-2025-47913](https://nvd.nist.gov/vuln/detail/CVE-2025-47913).
**Version 2.73.0**
Released 2026.01.27
## Web interface
* *Fix*: Fixed an issue that caused the pipeline builder to incorrectly show
an empty processing rules node for source or destination plugins that had
active processing rules.
**Version 2.72.0**
Released 2026.01.20
## Pipeline infrastructure
* Various performance improvements.
**Version 2.71.0**
Released 2026.01.13
## Pipeline agent
* Various performance improvements.
## Processing rules
* Various performance improvements.
**Version 2.70.0**
Released 2026.01.06
## Web interface
* *Fix*: Fixed an issue that could cause certain parts of the web interface to
crash.
## Processing rules
* *Fix*: Fixed a compatibility issue that prevented Lua scripts from executing on
older CPUs.
**Version 2.69.0**
Released 2025.12.17
## Pipeline infrastructure
* *Fix*: Fixed an issue that could cause memory leaks in pipelines with active
processing rules.
* *Fix*: Updated the dependencies for the [distroless](/ingest/pipeline/v2/configure/agent-image#distroless)
pipeline agent image, which patches vulnerabilities related to
[CVE-2025-61729](https://nvd.nist.gov/vuln/detail/CVE-2025-61729).
**Version 2.68.0**
Released 2025.12.16
## Web interface
* *Fix*: Fixed an issue where certain parameters for the S3 Input (SQS) source
plugin had label names that didn't match their corresponding YAML keys.
## Pipeline infrastructure
* Various performance improvements.
**Version 2.67.0**
Released 2025.12.09
## Pipeline infrastructure
* Added the `sqs_queue_owner_account_id` parameter to the
[S3 Input (SQS) source plugin](/ingest/pipeline/plugins/source-plugins/s3-sqs).
* Various performance improvements.
## Pipeline CLI
* Added the ability to enable or disable GPT generation on a per-project basis.
**Version 2.66.0**
Released 2025.12.02
## Pipeline infrastructure
* Various performance improvements.
**Version 2.65.0**
Released 2025.11.19
## Pipeline infrastructure
* Various performance improvements.
* *Fix*: Fixed an issue where invalid fleet configuration files could cause
unexpected behavior.
**Version 2.64.0**
Released 2025.11.12
## Pipeline infrastructure
* Various performance improvements.
**Version 2.63.0**
Released 2025.11.03
## Pipeline infrastructure
* Various performance improvements.
**Version 2.62.0**
Released 2025.10.28
## Pipeline infrastructure
* Various performance improvements.
**Version 2.61.0**
Released 2025.10.14
## Pipeline infrastructure
* Various performance improvements.
**Version 2.60.0**
Released 2025.10.07
## Pipeline infrastructure
* Various performance improvements.
**Version 2.59.0**
Released 2025.09.30
## Web interface
* Added the `mem_buf_limit` configuration parameter to all source plugins.
* Added the ability to upgrade pipelines through the
Palo Alto Networks Telemetry Pipeline web interface.
* Improved and standardized the workflow for adding new agents to a fleet.
* *Fix*: Fixed an issue where API keys were missing from the instructions for
adding new agents to a fleet.
**Version 2.58.0**
Released 2025.09.23
## Pipeline agent
* Various performance improvements.
**Version 2.57.0**
Released 2025.09.16
## Web interface
* Improved the workflow for adding a pipeline to a new Core Instance.
* *Fix*: Fixed an issue where invalid pipeline configuration files could affect
the visibility of other pipelines in the Palo Alto Networks Telemetry Pipeline web interface.
## Pipeline agent
* Various performance improvements.
## Pipeline infrastructure
* Added more descriptive error messages to Pipeline CLI.
**Version 2.56.0**
Released 2025.09.10
## Pipeline infrastructure
* *Fix*: Fixed an issue where invalid pipeline configuration files could cause
of unexpectedly high severity.
**Version 2.55.0**
Released 2025.09.02
## Pipeline agent
* Removed unnecessary configuration parameters from the S3 Input (SQS) source plugin.
* Various performance improvements.
**Version 2.54.0**
Released 2025.08.26
## Pipeline agent
* Various performance improvements.
**Version 2.53.0**
Released 2025.08.19
## Pipeline agent
* Updated the S3 Input (SQS) source plugin and S3 Input (One Time) source plugin,
including their configuration parameters and supported authentication methods.
> [!WARNING]
>
> This is a breaking change. If you upgrade an existing pipeline that uses the
> S3 Input (SQS) source plugin or S3 Input (One Time) source plugin, your previous
> configuration and authentication settings for those plugins will no longer function.
>
> For information about new configuration and authentication settings, see
> the [S3 Input (SQS) source plugin](/ingest/pipeline/plugins/source-plugins/s3-sqs)
> guide and the [S3 Input (One Time) source plugin](/ingest/pipeline/plugins/source-plugins/amazon-s3)
> guide.
## Web interface
* Updated the pipeline builder to clarify the relationship between active plugins
and associated processing rules.
* Added an alert to the pipeline builder that displays information when non-standard
processors are active but not included in the pipeline visualization.
* *Fix*: Fixed an issue that could cause unexpected errors when previewing output
in the processing rules playground.
**Version 2.52.0**
Released 2025.08.12
## Pipeline infrastructure
* Various performance and stability improvements.
**Version 2.51.0**
Released 2025.08.05
## Pipeline infrastructure
* Various performance and stability improvements.
* *Fix*: Fixed an issue that could cause the Cloudflare input plugin to ingest
incomplete data.
## Processing rules
* *Fix*: Fixed an issue that affected parsing for Unicode null characters.
* *Fix*: Fixed an issue that caused malformed request errors to appear as server
errors.
## Web interface
* *Fix*: Fixed an issue where the pipeline builder removed valid but
non-standard processors from pipeline configuration files.
**Version 2.50.0**
Released 2025.07.29
## Pipeline infrastructure
* Updated the default configuration for new agents in a fleet.
## Processing rules
* *Fix*: Fixed an issue that caused errors when attempting to preview the output
of processing rules in the Palo Alto Networks Telemetry Pipeline web interface.
**Version 2.49.0**
Released 2025.07.22
## Web interface
* *Fix*: Fixed an issue that prevented StatefulSet and DaemonSet pipelines from
appearing in the Palo Alto Networks Telemetry Pipeline web interface.
**Version 2.48.0**
Released 2025.07.15
## Pipeline infrastructure
* Added the ability to update existing [resource profiles](/ingest/pipeline/v2/configure/resource-profiles)
in Pipeline CLI.
* *Fix*: Improved the performance and stability of the
[Cloudflare LogPush](/ingest/pipeline/plugins/source-plugins/cloudflare)
source plugin.
## Web interface
* Added the ability to specify the [workload type](/ingest/pipeline/v2/configure/kubernetes/workloads)
for new pipelines in the Palo Alto Networks Telemetry Pipeline web interface.
**Version 2.47.0**
Released 2025.07.08
## Web interface
* *Fix*: Various security and stability improvements.
**Version 2.46.0**
Released 2025.07.01
## Web interface
* *Fix*: Various performance improvements.
**Version 2.45.0**
Released 2025.06.24
## Pipeline agent
* Added the ability to create pipelines with the StatefulSet
[deployment strategy](/ingest/pipeline/v2/configure/deployment-strategies).
* *Fix*: Various security and stability improvements.
**Version 2.43.1**
Released 2025.06.18
## Web interface
* *Fix*: Fixed an issue where certain pipeline deployment strategies caused
errors in the web interface.
**Version 2.44.0**
Released 2025.06.11
## Web interface
* Added a dialog to the workflow for deleting a Core Instance with information
about how to delete Palo Alto Networks Telemetry Pipeline resources locally.
* Various security improvements.
* *Fix*: Fixed an issue that caused disjointed connections between certain
source and destination plugins in the pipeline builder.
**Version 2.42.0**
Released 2025.06.03
## Pipeline agent
* Various stability improvements.
**Version 2.41.0**
Released 2025.05.27
## Pipeline agent
* *Fix:* Fixed an issue where invalid configuration parameter values could cause
pipelines to crash.
**Version 2.40.0**
Released 2025.05.20
## Web interface
* Various security improvements.
**Version 2.39.0**
Released 2025.05.13
## Pipeline agent
* Added support for global option schema validation.
## Web interface
* Updated the default values for several parameters in the
[Cortex XCOR Logs destination plugin](/ingest/pipeline/plugins/destination-plugins/chronosphere).
**Version 2.38.0**
Released 2025.05.06
## Web interface
* Improved the look and feel of the preview input pane and preview output pane in
the processing rules builder.
* *Fix*: Fixed an issue with incorrectly labeled pipeline settings.
**Version 2.37.0**
Released 2025.04.30
## Web interface
* Added the ability to exclude diagnostic logs from preview input data in the
processing rules builder and processing rules playground.
## Pipeline infrastructure
* Various bug fixes and performance improvements.
**Version 2.36.0**
Released 2025.04.22
## Core Operator
* *Fix*: Fixed an issue that impacted Secret names.
* *Fix*: Uninstalling a Core Operator no longer deletes the namespace where that
Core Operator was installed.
**Version 2.35.0**
Released 2025.04.15
## Web interface
* Added the ability to
[use pipeline logs as preview input data](/ingest/pipeline/processing-rules#use-pipeline-logs-as-preview-input-data)
for processing rules.
## Pipeline infrastructure
* Various bug fixes and performance improvements.
**Version 2.34.0**
Released 2025.04.08
## Pipeline agent
* Added support for new parameters and other improvements to the
[Cloudflare LogPush](/ingest/pipeline/plugins/source-plugins/cloudflare)
source plugin.
## Pipeline infrastructure
* Added the ability to set per-pipeline
[tolerations](/ingest/pipeline/v2/configure/kubernetes/tolerations).
* Various bug fixes and performance improvements.
## Web interface
* Added support for new parameters and other improvements to the
[Cloudflare LogPush](/ingest/pipeline/plugins/source-plugins/cloudflare)
source plugin.
* Added support for a new parameter to the
[Google Chronicle](/ingest/pipeline/plugins/destination-plugins/google-chronicle)
destination plugin.
* Various improvements.
**Version 2.33.0**
Released 2025.04.02
## Pipeline infrastructure
* *Fix*: Various bug fixes and performance improvements.
**Version 2.32.0**
Released 2025.03.25
## Pipeline CLI
* Added commands to list and delete
[individual resource profiles](/ingest/pipeline/v2/configure/resource-profiles).
* *Fix*: Fixed an issue where failed attempts to create resources through Pipeline CLI
would incorrectly register those nonexistent resources in the Palo Alto Networks
Telemetry Pipeline backend.
## Web interface
* Added support for Fluent Bit-style `service` information in pipeline configuration files.
* *Fix*: Fixed an issue where empty arrays in pipeline configuration files could
cause the Palo Alto Networks Telemetry Pipeline web interface to crash.
* *Fix*: Fixed an issue related to creating new projects.
**Version 2.31.0**
Released 2025.03.18
## Pipeline infrastructure
* *Fix*: Various bug fixes and performance improvements.
**Version 2.30.0**
Released 2025.03.11
## Web interface
* *Fix*: Fixed an issue that affected namespace filtering in
[automated Kubernetes logging](/ingest/pipeline/v2/build/automated-logging).
* *Fix*: Fixed an unexpected behavior with OAuth 2.0-related parameters for the HTTP
API source plugin.
**Version 2.29.1**
Released 2025.02.25
## Web interface
* Added a warning about Fluent Bit version compatibility to the fleet configuration editor.
* *Fix*: Fixed an issue that affected configuration parameters for the Loki destination plugin.
* *Fix*: Fixed an issue that could cause the Monitoring page to crash.
**Version 2.28.0**
Released 2025.02.13
## Web interface
* *Fix*: Fixed an error that caused discrepancies between the pipeline visualizer
and pipeline configuration files.
## Pipeline infrastructure
* *Fix*: Various bug fixes and performance improvements.
**Version 2.27.0**
Released 2025.02.04
## Web interface
* *Fix*: Fixed an error in the installation instructions for fleet agents.
* *Fix*: Various bug fixes.
## Pipeline agent
* *Fix*: Various bug fixes.
**Version 2.26.0**
Released 2025.01.28
## Web interface
* *Fixed*: Fixed an issue that prevented certain projects from displaying in the
project selection menu.
## Pipeline infrastructure
* Various improvements to fleet performance.
**Version 2.25.0**
Released 2025.01.21
## Web interface
* Added support for YAML fleet configuration files.
* Various security improvements.
## Pipeline CLI
* *Fix*: Fixed an issue where file retrieval failed for fleets with more than 10
files.
## Pipeline infrastructure
* Improved the performance and behavior of the pipeline upgrade process.
* *Fix*: Fixed an issue where port conflicts could affect health check pipelines.
* *Fix*: Fixed an issue where invalid data could cause Core Operator errors.
* *Fix*: Fixed an issue that affected custom parser files for new pipelines.
* *Fix*: Fixed multiple issues that affected token permissions.
* *Fix*: Fixed multiple issues that affected agent metrics.
## Pipeline agent
* Added support for conditional operators.
* *Fix*: Fixed an issue that affected the OpenTelemetry input and output plugins.
**Version 2.24.0**
Released 2025.01.14
## Web interface
* Updated the Palo Alto Networks Telemetry Pipeline web interface to use
Cortex XCOR styles and branding.
* *Fix*: Various bug fixes.
**Version 2.23.0**
Released 2025.01.06
## Web interface
* *Fix*: Fixed an issue that affected pipeline deployment strategies.
## Pipeline infrastructure
* Added Auth0 as an authentication method.
* Changed how permissions are granted to agents within a fleet.
* Various security and performance improvements.
* *Fix*: Fixed an issue that affected pipeline deployment strategies.
## Pipeline CLI
* Added support for [backing up](/ingest/pipeline/v2/configure/metadata#back-up-pipeline-configuration-files)
multiple pipeline configuration files simultaneously.
* *Fix*: Fixed an issue that affected pipeline deployment strategies.
**Version 2.22.0**
Released 2024.12.12
## Web interface
* Various improvements to the processing rules interface.
## Pipeline agent
* Added the Azure Blob source plugin.
* *Fix*: Fixed an issue that prevented certain plugins from detecting pipeline ports.
* *Fix*: Fleet files must now have unique names.
* *Fix*: Fixed an issue where tokens in the Splunk source plugin were incorrectly
treated as case-sensitive.
* *Fix*: Fixed an issue where the `Preservey_Key` and `Reserve_Data` parser fields
weren't behaving as expected.
## Pipeline infrastructure
* *Fix*: Fixed an issue that impacted the performance of the `projects` endpoint.
* *Fix*: Fixed an issue where pipelines failed to restart after an update to the
pipeline infrastructure.
## Core Operator
* Added support for Kubernetes sidecar containers.
* Various improvements to Core Operator behavior.
* *Fix*: Improved the syntax for referencing pipeline files and secrets to make its
behavior more consistent.
**Version 2.21.0**
Released 2024.12.05
## Web interface
* Updated the pipeline builder interface to convert the values of sensitive plugin
parameters into pipeline secrets.
* The **Settings** page now displays the ID of the selected project.
* Added the [Dummy HTTP](/ingest/pipeline/plugins/source-plugins/dummy-http) source plugin.
* Various improvements to the processing rules interface.
* Various improvements to the fleet management interface.
* Various improvements to the pipeline builder interface.
* *Fix*: Editing a pipeline no longer removes custom filters and processors from
configuration files.
* *Fix*: Deleting an agent from a fleet now removes the agent from that fleet list.
* *Fix*: Editing an agent in a fleet now displays the correct type for that agent.
* *Fix*: Fixed an issue that prevented pipeline names from including a number
as its final character.
**Version 2.20.0**
Released: 2024.11.12
## Web interface
* Added more settings to the [S3 Input (SQS) source plugin](/ingest/pipeline/plugins/source-plugins/s3-sqs).
## Pipeline agent
* *Fix*: Reduced the memory usage of the block records processing rule.
**Version 2.19.0**
Released: 2024.11.05
## Web interface
* Various improvements to the fleet management interface.
* *Fix*: Fixed an issue that made some processing rule templates unavailable in
the Pipeline Builder.
* *Fix*: Fixed an issue that hid pipelines' version numbers.
## Core Operator
* Added a host path volume to DaemonSet pipelines.
* Added tolerations to the Core Operator chart.
**Version 2.18.0**
Released: 2024.10.30
## Web interface
* Various improvements to the processing rules interface.
* Added documentation links for fleets.
* Added the `channel` parameter to the
[Splunk destination plugin](/ingest/pipeline/plugins/destination-plugins/splunk).
* *Fix*: Fixed several typos in the fleet onboarding walkthrough that could cause
certain commands to fail.
* *Fix*: Fixed an issue with the random sampling processing rule that could cause
the web interface to crash and reload.
## Pipeline agent
* *Fix*: Fixed an issue that artificially limited the number of processing rules
that could run in a single pipeline.
* *Fix*: Fixed an issue with the `aws_sqs_enable_imds` parameter in the
[S3 Input (SQS) source plugin](/ingest/pipeline/plugins/source-plugins/s3-sqs).
## Core Operator
* *Fix*: Fixed an issue that overwrote the standard label names provided by Kubernetes
templates.
**Version 2.17.0**
Released: 2024.10.21
## Web interface
* Updated names and logos to match Palo Alto Networks Telemetry Pipeline branding.
* Added more descriptive error messages throughout the web interface.
* *Fix*: Clarified the instructions for adding an agent to a fleet.
* *Fix*: Fixed an issue that restricted the types of files that can be added to fleets.
## Pipeline infrastructure
* Pipelines with the `Deployment` PipelineKind now use the rolling update strategy
instead of the recreate strategy.
* *Fix*: Added backwards compatibility for fleet agents.
## Pipeline agent
* Added the [Cloudflare source plugin](/ingest/pipeline/plugins/source-plugins/cloudflare).
* *Fix*: Fixed an issue that caused 404 errors from the OpenTelemetry destination plugin.
**Version 2.16.0**
Released: 2024.10.08
## Web interface
* Introduced character limits to Core Instance and pipeline names to prevent
name-related errors. Core Instance names are limited to 20 characters, and
pipeline names are limited to 27 characters.
* Added a character limit to regular expression GPT prompts. Only the first
16,834 characters of input text are included in prompts.
* Added documentation links for each plugin.
* Added the YAML configuration view to the Pipeline Builder.
* Added the ability to rename processing rule templates.
* Improved how confirmation dialogs appear on wide screens.
* Improved how the processing rules dialog appears at lower resolutions.
* Added detailed error messages when manually editing a YAML configuration in
the Pipeline Builder. These messages now highlight line syntax errors.
* Added a JSON linter to the processing rules dialog editor for JSON input.
* *Fix*: Closing the processing rules dialog now resets it before the next use.
* *Fix*: Metrics now display properly on each pipeline's details page.
* *Fix*: Fixed an issue where changing a project name through Pipeline CLI could
cause synchronization errors.
## Pipeline CLI
* Added the `--kind` flag to set the PipelineKind. The PipelineKind attribute
determines whether a pipeline is run as a
[Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/),
which has a configurable number of replicas, or a
[DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/),
which runs an instance for every node in the corresponding Kubernetes cluster.
* Added the `--max-replicas` flag, which lets you specify the upper limit of
replicas for a pipeline.
## Pipeline infrastructure
* Added the filter option `exclude_internal=true` for retrieving Core Instances
and pipelines. When retrieving Core Instances, using this option excludes
health check pipelines from the `pipelinesCount` field. When retrieving
pipelines, using this option excludes health check pipelines from results.
* *Fix*: Standardized the data type for pipeline statuses.
* *Fix*: Standardized internal values for querying metrics.
* *Fix*: Pipeline checks are now deduplicated before entering storage. This
resolves an issue that previously caused `500` errors.
* *Fix*: Sending an invalid URL query string to the audit logs API now returns
the proper HTTP status code.
* *Fix*: Updated several API error messages to display the correct component
names.
* *Fix*: Pipeline name length errors now appear before a pipeline is deployed,
not after.
## Pipeline agent
* *Fix*: The `listen` parameter in networking plugins now works correctly.
* *Fix*: Updated dependencies for increased security.
## Core Operator
* *Fix*: Validate pipeline names to ensure they don't exceed 27 characters.
**Version 2.15.0**
Released: 2024.09.24
## Web interface
* Updated the names of source and destination plugins for consistency.
* Updated the appearance of alert popups.
* Changed the name of the `Starting` pipeline status to `Running`.
* Added keyboard shortcuts to all confirmation modals. Users can now press the
**Enter** key to confirm an action or the **Escape** key to cancel it.
* *Fix*: Fixed a bug that prevented editing a pipeline whose
configuration file included a `match '*'` filter.
* *Fix*: Fixed pagination issues that affected the pipelines list and pipeline
secrets list.
* *Fix*: The processing rules modal now displays accurate stats.
* *Fix*: Fixed a bug that affected the ability to save templates when
creating a new pipeline.
* *Fix*: Fixed an issue that made buttons inaccessible in the processing rules
modal for certain screen resolutions.
## Pipeline CLI
* Added more descriptive error messages for errors related to Core Instance timeouts.
* *Fix*: Fixed a bug that returned an `ambiguous name` error for resources with similar names.
## Pipeline infrastructure
* *Fix*: Fixed a bug where logs with invalid UTF-8 characters would cause a
`500` server error. Null characters are now replaced with an empty string,
and other invalid characters return the appropriate descriptive errors.
* *Fix*: Metric labels are now deduplicated before entering storage.
## Pipeline agent
* *Fix*: Setting a region in the Amazon S3 SQS plugin now sets the corresponding endpoint
automatically.
* *Fix*: The aggregate records processing rule now handles unsigned integers correctly.
**Version 2.14.0**
*Also known as Palo Alto Networks Telemetry Pipeline v2.14.0.*
Released: 2024.09.11
## Web interface
* Renamed the Teammates page to **Team**.
* Core Instance tags can now include numbers.
* Added a confirmation modal when pausing a pipeline.
* Clarified the names of menu items in the **Data Pipelines** section of the **Core
Instance** details page.
* Added the **Status History** button to the **More options** menu in the **Data Pipelines**
section of the **Core Instance** details page.
* Updated the link to Cortex XCOR Support included in the pipeline **Status History**
modal.
* Added role tags to the project selector menu.
* Added the pipeline builder playground.
* Invalid cluster logging configurations now display an error message.
* Added the [Datagen](/ingest/pipeline/plugins/source-plugins/datagen)
source plugin to the pipeline builder.
* Updated in-page links to the Cortex XCOR docs library.
* Changed the behavior of the processing rules builder to load an empty state on startup.
* Processing rules now support metrics and traces.
* *Fix*: Fixed a bug that made processing rules disappear after updating a destination
plugin's configuration settings.
* *Fix*: Fixed a bug related to reserved words in Core Instance names.
## Pipeline CLI
* Added the ability to set proxy environment variables using the following flags:
`--cloud-proxy`, `--http_proxy`, `--https_proxy`, and `--no_proxy`.
* Added support for the `--metrics` flag to enable Kubernetes server metrics.
* Removed the deprecated `--auto-create-ports` flag.
* Added the `--disable-auto-checks` flag as an option when creating or updating
pipelines.
* Improved the performance of the autocomplete feature and the quality of its results.
## Pipeline infrastructure
* Added the new audit logs feature.
* Users with read-only permissions (the `Viewer` role) can no longer create or
access API tokens.
* Processing rules now draw upon V2 of the template API.
* The horizontal pod autoscaling API now supports the `Unknown` scaling policy.
* Ports are now configured based on a per-pipeline level.
* Pipeline image validation now supports any image that follows the `repo:tag` syntax.
* The validation process for pipeline configuration files now supports arrays
in addition to comma-separated and space-separated strings.
* Configuration files now return an error in response to unknown fields.
* Updated the list of resources returned in search results.
* Updated the performance of the `list` endpoint when including
`?include=ports,files,secrets` as a search query.
* Added support for the `exact` parameter when performing searches.
* Tags now support numbers and dashes.
* *Fix*: The Metrics API now ignores empty metrics instead of returning an error.
* *Fix*: Sending invalid AWS tokens to the AWS Marketplace API now returns the correct
HTTP `422 Unprocessable Content` status code.
* *Fix*: The validation process for configuration files no longer returns an error
for `core`-prefixed properties.
## Pipeline agent
* Added support for raw messages to the [S3 Input (SQS)](/ingest/pipeline/plugins/source-plugins/s3-sqs)
source plugin.
* Processing rules now support metrics and traces.
* Added the [SQL DB](/ingest/pipeline/plugins/source-plugins/sqldb) source plugin.
* Added proxy support to the `calyptia` plugin.
* *Fix*: Fixed a fatal error that stopped agent execution during a hot reload.
* *Fix*: Various improvements to the Splunk source plugin.
## Core Operator
* Added support for proxies.
* Improved image version replacement logic for Helm charts.
**Version 2.13.0**
*Also known as Palo Alto Networks Telemetry Pipeline v2.13.0.*
Released: 2024.06.12
## Web interface
* Added support for the Kubernetes Metadata input plugin and the Datadog input
plugin.
* The OpenTelemetry input plugin now sets `Tag_From_URI` to `false` by default.
* Added a **Help Center Menu** to the sidebar with links to various Palo Alto Networks Telemetry Pipeline and
Fluent Bit resources.
* Added an **About** section to settings with version information about different
Palo Alto Networks Telemetry Pipeline components.
* *Fix*: Fixed an issue where switching to a new project would not hide pipelines from
the previous project.
## Pipeline CLI
* Added parameters to configure horizontal pod autoscaling.
* *Fix*: Fixed an issue that automatically reverted a pipeline's service type to
`LoadBalancer` when updating a pipeline without providing a `--service-type` flag.
## Pipeline infrastructure
* Updated the plugins schema for pipeline configuration validation.
* *Fix*: Added a detailed error response to handle duplicate pipeline aliases.
* *Fix*: Metrics that are more than 30 minutes old are no longer ingested.
* *Fix*: Improved the performance of the pipeline infrastructure's pipeline endpoint.
## Pipeline agent
* Added a [Datagen](/ingest/pipeline/plugins/source-plugins/datagen) input plugin that
uses [Gofakeit](https://github.com/brianvoe/gofakeit) to generate simulated
log data.
* *Fix*: Fixed a potential security issue (Fluent Bit CVE-2024-4323) related to input
requests.
## Core Operator
* Pipelines now support horizontal pod autoscaling.
* *Fix*: Fixed an issue that prevented Core Instance from fetching more than 10 pipelines
at a time.
* *Fix*: Changed the way that Core Instance assigns names to pipelines. The previous
naming schema was `[pipeline_name]-[random_4_char_string]`, and the new naming
schema is `[core-instance-name]-[pipeline_name]`
**Version 2.12.3**
Released: 2024.05.21
## Pipeline agent
* *Fix*: Fixed a potential security issue (Fluent Bit CVE-2024-4323) related to input
requests.
**Version 2.12.0**
Released: 2024.05.15
## Web interface
* Added output plugins for Exabeam, Oracle Logging Analytics, Azure Log Ingestion
API, GELF (Graylog), Clickhouse DB, Scalyr DataSet, and Cortex XCOR logs.
* Various updates to pipeline-related UI elements, including plugin metrics,
output logs, and load-balanced endpoints.
* Improved the look and feel of the pipeline editor.
* Processing rules now remain visible in the UI after you disable them.
* Added the ability to disable automated logging.
* *Fix*: Fixed an issue that prevented empty Core Instances from redirecting to the
**Create new instance** page.
* *Fix*: Fixed an issue with the configuration settings for the Okta System Logs plugin.
* *Fix*: Fixed an issue with automated logging that caused a `CrashLoopBackOff` state.
* *Fix*: Added Pipeline CLI installation instructions that were missing from the Core
Instance install wizard.
* *Deprecated*: Removed "Test connection" feature from the automate logging onboarding modal.
* *Deprecated*: Removed Helm tags from Kubernetes aggregator onboarding instructions.
* *Deprecated*: Removed **Validate** button from fleet management onboarding modal.
## Pipeline CLI
* Added the ability to set a `tolerations` parameter for new Core Instances,
which sets pod tolerations to the Core Instance and propagates that value to
pipeline replicas. For example:
```shell theme={null}
calyptia create core_instance operator --name test8900 --tolerations key1=Exists:-:NoSchedule,key2=Equal:val2:PreferNoSchedule
```
* Added the ability to set permissions for new members when sending invites to a
project.
## Pipeline infrastructure
* Upgraded metrics backend to Prometheus.
* Added the ability to immediately create a fleet with files by using the `create`
endpoint.
* *Fix*: Improved performance by adding SQL index to pipeline statuses and configuration.
* *Fix*: Empty arrays now initialize to `[]` instead of `null` in the cluster object
regular expressions API.
* *Fix*: Fixed an error that prevented users from deleting fleets.
* *Deprecated*: Removed the ability to query metrics through the v1 API.
## Pipeline agent
* Added the Scalyr DataSet output plugin.
* Updated various dependencies.
## Core Operator
* Updated sync to accept the new `tolerations` parameter.
* The Core Instance `tolerations` parameter is now propagated to pipeline
replica sets.
* Updated Helm chart to include the `skipServiceCreation` parameter. This
parameter disables the creation of new Kubernetes services for all pipelines in
the Core Instance. For example:
```shell theme={null}
helm install ci calyptia/core-instance --set "skipServiceCreation=true" --set "coreInstance=12l34" --set "cloudToken=1l234"
```
* Updated Helm chart to include the `tolerations` parameter. For example:
```shell theme={null}
helm install ci core-instance/ --set "tolerations=key1=Equal:value1:Execute:3600\,key2=Exists:value2:NoExecute" --set "coreInstance=12l34" --set "cloudToken=1l234"
```
* *Fix*: Fixed an issue with annotations flag parsing that affected comma-separated values.
## Processing rules
* Added multiple regular expression engine options for most processing rules that
support regular expressions.
* Updated the "parse" processing rule to support extended regular expression syntax.
* Added the "join" processing rule.
# Palo Alto Networks Telemetry Pipeline v3
Source: https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v3
Create and manage v3 pipelines in Palo Alto Networks Telemetry Pipeline.
> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.
Use the information on this page to create and manage pipelines in Palo Alto Networks
Telemetry Pipeline v3.
## Requirements
To use Palo Alto Networks Telemetry Pipeline v3, you must meet the following requirements:
* You must have a Kubernetes cluster running [Kubernetes](https://kubernetes.io/docs/setup/)
v1.24 or later.
* You must have [Helm](https://helm.sh/docs/intro/install/) v3 or later installed.
* You must add the
[OpenTelemetry Helm charts](https://open-telemetry.github.io/opentelemetry-helm-charts)
to your cluster.
* You must have [yq](https://github.com/mikefarah/yq) installed.
## Create a pipeline
To create a pipeline in Palo Alto Networks Telemetry Pipeline v3, first
[build a pipeline configuration file](#build-a-pipeline-configuration-file), then
[deploy the pipeline collector](#deploy-the-pipeline-collector).
### Build a pipeline configuration file
Pipelines in Palo Alto Networks Telemetry Pipeline v3 support the same
[source plugins](/ingest/pipeline/plugins/source-plugins),
[destination plugins](/ingest/pipeline/plugins/destination-plugins), and
[processing rules](/ingest/pipeline/processing-rules) as v2 pipelines. However,
v3 pipelines use a new [configuration format](#configuration-format-for-v3-pipelines).
Use one of these methods to build a pipeline configuration file.
> [tab] Web interface
>
> You can build a pipeline configuration file in the
> Palo Alto Networks Telemetry Pipeline web interface,
> then export that file to use in your Kubernetes cluster.
>
> 1. Sign in to the [Palo Alto Networks Telemetry Pipeline web interface](https://core.calyptia.com/).
>
> 2. Open the project where you want to create a pipeline. If none of your projects
> have Palo Alto Networks Telemetry Pipeline v3 enabled, contact [Cortex XCOR Support](/support).
>
> > [!NOTE]
> >
> > To determine whether a project is using v2 or v3 of Palo Alto Networks Telemetry Pipeline,
> > check the items listed in the sidebar navigation menu in the
> > Palo Alto Networks Telemetry Pipeline
> > web interface. If **Core Instances** is displayed in the navigation menu,
> > the active project is using v2, not v3.
>
> 3. Go to **Pipelines**, then click **New Pipeline**.
>
> 4. Under **Pipeline Name**, enter a name for your pipeline.
>
> 5. Use the **FluentBit Pipeline Builder** and **Configuration** tabs to configure
> the source plugins, destination plugins, and processing rules for your pipeline.
>
> 6. After you finish building your configuration file, click **Copy Config** to
> copy those configuration settings to your clipboard, or click **Download Config**
> to download a YAML configuration file.
> [tab] Manual file creation
>
> You can build a pipeline configuration file by manually creating a YAML file that
> contains your configuration settings. This file must use a `.yaml` file extension,
> not a `.yml` file extension.
#### Configuration format for v3 pipelines
The configuration format for v3 pipelines is a superset of the configuration
format for v2 pipelines. You can convert a v2 configuration file into a v3 configuration
file by inserting the `pipeline` section from your v2 file into the corresponding
section of a v3 file.
> [accordion] Configuration file template
>
> You can replace the highlighted lines with the contents of a v2 configuration file.
> If you insert the `pipeline` section from a v2 file into a v3 file, make sure to
> appropriately indent the inserted content within its parent object.
>
> ```yaml title="pipeline-config.yaml" highlight={4-6} theme={null}
> receivers:
> fluentbit:
> fb_config:
> pipeline:
> inputs: []
> outputs: []
> processors:
> # configuration processors here
> exporters:
> nop: {}
> extensions:
> health_check:
> endpoint: 0.0.0.0:13133
> chronosphere:
> pipeline:
> pipeline_name: "NAME"
> project_id: "ID"
> project_token: "TOKEN"
> endpoint: "https://core.calyptia.com"
> service:
> extensions:
> - health_check
> - chronosphere
> telemetry:
> resource:
> pipeline_name: "NAME"
> project_id: "ID"
> prometheus_enabled: true
> prometheus_port: 8888
> pipelines:
> logs:
> receivers:
> - fluentbit
> processors:
> - # list any active processors
> exporters:
> - nop
> ```
### Deploy the pipeline collector
After you've [built a pipeline configuration file](#build-a-pipeline-configuration-file),
follow these steps to deploy the pipeline collector.
1. Run the following command to deploy an [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-collector):
```shell theme={null}
helm upgrade --install otel-pipeline open-telemetry/opentelemetry-collector \
--set mode=deployment \
--set image.repository=us-docker.pkg.dev/chronosphereio/otel-pipeline/otel-pipeline \
--set image.tag=VERSION \
-f <(yq '{"alternateConfig": .}' FILE) \
--namespace NAMESPACE
```
Replace the following values:
* *`VERSION`*: The version of the pipeline collector to use (for example,
`v3.0.0`).
* *`FILE`*: The [configuration file](#build-a-pipeline-configuration-file)
to apply to your pipeline.
* *`NAMESPACE`*: The namespace where you want to deploy the pipeline collector.
To deploy the pipeline collector in a new namespace, append the `--create-namespace`
flag after `--namespace NAMESPACE`.
> [!NOTE]
>
> To deploy multiple pipelines in the same Kubernetes cluster, use a separate namespace
> for each pipeline.
2. Run the following command to verify that the pipeline collector was deployed:
```shell theme={null}
kubectl get pods -n NAMESPACE
```
Replace *`NAMESPACE`* with the namespace where you deployed the pipeline collector.
## Update a pipeline
To update a pipeline, use the same `helm upgrade otel-pipeline` command that
you used to [deploy the pipeline collector](#deploy-the-pipeline-collector), but replace
the corresponding values of any attributes you want to update.
### Upgrade the pipeline collector
To upgrade the pipeline collector, replace `VERSION` with the latest version of the
pipeline collector.
### Update pipeline configuration
To update a pipeline's configuration, replace `FILE` with the name of your updated
pipeline configuration file.
## Uninstall a pipeline
To uninstall a pipeline from your cluster, follow these steps:
1. Run the following Helm command:
```shell theme={null}
helm uninstall otel-pipeline --namespace NAMESPACE
```
Replace *`NAMESPACE`* with the namespace where you deployed the pipeline collector.
2. In Pipeline CLI, run the following command:
```shell theme={null}
calyptia delete pipeline NAME
```
Replace *`NAME`* with the name or UUID of the pipeline to delete.
## Additional settings
Use the information in this section to configure additional settings for
v3 pipelines in Palo Alto Networks Telemetry Pipeline.
### Configure autoscaling
Palo Alto Networks Telemetry Pipeline v3 supports
[horizontal pod autoscaling (HPA)](https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/).
To enable HPA, include the following flags when you run the `helm upgrade otel-pipeline`
command to [deploy](#deploy-the-pipeline-collector) or [update](#update-a-pipeline)
a pipeline:
```shell theme={null}
--set autoscaling.enabled=true \
--set autoscaling.minReplicas=1 \
--set autoscaling.maxReplicas=10 \
--set autoscaling.targetCPUUtilizationPercentage=80 \
--set autoscaling.targetMemoryUtilizationPercentage=70
```
You can replace the example values with the values of your choosing.
### Enable health checks
To enable health checks, configure the
[OpenTelemetry `health_check` extension](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/healthcheckextension/README.md)
in your pipeline's [configuration file](#configuration-format-for-v3-pipelines).
The OpenTelemetry Helm chart uses this extension for its liveness and readiness
probes.
For a standard v3 pipeline that uses the recommended OpenTelemetry Helm chart
settings, set the value of `endpoint` to `0.0.0.0:13133`:
```yaml title="pipeline-config.yaml" theme={null}
[...]
extensions:
health_check:
endpoint: 0.0.0.0:13133
[...]
```
The [configuration builder](#build-a-pipeline-configuration-file) in the Telemetry
Pipeline web interface includes this value by default for new configuration files.
### Use Kubernetes metadata for pipeline and agent names
By default, pipeline names are derived from a literal value set in pipeline
configuration files, and the agents associated with each pipeline receive
automatically generated names. You can override this behavior by using environment
variables to assign pipeline and agent names derived from Kubernetes metadata.
1. When you run the `helm upgrade otel-pipeline` command to
[deploy](#deploy-the-pipeline-collector) or [update](#update-a-pipeline)
a pipeline, include the following flags:
```shell theme={null}
--set "extraEnvs[0].name=POD_NAME" \
--set "extraEnvs[0].valueFrom.fieldRef.fieldPath=metadata.name" \
--set "extraEnvs[1].name=DEPLOYMENT_NAME" \
--set "extraEnvs[1].valueFrom.fieldRef.fieldPath=metadata.labels['app.kubernetes.io/instance']"
```
This creates two environment variables:
* `POD_NAME` is derived from `metadata.name`. Because pipelines assign one agent
to each Pod, using Pod metadata for agent names guarantees that each agent
has a unique name.
* `DEPLOYMENT_NAME` is derived from `metadata.labels['app.kubernetes.io/instance']`.
2. In the `extensions.chronosphere.pipeline` section of your pipeline's configuration
file, update `pipeline_name` and `agent_name` to use the following values:
```yaml title="pipeline-config.yaml" theme={null}
[...]
extensions:
[...]
chronosphere:
pipeline:
pipeline_name: "${env:DEPLOYMENT_NAME}"
agent_name: "${env:POD_NAME}"
[...]
```
> [!NOTE]
>
> Agent names must be unique within a pipeline. Never assign a value to `agent_name`
> that would attempt to assign the same name to multiple agents.
### Route data from Fluent Bit to OpenTelemetry
In both Palo Alto Networks Telemetry Pipeline v2 and v3, pipeline plugins and processing rules
are built using [Fluent Bit](https://fluentbit.io/). In
Palo Alto Networks Telemetry Pipeline v3, that
Fluent Bit configuration
is wrapped in an [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/).
You can route data from the underlying Fluent Bit pipeline to the OpenTelemetry
Collector for further processing.
1. In the `receivers.fluentbit.fb_config.pipeline.outputs` section of your pipeline's
configuration file, add an `http` output with the following settings:
```yaml title="pipeline-config.yaml" theme={null}
receivers:
fluentbit:
fb_config:
pipeline:
[...]
outputs:
- name: http
match: '*'
format: msgpack
port: $${FORWARD_HTTP_PORT} # this is a literal value, not an environment variable
[...]
```
2. In the `processors` section of your pipeline's configuration file, add the
[`memory_limiter`](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiterprocessor/README.md)
and [`batch`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor)
processors.
> [!NOTE]
>
> The `memory_limiter` processor must execute before any other OpenTelemetry
> processors, which means it must always be the first processor in the `processors` list.
```yaml title="pipeline-config.yaml" theme={null}
[...]
processors:
memory_limiter:
check_interval: 1s
limit_percentage: 90
spike_limit_percentage: 10
batch: {}
[...]
```
3. Add `memory_limiter` and `batch` to the `service.pipelines.logs.processors`
section of your pipeline's configuration file:
```yaml title="pipeline-config.yaml" theme={null}
[...]
service:
[...]
pipelines:
logs:
receivers:
- fluentbit
processors:
- memory_limiter
- batch
[...]
```
4. Use the `helm upgrade otel-pipeline` to [deploy](#deploy-the-pipeline-collector)
or [update](#update-a-pipeline) your pipeline, and add the following flags:
```shell theme={null}
--set resources.requests.cpu=500m \
--set resources.requests.memory=512Mi \
--set resources.limits.cpu=1 \
--set resources.limits.memory=1Gi
```
These values set the resource limits for the `memory_limiter` processor. You can
replace the example values with the values of your choosing.
After you route data from Fluent Bit to OpenTelemetry, you can configure other
OpenTelemetry receivers, processors, and exporters in the `service` section of
your pipeline's configuration file. It's also possible to use standard Fluent
Bit-based plugins alongside the `http` plugin that routes data to OpenTelemetry.
However, any data routed through standard Fluent Bit-based plugins won't be
affected by OpenTelemetry processors and exporters.
### Internal telemetry
You can configure internal telemetry for v3 pipelines in the `service.telemetry`
section of pipeline configuration files.
> [accordion] Example configuration
>
> ```yaml title="pipeline-config.yaml" theme={null}
> [...]
> service:
> [...]
> telemetry:
> resource:
> custom_key: value
> control_plane_metrics_enabled: true
> control_plane_metrics_interval: 60s
> control_plane_metrics_timeout: 30s
> prometheus_enabled: true
> prometheus_port: 8888
> logs:
> # configure standard OpenTelemetry Collector settings for logs here
> traces:
> # configure standard OpenTelemetry Collector settings for traces here
> [...]
> ```
#### Logs and traces
Palo Alto Networks Telemetry Pipeline v3 uses the standard OpenTelemetry Collector
configuration settings for internal [logs](https://opentelemetry.io/docs/collector/internal-telemetry/#configure-internal-logs)
and [traces](https://opentelemetry.io/docs/collector/internal-telemetry/#configure-internal-traces).
#### Metrics
Palo Alto Networks Telemetry Pipeline v3 overrides the standard OpenTelemetry
Collector configuration
settings for internal metrics. Instead, metrics use the following configuration settings:
| Key | Description | Default |
| - | - | - |
| `control_plane_metrics_enabled` | Whether to send internal metrics to the Palo Alto Networks Telemetry Pipeline backend. | `true` |
| `control_plane_metrics_interval` | The interval for sending metrics to the Palo Alto Networks Telemetry Pipeline backend. | `60s` |
| `control_plane_metrics_timeout` | The timeout for sending metrics to the Palo Alto Networks Telemetry Pipeline backend. | `30s` |
| `prometheus_enabled` | Whether to enable the [Prometheus metrics endpoint](#prometheus). | `true` |
| `prometheus_port` | Sets the port for the [Prometheus metrics endpoint](#prometheus). | `8888` |
> [accordion] Prometheus metrics endpoint
>
> If enabled, the Prometheus metrics endpoint is available at `/metrics` on the port
> specified by `prometheus_port`. For example, if a pipeline is reachable at `192.0.2.10`
> and uses the default port value, it would expose its Prometheus metrics endpoint at
> `http://192.0.2.10:8888/metrics`. This endpoint listens on the configured port on all
> network interfaces available to the pipeline collector. The endpoint's bind address
> isn't configurable.
>
> The Prometheus metrics endpoint exposes the following metrics, including
> several groups of metrics that share a common prefix:
>
> * `otelcol_*`: A group of metrics related to internal OpenTelemetry Collector
> components, including receivers, processors, and exporters.
> For information about these metrics, see the
> [OpenTelemetry Collector internal telemetry documentation](https://opentelemetry.io/docs/collector/internal-telemetry/).
> * `fluentbit_*`: A group of metrics related to internal Fluent Bit components,
> including inputs, filters, outputs, and storage. The available metrics vary depending
> on the pipeline's active plugins and the version of the pipeline collector.
> * `go_*`: A group of Go runtime metrics for the pipeline collector.
> * `process_*`: A group of operating system process metrics for the pipeline collector.
> * `target_info`: A metric whose labels contain resource attributes for the pipeline
> collector, including values configured in `service.telemetry.resource` and values
> detected or assigned automatically.
#### Resource attributes
Palo Alto Networks Telemetry Pipeline v3 adds a custom internal telemetry
type for resource attributes.
These resource attributes are used to enrich other internal telemetry data, which
means the values of these resource attributes will affect the internal logs, traces, and
metrics emitted by your pipeline.
You can add custom key-value pairs in the `service.telemetry.resource` section of
your pipeline's configuration file to enrich your pipeline's internal telemetry with
custom resource attributes. These keys and value must be strings, and key names must
not overlap with the names of the keys that Palo Alto Networks Telemetry Pipeline
automatically assigns
to pipelines.
> [!NOTE]
>
> Any key-value pairs included in `service.telemetry.resource` are sent to the
> Telemetry Pipeline backend to enrich internal telemetry. Don't include sensitive data
> in these key-value pairs.
In addition to any custom resource attributes you specify, Telemetry Pipeline assigns
these resource attributes to all pipelines. Although it's possible to override the
default values for these resource attributes, Palo Alto Networks doesn't recommend
doing so.
| Key | Description | Default value |
| - | - | - |
| `pipeline_name` | The name of your pipeline. | The equivalent value specified in `service.extensions.chronosphere.pipeline` |
| `agent_name` | The names of the agents associated with your pipeline. Agent names must be unique within a pipeline. Never assign a value to `agent_name` that would attempt to assign the same name to multiple agents. | The equivalent value specified in `service.extensions.chronosphere.pipeline` |
| `project_id` | The ID of the Telemetry Pipeline project to which your pipeline belongs. | The equivalent value specified in `service.extensions.chronosphere.pipeline` |
| `host.name` | Your host name. | Auto-detected value of your host name, if possible |
| `service.name` | The name of your pipeline collector. | `chrono-telemetry-pipeline` |
| `service.version` | The version of your pipeline collector. | The current version of your pipeline collector |
## Supported Pipeline CLI commands
Telemetry Pipeline v3 supports the following Pipeline CLI commands.
> [!NOTE]
>
> The steps to [install](/ingest/pipeline/pipeline-cli/install) and
> [authenticate](/ingest/pipeline/pipeline-cli/authenticate) in Pipeline CLI are unchanged in
> Palo Alto Networks Telemetry Pipeline v3.
> [accordion] Command list
>
> ### `get pipelines`
>
> Returns a list of deployed pipelines.
>
> ```shell theme={null}
> calyptia get pipelines
> ```
>
> ### `get pipeline`
>
> Returns information about a pipeline.
>
> > [!NOTE]
> >
> > Add the flag `--only-config` to return only the contents of that pipeline's
> > configuration file.
>
> ```shell theme={null}
> calyptia get pipeline NAME
> ```
>
> Replace *`NAME`* with the name or UUID of your pipeline.
>
> ### `get agents`
>
> Returns a list of agents connected to a pipeline.
>
> ```shell theme={null}
> calyptia get agents --pipeline NAME
> ```
>
> Replace *`NAME`* with the name or UUID of your pipeline.
>
> ### `get agent`
>
> Returns information about a specified agent.
>
> ```shell copy theme={null}
> calyptia get agent UUID
> ```
>
> Replace *`UUID`* with the UUID of an agent.
>
> ### `get project`
>
> Returns the name of the active Pipeline CLI project.
>
> ```shell theme={null}
> calyptia get project
> ```
>
> ### `delete pipelines`
>
> Removes all pipelines associated with the active project from the list of pipelines
> in the Telemetry Pipeline web interface.
>
> > [!NOTE]
> >
> > If you run this command without using Helm to
> > [uninstall the pipelines from your cluster](#uninstall-a-pipeline) first, any active
> > pipelines will reappear in the Palo Alto Networks Telemetry Pipeline web
> > interface. However, this command
> > permanently removes any inactive pipelines from the
> > Telemetry Pipeline web interface.
>
> ```shell theme={null}
> calyptia delete pipelines
> ```
>
> ### `delete pipeline`
>
> Removes the specified pipeline from the list of pipelines in the Telemetry
> Pipeline web interface.
>
> > [!NOTE]
> >
> > If you run this command for an active pipeline without
> > [uninstalling the pipeline from your cluster](#uninstall-a-pipeline) from your cluster
> > first, the pipeline will reappear in the Palo Alto Networks Telemetry Pipeline web interface.
> > However, this command permanently removes any inactive pipelines from the Telemetry
> > Pipeline web interface.
>
> ```shell theme={null}
> calyptia delete pipeline NAME
> ```
>
> Replace *`NAME`* with the name or UUID of the pipeline to delete.
>
> ### `version`
>
> Returns the currently installed version of Pipeline CLI.
>
> ```shell theme={null}
> calyptia version
> ```
# Send third-party events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party
Learn how to send third-party events to Cortex XCOR to display as change events.
You can send third-party events to Palo Alto Networks Cortex XCOR, which display as change events
within Changes Explorer, and as change events on dashboards, traces, and services,
and query results for monitors.
This integration lets you visualize more of your events within Cortex XCOR and have
a single location for identifying anomalies across your environment. You can also
create custom change events with the
[CreateEvent](/tooling/api-info/data_definition/operations/CreateEvent) API.
After creating or sending events,
[filter change events](/investigate/querying/filter-events) when you're trying to
understand the root cause of an issue, and [overlay change events](/observe/enable-events)
to correlate those events with system and service anomalies in real time.
Cortex XCOR lets you receive change events from these products:
> [card] [Amazon EventBridge](/ingest/third-party/aws-eventbridge)
>
> Send Amazon EventBridge events to Cortex XCOR.
> [card] [Buildkite](/ingest/third-party/buildkite)
>
> Send Buildkite events to Cortex XCOR.
> [card] [CircleCI](/ingest/third-party/circleci)
>
> Send CircleCI events to Cortex XCOR.
> [card] [GitHub](/ingest/third-party/github)
>
> Send GitHub events to Cortex XCOR.
> [card] [GitLab](/ingest/third-party/gitlab)
>
> Send GitLab events to Cortex XCOR.
> [card] [Google Cloud Personalized Service Health](/ingest/third-party/google-cloud)
>
> Send Google Cloud Personalized Service Health events to Cortex XCOR.
> [card] [Harness](/ingest/third-party/harness)
>
> Send Harness events to Cortex XCOR.
> [card] [LaunchDarkly](/ingest/third-party/launchdarkly)
>
> Send LaunchDarkly events to Cortex XCOR.
> [card] [Statsig](/ingest/third-party/statsig)
>
> Send Statsig events to Cortex XCOR.
# Send Amazon EventBridge events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party/aws-eventbridge
Send Amazon EventBridge events, including AWS Health events, to Palo Alto Networks Cortex XCOR.
Amazon EventBridge is a serverless service you can use to route a stream of real-time
data from your applications, third-party software, and Amazon Web Services (AWS) to
targets that include HTTP APIs and third-party integrations. You configure routing
rules to route events to a target.
Amazon EventBridge API destinations are HTTP endpoints you can configure as the
target for a rule. Use API destinations to send events from Amazon EventBridge to
Palo Alto Networks Cortex XCOR.
You can also use Amazon EventBridge to detect and react to AWS Health events, and
send those events to Cortex XCOR. This configuration is similar to sending
[Google Cloud Personalized Service Health events to Cortex XCOR](/ingest/third-party/google-cloud).
To send Amazon EventBridge events to Cortex XCOR:
1. [Create an API token](#create-an-api-token).
2. [Create an API destination](#create-an-api-destination).
3. Create an Amazon EventBridge rule, depending on which events you want to send to
Cortex XCOR:
* [Create an EventBridge rule](#create-an-amazon-eventbridge-rule) for specific events,
such as Amazon CloudWatch events.
* [Create an EventBridge rule for AWS Health](#create-an-amazon-eventbridge-rule-for-aws-health)
events to send those events to Cortex XCOR.
## Create an API token
Before sending events from Amazon EventBridge, contact [Cortex XCOR Support](/support) to
obtain an API token to authenticate with Cortex XCOR.
> [!NOTE]
>
> This API token differs from an API token that's generated when you create
> a [service account](/administer/accounts-teams/service-accounts).
## Create an API destination
To configure Amazon EventBridge to send events to Cortex XCOR:
1. Create an API destination by completing the steps in the
[Amazon EventBridge documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html#eb-api-destination-create).
2. Configure the API destination you created:
1. For the **Authorization type**, select **API Key**. Enter **API-Token** as your
API key name, and enter the API token you received as the value.
2. For the destination endpoint, enter `https://TENANT/api/v1/data/events` and
select `POST` as the HTTP method.
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
3. For the **Invocation rate limit per second**, enter **5** as the value.
4. Select **Use an existing connection** and select the connection you created.
## Create an Amazon EventBridge rule
You can create an Amazon EventBridge rule to get notified about specific Amazon
EventBridge events in Cortex XCOR.
First, [create an API destination](#create-an-api-destination). Then complete the
following steps:
1. [Create an Amazon EventBridge rule](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule.html)
that reacts to events:
* Define the rule detail: Enter details for the rule and select
**Rule with an event pattern** as the rule type.
* Build the event pattern: Select **Use pattern form** as the creation method,
and define the event pattern.
* Define the target: Select **EventBridge API destination** as the target type,
choose your existing API destination from the list, and select
**Create a new role for this specific resource**.
2. Expand **Additional settings** and configure an
[input transformation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.html)
to handle mapping from an AWS event to a Cortex XCOR `CreateEvent`
payload. This definition sends the transformed event to a target instead of the
original event.
You configure an input path to define variables, and then configure an input
template to match your event payload.
3. Configure the input path to reference parameters in your event and store those
values in variables. For example:
```json theme={null}
{
"time": "$.time",
"resources": "$.resources",
"detail": "$.detail",
"state": "$.detail.state.value",
"prevState": "$.detail.previousState.value",
"alarmName": "$.detail.alarmName",
"description": "$.detail.configuration.description",
"detail": "$.detail",
"region": "$.region"
}
```
4. Configure the input template to specify the information you want to pass to your
target. This template matches your event payload and uses the variables defined in
your input path. You must surround all variables with angle brackets `<>`.
For example, the following template defines an Amazon CloudWatch input:
```json theme={null}
{
"event": {
"happenedAt": "",
"category": "alerts",
"labels": {
"description": "",
"aws_source": "aws.cloudwatch",
"region": ""
},
"source": "EventBridge",
"title": "CloudWatch Alarm is in state ",
"type": "CloudWatch_Alarm_State_Change",
"payload_object":
}
}
```
5. For each additional event type you want to map to a change event, configure a rule
and select your existing API destination as the target. Each rule can have its own
input transformer.
## Create an Amazon EventBridge rule for AWS Health
You can create an Amazon EventBridge rule to get notified about AWS Health events in
Cortex XCOR.
First, [create an API destination](#create-an-api-destination). Then complete the
following steps:
1. [Create an Amazon EventBridge rule](https://docs.aws.amazon.com/health/latest/ug/cloudwatch-events-health.html#creating-event-bridge-events-rule-for-aws-health)
for AWS Health.
2. In the step where you choose the target type on the **Select targets** page,
configure an
[input transformation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.html)
to handle mapping from an AWS event to a Cortex XCOR `CreateEvent`
payload. This definition sends the transformed event to a target instead of the
original event.
3. Configure the input path to reference parameters in your event and store those
values in variables. For example:
```json theme={null}
{
"time": "$.time",
"source": "$.source",
"detail": "$.detail",
"service": "$.detail.service",
"statusCode": "$.detail.statusCode",
"eventDescription": "$.detail.eventDescription[0].latestDescription",
"affectedAccount": "$.detail.affectedAccount",
"region": "$.region",
"type": "$.detail.eventTypeCode"
}
```
4. Configure the input template to specify the information you want to pass to your
target. This template matches your event payload and uses the variables defined in
your input path. You must surround all variables with angle brackets `<>`.
For example, the following template defines an AWS Health input:
```json theme={null}
{
"event": {
"happenedAt": "",
"category": "alerts",
"labels": {
"description": "",
"aws_source": "aws.health",
"region": "",
"service": "",
"statusCode": "",
"affectedAccount": "",
},
"source": "EventBridge",
"title": "AWS Health is in state ",
"type": "AWS Health Event",
"payload_object":
}
}
```
5. Complete the remaining steps in the AWS Health documentation to create the
EventBridge rule.
## Troubleshooting
To return error messages and view responses from the API, configure an Amazon Simple
Queue Service (SQS).
1. [Create a queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/step-create-queue.html)
in Amazon SQS.
2. Open the
[Amazon EventBridge rule](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule.html)
you created previously.
3. Click the **Targets** tab and then click **Edit**.
4. Expand the **Additional settings** section.
5. In the **Dead-letter queue** section, click
**Select an Amazon SQS queue in the current AWS account to use as the dead-letter queue**,
then select the SQS queue you created.
6. Update the Amazon EventBridge rule.
Amazon EventBridge sends events that match this rule to the dead-letter queue if
they're not successfully delivered to the target.
# Send Buildkite events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party/buildkite
Create a Buildkite webhook that sends build and pipeline events to Palo Alto Networks Cortex XCOR.
To send Buildkite events to Palo Alto Networks Cortex XCOR, create a webhook
within Buildkite and include your API key to authenticate with Cortex XCOR.
## Obtain an API token
Before sending events from Buildkite, contact [Cortex XCOR Support](/support) to
obtain an API token to authenticate with Cortex XCOR.
> [!NOTE]
>
> This API token differs from an API token that's generated when you create
> a [service account](/administer/accounts-teams/service-accounts).
## Create a Buildkite webhook
To send Buildkite events to Cortex XCOR:
1. In Buildkite, go to
`https://buildkite.com/organizations/COMPANY/services`
and [create a webhook](https://buildkite.com/docs/apis/webhooks).
Replace *`COMPANY`* with the name of your company or organization.
2. Click **Add Webhook** to define a webhook.
3. Enter a description for the webhook, such as **Cortex XCOR Buildkite**.
4. In the **URL** field, enter
`https://TENANT.chronosphere.io/api/v1/data/events/receiver/buildkite`.
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
5. In the **Token** field, enter the API token you obtained from Cortex XCOR
Support.
6. Select **Send an HMAC signature**.
7. Select one or more of the following options for your webhook:
* **build.finished**
* **build.running**
* **build.scheduled**
8. Select which pipelines you want to enable events for.
9. Save your webhook.
# Send CircleCI events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party/circleci
Create a CircleCI webhook that sends pipeline and workflow events to Palo Alto Networks Cortex XCOR.
To send CircleCI events to Palo Alto Networks Cortex XCOR, create a webhook
within CircleCI and include your API key to authenticate with Cortex XCOR.
## Obtain an API token
Before sending events from CircleCI, contact [Cortex XCOR Support](/support) to
obtain an API token to authenticate with Cortex XCOR.
> [!NOTE]
>
> This API token differs from an API token that's generated when you create
> a [service account](/administer/accounts-teams/service-accounts).
## Create a CircleCI webhook
To send CircleCI events to Cortex XCOR:
1. In CircleCI, go to the project you want to create a webhook for.
2. Click **Project Settings**.
3. In the navigation menu, click **Webhooks**, and then click **Add Webhook**.
4. In the **Add Webhook** dialog, enter a name for your webhook, such as
`Cortex XCOR change events`.
5. In the **Receiver URL** field, enter
`https://TENANT.chronosphere.io/api/v1/data/events/receiver/circleci`
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
6. In the **Secret token** field, enter the API token you obtained from
Cortex XCOR Support.
7. Select the **Events** to trigger the webhook. Cortex XCOR supports
**Workflow Completed** and **Job Completed** events.
8. Click **Add Webhook** to create the webhook.
# Send GitHub events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party/github
Create a webhook to send your GitHub events to Palo Alto Networks Cortex XCOR as change events.
To send GitHub events to Palo Alto Networks Cortex XCOR, create a webhook
within GitHub and include a secret token to authenticate with Cortex XCOR.
For more information, refer to
[webhook events and payloads](https://docs.github.com/en/webhooks/webhook-events-and-payloads)
in the GitHub documentation.
## Obtain an API token
Before sending events from GitHub, contact [Cortex XCOR Support](/support) to
obtain an API token to authenticate with Cortex XCOR.
> [!NOTE]
>
> This API token differs from an API token that's generated when you create
> a [service account](/administer/accounts-teams/service-accounts).
## Create a GitHub webhook
To send GitHub events to Cortex XCOR:
1. In GitHub, open the repository you want to configure a webhook for.
2. Click **Settings**.
3. Under **Code and automation**, click **Webhooks**.
4. In the **Add webhook** window, in the **Payload URL** field, enter:
```text /TENANT/ theme={null}
https://TENANT.chronosphere.io/api/v1/data/events/receiver/github
```
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
5. Select **application/json** as the **Content type**.
6. In the **Secret** field, enter the API token you obtained from Cortex XCOR
Support.
7. Choose **Let me select individual events**, and then select **Deployment** and
**Deployment Status** as the events to trigger the webhook.
8. Save your webhook.
## Map GitHub events to Cortex XCOR events
After creating a GitHub webhook to send events to Cortex XCOR,
Cortex XCOR automatically maps the GitHub payload to change events.
You can't customize how the payload maps to change events. If you want to modify
how the GitHub payload gets mapped, contact [Cortex XCOR Support](/support).
The following table indicates the fields and values that Cortex XCOR
produces from a GitHub webhook event:
| Field | Value |
| - | - |
| `category` | `deploys` |
| `type` | `deploy_ACTION` |
| `source` | `github` |
| `happened_at` | `TIMESTAMP` |
| `title` | `TITLE` |
Replace the following:
* *`ACTION`*: For `deployment` events, the type is always `deploy_start`. For
`deployment_status` events, the type is `deploy_` followed by the GitHub
deployment status state, such as `deploy_in_progress`, `deploy_success`, or
`deploy_failure`.
* *`TIMESTAMP`*: The time the event occurred, taken from the deployment's
`created_at` field. Must be within seven days of the current time.
* *`TITLE`*: A description generated from the repository name and environment,
such as "Deployment for my-repo in environment production started".
Cortex XCOR maps the following labels by default:
| Label | Source | Event types |
| - | - | - |
| `environment` | Deployment environment | `deployment`, `deployment_status` |
| `deployment.sha` | Deployment commit SHA | `deployment`, `deployment_status` |
| `deployment.log_url` | Deployment status log URL | `deployment_status` only |
This snippet illustrates how to set a `shell` variable `PAYLOAD` to a JSON string
that mimics a GitHub deployment webhook payload. The resulting `$SIGNATURE` is used
in the `X-Hub-Signature: sha1=$SIGNATURE` header of the following `curl` request. The
receiver validates authenticity by recomputing this same Hash-based Message
Authentication Code (HMAC) against the stored secret token and comparing it to the
header value, which is the same mechanism GitHub uses when delivering real webhooks.
```shell wrap /TENANT/ /SECRET_TOKEN/ theme={null}
# Generate the HMAC-SHA1 signature for the payload
PAYLOAD='{"deployment":{"created_at":"2024-07-24T14:15:22Z","environment":"staging","sha":"abc123def456","url":"https://api.github.com/repos/example-org/example-repo/deployments/1"},"repository":{"name":"example-repo"}}'
SIGNATURE=$(echo -n "$PAYLOAD" | openssl dgst -sha1 -hmac "$SECRET_TOKEN" | awk '{print $2}')
```
The following sample request simulates a GitHub `deployment` webhook. Replace
the following:
* *`TENANT`*: Your organization name from your Cortex XCOR tenant.
* *`SECRET_TOKEN`*: The secret token configured in your GitHub webhook and
registered with Cortex XCOR.
```shell theme={null}
curl --request POST \
--url https://TENANT.chronosphere.io/api/v1/data/events/receiver/github \
--header "Content-Type: application/json" \
--header "X-Github-Event: deployment" \
--header "X-Hub-Signature: sha1=$SIGNATURE" \
--data "$PAYLOAD"
```
This request produces a change event with the following values:
| Field | Value |
| - | - |
| `category` | `deploys` |
| `type` | `deploy_start` |
| `source` | `github` |
| `title` | `Deployment for my-repo in environment staging started` |
| `environment` | `staging` |
| `deployment.sha` | `abc123def456` |
# Send GitLab events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party/gitlab
Create a GitLab webhook that sends project and pipeline events to Palo Alto Networks Cortex XCOR.
To send GitLab events to Palo Alto Networks Cortex XCOR, create a webhook within
GitLab and include your API key to authenticate with Cortex XCOR. For more
information, refer to
[Webhooks](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html) in the
GitLab documentation.
## Obtain an API token
Before sending events from GitLab, contact [Cortex XCOR Support](/support) to
obtain an API token to authenticate with Cortex XCOR.
> [!NOTE]
>
> This API token differs from an API token that's generated when you create
> a [service account](/administer/accounts-teams/service-accounts).
## Create a GitLab webhook
To send GitLab events to Cortex XCOR:
1. In GitLab, [create a webhook](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#configure-a-webhook-in-gitlab)
scoped to your project or group.
2. In the **URL** field, enter
`https://TENANT.chronosphere.io/api/v1/data/events/receiver/gitlab`
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
3. In the **Secret token** field, enter the API token you obtained from Cortex XCOR
Support.
4. In the **Trigger** section, select the events to trigger the webhook.
Cortex XCOR supports only **Deployment events** and
**Feature flag events**.
> [!WARNING]
>
> If you choose any events other than **Deployment events** or **Feature flag events**,
> Cortex XCOR drops the related event data, even though the GitLab interface lets
> you select other event types.
5. Click **Add webhook** to create the webhook.
# Send Google Cloud Personalized Service Health events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party/google-cloud
Create a webhook to send Google Cloud Personalized Service Health events to Palo Alto Networks Cortex XCOR.
To send Google Cloud Personalized Service Health events to Palo Alto Networks Cortex XCOR,
create a webhook
in the Google Cloud Personalized Service Health dashboard
and include credentials to authenticate with Cortex XCOR.
## Obtain credentials
Before sending events from Google Cloud Personalized Service Health, contact
[Cortex XCOR Support](/support) to obtain a username and password to authenticate
your third-party app with Cortex XCOR.
## Create a Google Cloud Personalized Service Health webhook
1. Enable Google Cloud Personalized Service Health in the Google Cloud console. See
[Manage Personalized Service Health access](https://cloud.google.com/service-health/docs/manage-access)
in the Google Cloud documentation for required steps.
2. In the Google Cloud console, search for **Service Health**.
3. Navigate to Google Service Health, and click **Create Alert Policy**.
4. In the **Alert policy templates** dialog, in the **Configure notifications**
section, click the **Notification channels** dropdown menu and then click
**Manage notification channels**.
5. In the **Notification channels** dialog, scroll to the **Webhooks** section and
click **Add new**.
6. In the **Add Webhook** dialog, define your webhook:
1. In the **Endpoint URL** field, enter
`https://TENANT.chronosphere.io/api/v1/data/events/receiver/gcp-service-health`.
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
2. In the **Display Name** field, enter a name to display for your webhook, and
then select the **Use HTTP Basic Auth** checkbox.
3. Input the username and password credentials that Cortex XCOR Support supplied.
4. Click **Test Connection** to test your webhook configuration.
> [!NOTE]
>
> No confirmation dialog displays to confirm whether your webhook is configured
> correctly, but you must complete this step to proceed.
5. Click **Save** to save your webhook.
7. In the **Alert policy templates** dialog, select the **All incidents, all updates**
checkbox, click the three vertical dots icon, and select
**Customize alert policy**.
1. In the **Create logs-based alert policy** dialog, in the **Alert details**
section, click **Next**.
2. In the **Extract log labels** section, ensure that the following log labels are
included in the template:
* `impactedProducts`: `jsonPayload.impactedProducts`
* `detailedState`: `jsonPayload.detailedState`
* `impactedLocations`: `jsonPayload.impactedLocations`
* `updateTime`: `jsonPayload.updateTime`
* `startTime`: `jsonPayload.startTime`
* `relevance`: `jsonPayload.relevance`
* `title`: `jsonPayload.title`
* `description`: `jsonPayload.description`
* `state`: `jsonPayload.state`
If any of these labels aren't included in the list, click **Add a label** to add
the missing label.
3. Click **Next**.
4. Select the notification frequency and duration, or accept the default values.
5. Click **Next**.
6. In the **Who should be notified** section, the notification channel that you
created when defining the webhook, and then click **Ok**.
# Send Harness events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party/harness
Create a Harness webhook that sends pipeline and deployment events to Palo Alto Networks Cortex XCOR.
To send Harness events to Palo Alto Networks Cortex XCOR, create a webhook
within Harness and include your API key to authenticate with Cortex XCOR.
## Obtain an API token
Before sending events from Harness, contact [Cortex XCOR Support](/support) to
obtain an API token to authenticate with Cortex XCOR.
> [!NOTE]
>
> This API token differs from an API token that's generated when you create
> a [service account](/administer/accounts-teams/service-accounts).
## Create a Harness webhook
To send Harness events to Cortex XCOR:
1. In Harness, [create a webhook](https://developer.harness.io/docs/continuous-delivery/x-platform-cd-features/cd-steps/notify-users-of-pipeline-events).
2. Select **Add a Notification Rule**.
Cortex XCOR supports the following Harness events:
* `PipelineSuccess`
* `PipelineFailed`
* `PipelineStart`
Cortex XCOR listens for `PipelineStart`, `PipelineSuccess`, and
`PipelineFailed` events. There can be several hours between a `PipelineStart`
event and a deployment. Cortex XCOR recommends using `PipelineSuccess` or
`PipelineFailed` unless start events are critical information.
3. Select a [**Webhook notification method**](https://developer.harness.io/docs/continuous-delivery/x-platform-cd-features/cd-steps/notify-users-of-pipeline-events/#webhook-notifications).
4. Enter the following URL:
`https://TENANT/api/v1/data/events/receiver/harness`
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
5. Click **+ Add Headers** to add the following custom header:
```text theme={null}
X-Harness-Token: CHRONOSPHERE_HARNESS_TOKEN
```
Replace *`CHRONOSPHERE_HARNESS_TOKEN`* with the API token obtained from
Cortex XCOR Support.
6. Click **Finish**.
# Send LaunchDarkly events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party/launchdarkly
Configure the Cortex XCOR integration in LaunchDarkly to send feature flag events to Palo Alto Networks Cortex XCOR.
To send LaunchDarkly events to Palo Alto Networks Cortex XCOR, configure
the Cortex XCOR integration in LaunchDarkly and include your API token
to authenticate with Cortex XCOR.
## Obtain an API token
Before sending events from LaunchDarkly, contact [Cortex XCOR Support](/support) to
obtain an API token to authenticate with Cortex XCOR.
> [!NOTE]
>
> This API token differs from an API token that's generated when you create
> a [service account](/administer/accounts-teams/service-accounts).
## Create a Cortex XCOR integration in LaunchDarkly
To send LaunchDarkly events to Cortex XCOR:
1. In LaunchDarkly, navigate to **Integrations** and find the
**Chronosphere Events** integration.
2. Click **Add new** to create a new Cortex XCOR configuration.
3. Set the **Status** toggle to **On**.
4. Enter a **Name** for the integration.
5. In the **Chronosphere secret token** field, enter the API token you
obtained from Cortex XCOR Support.
6. In the **Chronosphere receiver URL** field, enter
`https://TENANT.chronosphere.io/api/v1/data/events/receiver/launchdarkly`.
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
7. Optional: Modify the policy statement to customize the projects, environments,
flags, views, and actions:
* **Scope**: Set the resource to **Flag** with **all flags** selected.
* **Select project**: Choose the projects to include, or select **all** for all
projects.
* **Select environments**: Choose the environments to include, such as
**production**.
* **Actions**: Set to **ALLOW** with **only these actions** and select
the following actions:
* `createFlag`
* `deleteFlag`
* `createTriggers`
* `deleteTriggers`
* `updateClientSideFlagAvailability`
* `updateFallthrough`
* `updateFeatureWorkflows`
* `updateFlagDefaultVariations`
* `updateFlagSalt`
* `updateFlagVariations`
* `updateGlobalArchived`
* `updateName`
* `updateOffVariation`
* `updateOn`
* `updatePrerequisites`
* `updateRules`
* `updateScheduledChanges`
* `updateTargets`
* `updateTemporary`
* `updateTriggers`
8. Save your configuration.
# Send Statsig events to Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/third-party/statsig
Create a webhook to send your Statsig feature flag events to Palo Alto Networks Cortex XCOR as change events.
To send Statsig events to Palo Alto Networks Cortex XCOR, configure an
[outgoing webhook](https://docs.statsig.com/integrations/event_webhook#outgoing)
in Statsig and provide its signing secret to Cortex XCOR for
signature verification.
Cortex XCOR ingests only `statsig::config_change` events and silently
ignores other Statsig event types, such as `statsig::gate_exposure` and
`statsig::experiment_exposure`.
## Configure a Statsig outgoing webhook
To configure Statsig to send events to Cortex XCOR:
1. In Statsig, go to **Project Settings** and click the **Integrations** tab.
2. Find **Generic Webhook** and click **Enable**.
3. In the **URL** field, enter:
```text /TENANT/ theme={null}
https://TENANT.chronosphere.io/api/v1/data/events/receiver/statsig
```
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
4. Click **Event Filtering** to configure which event types Statsig sends.
Cortex XCOR ingests only config change events and silently
ignores exposure events if sent. Select only **Config Changes** and
clear **Exposures**.
5. Save the webhook configuration.
6. From the **Generic Webhook** integration card, copy the **Signing Secret**.
The secret is required to configure the integration in
Cortex XCOR.
## Configure the Statsig integration in Cortex XCOR
Contact [Cortex XCOR Support](/support) to configure your Statsig integration and
provide the signing secret you copied from Statsig.
## Map Statsig events to Cortex XCOR events
After configuring the integration, Cortex XCOR automatically maps incoming
config change events from Statsig to change events in Cortex XCOR.
You can't customize how the payload maps to change events in Cortex XCOR.
To request modifications to the Statsig payload's mapping, contact
[Cortex XCOR Support](/support).
The following table describes how Statsig event fields map to Cortex XCOR
change events:
| Field | Value |
| - | - |
| `category` | `feature_flags` |
| `type` | `TYPE_ACTION` |
| `source` | `statsig` |
| `happened_at` | `TIMESTAMP` |
| `title` | `NAME ACTION` |
Replace the following:
* *`TYPE`*: The Statsig config type in lowercase, such as `gate` or `experiment`.
* *`ACTION`*: The action that occurred, such as `created` or `updated`.
Combined with *`TYPE`*, this produces values like `gate_updated` or
`experiment_created`.
* *`TIMESTAMP`*: The time the config change occurred, taken from the event's
`timestamp` field.
* *`NAME`*: The name of the Statsig feature flag or experiment that changed.
Cortex XCOR also attaches the following labels to each event from the
Statsig payload:
| Label | Value |
| - | - |
| `type` | The Statsig config type, such as `Gate` or `Experiment`. |
| `name` | The name of the feature flag or experiment that changed. |
| `action` | The action that occurred, such as `updated` or `created`. |
| `description` | The description of the change, if provided by Statsig. |
# CXDOT Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector
Use the CXDOT Collector to send telemetry data to Cortex XCOR.
The Cortex XCOR Distribution of OpenTelemetry (CXDOT) Collector is a unified
telemetry collector that sends logs, metrics, and traces to Palo Alto Networks
Cortex XCOR.
## Install
Install the CXDOT Collector in your environment.
> [card] [Kubernetes](/ingest/xcor/collector/install/kubernetes)
>
> Install the CXDOT Collector in a Kubernetes cluster.
> [card] [Linux](/ingest/xcor/collector/install/linux)
>
> Install the CXDOT Collector on Linux.
> [card] [Windows](/ingest/xcor/collector/install/windows)
>
> Install the CXDOT Collector on Windows.
## Configure the CXDOT Collector
After you install the CXDOT Collector, configure its behavior.
> [card] [Manage configuration schema versions](/ingest/xcor/collector/configure/schema-version)
>
> Set the schema version of the CXDOT Collector's configuration file.
> [card] [Enable integrations](/ingest/xcor/collector/configure/integrations)
>
> Use CXDOT Collector integrations to collect telemetry from tools and services.
> [card] [Build custom pipelines](/ingest/xcor/collector/configure/custom-pipelines)
>
> Build custom pipelines to process and route telemetry data from the CXDOT Collector.
> [card] [Enable telemetry egress](/ingest/xcor/collector/configure/telemetry-egress)
>
> Control which types of telemetry data the CXDOT Collector sends to Cortex XCOR.
## Discover targets
Use the CXDOT Collector to discover telemetry sources in your environment.
> [card] [Discover Kubernetes targets](/ingest/xcor/collector/discover/kubernetes)
>
> Find supported metric scrape targets from Kubernetes workloads.
# Build custom pipelines for the CXDOT Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/configure/custom-pipelines
Build custom pipelines to process and route telemetry data from the CXDOT Collector.
> Requires CXDOT Collector version 1.5.0 or later.
You can build custom pipelines to modify how the CXDOT Collector processes and routes
telemetry data. Custom pipelines affect telemetry data after an
[integration](/ingest/xcor/collector/configure/integrations) collects that data,
but before the CXDOT Collector sends it to Palo Alto Networks Cortex XCOR. For
example, you can create a custom pipeline that removes sensitive information from
logs before the Collector sends those logs to Cortex XCOR, or a custom pipeline that
sends one copy of metrics to Cortex XCOR and another copy to a different destination.
Each custom pipeline applies to either metrics, logs, or traces, and by default
affects data of that telemetry type from all enabled integrations. For example, a
pipeline for traces affects trace data from every integration that collects traces,
unless the pipeline is configured to
[only affect certain integrations](#configure-per-integration-behavior).
```mermaid actions={false} theme={null}
flowchart TD
accTitle: Custom pipeline telemetry flow
accDescr: The CXDOT Collector collects telemetry data from multiple integrations. That data passes through a custom pipeline, then gets sent to Cortex XCOR and other destinations.
source(["Telemetry sources"])
subgraph collector["CXDOT Collector"]
direction LR
subgraph integrations[" "]
direction TB
integration1["Integration"]
integration2["Integration"]
integration3["Integration"]
end
pipeline{"Custom pipeline"}
integration1 -.->|"Telemetry data"| pipeline
integration2 -.->|"Telemetry data"| pipeline
integration3 -.->|"Telemetry data"| pipeline
end
xcor(["Palo Alto Networks Cortex XCOR"])
destinations(["Other destinations"])
source -.-> integration1
source -.-> integration2
source -.-> integration3
pipeline -.->|"Processed telemetry data"| xcor
pipeline -.->|"Processed telemetry data"| destinations
style integrations fill:transparent,stroke:transparent
classDef green fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF;
class pipeline green
```
## Components
Custom pipelines use a subset of OpenTelemetry components. Each custom pipeline
consists of the following components:
* At least one [receiver](https://opentelemetry.io/docs/collector/configuration/#receivers)
* At least one [exporter](https://opentelemetry.io/docs/collector/configuration/#exporters)
* (Optional) One or more [processors](https://opentelemetry.io/docs/collector/configuration/#processors).
The CXDOT Collector provides two components that can be used as receivers
and exporters. Use the `forward/cxdot/from-integrations` component as a receiver to
receive telemetry data from CXDOT Collector integrations. Use the
`forward/cxdot/to-egress` component as an exporter to send telemetry data to Cortex
XCOR.
> [!WARNING]
>
> When a custom pipeline receives telemetry data from
> `forward/cxdot/from-integrations`, that custom pipeline replaces the default path for
> that telemetry type. To continue sending all telemetry data of that type to Cortex
> XCOR, every processing or routing path must eventually export to
> `forward/cxdot/to-egress`.
### Connect multiple pipelines
If you're using multiple custom pipelines for the same telemetry type, use
`forward/cxdot/from-integrations` as a receiver in the first pipeline of your
sequence, then use
[OpenTelemetry connectors](https://opentelemetry.io/docs/collector/configuration/#connectors)
to allow telemetry data to flow from one pipeline to the next. Use
`forward/cxdot/to-egress` as an exporter in any pipelines that should send telemetry
data to Cortex XCOR.
For example, the following snippet uses the `forward/next` connector to send metrics
from one custom pipeline to another. The `forward/cxdot/from-integrations` receiver
in the first pipeline receives telemetry data, and the `forward/cxdot/to-egress`
exporter in the second pipeline sends that data to Cortex XCOR.
```yaml theme={null}
connectors:
forward/next: {}
service:
pipelines:
metrics/first:
receivers: [forward/cxdot/from-integrations]
exporters: [forward/next]
metrics/second:
receivers: [forward/next]
exporters: [forward/cxdot/to-egress]
```
If multiple pipelines are joined by a routing connector, those pipelines must all
handle the same telemetry type as that routing connector. For example, a routing
connector that handles metrics must join only pipelines for metrics.
### List compatible OpenTelemetry components
To list the OpenTelemetry components that are compatible with your version of the
CXDOT Collector, use the following command:
> [tab] Kubernetes
>
> ```shell theme={null}
> kubectl exec --namespace cxdot POD -- \
> /bin/cxdot-collector components
> ```
>
> Replace *`POD`* with the name of any running CXDOT Collector Pod.
> [tab] Linux
>
> ```shell theme={null}
> cxdot-collector components
> ```
> [tab] Windows
>
> ```powershell theme={null}
> .\cxdot-collector.exe components
> ```
> [!NOTE]
>
> The `forward` component used by `forward/cxdot/from-integrations` and
> `forward/cxdot/to-egress` appears in the command's `connectors` list.
## Create a custom pipeline
To create a custom pipeline, add a `service.pipelines` block to your configuration
file that defines receivers and exporters. Optionally, add a `processors` block that
defines processors.
> [!NOTE]
>
> Before you create a custom pipeline for logs or traces, make sure to
> [enable telemetry egress](/ingest/xcor/collector/configure/telemetry-egress) for
> that telemetry type.
### Process telemetry data
The following example creates a custom pipeline named `metrics/add-env` that adds the
`env = prod` resource attribute to metrics. Logs and traces aren't affected.
> [tab] Helm values file
>
> Add `processors` and `service.pipelines` blocks to both the
> `nodeCollector.configOverlay` and `clusterCollector.configOverlay` sections
> of your Helm values file.
>
> ```yaml expandable title="values.yaml" theme={null}
> nodeCollector:
> configOverlay:
> processors:
> resource/add-env:
> attributes:
> - key: env
> value: prod
> action: insert
> service:
> pipelines:
> metrics/add-env:
> receivers: [forward/cxdot/from-integrations]
> processors: [resource/add-env]
> exporters: [forward/cxdot/to-egress]
>
> clusterCollector:
> configOverlay:
> processors:
> resource/add-env:
> attributes:
> - key: env
> value: prod
> action: insert
> service:
> pipelines:
> metrics/add-env:
> receivers: [forward/cxdot/from-integrations]
> processors: [resource/add-env]
> exporters: [forward/cxdot/to-egress]
> ```
> [tab] Configuration file
>
> Add `processors` and `service.pipelines` as top-level blocks in your configuration
> file.
>
> ```yaml expandable title="config.yaml" theme={null}
> cxdot:
> # ...
>
> processors:
> resource/add-env:
> attributes:
> - key: env
> value: prod
> action: insert
>
> service:
> pipelines:
> metrics/add-env:
> receivers: [forward/cxdot/from-integrations]
> processors: [resource/add-env]
> exporters: [forward/cxdot/to-egress]
> ```
### Send telemetry data to an additional destination
The following example creates a custom pipeline named `logs/copy` that sends a copy
of log data to an OTLP HTTP endpoint while continuing to send logs to Cortex XCOR.
Metrics and traces aren't affected.
> [tab] Helm values file
>
> Add `exporters` and `service.pipelines` blocks to both the
> `nodeCollector.configOverlay` and `clusterCollector.configOverlay` sections
> of your Helm values file.
>
> ```yaml expandable title="values.yaml" theme={null}
> nodeCollector:
> configOverlay:
> exporters:
> otlphttp/additional:
> endpoint: https://destination.example.com:4318
> service:
> pipelines:
> logs/copy:
> receivers: [forward/cxdot/from-integrations]
> exporters: [forward/cxdot/to-egress, otlphttp/additional]
>
> clusterCollector:
> configOverlay:
> exporters:
> otlphttp/additional:
> endpoint: https://destination.example.com:4318
> service:
> pipelines:
> logs/copy:
> receivers: [forward/cxdot/from-integrations]
> exporters: [forward/cxdot/to-egress, otlphttp/additional]
> ```
> [tab] Configuration file
>
> Add `exporters` and `service.pipelines` as top-level blocks in your configuration
> file.
>
> ```yaml expandable title="config.yaml" theme={null}
> cxdot:
> # ...
>
> exporters:
> otlphttp/additional:
> endpoint: https://destination.example.com:4318
>
> service:
> pipelines:
> logs/copy:
> receivers: [forward/cxdot/from-integrations]
> exporters: [forward/cxdot/to-egress, otlphttp/additional]
> ```
#### Send batched telemetry data to an additional destination
Telemetry data exported through `forward/cxdot/to-egress` is batched before being
sent to Cortex XCOR, but other exporters don't batch data by default. To batch
telemetry data sent through another exporter, add a `batch` processor to the pipeline
for that destination.
The following example creates two custom pipelines. The first custom pipeline, named
`logs/copy`, sends logs to Cortex XCOR using the `forward/cxdot/to-egress` exporter,
and also routes a copy of that log data to the second pipeline. The second custom
pipeline, named `logs/additional`, uses a batch processor to batch these logs before
sending them to an OTLP HTTP endpoint. Metrics and traces aren't affected.
> [tab] Helm values file
>
> Add `connectors`, `exporters`, `processors`, and `service.pipelines` blocks to
> both the `nodeCollector.configOverlay` and `clusterCollector.configOverlay`
> sections of your Helm values file.
>
> ```yaml expandable title="values.yaml" theme={null}
> nodeCollector:
> configOverlay:
> connectors:
> forward/additional: {}
> exporters:
> otlphttp/additional:
> endpoint: https://destination.example.com:4318
> processors:
> batch/additional: {}
> service:
> pipelines:
> logs/copy:
> receivers: [forward/cxdot/from-integrations]
> exporters: [forward/cxdot/to-egress, forward/additional]
> logs/additional:
> receivers: [forward/additional]
> processors: [batch/additional]
> exporters: [otlphttp/additional]
>
> clusterCollector:
> configOverlay:
> connectors:
> forward/additional: {}
> exporters:
> otlphttp/additional:
> endpoint: https://destination.example.com:4318
> processors:
> batch/additional: {}
> service:
> pipelines:
> logs/copy:
> receivers: [forward/cxdot/from-integrations]
> exporters: [forward/cxdot/to-egress, forward/additional]
> logs/additional:
> receivers: [forward/additional]
> processors: [batch/additional]
> exporters: [otlphttp/additional]
> ```
> [tab] Configuration file
>
> Add `connectors`, `exporters`, `processors`, and `service.pipelines` as top-level
> blocks in your configuration file.
>
> ```yaml expandable title="config.yaml" theme={null}
> cxdot:
> # ...
>
> connectors:
> forward/additional: {}
>
> exporters:
> otlphttp/additional:
> endpoint: https://destination.example.com:4318
>
> processors:
> batch/additional: {}
>
> service:
> pipelines:
> logs/copy:
> receivers: [forward/cxdot/from-integrations]
> exporters: [forward/cxdot/to-egress, forward/additional]
> logs/additional:
> receivers: [forward/additional]
> processors: [batch/additional]
> exporters: [otlphttp/additional]
> ```
## Configure per-integration behavior
Each custom pipeline applies to either metrics, logs, or traces, and by default
affects data of that telemetry type from all enabled integrations. For example, a
pipeline for traces affects trace data from every integration that collects traces.
To change this behavior, use the `xcor.integration.name` attribute and
`cxdot.integration.instance.name` attribute to configure per-integration behavior for
your custom pipelines. This lets custom pipelines selectively route and process
telemetry data from specified integrations without affecting other integrations.
The `xcor.integration.name` attribute identifies an integration type. For example,
this `condition` block matches every configured MySQL integration instance. If
multiple MySQL integration instances are configured, it will match them all.
```yaml theme={null}
condition: resource.attributes["xcor.integration.name"] == "mysql"
```
The `cxdot.integration.instance.name` attribute identifies a
[named integration instance](/ingest/xcor/collector/configure/integrations#use-multiple-instances-of-the-same-integration).
Use this attribute in conjunction with the `xcor.integration.name` attribute. For
example, this `condition` block matches a configured NGINX integration with the
instance name `bravo`:
```yaml theme={null}
condition: resource.attributes["xcor.integration.name"] == "nginx" and resource.attributes["cxdot.integration.instance.name"] == "bravo"
```
### Process telemetry data from one integration type
The following example creates a custom pipeline named `metrics/filter-mysql` that
drops the `mysql.locks` metric from all instances of the
[MySQL integration](/ingest/xcor/integrations/collector/mysql). Metrics from other
integration types aren't affected, and logs and traces aren't affected.
> [tab] Helm values file
>
> Add `processors` and `service.pipelines` blocks to both the
> `nodeCollector.configOverlay` and `clusterCollector.configOverlay` sections of
> your Helm values file.
>
> ```yaml expandable title="values.yaml" theme={null}
> nodeCollector:
> configOverlay:
> processors:
> filter/mysql-noise:
> metrics:
> metric:
> - 'resource.attributes["xcor.integration.name"] == "mysql" and name == "mysql.locks"'
> service:
> pipelines:
> metrics/filter-mysql:
> receivers: [forward/cxdot/from-integrations]
> processors: [filter/mysql-noise]
> exporters: [forward/cxdot/to-egress]
>
> clusterCollector:
> configOverlay:
> processors:
> filter/mysql-noise:
> metrics:
> metric:
> - 'resource.attributes["xcor.integration.name"] == "mysql" and name == "mysql.locks"'
> service:
> pipelines:
> metrics/filter-mysql:
> receivers: [forward/cxdot/from-integrations]
> processors: [filter/mysql-noise]
> exporters: [forward/cxdot/to-egress]
> ```
> [tab] Configuration file
>
> Add `processors` and `service.pipelines` as top-level blocks in your configuration
> file.
>
> ```yaml expandable title="config.yaml" theme={null}
> cxdot:
> # ...
>
> processors:
> filter/mysql-noise:
> metrics:
> metric:
> - 'resource.attributes["xcor.integration.name"] == "mysql" and name == "mysql.locks"'
>
> service:
> pipelines:
> metrics/filter-mysql:
> receivers: [forward/cxdot/from-integrations]
> processors: [filter/mysql-noise]
> exporters: [forward/cxdot/to-egress]
> ```
### Route telemetry data from one integration type
The following example creates three custom pipelines. The first custom pipeline,
named `metrics/route-integrations`, receives metrics from all integrations and sends
them to a routing connector, which routes metrics to one of two branching pipelines.
The `metrics/mysql` pipeline sends metrics from all instances of the
[MySQL integration](/ingest/xcor/integrations/collector/mysql) to Cortex XCOR and
an additional destination. The `metrics/other` pipeline sends metrics from all other
integration types to Cortex XCOR.
Metrics from all integrations are sent to Cortex XCOR, but only metrics from
instances of the MySQL integration are sent to the additional destination. Logs and
traces aren't affected.
> [tab] Helm values file
>
> Add `connectors`, `exporters`, and `service.pipelines` blocks to both the
> `nodeCollector.configOverlay` and `clusterCollector.configOverlay` sections of
> your Helm values file.
>
> ```yaml expandable title="values.yaml" theme={null}
> nodeCollector:
> configOverlay:
> connectors:
> routing/metrics:
> default_pipelines: [metrics/other]
> table:
> - context: resource
> condition: resource.attributes["xcor.integration.name"] == "mysql"
> pipelines: [metrics/mysql]
> exporters:
> otlphttp/additional:
> endpoint: https://destination.example.com:4318
> service:
> pipelines:
> metrics/route-integrations:
> receivers: [forward/cxdot/from-integrations]
> exporters: [routing/metrics]
> metrics/mysql:
> receivers: [routing/metrics]
> exporters: [forward/cxdot/to-egress, otlphttp/additional]
> metrics/other:
> receivers: [routing/metrics]
> exporters: [forward/cxdot/to-egress]
>
> clusterCollector:
> configOverlay:
> connectors:
> routing/metrics:
> default_pipelines: [metrics/other]
> table:
> - context: resource
> condition: resource.attributes["xcor.integration.name"] == "mysql"
> pipelines: [metrics/mysql]
> exporters:
> otlphttp/additional:
> endpoint: https://destination.example.com:4318
> service:
> pipelines:
> metrics/route-integrations:
> receivers: [forward/cxdot/from-integrations]
> exporters: [routing/metrics]
> metrics/mysql:
> receivers: [routing/metrics]
> exporters: [forward/cxdot/to-egress, otlphttp/additional]
> metrics/other:
> receivers: [routing/metrics]
> exporters: [forward/cxdot/to-egress]
> ```
> [tab] Configuration file
>
> Add `connectors`, `exporters`, and `service.pipelines` as top-level blocks in your
> configuration file.
>
> ```yaml expandable title="config.yaml" theme={null}
> cxdot:
> # ...
>
> connectors:
> routing/metrics:
> default_pipelines: [metrics/other]
> table:
> - context: resource
> condition: resource.attributes["xcor.integration.name"] == "mysql"
> pipelines: [metrics/mysql]
>
> exporters:
> otlphttp/additional:
> endpoint: https://destination.example.com:4318
>
> service:
> pipelines:
> metrics/route-integrations:
> receivers: [forward/cxdot/from-integrations]
> exporters: [routing/metrics]
> metrics/mysql:
> receivers: [routing/metrics]
> exporters: [forward/cxdot/to-egress, otlphttp/additional]
> metrics/other:
> receivers: [routing/metrics]
> exporters: [forward/cxdot/to-egress]
> ```
# Configure integrations for the CXDOT Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/configure/integrations
Configure CXDOT Collector integrations to collect telemetry from tools and services.
The CXDOT Collector offers configurable integrations to collect telemetry data from
various tools, apps, and services and send that telemetry data to Palo Alto Networks
Cortex XCOR.
## Available integrations
For a list of available integrations for the CXDOT Collector, see
[CXDOT Collector integrations](/ingest/xcor/integrations/collector). You can also
browse integrations in the [Integrations Hub](/integrate/integrations-hub).
## Configure integrations
To configure integrations for the CXDOT Collector, add and update entries
in the `integrations` section of your configuration file. Before configuring an
integration that collects logs or traces,
[enable telemetry egress](/ingest/xcor/collector/configure/telemetry-egress)
for that telemetry type.
> [!NOTE]
>
> For information about integration-specific configuration settings, consult the
> documentation for each integration.
When you configure an integration, the CXDOT Collector manages the components required
to collect and route telemetry data to Cortex XCOR. You can configure
integration-specific settings as needed, but you don't need to directly manage
OpenTelemetry components like receivers, processors, or pipelines.
For example, the following configuration snippet configures collection and
timeout settings for the
[NGINX integration](/ingest/xcor/integrations/collector/nginx):
> [tab] Helm values file
>
> ```yaml title="values.yaml" theme={null}
> config:
> integrations:
> nginx:
> enabled: true
> collection_interval: 30s
> timeout: 5s
> ```
> [tab] Configuration file
>
> ```yaml title="config.yaml" theme={null}
> cxdot:
> integrations:
> nginx:
> enabled: true
> collection_interval: 30s
> timeout: 5s
> ```
### Use multiple instances of the same integration
To use multiple instances of the same integration, each instance of that
integration must be nested under a unique YAML key. Create unique keys by assigning
names to your integration instances.
The following example configures three instances of the NGINX integration: an unnamed
`nginx` instance, an instance named `bravo` nested under the key `nginx/bravo`, and
an instance named `charlie` nested under the key `nginx/charlie`.
> [tab] Helm values file
>
> ```yaml title="values.yaml" theme={null}
> config:
> integrations:
> nginx:
> enabled: true
> collection_interval: 30s
> timeout: 5s
> nginx/bravo:
> enabled: true
> collection_interval: 10s
> timeout: 15s
> nginx/charlie:
> enabled: true
> collection_interval: 25s
> timeout: 10s
> ```
> [tab] Configuration file
>
> ```yaml title="config.yaml" theme={null}
> cxdot:
> integrations:
> nginx:
> enabled: true
> collection_interval: 30s
> timeout: 5s
> nginx/bravo:
> enabled: true
> collection_interval: 10s
> timeout: 15s
> nginx/charlie:
> enabled: true
> collection_interval: 25s
> timeout: 10s
> ```
# Set the CXDOT Collector schema version
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/configure/schema-version
Set and update the schema version for CXDOT Collector configuration.
The CXDOT Collector uses schema versions so that you can upgrade the Collector
without needing to rewrite your configuration file. If your specified schema version
is older than the active version of your CXDOT Collector, the Collector validates your
configuration file using the schema and default values defined by the schema version,
then [translates](#view-the-translated-version-of-your-configuration-file)
your configuration settings to their equivalent format in the active version.
For example, if a YAML configuration key named `address` was renamed to `ip_address` in v1.15,
but your configuration file specifies `schema_version: v1.14`, the Collector continues to
expect the `address` key in your configuration file.
> [!NOTE]
>
> When the CXDOT Collector translates configuration settings from the specified schema
> version, it doesn't modify your configuration file.
## Set the schema version
Use the `schema_version` field in your configuration file to set the schema version
for your CXDOT Collector configuration file. Replace *`VALUE`* with the version to
use (for example, `v1.14`).
> [tab] Helm values file
>
> ```yaml title="values.yaml" theme={null}
> config:
> schema_version: VALUE
> ```
> [tab] Configuration file
>
> ```yaml title="config.yaml" theme={null}
> cxdot:
> schema_version: VALUE
> ```
The `schema_version` field is required in all Collector configuration files. When you
install the CXDOT Collector in a
[Kubernetes cluster](/ingest/xcor/collector/install/kubernetes), you must specify
this value in your Helm values file. When you install the CXDOT Collector in a
[Linux](/ingest/xcor/collector/install/linux) or
[Windows](/ingest/xcor/collector/install/windows) environment, the example
configuration file includes this field already.
## Upgrade the Collector without updating the schema version
If you upgrade the CXDOT Collector to a newer version, but want to continue using
the same schema version, leave the `schema_version` field unchanged in your configuration
file.
> [!NOTE]
>
> The schema version only governs settings and behavior specific to the CXDOT Collector.
> When you upgrade the Collector to a newer version based on an upgraded version of
> the upstream OpenTelemetry Collector, changes in upstream components will still
> take effect.
## Update schema version
Update the CXDOT Collector's schema version when you need to use a configuration
setting or integration that was introduced in a newer release than your current
schema version. To use a newer schema version, update the value of `schema_version`,
then update your configuration file so that the change takes effect.
Before you update to a newer schema version, compare your current configuration
file with the [translated version](#view-the-translated-version-of-your-configuration-file)
to identify the settings you need to change before you adopt the newer schema.
The Collector rejects configuration settings that don't exist in the specified schema
version. This means that if a field was renamed or removed prior to the newer schema
version, you must rename or remove that field accordingly in your configuration file.
Default values for certain configuration settings can change between Collector releases.
This means that settings not specified in your
configuration file might change behavior in a newer schema version.
For information about the available versions of the Collector and the changes
associated with each, including breaking changes, review the release notes in
Palo Alto Networks Cortex XCOR. In the navigation menu, select
** More information > Release notes**,
and then click the **CXDOT Collector** tab.
## View the translated version of your configuration file
When you use a schema version earlier than the Collector's active version, the
Collector translates your configuration settings to their equivalent format in
the active version, but doesn't modify your configuration file.
To view the schema-translated version of your configuration file, use the CXDOT Collector
[debug interface](/ingest/xcor/collector/debug) to query `config/migrated.yaml`.
You can compare this file against your original configuration file to identify
any fields that were renamed or removed between the schema version and the active
version.
To inspect the differences between your original configuration file and the
translated configuration file, ensure that the debug interface is enabled, then
run the following commands:
> [tab] Kubernetes
>
> ```shell theme={null}
> kubectl exec --namespace cxdot POD -- \
> /bin/cxdot-admin debug get config/original.yaml > original.yaml
>
> kubectl exec --namespace cxdot POD -- \
> /bin/cxdot-admin debug get config/migrated.yaml > migrated.yaml
>
> diff -u original.yaml migrated.yaml
> rm original.yaml migrated.yaml
> ```
>
> Replace *`POD`* with the name of the CXDOT Collector Pod whose configuration
> you want to inspect.
> [tab] Linux
>
> ```shell theme={null}
> cxdot-admin debug get config/original.yaml --socket PATH > original.yaml
> cxdot-admin debug get config/migrated.yaml --socket PATH > migrated.yaml
> diff -u original.yaml migrated.yaml
> rm original.yaml migrated.yaml
> ```
>
> Replace *`PATH`* with your configured debug socket path. If you use the default
> socket path, or if the `CXDOT_DEBUG_SOCKET` environment variable is set, omit
> `--socket PATH`.
> [tab] Windows
>
> ```powershell theme={null}
> $Original = & .\cxdot-admin.exe debug get `
> --socket "PATH" `
> config/original.yaml
>
> $Migrated = & .\cxdot-admin.exe debug get `
> --socket "PATH" `
> config/migrated.yaml
>
> Compare-Object -ReferenceObject $Original -DifferenceObject $Migrated
> ```
>
> Replace *`PATH`* with your configured debug socket path. If you use
> the default socket path, or if the `CXDOT_DEBUG_SOCKET` environment variable is set,
> omit `--socket "PATH"`.
>
> In the resulting output, `<=` identifies lines from the original configuration,
> and `=>` identifies lines from the migrated configuration.
# Enable telemetry egress for the CXDOT Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/configure/telemetry-egress
Control which telemetry types the CXDOT Collector sends to Cortex XCOR.
Telemetry egress controls whether the CXDOT Collector can send each type of telemetry
data to Palo Alto Networks Cortex XCOR. If an enabled integration collects a type of
telemetry data whose egress is disabled, the CXDOT Collector won't send that data
from the integration to Cortex XCOR.
Egress for metrics is enabled by default, but egress for logs and traces is disabled
by default.
> [!NOTE]
>
> Enabling egress for a telemetry type doesn't configure a telemetry source. After
> you enable egress, [configure integrations](/ingest/xcor/collector/configure/integrations)
> to collect telemetry data.
To enable or disable egress for each telemetry type, update your Helm values file
or configuration file:
> [tab] Helm values file
>
> ```yaml title="values.yaml" theme={null}
> config:
> egress:
> tenant:
> signals:
> logs:
> enabled: true
> metrics:
> enabled: true
> traces:
> enabled: true
> ```
> [tab] Configuration file
>
> ```yaml title="config.yaml" theme={null}
> cxdot:
> egress:
> tenant:
> signals:
> logs:
> enabled: true
> metrics:
> enabled: true
> traces:
> enabled: true
> ```
# Debug the CXDOT Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/debug
Query the CXDOT Collector debug interface for configuration and health details.
The CXDOT Collector exposes a debug interface that provides diagnostic information,
including the CXDOT Collector's current configuration settings, component health, and
runtime statistics. This debug interface is separate from runtime logs produced by
the Collector.
The CXDOT Collector's debug interface is enabled by default. The installation
process for the Collector also installs the `cxdot-admin` command-line tool,
which you can use to query the debug interface.
> [!WARNING]
>
> Debug responses redact the values of known secrets, but these responses can
> still expose endpoints, component names, and other deployment details.
## Query the debug interface
The steps to query the debug interface vary based on the environment where the
CXDOT Collector is deployed.
### Kubernetes
Each of the CXDOT Collector's Pods exposes its own debug interface. To query the
debug interface for a Pod, use the following command:
```shell theme={null}
kubectl exec --namespace cxdot POD -- \
/bin/cxdot-admin debug get RESOURCE
```
Replace these values:
* *`POD`*: The name of the Pod whose debug interface you want to query.
* *`RESOURCE`*: The diagnostic resource you want to retrieve (for example,
`health/component_status.json`). If you omit this value, the command returns a
list of the available diagnostic resources.
### Linux
To query the CXDOT Collector's debug interface on Linux, follow these steps.
1. In your configuration file, configure a socket path:
```yaml title="config.yaml" theme={null}
cxdot:
debug:
socket_path: PATH
```
Replace *`PATH`* with the complete path where the CXDOT Collector should create the
socket. This must be a Unix-style absolute path that begins with `/`. The
nearest existing parent directory must be writable by the Collector process.
> [!NOTE]
>
> If the CXDOT Collector runs as the root user, it can write to the default
> socket path at `/var/run/cxdot-collector/debug.sock`.
2. Use the following command to query that socket:
```shell theme={null}
cxdot-admin debug get RESOURCE --socket PATH
```
Replace these values:
* *`RESOURCE`*: The diagnostic resource you want to retrieve (for example,
`health/component_status.json`). If you omit this value, the command returns
a list of the available diagnostic resources.
* *`PATH`*: The socket path that you configured in the previous step.
> [!NOTE]
>
> If you're using the default socket path, omit the `--socket PATH` flag.
### Windows
> Debug paths that begin with a drive letter require CXDOT Collector v1.16 or later.
To query the CXDOT Collector's debug interface on Windows, follow these steps.
1. In your configuration file, configure a socket path:
```yaml title="config.yaml" theme={null}
cxdot:
debug:
socket_path: PATH
```
Replace *`PATH`* with the complete path where the CXDOT Collector should
create the socket.
This path can either be a Windows-style path that begins with a drive letter
(for example, `C:\`) or a Unix-style path that begins with `/`. If you specify
a Unix-style path, the Collector resolves it as a Windows-style absolute path on
the same drive where the Collector is running. For example, if you specify the path
`/cxdot-debug/debug.sock`, and the Collector is running on the `C` drive, this
path resolves to `C:\cxdot-debug\debug.sock`.
2. Use the following command to query that socket:
```shell theme={null}
.\cxdot-admin.exe debug get --socket "PATH" RESOURCE
```
Replace the following values:
* *`PATH`*: The socket path that you configured in the previous step.
* *`RESOURCE`*: The diagnostic resource you want to retrieve (for
example, `health/component_status.json`). If you omit this value, the command
returns a list of the available diagnostic resources.
## Disable debugging
The debug interface is enabled by default. To disable it, set `debug.enabled` to
`false` in your configuration file:
> [tab] Helm values file
>
> ```yaml title="values.yaml" theme={null}
> config:
> debug:
> enabled: false
> ```
> [tab] Configuration file
>
> ```yaml title="config.yaml" theme={null}
> cxdot:
> debug:
> enabled: false
> ```
# Discover Kubernetes scrape targets with the CXDOT Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes
Configure the CXDOT Collector to discover Kubernetes metric scrape targets.
If the CXDOT Collector is deployed in a Kubernetes cluster, it uses autodiscovery to
find supported scrape targets for pull-based metric sources, even as workloads
change. This lets the CXDOT Collector begin collecting metrics when a matching target
appears, and stop collecting metrics when Kubernetes no longer reports that target.
> [!NOTE]
>
> Kubernetes autodiscovery doesn't identify log or trace sources.
## Prerequisites
Before using Kubernetes autodiscovery, you must meet these prerequisites:
* The `config.integrations.discovery.enabled` setting in your Helm values file
must be enabled. If no value is specified, this setting is enabled by default.
This setting lets the CXDOT Collector discover targets.
* The `apiServer.metadataServer.enabled` setting in your Helm values file must
be enabled. If no value is specified, this setting is enabled by default. This
setting lets the CXDOT Collector retrieve Kubernetes metadata, including
metadata used for autodiscovery.
* The [integration](/ingest/xcor/collector/configure/integrations) for the
workload you want to discover must be enabled. All integrations are
enabled by default.
* Ensure that the CXDOT Collector can connect to the workload or service associated
with that integration.
## Use autodiscovery
Autodiscovery is enabled by default. The Collector uses two methods to
discover targets:
[label-based discovery](#use-labels-to-discover-targets), and
[discovery through Datadog annotations](#use-datadog-annotations-to-discover-targets).
> [!NOTE]
>
> If a Pod or container includes both labels and Datadog annotations for the same
> integration, annotation-based targets replace label-based targets. However, if
> none of the matching annotations resolve successfully, the CXDOT Collector uses an
> eligible label-based target instead.
### Use labels to discover targets
The CXDOT Collector uses labels to discover targets when a Pod's labels match the
criteria defined by an enabled integration.
For example, the [NGINX integration](/ingest/xcor/integrations/collector/nginx)
matches Pods with the label `app.kubernetes.io/name: nginx`. When a Pod includes
this label, the Collector discovers that Pod as an NGINX scrape target.
Label discovery criteria vary by integration. For more information, consult the
documentation for each integration.
### Use Datadog annotations to discover targets
The CXDOT Collector uses Datadog annotations to discover targets when a Pod uses
Datadog Autodiscovery annotations that use the v2 `.checks` format and the
corresponding CXDOT Collector integration is enabled. Use this method for workloads
that already have Datadog annotations or need target-specific settings that
label-based discovery can't provide.
> [!NOTE]
>
> Legacy v1 annotations and Datadog exclusion annotations aren't supported.
#### Configure Pod annotations
For a Deployment, DaemonSet, or StatefulSet, add an annotation to the Pod
template in `spec.template.metadata.annotations`. For a standalone Pod, add an
annotation to `metadata.annotations`.
The annotation key must follow this format:
```text theme={null}
ad.datadoghq.com/.checks
```
Replace *``* with the name of the monitored container. In a workload
controller, find this value under `spec.template.spec.containers`.
The value of this annotation must contain a JSON object that defines one or more
Datadog checks. Each top-level key identifies a check, and its `instances` array
provides configuration for one or more endpoints. Each valid instance becomes a
discovered scrape target.
> [!NOTE]
>
> The CXDOT Collector supports a subset of Datadog Autodiscovery configuration. It
> reads the `instances` list and ignores `init_config`, and it processes only the
> check names and instance fields supported by the corresponding CXDOT Collector
> integration. Consult each integration's documentation before reusing an existing
> Datadog annotation.
For example, the following Deployment fragment defines an
[NGINX](/ingest/xcor/integrations/collector/nginx) target:
```yaml theme={null}
spec:
template:
metadata:
annotations:
ad.datadoghq.com/web.checks: |
{
"nginx": {
"instances": [
{
"nginx_status_url": "http://%%host%%:%%port%%/status"
}
]
}
}
spec:
containers:
- name: web
ports:
- containerPort: 80
protocol: TCP
```
In this example, the value `web` in the annotation key identifies the monitored
container and matches `name: web` in the container list. The top-level `nginx`
key in the JSON identifies the Datadog check that the CXDOT Collector maps to the NGINX
integration, and `nginx_status_url` defines the endpoint to monitor. The
[`%%host%%` variable](#use-template-variables) resolves to the Pod IP address,
and `%%port%%` resolves to the highest-numbered TCP port declared by the `web`
container.
#### Use template variables
The CXDOT Collector supports the following template variables inside `instances`
entries. The Collector replaces these variables with their associated value
before using the entry to define a scrape target.
> [!NOTE]
>
> The CXDOT Collector resolves these variables relative to the container specified
> in the annotation key.
| Variable | Value |
| - | - |
| `%%host%%` | The IP address of the Pod that contains the specified container. |
| `%%port%%` | The highest-numbered TCP port declared by the specified container. |
| `%%port_NAME%%` | The specified container's TCP port whose `name` field matches *`NAME`*. |
| `%%port_INDEX%%` | The TCP port at the zero-based position specified by *`INDEX`*, after the Collector sorts the specified container's TCP ports from lowest to highest. |
| `%%kube_namespace%%` | The Kubernetes namespace that contains the annotated Pod. |
| `%%env_VAR%%` | The value of the environment variable specified by *`VAR`*. This must be an environment variable available to the CXDOT Collector process. A variable that exists only in the Pod or container being monitored won't resolve. For more information, see [Use environment variables](#use-environment-variables). |
#### Use environment variables
Use the `%%env_VAR%%` [template variable](#use-template-variables) inside
`instances` entries to reference an environment variable available to the
CXDOT Collector process.
No environment variables are allowed by default. To use `%%env_VAR%%` in annotations,
ensure that the variable exists in the environment where the Collector is deployed,
then add its name to `allowed_env_vars` in your Helm values file:
```yaml title="values.yaml" theme={null}
config:
integrations:
discovery:
kubernetes:
allowed_env_vars:
- NAME_OF_ENVIRONMENT_VARIABLE
```
Environment variable names are case-sensitive. If a referenced variable is
unavailable or isn't listed in `allowed_env_vars`, the CXDOT Collector skips the
affected instance.
#### Use Kubernetes Secrets
Use the following syntax inside `instances` entries to retrieve the value of a
Kubernetes Secret:
```text theme={null}
ENC[k8s_secret@NAMESPACE/SECRET/KEY]
```
Replace the following:
* *`NAMESPACE`*: The namespace that contains the Secret.
* *`SECRET`*: The name of the Secret.
* *`KEY`*: The key that contains the value to retrieve.
No Secrets are allowed by default. To use Kubernetes Secrets in annotations, add
each required Secret to `secretAllowlist` in your Helm values file:
```yaml title="values.yaml" theme={null}
apiServer:
metadataServer:
secretAllowlist:
- namespace: default
names:
- SECRET
```
> [!NOTE]
>
> Secrets must be in the same namespace as the annotated Pod.
## Configure autodiscovery behavior
Use the information in this section to configure the CXDOT Collector's autodiscovery
behavior.
### Set the Kubernetes polling interval
By default, the CXDOT Collector polls for changes to targets every 30 seconds. To
change this polling interval, set the value of `node_poll_interval`:
```yaml title="values.yaml" theme={null}
config:
integrations:
discovery:
kubernetes:
node_poll_interval: 15s
```
This must be a positive, non-zero value. Shorter intervals let the Collector
detect target changes sooner, but also increase request load on the
[CXDOT API server](/ingest/xcor/collector/install/kubernetes/architecture#api-server).
### Filter discovered targets by namespace
By default, the CXDOT Collector can discover supported targets in any namespace. To
limit autodiscovery to specific namespaces, configure
`include_metrics.kube_namespace` and `exclude_metrics.kube_namespace`. These
settings accept RE2 regular expressions. The Collector matches each expression
against the entire namespace name.
When `include_metrics.kube_namespace` is set, the Collector discovers targets
only in matching namespaces. When `exclude_metrics.kube_namespace` is set, the
Collector ignores namespaces that match this value. Exclusion expressions take
precedence over inclusion expressions.
For example, the following configuration discovers targets only in namespaces
that begin with `prod-` or `staging-`, except for `staging-canary`:
```yaml title="values.yaml" theme={null}
config:
integrations:
discovery:
include_metrics:
kube_namespace: "(prod|staging)-.*"
exclude_metrics:
kube_namespace: "staging-canary"
```
> [!NOTE]
>
> These settings don't affect static targets or other collection paths.
### Use both discovered targets and static targets for the same integration type
Static targets are endpoints that are explicitly listed in an integration's
configuration settings. For a given instance of an integration, setting static
targets disables autodiscovery for that instance.
To use both discovered targets and static targets for the same integration type,
define two instances of the integration, then configure static targets for only
one instance of that integration:
```yaml title="values.yaml" theme={null}
config:
integrations:
nginx/first-instance:
enabled: true
nginx/second-instance:
enabled: true
endpoints:
- endpoint: nginx1.example.com:80
- endpoint: nginx2.example.com:80
```
### Disable autodiscovery
To disable autodiscovery, set `config.integrations.discovery.enabled` to `false`:
```yaml title="values.yaml" theme={null}
config:
integrations:
discovery:
enabled: false
```
> [!NOTE]
>
> Don't set `apiServer.metadataServer.enabled` to `false` solely to disable
> autodiscovery. Disabling the metadata server also disables other features of the
> CXDOT Collector.
# Install the CXDOT Collector in a Kubernetes cluster
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes
Install the CXDOT Collector in a Kubernetes cluster.
Install the CXDOT Collector in your Kubernetes cluster to collect telemetry data
and send that telemetry data to Palo Alto Networks Cortex XCOR.
## Supported environments and distributions
The CXDOT Collector supports Kubernetes clusters running in a Linux environment
with either x86\_64 (AMD64) or ARM64 architecture.
The following Kubernetes distributions are supported:
* Upstream Kubernetes (self-managed or on-premises)
* Amazon EKS
* Google GKE
* Azure AKS
## Prerequisites
Before installing the CXDOT Collector in a Kubernetes cluster, you must meet
these prerequisites:
* Your Kubernetes cluster must use Kubernetes version 1.31 or later.
* You must have Helm version 3.8 or later installed.
* You must have an API token from a
[restricted service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account)
with a write-only scope.
## Install
To install the CXDOT Collector in a Kubernetes cluster, follow these steps.
1. Run the following kubectl command to create the `cxdot` namespace:
```shell theme={null}
kubectl create namespace cxdot
```
2. Set your configuration schema version, Cortex XCOR tenant name, and cluster name
in your Helm values file:
```yaml title="values.yaml" theme={null}
config:
schema_version: VERSION
orgName: TENANT
clusterName: CLUSTER
```
Replace the following values:
* *`VERSION`*: The CXDOT Collector
[schema version](/ingest/xcor/collector/configure/schema-version) to use (for example, `v1.23`).
* *`TENANT`*: The name of your Cortex XCOR tenant.
* *`CLUSTER`*: The name of the cluster where you're installing the CXDOT
Collector. This value gets added to your telemetry data as the
`k8s.cluster.name` resource attribute.
3. Set your API token by creating a
[Kubernetes Secret](https://kubernetes.io/docs/concepts/configuration/secret/)
named `cxdot-api-token` with the following contents:
```yaml theme={null}
apiVersion: v1
kind: Secret
metadata:
name: cxdot-api-token
namespace: cxdot
type: Opaque
data:
api-token: "TOKEN"
```
Replace *`TOKEN`* with your base64-encoded Cortex XCOR API token.
> [!NOTE]
>
> Alternatively, you can reference an existing Kubernetes Secret by supplying
> it to Helm as the value of `config.apiToken`. If you use this method,
> don't encode the value of your API token.
4. Run the following Helm command to install the CXDOT Collector in your
Kubernetes cluster:
```shell theme={null}
helm install cxdot-collector \
oci://us-docker.pkg.dev/chronosphereio/helm/cxdot-collector \
--version "VERSION" \
--namespace cxdot \
-f values.yaml
```
Replace *`VERSION`* with the version of the CXDOT Collector to use (for
example, `1.9.0`).
To find the latest version, view the CXDOT Collector release notes in Cortex XCOR. In
the navigation menu, select
** More information > Release notes**,
and then click the **CXDOT Collector** tab.
5. Run the following `kubectl` command to verify that the CXDOT Collector was
installed successfully:
```shell theme={null}
kubectl -n cxdot get ds,deploy
```
Confirm that the output returns a list of resources that includes
`ds/cxdot-node-collector`, `deploy/cxdot-api-server`, and
`deploy/cxdot-cluster-collector`. These are
[components](/ingest/xcor/collector/install/kubernetes/architecture) of the
CXDOT Collector.
After you install the CXDOT Collector, the Collector uses the
[Kubernetes](/ingest/xcor/integrations/collector/kubernetes)
integration to collect metrics from your Kubernetes cluster. Configure this
integration to customize or disable its behavior.
## Upgrade
To upgrade the CXDOT Collector to a new version, or after updating configuration
settings in your Helm values file, run the following command:
```shell theme={null}
helm upgrade cxdot-collector \
oci://us-docker.pkg.dev/chronosphereio/helm/cxdot-collector \
--version "VERSION" \
--namespace cxdot \
-f values.yaml
```
Replace *`VERSION`* with the version of the CXDOT Collector to use (for example,
`1.9.0`).
To find the latest version, view the CXDOT Collector release notes in Cortex XCOR. In
the navigation menu, select
** More information > Release notes**,
and then click the **CXDOT Collector** tab.
> [!NOTE]
>
> When you upgrade the CXDOT Collector, your configured
> [`schema_version` value](/ingest/xcor/collector/configure/schema-version)
> stays the same. To update the active schema version, you must change this value
> manually.
## Uninstall
To uninstall the CXDOT Collector, follow these steps.
1. Run the following Helm command to uninstall the components of the CXDOT
Collector:
```shell theme={null}
helm uninstall cxdot-collector --namespace cxdot
```
2. Run the following kubectl command to delete the namespace associated with
the CXDOT Collector:
```shell theme={null}
kubectl delete namespace cxdot
```
# Kubernetes architecture of the CXDOT Collector
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture
Learn how the CXDOT Collector deploys components in a Kubernetes cluster.
The CXDOT Collector is a single container image that contains the `cxdot-collector`
binary. When you [install](/ingest/xcor/collector/install/kubernetes) the CXDOT Collector
in a Kubernetes cluster, the CXDOT Collector deploys several components that work in
tandem to collect telemetry data and send that data to Palo Alto Networks Cortex XCOR.
```mermaid actions={false} theme={null}
graph TB
accTitle: CXDOT Kubernetes architecture
accDescr: The CXDOT Collector deploys several components in a Kubernetes cluster. Telemetry data flows to the Cortex XCOR OTLP Ingestion API.
subgraph cloud["Cloud environment"]
subgraph cluster["Kubernetes cluster"]
subgraph node["Kubernetes node"]
direction TB
app["App Pod"]
nc["CXDOT node collector (DaemonSet)"]
subgraph targets["Local scrape targets"]
direction TB
infrapod["Infra Pod"]
kubelet["kubelet"]
runtime["Container runtime"]
end
app --> nc
nc --> infrapod
nc --> kubelet
nc --> runtime
end
cc["CXDOT cluster collector (Deployment)"]
api["CXDOT API server (Deployment)"]
k8s["Kubernetes API server"]
end
managed["Managed services"]
end
ingestion["Cortex XCOR OTLP Ingestion API"]
nc .-> api
cc .-> api
cc --> managed
k8s <--> api
k8s <--> cc
nc ==> ingestion
cc ==> ingestion
managed ~~~ ingestion
classDef cxdot fill:#007A3D,stroke:#000,stroke-width:2px,color:#FFFFFF;
classDef workload fill:#E8D5F5,stroke:#6320EE,stroke-width:1px,color:#000;
classDef infra fill:#FFF,stroke:#999,stroke-width:1px,stroke-dasharray:5 5,color:#000;
classDef otl fill:lightblue,stroke:#000,stroke-width:2px,color:#000;
class nc,cc,api cxdot
class app,infrapod,managed workload
class kubelet,runtime,k8s infra
class ingestion otl
```
The CXDOT Collector deploys these components to collect telemetry data from your
Kubernetes workloads:
* The [node collector](#node-collector) is a DaemonSet with one Pod on each
eligible node.
* The [cluster collector](#cluster-collector) is a Deployment with one or more
worker Pods.
* The [API server](#api-server) provides cluster-wide services that support the
node collector and cluster collector.
## Node collector
The node collector is a DaemonSet with one Pod on each eligible node. It uses
push-based collection when it listens for HTTP and UDP requests from application
Pods on the same node. It uses pull-based collection when it queries Pods on the
same node to collect data from infrastructure services, such as MySQL. The node
collector also gathers information about the node itself through the kubelet API
and through the container runtime.
After it collects telemetry data, the node collector sends that data to
Cortex XCOR through the
[Cortex XCOR OTLP Ingestion API](/ingest/logs/otel-logs#otlp-endpoint-urls).
## Cluster collector
The cluster collector is a Deployment with one or more worker Pods. It handles
cluster-wide collection tasks, like running the OpenTelemetry `k8scluster`
receiver to gather data from the Kubernetes API. It also collects telemetry data
from managed services that are accessible only from within your cloud
environment.
By default, the cluster collector deploys two replicas. You can change this
behavior by setting the value of `clusterCollector.replicas` in your Helm values
file.
After it collects telemetry data, the cluster collector sends that data to
Cortex XCOR through the
[Cortex XCOR OTLP Ingestion API](/ingest/logs/otel-logs#otlp-endpoint-urls).
## API server
The CXDOT API server provides cluster-wide services that support the node collector
and cluster collector. Its primary function is to cache the state of Kubernetes
resources in your cluster, which helps determine which attributes to add to the
telemetry data collected by the node collector and cluster collector. The API server
does this by using watch streams to keep the cache current and by responding to
queries from the node collector and cluster collector.
The CXDOT API server also hosts a mutating admission controller webhook that, when
enabled, returns a set of mutations to apply to new Pods before their creation.
These mutations inject information into Pods for use by instrumentation SDKs.
> [!NOTE]
>
> The CXDOT API server doesn't directly collect or handle telemetry data.
# Install the CXDOT Collector on Linux
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/linux
Install the CXDOT Collector in a supported Linux environment.
Install the CXDOT Collector on Linux to collect telemetry data and send that
telemetry data to Palo Alto Networks Cortex XCOR.
## Supported environments and distributions
The CXDOT Collector supports Linux environments with either x86\_64 (AMD64) or
ARM64 architecture, on distributions based on Linux kernel version 3.2 or later.
## Prerequisites
Before installing the CXDOT Collector on Linux, you must meet these
prerequisites:
* You must have `curl` installed.
* You must have `tar` installed.
* You must have either `sha256sum` or `shasum` installed.
* You must have an API token from a
[restricted service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account)
with a write-only scope.
## Install
To install the CXDOT Collector on Linux, follow these steps.
> [!NOTE]
>
> For a long-running deployment, install the CXDOT Collector in a stable location, and
> use your distribution's service manager to run the Collector.
1. Run the following command to download and install the CXDOT Collector:
```shell theme={null}
CXDOT_COLLECTOR_VERSION="VALUE"
curl -fsSL "https://artifactregistry.googleapis.com/download/v1/projects/chronosphereio/locations/us/repositories/release-binaries/files/cxdot-collector%3A${CXDOT_COLLECTOR_VERSION}%3Acxdot-collector-install.sh:download?alt=media" | sh
```
Replace *`VALUE`* with the version of the CXDOT Collector to use (for
example, `1.9.0`).
To find the latest version, view the CXDOT Collector release notes in Cortex XCOR. In
the navigation menu, select
** More information > Release notes**,
and then click the **CXDOT Collector** tab.
This script creates `cxdot-collector` and `cxdot-admin` in `/usr/local/bin`,
and an example configuration file and a software license in
`/usr/local/share/cxdot-collector`. The script requests `sudo` access if these
directories aren't writable.
2. Run the following command to make a copy of the example configuration file:
```shell theme={null}
cp /usr/local/share/cxdot-collector/config-example.yaml ./config.yaml
```
3. In the environment where the CXDOT Collector is deployed, create an environment
variable named `XCOR_API_TOKEN`, and set its value to your Cortex XCOR API
token.
4. Add the `api_token` key to your YAML configuration file, and set its value to
`${env:XCOR_API_TOKEN}`:
```yaml title="config.yaml" theme={null}
cxdot:
egress:
tenant:
api_token: ${env:XCOR_API_TOKEN}
```
5. Set the name of your Cortex XCOR tenant by adding the following key to your YAML
configuration file:
```yaml title="config.yaml" theme={null}
cxdot:
egress:
tenant:
org_name: TENANT
```
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
6. Run the following command to start the CXDOT Collector:
```shell theme={null}
cxdot-collector --config ./config.yaml
```
The CXDOT Collector writes logs to `stdout`. To confirm that the Collector is
running, look for the message `Everything is ready`.
Additionally, you can confirm whether
[host metrics](/ingest/xcor/integrations/collector/host) appear in your
Cortex XCOR tenant. By default, the CXDOT Collector collects
telemetry data from your host environment, like information about memory,
network activity, and uptime. If these metrics appear in your tenant, that means
the Collector started up successfully.
After you install the CXDOT Collector, the Collector uses the
[Host](/ingest/xcor/integrations/collector/host)
integration to collect operating system metrics from your Linux host. Configure this
integration to customize or disable its behavior.
## Upgrade
To upgrade the CXDOT Collector to a new version, run the same command that you used
to [install](#install) the Collector:
```shell theme={null}
CXDOT_COLLECTOR_VERSION="VALUE"
curl -fsSL "https://artifactregistry.googleapis.com/download/v1/projects/chronosphereio/locations/us/repositories/release-binaries/files/cxdot-collector%3A${CXDOT_COLLECTOR_VERSION}%3Acxdot-collector-install.sh:download?alt=media" | sh
```
Replace *`VALUE`* with the new version of the CXDOT Collector to use (for
example, `1.9.0`).
> [!NOTE]
>
> When you upgrade the CXDOT Collector, your configured
> [`schema_version` value](/ingest/xcor/collector/configure/schema-version)
> stays the same. To update the active schema version, you must change this value
> manually.
# Install the CXDOT Collector on Windows
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/windows
Install the CXDOT Collector in a supported Windows environment.
Install the CXDOT Collector on Windows to collect telemetry data and send that
telemetry data to Palo Alto Networks Cortex XCOR.
## Supported environments and versions
The CXDOT Collector supports Windows environments with either x86\_64 (AMD64) or ARM64
architecture, on Windows 10 version 1803 or later or Windows Server 2019 or later.
## Prerequisites
Before installing the CXDOT Collector on Windows, you must meet these prerequisites:
* `tar.exe` must be available on your `PATH`.
* You must have Windows PowerShell 5.1 or later installed.
* You must have an API token from a
[restricted service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account)
with a write-only scope.
## Install
To install the CXDOT Collector on Windows, follow these steps.
> [!NOTE]
>
> For a long-running deployment, install the CXDOT Collector in a stable location, and
> register the Collector as a Windows service.
1. Run the following command to download and install the CXDOT Collector:
```shell theme={null}
$CxdotCollectorVersion = "VALUE"
$EncodedVersion = [Uri]::EscapeDataString($CxdotCollectorVersion)
$InstallerUrl = "https://artifactregistry.googleapis.com/download/v1/projects/chronosphereio/locations/us/repositories/release-binaries/files/cxdot-collector%3A$EncodedVersion%3Acxdot-collector-install.ps1:download?alt=media"
$InstallDir = Join-Path $PWD "cxdot-collector"
$Installer = (Invoke-WebRequest -UseBasicParsing -Uri $InstallerUrl).Content
& ([ScriptBlock]::Create($Installer)) -InstallDir $InstallDir
```
Replace *`VALUE`* with the version of the CXDOT Collector to use (for
example, `1.9.0`).
To find the latest version, view the CXDOT Collector release notes in Cortex XCOR. In
the navigation menu, select
** More information > Release notes**,
and then click the **CXDOT Collector** tab.
This script creates `cxdot-collector.exe`, `cxdot-admin.exe`, an example
configuration file, and a software license in `.\cxdot-collector`.
2. Run the following command to make a copy of the example configuration file:
```shell theme={null}
$InstallDir = Join-Path $PWD "cxdot-collector"
Copy-Item (Join-Path $InstallDir "config-example.yaml") (Join-Path $InstallDir "config.yaml")
notepad.exe (Join-Path $InstallDir "config.yaml")
```
3. In the environment where the CXDOT Collector is deployed, create an environment
variable named `XCOR_API_TOKEN`, and set its value to your
Cortex XCOR API token.
4. Add the `api_token` key to your YAML configuration file, and set its value to
`${env:XCOR_API_TOKEN}`:
```yaml title="config.yaml" theme={null}
cxdot:
egress:
tenant:
api_token: ${env:XCOR_API_TOKEN}
```
5. Set the name of your Cortex XCOR tenant by adding the following key to your YAML
configuration file:
```yaml title="config.yaml" theme={null}
cxdot:
egress:
tenant:
org_name: TENANT
```
Replace *`TENANT`* with the name of your Cortex XCOR tenant.
6. Run the following command to start the CXDOT Collector:
```shell theme={null}
$InstallDir = Join-Path $PWD "cxdot-collector"
& (Join-Path $InstallDir "cxdot-collector.exe") `
--config (Join-Path $InstallDir "config.yaml") `
--set cxdot.debug.enabled=false
```
The CXDOT Collector writes logs to `stdout`. To confirm that the Collector is running,
look for the message `Everything is ready`.
Additionally, you can confirm whether
[host metrics](/ingest/xcor/integrations/collector/host) appear in your
Cortex XCOR tenant. By default, the CXDOT Collector collects
telemetry data from your host environment, like information about memory,
network activity, and uptime. If these metrics appear in your tenant, that means
the Collector started up successfully.
After you install the CXDOT Collector, the Collector uses the
[Host](/ingest/xcor/integrations/collector/host) and [Windows](/ingest/xcor/integrations/collector/windows)
integrations to collect operating system metrics from your Windows host. Configure
these integrations to customize or disable their behavior.
## Upgrade
To upgrade the CXDOT Collector to a new version, follow these steps:
1. Stop any active Collector processes.
2. Run the same command that you used to [install](#install) the Collector:
```shell theme={null}
$CxdotCollectorVersion = "VALUE"
$EncodedVersion = [Uri]::EscapeDataString($CxdotCollectorVersion)
$InstallerUrl = "https://artifactregistry.googleapis.com/download/v1/projects/chronosphereio/locations/us/repositories/release-binaries/files/cxdot-collector%3A$EncodedVersion%3Acxdot-collector-install.ps1:download?alt=media"
$InstallDir = "DIRECTORY"
$Installer = (Invoke-WebRequest -UseBasicParsing -Uri $InstallerUrl).Content
& ([ScriptBlock]::Create($Installer)) -InstallDir $InstallDir
```
Replace the following values:
* *`VALUE`*: The new version of the CXDOT Collector to use (for example,
`1.9.0`).
* *`DIRECTORY`*: The directory where you originally installed the CXDOT Collector.
To find the latest version, view the CXDOT Collector release notes in Cortex XCOR. In
the navigation menu, select
** More information > Release notes**,
and then click the **CXDOT Collector** tab.
> [!NOTE]
>
> When you upgrade the CXDOT Collector, your configured
> [`schema_version` value](/ingest/xcor/collector/configure/schema-version)
> stays the same. To update the active schema version, you must change this value
> manually.
# XCOR Integrations
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations
Ingest telemetry data from cloud providers and the CXDOT Collector into Cortex XCOR.
Palo Alto Networks Cortex XCOR ingests telemetry data from cloud providers and
from integrations you enable in the [CXDOT Collector](/ingest/xcor/collector).
Browse the full catalog and configure integrations in the
[Integrations Hub](/integrate/integrations-hub).
> [card] [Server integrations](/ingest/xcor/integrations/server)
>
> Ingest telemetry data directly from cloud providers without running a Collector in
> your environment.
> [card] [CXDOT Collector integrations](/ingest/xcor/integrations/collector)
>
> Configure integrations in the CXDOT Collector to route telemetry data to
> Cortex XCOR.
# CXDOT Collector integrations
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector
Use CXDOT Collector integrations to send telemetry data to Palo Alto Networks Cortex XCOR.
The [CXDOT Collector](/ingest/xcor/collector) offers configurable integrations
to collect telemetry data from various tools, apps, and services and send that
data to Palo Alto Networks Cortex XCOR.
To [configure integrations for the CXDOT Collector](/ingest/xcor/collector/configure/integrations),
update the Collector's configuration file. You can browse the full catalog of integrations
in the [Integrations Hub](/integrate/integrations-hub).
> [card] [Apache](/ingest/xcor/integrations/collector/apache)
>
> Apache HTTP Server connection, request, traffic, and worker metrics.
> [card] [Apache Cassandra](/ingest/xcor/integrations/collector/cassandra)
>
> Apache Cassandra node, table, and Java Virtual Machine runtime metrics collected over JMX.
> [card] [cert-manager](/ingest/xcor/integrations/collector/cert_manager)
>
> Certificate lifecycle and expiry metrics from cert-manager, scraped from its controller's Prometheus endpoint.
> [card] [ClickHouse](/ingest/xcor/integrations/collector/clickhouse)
>
> ClickHouse query, connection, merge, and replication metrics.
> [card] [Concourse CI](/ingest/xcor/integrations/collector/concourse_ci)
>
> Concourse build, job scheduling, resource check, worker, garbage collection, database and API metrics, scraped from web nodes' Prometheus endpoint.
> [card] [Consul](/ingest/xcor/integrations/collector/consul)
>
> Consul cluster and catalog health metrics from Consul agents.
> [card] [containerd](/ingest/xcor/integrations/collector/containerd)
>
> Per-container CPU, memory, block I/O, process and uptime metrics from a containerd daemon, plus the size of every image in its store.
> [card] [Datadog](/ingest/xcor/integrations/collector/datadog)
>
> DogStatsD metrics, Datadog APM traces, and APM span metrics from apps instrumented with Datadog clients.
> [card] [Docker](/ingest/xcor/integrations/collector/docker)
>
> Per-container CPU, memory, block I/O, network, process and uptime metrics from a Docker daemon, plus the daemon's own container and image counts.
> [card] [Elasticsearch](/ingest/xcor/integrations/collector/elasticsearch)
>
> Collect cluster, node, index, operating system, process, and JVM metrics from Elasticsearch.
> [card] [Envoy](/ingest/xcor/integrations/collector/envoy)
>
> Envoy listener, cluster, and traffic metrics.
> [card] [HAProxy](/ingest/xcor/integrations/collector/haproxy)
>
> HAProxy connection, request, and session metrics.
> [card] [Hasura](/ingest/xcor/integrations/collector/hasura)
>
> Hasura GraphQL Engine request, subscription, event trigger, and Postgres connection metrics.
> [card] [Apache HBase](/ingest/xcor/integrations/collector/hbase)
>
> Apache HBase master and RegionServer metrics collected over JMX, including requests and latency, regions and store files, the block cache, flushes and compactions, the write-ahead log, and the Java Virtual Machine runtime.
> [card] [Host](/ingest/xcor/integrations/collector/host)
>
> Operating system metrics from the machine running the Collector, including CPU, memory, disk, file system, network, load, paging, process counts, and uptime.
> [card] [HTTP Check](/ingest/xcor/integrations/collector/http_check)
>
> Availability, response time, and certificate expiry metrics for the HTTP endpoints your services depend on.
> [card] [JMX](/ingest/xcor/integrations/collector/jmx)
>
> Runtime metrics from Java apps that expose Java Management Extensions.
> [card] [Apache Kafka](/ingest/xcor/integrations/collector/kafka)
>
> Apache Kafka broker and Java Virtual Machine runtime metrics collected over JMX.
> [card] [Apache Kafka Consumer](/ingest/xcor/integrations/collector/kafka_consumer)
>
> Apache Kafka consumer group offsets and lag, partition offsets and replicas, and cluster broker counts collected from the Kafka admin API.
> [card] [Kubernetes](/ingest/xcor/integrations/collector/kubernetes)
>
> Kubernetes workload, node, cluster state, and control-plane metrics, and Kubernetes logs.
> [card] [Linux](/ingest/xcor/integrations/collector/linux)
>
> Journal records and unit-state metrics from systemd on Linux hosts, optional forwarded syslog records, and target health for the journal, system bus, and listener.
> [card] [MarkLogic](/ingest/xcor/integrations/collector/marklogic)
>
> MarkLogic cluster, database, forest, host, server, request, transaction, storage, and health metrics.
> [card] [Memcached](/ingest/xcor/integrations/collector/memcached)
>
> Memcached cache, operation, and connection metrics.
> [card] [Apache Mesos](/ingest/xcor/integrations/collector/mesos)
>
> Apache Mesos cluster metrics read from the masters' and agents' HTTP APIs, including cluster-wide task, agent, and resource counts, per-framework and per-role allocations, and each agent's tasks, executors, and resources, plus Apache Aurora scheduler metrics, including task counts by state, resource offers, preemptions, and cron activity.
> [card] [Micrometer](/ingest/xcor/integrations/collector/micrometer)
>
> Metrics from Java apps instrumented with Micrometer, including Spring Boot, sent to the CXDOT Collector over OTLP.
> [card] [MongoDB](/ingest/xcor/integrations/collector/mongodb)
>
> MongoDB server performance and health metrics, including operations, connections, locks, WiredTiger cache, replication, and database storage.
> [card] [MySQL](/ingest/xcor/integrations/collector/mysql)
>
> MySQL server performance and health metrics, including buffer pool, connections, commands, query throughput, and index usage.
> [card] [Neo4j](/ingest/xcor/integrations/collector/neo4j)
>
> Neo4j transaction, query, page cache, checkpoint, Bolt connection, and JVM metrics, scraped from the server's Prometheus endpoint.
> [card] [NGINX](/ingest/xcor/integrations/collector/nginx)
>
> NGINX connection and request metrics scraped from the stub\_status endpoint.
> [card] [OpenMetrics](/ingest/xcor/integrations/collector/openmetrics)
>
> Metrics scraped from OpenMetrics and Prometheus endpoints.
> [card] [Oracle Database](/ingest/xcor/integrations/collector/oracle)
>
> Oracle Database health and workload metrics, including sessions, wait and response time, cache hit ratios, I/O, and tablespace usage per pluggable database.
> [card] [OTLP](/ingest/xcor/integrations/collector/otlp)
>
> Logs, metrics, and traces ingested over the OpenTelemetry Protocol from instrumented apps.
> [card] [PostgreSQL](/ingest/xcor/integrations/collector/postgres)
>
> PostgreSQL connection and workload metrics.
> [card] [Redis](/ingest/xcor/integrations/collector/redis)
>
> Redis server health and performance metrics, including memory, clients, commands, keyspace, persistence, replication, and cluster state.
> [card] [SNMP](/ingest/xcor/integrations/collector/snmp)
>
> Availability and performance metrics from SNMP network devices.
> [card] [Apache Spark](/ingest/xcor/integrations/collector/spark)
>
> Apache Spark application metrics read from a driver's REST API, including executor memory and task throughput, garbage collection, shuffle volume, and persisted RDD storage.
> [card] [Microsoft SQL Server](/ingest/xcor/integrations/collector/sqlserver)
>
> Microsoft SQL Server workload, memory, lock, transaction, database, file, and backup metrics.
> [card] [TCP Check](/ingest/xcor/integrations/collector/tcp_check)
>
> Connectivity checks for TCP endpoints — whether a connection to each configured host and port can be established, how long the connect takes, and failed attempts by cause.
> [card] [Temporal](/ingest/xcor/integrations/collector/temporal)
>
> Temporal request, workflow, task, and persistence metrics.
> [card] [Apache Tomcat](/ingest/xcor/integrations/collector/tomcat)
>
> Apache Tomcat application and Java Virtual Machine runtime metrics collected over JMX.
> [card] [Vault](/ingest/xcor/integrations/collector/vault)
>
> Collects cluster health, request performance, token, and storage backend metrics from HashiCorp Vault.
> [card] [VMware vSphere](/ingest/xcor/integrations/collector/vsphere)
>
> Performance counters, inventory and events of vCenter Servers and standalone ESXi hosts — every host and virtual machine's CPU, memory, disk and network counters, guest and host properties, and vCenter events as logs.
> [card] [Windows](/ingest/xcor/integrations/collector/windows)
>
> Windows Event Log records, service-state metrics, and user-selected performance counters for Windows hosts, with per-channel, Service Control Manager, and per-counter-object target health.
> [card] [ZooKeeper](/ingest/xcor/integrations/collector/zookeeper)
>
> ZooKeeper connection, request, latency, and data tree metrics.
For server-side integrations you configure in Cortex XCOR without
running a Collector, see
[Server integrations](/ingest/xcor/integrations/server).
# Apache
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/apache
Apache HTTP Server connection, request, traffic, and worker metrics.
The Apache integration requires CXDOT Collector 1.4.0 or greater.
[Apache HTTP Server](https://httpd.apache.org/) is an open source web server. Use the
Apache CXDOT Collector integration to collect connection, request, traffic, and worker metrics
from Apache HTTP Server instances running in your environment.
The Apache integration supports Apache HTTP Server 2.4.13 or greater.
## Supported telemetry types
The Apache integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Apache integration has the following prerequisites:
* Enable the
[`mod_status` module](https://httpd.apache.org/docs/2.4/mod/mod_status.html). To
confirm that the module is loaded, run:
```shell theme={null}
httpd -M | grep status_module
```
* Make the Apache HTTP Server status endpoint reachable from the Collector.
## Configure
The Apache integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the Apache integration, follow these steps:
1. Configure Apache HTTP Server to expose status information at `/server-status`.
Restrict access because the status endpoint can include information about active
requests and clients. For example:
```apache theme={null}
ExtendedStatus On
SetHandler server-status
Require all granted
```
On Kubernetes, the node Collector is a separate pod on `hostNetwork`, so Apache
sees the node IP, not loopback. `Require local` returns `403` even when the
Collector runs on the same node, and the integration health metric reads `0`. Use
`Require all granted`, or an explicit `Require ip` rule for the Collector, on
the documented Kubernetes path. On hosts where the Collector runs on the same
machine, you can use a tighter
[Apache authorization rule](https://httpd.apache.org/docs/2.4/howto/access.html)
instead.
2. To collect from Apache HTTP Server pods in Kubernetes, add a CXDOT integration
annotation to the pod template. The annotation key must end with the container name.
For example, add the following annotation to your Apache HTTP Server workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/httpd: |
schema_version: v1.14
apache:
endpoints:
- endpoint: ${target.host}:${target.port.http}
spec:
containers:
- name: httpd
image: httpd:2.4
ports:
- name: http
containerPort: 80
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.http}` with the container port named `http`.
The Collector also discovers Apache HTTP Server pods that carry the
`app.kubernetes.io/name: apache` label and listen on port `80`. A CXDOT integration
annotation takes precedence over the label for its container. To stop collecting from
a container, set `apache: {enabled: false}` in the annotation. For more information,
see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
3. Optional: To collect from Apache HTTP Server instances outside your Kubernetes
cluster, configure static targets. For example, add the following to the
`values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
apache:
endpoints:
- endpoint: 10.0.0.5:80
```
A nonempty `endpoints` list disables label and annotation discovery for that
integration instance. The Collector scrapes only the listed targets.
4. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example:
```yaml theme={null}
collection:
cxdot:
integrations:
apache: {}
apache/static:
endpoints:
- endpoint: 10.0.0.5:80
```
The `apache/static` key defines a named instance for the static targets. The bare
`apache` key continues to discover pods.
### Validate
To validate the Apache integration, follow these steps:
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following label filters:
* Set **Label** to `__name__` and **Value** to
`cxdot.integration.target.health`.
* Set **Label** to `cxdot.integration.name` and **Value** to `apache`.
Confirm that the metric reports `1` for each `cxdot.integration.target`.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while the Apache HTTP Server instances receive traffic:
```text theme={null}
sum by ("server.address", "server.port") (rate({"apache.requests"}[$__rate_interval]))
```
Confirm that the query returns a value greater than `0` for each target.
### Troubleshooting
* The CXDOT Collector logs a warning at startup that asks you to enable the
`receiver.apache.enableNewFormatMetrics` feature gate to migrate to new
Apache metric names: this warning is expected and has no effect on
collection. The integration collects the current metric names, which this
page and the Apache dashboard use, and keeps the new names turned off.
Leave the feature gate off.
## Disable the Apache integration
To disable the Apache integration, set `enabled` to `false` in the `values.yaml` file:
```yaml theme={null}
collection:
cxdot:
integrations:
apache:
enabled: false
```
## Configuration reference
Configure one Apache integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.apache`. In a Collector configuration file,
place them under `cxdot.integrations.apache`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Apache integration instance. If true, the Collector runs the instance.
If false, the Collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Apache targets. Specify a target as `host:port` to request
`http://:/server-status?auto`. Specify a full HTTP or HTTPS URL to use a different
status path or transport security. The Collector appends `?auto` when the URL doesn't include
it.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Apache target as either `host:port` or a full HTTP or HTTPS status URL.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
How often the Collector collects metrics from each Apache target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time allowed to collect metrics from one Apache target. The value must not exceed
`collection_interval`.
* **`disable_keep_alives`**
Type: `boolean`. Optional. Default: `true`.
Close the scrape connection after each collection instead of holding it open with keep-alive.
A held keep-alive connection is parked by the event Multi-Processing Module (MPM) and counted
in `apache.connections.async{connection_state="keepalive"}`, so a persistent scrape connection
inflates that value. Set false to reuse one connection across collections.
Annotation-discovered endpoints instead take connection persistence from the annotation's
`persist_connections`, `tls_use_host_header`, `headers`, and `extra_headers` fields.
* **`tls`**
Type: `object`. Optional.
Transport layer security (TLS) settings for the HTTPS targets in `endpoints`. Certificate
verification is enabled unless `insecure_skip_verify` is true. These settings don't apply to
HTTP targets. Discovery annotations can provide target-specific TLS settings.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to the CA cert. For a client this verifies the server certificate. For a server this
verifies client certificates. If empty uses system root CA. (optional)
* **`tls.ca_pem`**
Type: `string`. Optional.
In memory PEM encoded cert. (optional)
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the TLS cert to use for TLS required connections. (optional)
* **`tls.cert_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS cert to use for TLS required connections. (optional)
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a
safe default list is used. See
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go)
for a list of supported cipher suites.
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
contains the elliptic curves that will be used in an ECDHE handshake, in preference order
Defaults to empty list and "crypto/tls" defaults are used, internally.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
If true, load system CA certificates pool in addition to the certificates configured in this
struct.
* **`tls.insecure`**
Type: `boolean`. Optional.
In gRPC and HTTP when set to true, this is used to disable the client transport security. See
[https://godoc.org/google.golang.org/grpc#WithInsecure](https://godoc.org/google.golang.org/grpc#WithInsecure)
for gRPC. Please refer to
[https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for more
information. (optional, default false)
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
InsecureSkipVerify will enable TLS but not verify the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the TLS key to use for TLS required connections. (optional)
* **`tls.key_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS key to use for TLS required connections. (optional)
* **`tls.max_version`**
Type: `string`. Optional.
MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls
for defaults. (optional)
* **`tls.min_version`**
Type: `string`. Optional.
MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used.
(optional)
* **`tls.reload_interval`**
Type: `duration`. Optional.
ReloadInterval specifies the duration after which the certificate will be reloaded If not set,
it will never be reloaded (optional)
* **`tls.server_name_override`**
Type: `string`. Optional.
ServerName requested by client for virtual hosting. This sets the ServerName in the TLSConfig.
Please refer to [https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for
more information. (optional)
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module configuration
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.
# Apache Cassandra
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/cassandra
Apache Cassandra node, table, and Java Virtual Machine runtime metrics collected over JMX.
The Apache Cassandra integration requires CXDOT Collector 1.13.0 or greater.
[Apache Cassandra](https://cassandra.apache.org/) is an open source distributed NoSQL
database. Use the Apache Cassandra integration with the CXDOT Collector to collect node,
table, and Java Virtual Machine (JVM) runtime metrics from Cassandra nodes running in your
environment.
The Apache Cassandra integration supports Apache Cassandra 3.0.29 or greater.
## Supported telemetry types
The Apache Cassandra integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Apache Cassandra integration has the following prerequisites:
* Enable remote Java Management Extensions (JMX) on each Cassandra node. By default,
Cassandra accepts JMX connections only from the machine it runs on. Set the `LOCAL_JMX`
environment variable to `no` before Cassandra starts, or set `LOCAL_JMX=no` in
`cassandra-env.sh`. Cassandra then accepts remote JMX connections on port `7199` and
requires authentication for those connections. For more information, see
[JMX access](https://cassandra.apache.org/doc/latest/cassandra/managing/operating/security.html#jmx-access)
in the Cassandra documentation.
* Create a JMX user for the CXDOT Collector. Cassandra reads JMX users from
`/etc/cassandra/jmxremote.password`, with one username and password per line. Make the
file readable only by the user that runs Cassandra.
* Give the JMX user for the CXDOT Collector read-only access, since the integration only
reads metrics. Name an access file with the `com.sun.management.jmxremote.access.file`
system property, and list the user in it with `readonly` access.
* In production, encrypt JMX connections with Transport Layer Security (TLS). Set the
`com.sun.management.jmxremote.ssl` and `com.sun.management.jmxremote.registry.ssl`
system properties to `true`, and point the `javax.net.ssl.keyStore` system property at
the file that holds the node's certificate and private key. For more information, see
[JMX with SSL](https://cassandra.apache.org/doc/latest/cassandra/managing/operating/security.html#jmx-with-ssl)
in the Cassandra documentation.
For example, the following container environment variables enable remote JMX, an access
file, and TLS for the official Cassandra image. This configuration expects the access
and certificate files at the specified paths and the certificate file's password in the
`cassandra-jmx-tls` Secret:
```yaml theme={null}
env:
- name: LOCAL_JMX
value: "no"
- name: KEYSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: cassandra-jmx-tls
key: keystore-password
- name: JVM_EXTRA_OPTS
value: >-
-Dcom.sun.management.jmxremote.access.file=/etc/cassandra/jmxremote.access
-Dcom.sun.management.jmxremote.ssl=true
-Dcom.sun.management.jmxremote.registry.ssl=true
-Djavax.net.ssl.keyStore=/etc/cassandra/tls/keystore.p12
-Djavax.net.ssl.keyStorePassword=$(KEYSTORE_PASSWORD)
```
* Allow connections from the CXDOT Collector to the JMX registry and server ports on
each Cassandra node. The JMX registry uses port `7199` by default. Cassandra can
advertise a different host and port for the JMX server.
## Configure
The Apache Cassandra integration is enabled by default. Configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the Apache Cassandra integration, follow these steps:
1. To collect from Cassandra pods in Kubernetes, add a CXDOT integration annotation to
the pod template. The annotation key must end with the container name, and its value
can reference JMX credentials stored in a Kubernetes Secret in the same namespace. For
example, add the following annotation to your Cassandra workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/cassandra: |
schema_version: v1.14
cassandra:
endpoints:
- endpoint: ${target.host}:${target.port.jmx}
username: cxdot
password: ${k8s_secret:cassandra-jmx/password}
spec:
containers:
- name: cassandra
image: cassandra:5.0
ports:
- name: jmx
containerPort: 7199
```
The Collector replaces `${target.host}` with the pod IP address, `${target.port.jmx}`
with the container port named `jmx`, and `${k8s_secret:cassandra-jmx/password}` with
the `password` key of the `cassandra-jmx` Secret. To allow the Collector to read the
Secret, add the pod's namespace to `apiServer.metadataServer.secretAllowlist` in the
Helm values for your CXDOT Collector.
2. Optional: To collect from Cassandra nodes outside your Kubernetes cluster, configure
static targets. For example, add the following to the Helm values file for your CXDOT
Collector to read the JMX password from the `cassandra-jmx` Secret:
```yaml theme={null}
nodeCollector:
extraEnv:
- name: CASSANDRA_JMX_PASSWORD
valueFrom:
secretKeyRef:
name: cassandra-jmx
key: password
clusterCollector:
extraEnv:
- name: CASSANDRA_JMX_PASSWORD
valueFrom:
secretKeyRef:
name: cassandra-jmx
key: password
collection:
cxdot:
integrations:
cassandra:
endpoints:
- endpoint: cassandra-0.example.com:7199
- endpoint: cassandra-1.example.com:7199
username: cxdot
password: "${env:CASSANDRA_JMX_PASSWORD}"
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets. In Kubernetes, the cluster Collector
that wins leader election collects from static targets. Every Collector loads the
same integration settings and rejects a `username` without a `password`, so set the
password variable on both the node and cluster Collectors. The `username` and
`password` settings in your Helm values apply to the targets you list there. For an
annotated pod, set them in its CXDOT integration annotation.
If the JMX server host or port that Cassandra advertises isn't reachable from the
CXDOT Collector, set `advertised_host_override` or `advertised_port_override`.
3. Optional: Configure a second integration instance to collect from both annotated pods
and static targets. For example, add the following to the Helm values file for your
CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
cassandra: {}
cassandra/external:
endpoints:
- endpoint: cassandra-0.example.com:7199
username: cxdot
password: "${env:CASSANDRA_JMX_PASSWORD}"
```
The `cassandra/external` key defines a named instance for the static targets. The bare
`cassandra` key continues to discover pods. Set the `CASSANDRA_JMX_PASSWORD`
environment variable on the node and cluster Collectors, as the previous step shows.
4. Optional: If your static Cassandra targets use TLS for JMX, configure the CXDOT
Collector to trust their certificates. For example, add the following to the Helm
values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
cassandra:
registry_tls: true
tls:
ca_file: /etc/cxdot/cassandra-tls/ca.crt
server_name_override: cassandra.example.com
```
The `tls` and `registry_tls` settings in your Helm values apply to the targets you
list there. Mount the certificate authority file into the cluster Collector, which
collects from static targets. To mount the file from a Secret, use the
`clusterCollector.extraVolumes` and `clusterCollector.extraVolumeMounts` Helm values.
For an annotated pod, set `registry_tls` and `tls` in its CXDOT integration
annotation, and supply the certificate authority from a Kubernetes Secret with
`tls.ca_pem: ${k8s_secret:cassandra-tls/ca.crt}`. The Collector rejects an annotation
that sets `tls.ca_file`, or any other setting that names a file, unless the file is
under
`collection.cxdot.integrations.discovery.kubernetes.annotation_restrictions.allowed_collector_file_paths`
in your Helm values, which allows no files by default.
The CXDOT Collector verifies each node's certificate against the host in that target's
endpoint, which for a discovered pod is the pod's IP address. If your certificates
name a different host, set `server_name_override` to a name that every node's
certificate carries.
5. Optional: Disable the integration. For example, add the following to the Helm values
file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
cassandra:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Apache Cassandra integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=cassandra`. Confirm that `cxdot.integration.target.health`
reports `1` for each reachable Cassandra node. A value of `0` means the CXDOT Collector
encountered an error while connecting to or collecting from that node. The
`cxdot.integration.target`, `server.address`, and `server.port` attributes identify
the node.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
sum by ("server.address", "server.port") ({"cassandra.endpoint.count", "cassandra.endpoint.state"="up", "cxdot.integration.name"="cassandra"})
```
Confirm that the query returns one time series per Cassandra node, each reporting the
number of nodes that node sees as up. While every node is up, the value is the number
of nodes in your cluster.
### Troubleshooting
* Metrics for a new table, or for a thread pool the node hasn't used yet, are missing:
Cassandra registers a table's metrics when you create the table, and Cassandra 4.0 and
later create some thread pools when they're first used. The integration refreshes its
list of JMX beans at each `bean_detection_interval`, which defaults to 10 minutes, so the
missing time series appear after the next refresh.
* `cassandra.table.memtable.flushed` and `cassandra.table.compaction.written` are missing:
Cassandra reports these table metrics starting with Cassandra 3.11. A Cassandra 3.0
node doesn't report them.
* `cassandra.table.memtable.space_wait.duration.p75` and
`cassandra.table.memtable.space_wait.duration.p95` always report `0`, or are missing:
Cassandra releases before 5.0 register these percentiles but never record wait values
for them, so they report `0` regardless of the write load. Cassandra 5.0 doesn't report
them.
* A query on one `cassandra.message.type` value finds no dropped messages on some
Cassandra nodes: The message types depend on the Cassandra release. On Cassandra 4.0 and
later, the integration reports nine message types using names from earlier releases,
such as `MUTATION` and `READ`. It reports the remaining types using the request and
response verb names introduced in Cassandra 4.0, such as `MUTATION_RSP`. Summing across
all message types counts all dropped messages for a node in every release.
## Configuration reference
Configure one Apache Cassandra integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.cassandra`. In a Collector
configuration file, place them under `cxdot.integrations.cassandra`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Cassandra integration instance. If true, the Collector runs the
instance. If false, the Collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Cassandra node Java Management Extensions (JMX) targets. When this list is empty or omitted,
the integration uses automatic target discovery. When the list contains targets, this
integration instance collects from exactly those targets and doesn't automatically discover
targets. To combine listed targets with automatic target discovery, list them in a second
named instance. Each endpoint can be a `host:port` Remote Method Invocation (RMI) registry
address or a `service:jmx:rmi` URL.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Cassandra node JMX endpoint as either a `host:port` Remote Method Invocation (RMI) registry
address or a `service:jmx:rmi` URL.
* **`registry_tls`**
Type: `boolean`. Optional. Default: `false`.
Whether to use Transport Layer Security (TLS) for the RMI registry connection. If true, the
Collector uses TLS, which Cassandra requires when it sets
`com.sun.management.jmxremote.registry.ssl` to `true`. If false, the Collector uses an
unencrypted registry connection. The connection to the JMX server returned by the registry
uses TLS whenever Cassandra requires it, regardless of this setting. For targets that
autodiscovery annotations define, the annotation sets this value instead.
* **`advertised_host_override`**
Type: `string`. Optional. Default: empty string.
Host the Collector connects to for the JMX server that the RMI registry returns, instead of
the host that Cassandra advertises. When empty, the Collector connects to the host in the
target's endpoint, so the `java.rmi.server.hostname` setting on the Cassandra node doesn't
affect the Collector.
* **`advertised_port_override`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`. Maximum: `65535`.
Port the Collector connects to for the JMX server that the RMI registry returns, instead of
the port that Cassandra advertises. When set to `0`, the Collector uses the advertised port.
* **`username`**
Type: `string`. Optional.
Username for JMX authentication. Configure `username` and `password` together. For targets
that autodiscovery annotations define, the annotation supplies the credentials instead.
* **`password`**
Type: `string`. Optional.
Password for JMX authentication. Configure `username` and `password` together. For targets
that autodiscovery annotations define, the annotation supplies the credentials instead.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector collects metrics from each Cassandra JMX endpoint. For targets that
autodiscovery annotations define, the annotation sets the interval instead.
* **`bean_detection_interval`**
Type: `duration`. Optional. Default: `10m`.
How often the Collector refreshes the set of available JMX beans. Cassandra registers beans
for tables when they're created and for some thread pools when they're first used, so their
metrics appear after the next refresh.
* **`bean_limit`**
Type: `integer`. Optional. Default: `35000`. Minimum: `1`.
Maximum number of JMX beans the Collector reads from each Cassandra node in one collection.
Cassandra registers a set of beans for each table, so the number of beans grows with the
number of tables. When a node has more matching beans than this limit, the Collector skips
per-table beans first so it can continue reporting node and Java Virtual Machine (JVM)
metrics.
* **`target_system`**
Type: `string`. Optional. Default: `cassandra`.
Comma-delimited attribute mapping names to apply. The Cassandra mapping is enabled by default,
and the JVM mapping is included automatically. Add `-jvm` to disable JVM metrics when at least
one other mapping is configured. For targets that autodiscovery annotations define, the
annotation decides whether to collect JVM metrics, and this setting doesn't apply.
* **`attribute_mapping_paths`**
Type: `array of string`. Optional. Default: `[]`.
Directories and files containing custom JMX attribute mappings. The Collector searches these
paths before the embedded Cassandra and JVM mappings.
* **`tls`**
Type: `object`. Optional. Default: `{}`.
TLS certificate and client authentication settings for RMI registry and server connections.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the JMX
server certificate. If omitted, the Collector uses the system certificate authority pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the JMX server
certificate.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the JMX server requires mutual
TLS authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the JMX server requires mutual TLS
authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses secure default cipher suites. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses its default curves.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. This setting must be false. Use `registry_tls` to
control transport security for the RMI registry.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the JMX server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the highest
TLS version it supports.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the JMX server certificate instead of the host in the target's
endpoint. Use this setting when the certificate names a different host, such as for a
discovered pod, whose endpoint host is the pod's IP address.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted Platform Module (TPM) settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the TPM key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a TPM for the TLS private key. If true, the Collector loads the key from the
configured device or socket. If false, the Collector uses the configured key file or an
in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the TPM.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the TPM device or Unix domain socket, such as `/dev/tpm0` or `/dev/tpmrm0`.
# cert-manager
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/cert_manager
Certificate lifecycle and expiry metrics from cert-manager, scraped from its controller's Prometheus endpoint.
The cert-manager integration requires CXDOT Collector 1.4.0 or greater.
[cert-manager](https://cert-manager.io/) manages TLS certificates in Kubernetes. Use the
cert-manager integration with the
[CXDOT Collector](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector)
to collect certificate lifecycle and controller activity metrics.
The cert-manager integration supports cert-manager version 1.21.1 or later.
## Supported telemetry types
The cert-manager integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
Meet these requirements before configuring the integration:
* Expose each controller's
[Prometheus metrics endpoint](https://cert-manager.io/docs/devops-tips/prometheus-metrics/)
at `/metrics`.
* For controller pods, allow the node Collector to connect to the pods.
* For Services or static targets, allow the cluster Collector to connect to each
target.
## Configure
The cert-manager integration is enabled by default. You can configure targets either by
annotating controller pods in your Kubernetes cluster or by listing static endpoints in
your Helm values. To configure the cert-manager integration, follow these steps:
1. To collect from cert-manager controller pods in Kubernetes, add a CXDOT integration
annotation to the pod template. The annotation key must end with the container name.
For example, add the following annotation to your cert-manager controller Deployment:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/cert-manager-controller: |
schema_version: v1.14
cert_manager:
endpoints:
- endpoint: ${target.host}:${target.port.http-metrics}
spec:
containers:
- name: cert-manager-controller
image: quay.io/jetstack/cert-manager-controller:v1.21.1
ports:
- name: http-metrics
containerPort: 9402
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.http-metrics}` with the container port named `http-metrics`.
The Collector also discovers controller pods that carry the
`app.kubernetes.io/name: cert-manager` and `app.kubernetes.io/component: controller`
labels and listen on port `9402`. A CXDOT integration annotation takes precedence over
the labels for its container. To stop collecting from a container, set
`cert_manager: {enabled: false}` in the annotation. For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
2. Optional: To collect from specific cert-manager endpoints, configure static
targets by listing their `host:port` values in `endpoints`. The instance then scrapes
only those targets. For example:
```yaml theme={null}
collection:
cxdot:
integrations:
cert_manager:
endpoints:
- endpoint: 10.0.0.5:9402
```
Each static target resolves to `http://:/metrics`.
3. Optional: To combine annotated pods and static targets, configure separate
instances. The bare `cert_manager` key discovers pods, and the named instance scrapes
the static targets:
```yaml theme={null}
collection:
cxdot:
integrations:
cert_manager: {}
cert_manager/static:
endpoints:
- endpoint: 10.0.0.5:9402
```
### Validate
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following label filters:
* Set **Label** to `__name__` and **Value** to
`cxdot.integration.target.health`.
* Set **Label** to `cxdot.integration.name` and **Value** to `cert_manager`.
Group the results by `cxdot.integration.target`, and confirm that the metric
reports `1` for each target.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
max by ("certmanager.name", "k8s.namespace.name", "certmanager.condition") ({"certmanager.certificate.ready"})
```
Confirm that the query returns a time series for each certificate condition.
## Disable the cert-manager integration
Deleting every `cert_manager` block restores the default unnamed instance. To remove
custom settings and stop collection, retain a disabled configuration:
```yaml theme={null}
collection:
cxdot:
integrations:
cert_manager:
enabled: false
```
## Configuration reference
Configure one cert-manager integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.cert_manager`. In a Collector
configuration file, place them under `cxdot.integrations.cert_manager`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this cert-manager integration instance. If true, the Collector runs the
instance. If false, the Collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Targets for cert-manager. Specify each target as `host:port`. The Collector requests
`http://:/metrics`.
* **`endpoints[].endpoint`**
Type: `string`. Required.
cert-manager target in `host:port` format.
* **`collection_interval`**
Type: `duration`. Optional. Default: `60s`.
How often the Collector collects metrics from each cert-manager target.
* **`timeout`**
Type: `duration`. Optional. Default: `60s`.
Maximum time allowed to collect metrics from one cert-manager target. The value must not
exceed `collection_interval`.
# ClickHouse
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/clickhouse
ClickHouse query, connection, merge, and replication metrics.
The ClickHouse integration requires CXDOT Collector 1.4.0 or greater.
[ClickHouse](https://clickhouse.com/) is a column-oriented database for real-time
analytics. Use the ClickHouse integration with the
[CXDOT Collector](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector)
to collect query,
connection, merge, and replication metrics from ClickHouse servers.
## Supported telemetry types
The ClickHouse integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
Meet these requirements before configuring the integration:
* Allow the Collector to connect to each ClickHouse HTTP interface.
* Use a ClickHouse account that can run `SELECT 1` and read the `system.metrics`,
`system.events`, `system.asynchronous_metrics`, `system.parts`,
`system.replicas`, and `system.dictionaries` tables.
## Configure
The ClickHouse integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the ClickHouse integration, follow these steps:
1. To collect from ClickHouse pods in Kubernetes, add a CXDOT integration annotation to
the pod template. The annotation key must end with the container name, and its value
can reference credentials stored in a Kubernetes Secret in the same namespace. For
example, add the following annotation to your ClickHouse workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/clickhouse: |
schema_version: v1.14
clickhouse:
instances:
- endpoint: http://${target.host}:${target.port.http}
username: cxdot
password: ${k8s_secret:clickhouse-credentials/password}
spec:
containers:
- name: clickhouse
image: clickhouse/clickhouse-server:26.3
ports:
- name: http
containerPort: 8123
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.http}` with the container port named `http`, and
`${k8s_secret:clickhouse-credentials/password}` with the `password` key of the
`clickhouse-credentials` Secret. To allow the Collector to read the Secret, add the
pod's namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for
your CXDOT Collector.
2. Optional: To collect from ClickHouse servers outside your Kubernetes cluster,
configure static targets: list their HTTP interface URLs in `instances`. Static
targets run on the cluster Collector, so provide the password through
`clusterCollector.extraEnv`. For example:
```yaml theme={null}
clusterCollector:
extraEnv:
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: clickhouse-credentials
key: password
collection:
cxdot:
integrations:
clickhouse:
instances:
- endpoint: http://clickhouse.example.com:8123
username: default
password: "${env:CLICKHOUSE_PASSWORD}"
```
A nonempty `instances` list disables annotation discovery for that integration
instance. The Collector scrapes only the listed targets.
3. Optional: To combine annotated pods and static targets, configure separate instances.
The unnamed instance discovers pods, and the named instance scrapes the static
targets:
```yaml theme={null}
collection:
cxdot:
integrations:
clickhouse: {}
clickhouse/static:
instances:
- endpoint: http://clickhouse.example.com:8123
username: default
password: "${env:CLICKHOUSE_PASSWORD}"
```
The `clickhouse/static` key defines a named instance and uses the Secret-backed
environment variable from the preceding example.
For more information about how the CXDOT Collector discovers targets, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following label filters:
* Set **Label** to `__name__` and **Value** to
`cxdot.integration.target.health`.
* Set **Label** to `cxdot.integration.name` and **Value** to `clickhouse`.
Group the results by `cxdot.integration.target`, and confirm that the metric
reports `1` for each target.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while the ClickHouse servers process queries:
```text theme={null}
sum by ("server.address", "server.port") (rate({"clickhouse.query.started"}[$__rate_interval]))
```
Confirm that the query returns a value greater than `0` for each target.
## Troubleshoot missing metrics
If expected ClickHouse metrics are missing, confirm that the ClickHouse account can
read every system table listed in the prerequisites. The integration collects metric
groups from separate system tables, so a permissions error can affect only some of
the collected metrics.
## Disable the ClickHouse integration
Deleting every `clickhouse` block restores the default unnamed instance. To remove
custom settings and stop collection, retain a disabled configuration:
```yaml theme={null}
collection:
cxdot:
integrations:
clickhouse:
enabled: false
```
## Configuration reference
Configure one ClickHouse integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.clickhouse`. In a Collector configuration
file, place them under `cxdot.integrations.clickhouse`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this ClickHouse integration instance. If true, the Collector runs the
instance. If false, the Collector doesn't run it.
* **`username`**
Type: `string`. Optional. Default: `default`.
ClickHouse user name for connections to the configured instances.
* **`password`**
Type: `string`. Optional.
ClickHouse password for connections to the configured instances. The Collector masks this
sensitive value in diagnostic output, logs, and errors.
* **`database`**
Type: `string`. Optional. Default: `default`.
Database to attach the connection to.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector collects metrics from each ClickHouse target.
* **`timeout`**
Type: `duration`. Optional. Default: `15s`.
Maximum time allowed to collect metrics from one ClickHouse instance. The value must not
exceed `collection_interval`.
* **`instances`**
Type: `array of object`. Optional. Default: `[]`.
ClickHouse instances. Specify each `endpoint` as the full URL of the ClickHouse HTTP
interface, such as `http://clickhouse.default.svc:8123`. Use an HTTPS URL and the `tls`
settings for a connection that uses TLS.
* **`instances[].endpoint`**
Type: `string`. Required.
URL of the instance's HTTP interface.
* **`tls`**
Type: `object`. Optional.
Transport layer security (TLS) settings for the configured HTTPS instances. Certificate
verification is enabled unless `insecure_skip_verify` is true. These settings don't apply to
HTTP instances or targets configured through discovery annotations.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to the CA cert. For a client this verifies the server certificate. For a server this
verifies client certificates. If empty uses system root CA. (optional)
* **`tls.ca_pem`**
Type: `string`. Optional.
In memory PEM encoded cert. (optional)
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the TLS cert to use for TLS required connections. (optional)
* **`tls.cert_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS cert to use for TLS required connections. (optional)
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a
safe default list is used. See
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go)
for a list of supported cipher suites.
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
contains the elliptic curves that will be used in an ECDHE handshake, in preference order
Defaults to empty list and "crypto/tls" defaults are used, internally.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
If true, load system CA certificates pool in addition to the certificates configured in this
struct.
* **`tls.insecure`**
Type: `boolean`. Optional.
In gRPC and HTTP when set to true, this is used to disable the client transport security. See
[https://godoc.org/google.golang.org/grpc#WithInsecure](https://godoc.org/google.golang.org/grpc#WithInsecure)
for gRPC. Please refer to
[https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for more
information. (optional, default false)
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
InsecureSkipVerify will enable TLS but not verify the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the TLS key to use for TLS required connections. (optional)
* **`tls.key_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS key to use for TLS required connections. (optional)
* **`tls.max_version`**
Type: `string`. Optional.
MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls
for defaults. (optional)
* **`tls.min_version`**
Type: `string`. Optional.
MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used.
(optional)
* **`tls.reload_interval`**
Type: `duration`. Optional.
ReloadInterval specifies the duration after which the certificate will be reloaded If not set,
it will never be reloaded (optional)
* **`tls.server_name_override`**
Type: `string`. Optional.
ServerName requested by client for virtual hosting. This sets the ServerName in the TLSConfig.
Please refer to [https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for
more information. (optional)
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module configuration
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.
# Concourse CI
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/concourse_ci
Concourse build, job scheduling, resource check, worker, garbage collection, database and API metrics, scraped from web nodes' Prometheus endpoint.
The Concourse CI integration requires CXDOT Collector 1.13.0 or greater.
[Concourse](https://concourse-ci.org/) is an open source continuous integration system
that runs pipelines of resources and jobs on a pool of workers. Use the Concourse CI
integration to collect build, job scheduling, resource checking, worker, garbage
collection, database, and API metrics from the Concourse web nodes running in your
environment.
The Concourse CI integration supports Concourse 7.11 or greater.
## Supported telemetry types
The Concourse CI integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Choose a collection method
The CXDOT Collector collects Concourse metrics in one of two ways:
* Recommended: Turn on the Prometheus emitter on each web node and scrape its endpoint
with the Concourse CI integration. You get the Concourse CI integration's metrics,
its overview dashboard, and a health metric for each web node. The Prerequisites and
Configure sections cover this method.
* Alternative: Keep the Datadog emitter and send its DogStatsD metrics to the Datadog
integration. Choose this method if you can't switch a web node to the Prometheus
emitter yet. You get the metric names that the emitter sends, and none of the
Concourse CI integration's metrics, dashboard, or health metric. The Send DogStatsD
metrics to the Datadog integration section covers this method.
## Prerequisites
The Concourse CI integration has the following prerequisites:
* Turn on the Prometheus metrics emitter on each Concourse web node by setting
`CONCOURSE_PROMETHEUS_BIND_IP` and `CONCOURSE_PROMETHEUS_BIND_PORT`, or the
`--prometheus-bind-ip` and `--prometheus-bind-port` flags of `concourse web`. With
the Concourse Helm chart, set `concourse.web.prometheus.enabled` to `true`, which
binds port `9391` and creates a Service for it. For more information, see
[Metrics](https://concourse-ci.org/docs/operation/metrics/) in the Concourse
documentation.
A web node runs one metrics emitter, and a web node with more than one emitter
configured fails to start with the error `multiple emitters configured`. To turn
on the Prometheus emitter on a web node that sends its metrics through another
emitter, remove that emitter's settings. The Prometheus emitter serves an endpoint
that any number of readers can request, so move whatever reads the node's metrics
today to the Prometheus endpoint when you switch.
To confirm that a web node serves metrics, request `/metrics` on the Prometheus
port from a machine that can reach it and confirm that the request returns a
successful status code:
```shell theme={null}
curl -i http://concourse-web.example.com:9391/metrics
```
* Make the Prometheus port reachable on each web node from the CXDOT Collector.
## Configure
The Concourse CI integration is enabled by default, but it collects nothing until you
configure targets. Add a CXDOT integration annotation to your Concourse web pods or to a
Service in front of them, or list the web nodes to monitor.
To configure the Concourse CI integration, follow these steps:
1. To collect from Concourse web pods in Kubernetes, add a CXDOT integration annotation
to the pod template. The annotation key must end with the container name. For
example, add the following annotation to your Concourse web workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/concourse-web: |
schema_version: v1.16
concourse_ci:
endpoints:
- endpoint: ${target.host}:${target.port.prometheus}
spec:
containers:
- name: concourse-web
image: concourse/concourse
ports:
- name: prometheus
containerPort: 9391
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.prometheus}` with the container port named `prometheus`. Metrics
from each annotated pod include that pod's Kubernetes metadata.
With the Concourse Helm chart, add the annotation under `web.annotations`. The
chart names the web container `RELEASE_NAME-web` and its Prometheus port
`prometheus`, so end the annotation key with the container name that your release
produces.
2. Alternatively, to collect from web nodes outside your Kubernetes cluster or at
addresses that you choose, list each web node in `endpoints`. For example, add the
following to the Helm values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
concourse_ci:
endpoints:
- endpoint: concourse-web-1.example.com:9391
- endpoint: concourse-web-2.example.com:9391
- endpoint: http://concourse-web-3.example.com:9391/metrics
```
When you list endpoints, the integration collects from exactly those endpoints
instead of from annotated pods and Services. In Kubernetes, the elected
cluster Collector collects from each endpoint that you list, one time rather than
once per node. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
List an address that reaches one web node. Each request to an address that
balances across replicas, such as a Kubernetes Service in front of several web
pods, reaches a different replica, so the metrics mix the replicas' values. With
one web node, the Service that the Concourse Helm chart creates for the Prometheus
port reaches that node. For a Concourse deployment with several web nodes, list
each node's own address. Metrics from listed endpoints don't carry Kubernetes
metadata from the Concourse pods. Use the `server.address` and `server.port`
attributes to identify each web node.
3. Optional: To collect from both annotated pods and listed endpoints, list the
endpoints in a second integration instance. For example, add the following to the
Helm values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
concourse_ci: {}
concourse_ci/edge:
endpoints:
- endpoint: concourse-web-1.example.com:9391
```
The `concourse_ci/edge` key defines a named instance for the listed endpoints. The
bare `concourse_ci` key lists no endpoints, so the integration continues to collect
from annotated pods and Services.
4. Optional: If you can't change the pod template, configure the Service in front of
the Prometheus port with a CXDOT integration annotation instead. The
`integrations.cxdot.paloaltonetworks.com/endpoints` key makes each ready web pod
behind the Service a separate target, so the metrics don't mix the replicas' values.
For example, add the following annotation to the Prometheus Service of your
Concourse deployment:
```yaml theme={null}
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/endpoints: |
schema_version: v1.16
concourse_ci:
endpoints:
- endpoint: ${target.host}:${target.port.prometheus}
spec:
ports:
- name: prometheus
port: 9391
targetPort: 9391
```
The Collector replaces `${target.host}` with the IP address of each web pod and
`${target.port.prometheus}` with the pod port that the Service port named
`prometheus` forwards to. The Collector reads these annotations only when
`endpoints` is empty.
5. Optional: If the OpenMetrics integration also scrapes your Concourse web pods or
Service, disable OpenMetrics on that workload to avoid duplicate metrics. For
example, set `openmetrics: {enabled: false}` in a CXDOT integration annotation on the
pod or Service. For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Concourse CI integration, follow these steps:
1. In the [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=concourse_ci`. Confirm that each web node reports `1`,
identified by its `server.address` and `server.port` attributes.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query after Concourse finishes builds:
```text theme={null}
sum by ("server.address", "concourse.build.status") (rate({"concourse.build.finished"}[$__rate_interval]))
```
Confirm that the query returns a time series for each web node and build status.
## Known limitations
* Concourse emits `concourse.api.concurrent_request.count` and
`concourse.api.concurrent_request.limit_hits` only for API actions with a configured
concurrent request limit.
* Concourse emits `concourse.log.errors` only when error metric capture is enabled.
## Send DogStatsD metrics to the Datadog integration
Set `CONCOURSE_DATADOG_AGENT_HOST` and `CONCOURSE_DATADOG_AGENT_PORT`, or the
`--datadog-agent-host` and `--datadog-agent-port` flags of `concourse web`, to the
DogStatsD listener of the
[Datadog](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/datadog)
integration. The listener accepts UDP on port `9125` by default.
The Concourse CI integration doesn't collect these DogStatsD metrics. The emitter sends
each metric as a gauge named with the `--datadog-prefix` value followed by the event
name, such as `concourse.ci.builds_running` with the Concourse Helm chart's default
prefix. The metric names on this page and its dashboard don't apply to those metrics.
## Configuration reference
Configure one Concourse CI integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.concourse_ci`. In a Collector
configuration file, place them under `cxdot.integrations.concourse_ci`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Concourse CI integration instance. If true, the Collector collects
metrics from the web nodes that this instance is configured for. If false, the Collector
doesn't run this integration instance.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Concourse web nodes to monitor, by the address of each node's Prometheus metrics endpoint. The
integration instance collects only from the endpoints listed here. Specify `host:port` to
request the `/metrics` path over HTTP, or a full HTTP or HTTPS URL. For a URL without a path,
the Collector requests `/metrics`. A web node serves the endpoint only when its Prometheus
emitter is on, set with `CONCOURSE_PROMETHEUS_BIND_IP` and `CONCOURSE_PROMETHEUS_BIND_PORT`.
The Concourse Helm chart uses port `9391`. Each entry is one target, so list an address that
reaches one web node. An address that balances requests across replicas, such as a Kubernetes
Service with several pods, reaches a different replica on each collection.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Address of one Concourse web node's Prometheus metrics endpoint, in `host:port` format or as a
full HTTP or HTTPS URL. For `host:port`, the Collector requests the `/metrics` path over HTTP.
A full URL is requested as given, such as `http://concourse-web.example.com:9391/metrics`. For
a URL without a path, the Collector requests `/metrics`.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the integration collects metrics from each Concourse web node.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one collection from a web node. The value must be greater
than zero. A value longer than `collection_interval` is lowered to `collection_interval`.
# Consul
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/consul
Consul cluster and catalog health metrics from Consul agents.
The Consul integration requires CXDOT Collector 1.4.0 or greater.
[Consul](https://developer.hashicorp.com/consul) is a distributed system for
connecting and configuring applications across dynamic infrastructure. Use the
Consul CXDOT Collector integration to collect cluster and catalog health metrics
from Consul agents in your environment.
## Supported telemetry types
The Consul integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
Meet these requirements before configuring the integration:
* Make each Consul agent HTTP API reachable from the Collector tier that scrapes
it (node-local agents on the node Collector, static targets on the cluster
Collector).
* When Consul access control lists are enabled, provide a token with read access
to the agent, catalog, and health endpoints.
## Configure
The Consul integration is enabled by default. You can configure targets either by
annotating agent pods in your Kubernetes cluster or by listing static endpoints in your
Helm values. To configure the Consul integration, follow these steps:
1. To collect from Consul agent pods in Kubernetes, add a CXDOT integration annotation
to the pod template. The annotation key must end with the container name, and its
value can reference an access control list token stored in a Kubernetes Secret in the
same namespace. For example, add the following annotation to your Consul agents:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/consul: |
schema_version: v1.14
consul:
endpoints:
- endpoint: ${target.host}:${target.port.http}
acl_token: ${k8s_secret:consul-monitoring/token}
spec:
containers:
- name: consul
image: hashicorp/consul:2.0.1
ports:
- name: http
containerPort: 8500
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.http}` with the container port named `http`, and
`${k8s_secret:consul-monitoring/token}` with the `token` key of the
`consul-monitoring` Secret. To allow the Collector to read the Secret, add the pod's
namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for your
CXDOT Collector.
The Collector also discovers Consul agent pods that carry the `app: consul` label and
expose the HTTP API on port `8500`, which HashiCorp's official chart sets by default.
A CXDOT integration annotation takes precedence over the label for its container. To
stop collecting from a container, set `consul: {enabled: false}` in the annotation.
For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
2. Optional: To collect from Consul agents outside your Kubernetes cluster, configure
static targets: list reachable `host:port` values or full URLs in `endpoints`. A
nonempty list disables discovery for that instance. The Collector scrapes only those
agents. When access control lists are enabled, set `acl_token`. For example:
```yaml theme={null}
collection:
cxdot:
integrations:
consul:
acl_token: "${env:CONSUL_HTTP_TOKEN}"
endpoints:
- endpoint: consul.example.com:8500
```
3. Optional: To combine annotated pods and static targets, configure separate
instances. The unnamed instance discovers pods, and the named instance
scrapes the static targets:
```yaml theme={null}
collection:
cxdot:
integrations:
consul: {}
consul/static:
acl_token: "${env:CONSUL_HTTP_TOKEN}"
endpoints:
- endpoint: consul.example.com:8500
```
4. Optional: To collect Raft and Serf metrics, send Consul's own telemetry to
the DogStatsD listener in the CXDOT Collector. The Consul integration doesn't
collect these metrics. Consul agents push them through a telemetry sink, and
the Datadog integration receives them. The Datadog integration runs by
default on the node Collector.
Consul 2.0.2 through 2.0.4 don't send Raft or Serf metrics to any telemetry
sink. By default, HashiCorp's chart installs the Consul version that matches
the chart version, so chart versions 2.0.2 through 2.0.4 install an affected
Consul version. To collect these metrics, upgrade to a later Consul release,
which restores them. Until one is available, set `global.image` in the Helm
values file for your Consul release to Consul 2.0.1, which also sends them.
Set `telemetry.dogstatsd_addr` in each agent's configuration to the node IP
address and the DogStatsD listener port, which is `9125` by default, not
`8125`. HashiCorp's official chart replaces the `HOST_IP` placeholder in
`server.extraConfig` with the IP address of each server's node. For example,
add the following to the Helm values file for your Consul release:
```yaml theme={null}
server:
extraConfig: |
{
"telemetry": {
"dogstatsd_addr": "HOST_IP:9125"
}
}
```
Consul sends DogStatsD metrics to one address only, so
`telemetry.dogstatsd_addr` replaces the DogStatsD destination that your
Consul agents already use rather than adding a second one. If a Datadog Agent
already receives Consul's DogStatsD metrics and forwards metrics to the CXDOT
Collector, leave Consul pointed at the Agent and skip this step. Otherwise,
set `global.metrics.datadog.dogstatsd.enabled` to `false` in the Helm values
file for your Consul release. While that value is `true`, HashiCorp's chart
rejects `dogstatsd_addr` in `server.extraConfig`.
The node IP address reaches the node Collector only while
`nodeCollector.hostNetwork` is `true`, the CXDOT Collector chart's default. If
you set it to `false`, use the address of the node Collector Service,
`cxdot-node-collector..svc`, instead of `HOST_IP`, where
`` is the namespace of your CXDOT Collector release.
Only Consul servers report Raft metrics. If you run Consul client agents
(`client.enabled: true`), add the same `telemetry` block to
`client.extraConfig` to also collect their Serf metrics:
```yaml theme={null}
client:
extraConfig: |
{
"telemetry": {
"dogstatsd_addr": "HOST_IP:9125"
}
}
```
By default, Consul sends all of its telemetry to the DogStatsD sink, not only
Raft and Serf metrics. That includes Go runtime, gossip, RPC, and HTTP
metrics. To send only Raft and Serf metrics, allow the `consul.raft` and
`consul.serf` prefixes with Consul's `telemetry.prefix_filter` setting, and
set `telemetry.filter_default` to `false` to drop everything else. The filter
applies to every Consul telemetry sink, not only DogStatsD.
HashiCorp's chart rejects `prefix_filter` and `disable_hostname` in
`server.extraConfig`, so set the server filter through `global.metrics`
instead. Filter entries match the start of each metric name, and Consul adds
the agent's host name to gauge names unless `disable_hostname` is `true`, so
also set `global.metrics.disableAgentHostName` to `true`. Setting
`global.metrics.enabled` also turns on the chart's other metrics features,
such as Prometheus scrape annotations on Consul pods. For example:
```yaml theme={null}
global:
metrics:
enabled: true
enableAgentMetrics: true
disableAgentHostName: true
prefixFilter:
allowList:
- consul.raft
- consul.serf
server:
extraConfig: |
{
"telemetry": {
"dogstatsd_addr": "HOST_IP:9125",
"filter_default": false
}
}
```
Client agents report Serf metrics but not Raft metrics. For client agents,
add `"prefix_filter": ["+consul.serf"]`, `"filter_default": false`, and
`"disable_hostname": true` to the `telemetry` block in `client.extraConfig`.
In Consul's own configuration, each allowed prefix starts with `+`.
Use only the DogStatsD sink. Don't point Consul's `statsd_address` or
`statsite_address` sinks at the CXDOT Collector: those sinks add label values
to metric names, such as `consul.serf.member.join.lan`, and send no tags.
5. Optional: To attach pod metadata to Consul's telemetry, set the
`DD_ENTITY_ID` environment variable on the Consul pods. Without it, Consul's
metrics identify only the node that sent them, and a server and a client
agent on the same node report the same time series. With it, each metric
arrives with the Kubernetes metadata of the pod that sent it.
The CXDOT Collector admission controller sets `DD_ENTITY_ID` on pods that
carry the `admission.cxdot.paloaltonetworks.com/enabled: "true"` label. Set
`apiServer.admissionController.enabled` to `true` in the Helm values file for
your CXDOT Collector, then add the label to the Consul pods in the Helm values
file for your Consul release:
```yaml theme={null}
server:
extraLabels:
admission.cxdot.paloaltonetworks.com/enabled: "true"
client:
extraLabels:
admission.cxdot.paloaltonetworks.com/enabled: "true"
```
If the Datadog Cluster Agent admission controller already sets
`DD_ENTITY_ID` on the Consul pods, such as during a migration, skip this
step.
### Validate
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following label filters:
* Set **Label** to `__name__` and **Value** to
`cxdot.integration.target.health`.
* Set **Label** to `cxdot.integration.name` and **Value** to `consul`.
Group the results by `cxdot.integration.target`, and confirm that the metric
reports `1` for each target.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
count by ("server.address", "server.port", "consul.mode") ({"consul.peers"})
```
Confirm that each agent you expect appears. Only agents where
`consul.mode="leader"` also emit catalog metrics for the data center.
3. Optional: If you send Consul Raft and Serf metrics to the CXDOT Collector,
run the following query in Metrics Explorer after you write a key to the
Consul key-value store:
```text theme={null}
count({"consul.raft.apply"})
```
Confirm that the query returns a result. Only the Raft leader reports this
metric.
### Troubleshooting
* Consul metrics don't appear and Collector logs report HTTP `403` responses:
Confirm that the ACL token has read access to the agent, catalog, and health
endpoints.
* Catalog metrics are missing for an agent, but `consul.peers` appears: Only the
Raft leader for a data center reports catalog metrics. Other agents report peer
count only.
* Raft and Serf metrics don't appear: Confirm that the Datadog integration and
its DogStatsD intake are enabled, and that the port in
`telemetry.dogstatsd_addr` matches the DogStatsD listener port, `9125` by
default. The CXDOT Collector doesn't listen on port `8125` by default.
* Raft and Serf metrics don't appear, but other Consul telemetry such as Go
runtime metrics does: Consul 2.0.2 through 2.0.4 don't send Raft or Serf
metrics to any telemetry sink, so upgrade to a later release, or use 2.0.1
until one is available.
## Disable the Consul integration
Deleting every `consul` block restores the default unnamed instance. To remove
custom settings and stop collection, retain a disabled configuration:
```yaml theme={null}
collection:
cxdot:
integrations:
consul:
enabled: false
```
## Configuration reference
Configure one Consul integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.consul`. In a Collector configuration file,
place them under `cxdot.integrations.consul`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Consul integration instance. If true, the Collector runs the instance.
If false, the Collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Consul targets. Specify a target as `host:port` to use HTTP. Specify a full HTTP or HTTPS URL
to control the scheme.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Consul target as either `host:port` or a full HTTP or HTTPS URL.
* **`acl_token`**
Type: `string`. Optional.
Consul access control list token sent in the `X-Consul-Token` header. Provide a token with
read access to the agent, catalog, and health endpoints when access control lists are enabled.
The Collector masks this sensitive value in diagnostic output, logs, and errors. Discovery
annotations can provide a target-specific token.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector collects metrics from each Consul target.
* **`timeout`**
Type: `duration`. Optional. Default: `15s`.
Maximum time allowed to collect metrics from one Consul target. The value must not exceed
`collection_interval`.
* **`max_services`**
Type: `integer`. Optional. Default: `50`. Minimum: `1`.
Cap on how many catalog services one collection interrogates. Each service costs one
health-endpoint request, so an unbounded catalog would turn a single collection into thousands
of requests against the agent. Services are taken in name order once the catalog exceeds the
cap, so the truncated set stays the same between collections rather than shifting with the
agent's response ordering.
* **`network_latency_checks`**
Type: `boolean`. Optional. Default: `false`.
Whether the Consul leader reports `consul.net.node.latency`, each node's estimated round-trip
times to the other nodes in its network segment, computed from network coordinates. Reading
coordinates requires the `node:read` access control list permission for every node. For a
target discovered through a Datadog annotation, the annotation's `network_latency_checks`
field applies instead.
* **`tls`**
Type: `object`. Optional.
Transport layer security (TLS) settings for the HTTPS targets in `endpoints`. Certificate
verification is enabled unless `insecure_skip_verify` is true. These settings don't apply to
HTTP targets. Discovery annotations can provide target-specific TLS settings.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to the CA cert. For a client this verifies the server certificate. For a server this
verifies client certificates. If empty uses system root CA. (optional)
* **`tls.ca_pem`**
Type: `string`. Optional.
In memory PEM encoded cert. (optional)
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the TLS cert to use for TLS required connections. (optional)
* **`tls.cert_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS cert to use for TLS required connections. (optional)
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a
safe default list is used. See
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go)
for a list of supported cipher suites.
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
contains the elliptic curves that will be used in an ECDHE handshake, in preference order
Defaults to empty list and "crypto/tls" defaults are used, internally.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
If true, load system CA certificates pool in addition to the certificates configured in this
struct.
* **`tls.insecure`**
Type: `boolean`. Optional.
In gRPC and HTTP when set to true, this is used to disable the client transport security. See
[https://godoc.org/google.golang.org/grpc#WithInsecure](https://godoc.org/google.golang.org/grpc#WithInsecure)
for gRPC. Please refer to
[https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for more
information. (optional, default false)
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
InsecureSkipVerify will enable TLS but not verify the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the TLS key to use for TLS required connections. (optional)
* **`tls.key_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS key to use for TLS required connections. (optional)
* **`tls.max_version`**
Type: `string`. Optional.
MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls
for defaults. (optional)
* **`tls.min_version`**
Type: `string`. Optional.
MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used.
(optional)
* **`tls.reload_interval`**
Type: `duration`. Optional.
ReloadInterval specifies the duration after which the certificate will be reloaded If not set,
it will never be reloaded (optional)
* **`tls.server_name_override`**
Type: `string`. Optional.
ServerName requested by client for virtual hosting. This sets the ServerName in the TLSConfig.
Please refer to [https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for
more information. (optional)
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module configuration
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.
# containerd
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/containerd
Per-container CPU, memory, block I/O, process and uptime metrics from a containerd daemon, plus the size of every image in its store.
The containerd integration requires CXDOT Collector 1.8.0 or greater.
[containerd](https://containerd.io/) is a container runtime that manages the full
lifecycle of containers on a node. Use the containerd integration with the CXDOT
Collector to collect per-container resource metrics and image sizes from the
containerd daemons running in your environment.
The containerd integration supports containerd 1.6 or greater.
## Supported telemetry types
The containerd integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The containerd integration has the following prerequisites:
* Run containerd as the container runtime on the nodes you collect from. To confirm
which runtime your nodes run, run the following command and read the
`CONTAINER-RUNTIME` column:
```shell theme={null}
kubectl get nodes -o wide
```
* Run your nodes on Linux with cgroups v2, which most current distributions use. On a
cgroups v1 node the integration still reports each container's uptime and any CPU
limit, but none of the cgroup readings: CPU time, memory, block I/O, and process
counts. To confirm which version a node uses, run the following command on that node
and confirm that it reports `cgroup2fs`:
```shell theme={null}
stat -fc %T /sys/fs/cgroup
```
## Configure
The containerd integration is disabled by default. To configure the containerd
integration, follow these steps:
1. Enable the integration. For example, add the following to `values.yaml` for your
CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
containerd:
enabled: true
```
Each Collector reads the containerd daemon on its own node and reports the
containers that daemon runs, along with the size of every image in its store.
Metrics from a container that Kubernetes created arrive with that pod's Kubernetes
metadata attached. A container created outside Kubernetes carries none of that
metadata.
2. Allow the node Collector to run as root. For example, add the following to
`values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
nodeCollector:
securityContext:
runAsRoot: true
```
The containerd socket is owned by root and readable by no one else, so the
Collector reaches the daemon only when it runs as root. The Helm chart refuses to
render the containerd integration without `runAsRoot`, rather than deploying a
Collector that can't open the socket. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
3. Optional: Report a chosen set of containerd namespaces instead of every namespace
the daemon has. For example, add the following to `values.yaml` for your CXDOT
Collector Helm chart to report Kubernetes containers alone:
```yaml theme={null}
collection:
cxdot:
integrations:
containerd:
enabled: true
namespaces:
- k8s.io
```
A non-empty `namespaces` list reports exactly the namespaces you name, and
`exclude_namespaces` no longer applies.
4. Optional: Stop collecting open file descriptor counts. For example, add the
following to `values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
containerd:
enabled: true
collect_open_file_descriptors: false
```
Counting descriptors costs one extra call to the daemon for each container, plus a
read of the node's process table. The work therefore grows with the number of
containers on a node and the number of processes each one runs. Turning it off
leaves every other metric collecting normally.
### Validate
To validate the containerd integration, follow these steps:
1. In
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=containerd`. Confirm that the metric reports `1`,
meaning the Collector reached the daemon and listed its namespaces, containers,
and images. A value of `0` means that one of those listings failed. The `host.name`
attribute identifies which node's daemon a reading describes.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
count by ("host.name") ({"container.memory.current"})
```
Confirm that the query returns one time series per node, each counting the
containers running on that node.
### Troubleshooting
* Containers report their uptime and any CPU limit, but no CPU time, memory, block I/O,
or process counts: The node runs cgroups v1, whose readings the daemon reports in a
form the integration doesn't read. Only the fields the integration takes from each
container's own record remain. Run the node on cgroups v2 to collect the rest.
* Every other metric arrives, but `container.file_descriptor.count` is missing:
Descriptor counts come from the node's own process table, which the Collector reads
under `root_path`. A Collector that doesn't run as root reads no other user's
descriptors and reports no count for any container. Outside the Helm chart, nothing
mounts the node file system or sets `root_path` in `node` mode, and the count is
skipped for every container. The count is also skipped for an individual container
whose processes the Collector can't all read, because a partial tally can't be told
apart from a real one.
* Each container on a node is reported twice, once by the containerd integration and
once by the Docker integration: The node runs Docker Engine on top of containerd,
which keeps its containers in the `moby` containerd namespace, and that namespace
was removed from `exclude_namespaces`. Restore `moby` to `exclude_namespaces` and
let the Docker integration report those containers.
## Configuration reference
Configure one containerd integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.containerd`. In a Collector configuration
file, place them under `cxdot.integrations.containerd`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`endpoint`**
Type: `string`. Optional. Default: `unix:///run/containerd/containerd.sock`.
The containerd socket the Collector reads container metrics from, as a `unix://` URL or a bare
path. The daemon serves its API over a Unix socket only. The default is the socket on the node
the Collector runs on: directly in `host` mode, and in Kubernetes because the Helm chart
mounts that node's socket directory into the Collector.
* **`namespaces`**
Type: `array of string`. Optional. Default: `[]`.
The containerd namespaces to report on. An empty list reports every namespace the daemon has
except those in `exclude_namespaces`. Kubernetes containers live in `k8s.io`; containers
created with `nerdctl` or `ctr` live in `default` unless told otherwise.
* **`exclude_namespaces`**
Type: `array of string`. Optional. Default: `["moby"]`.
The containerd namespaces to leave out when `namespaces` is empty. A namespace listed in
`namespaces` is always reported, regardless of this setting. The default leaves out `moby`,
where Docker Engine runs its containers when containerd is its runtime, because the `docker`
integration reports those containers. If the `docker` integration also runs, keep `moby` out
of this integration, both here and in `namespaces`. The two integrations report the same
metric names, so each Docker container would be counted twice in any sum.
* **`exclude_pause_containers`**
Type: `boolean`. Optional. Default: `true`.
Whether to leave out the sandbox container, also called the pause container, that Kubernetes
runs for every pod. It holds the pod's network and nothing else, so its readings are a flat
near-zero per pod. Set to `false` to report it like any other container.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
How often the Collector collects metrics from the containerd daemon.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for the containerd daemon to respond during one collection.
This value must not exceed `collection_interval`. If the deadline expires, that collection
fails.
* **`keep_container_id`**
Type: `boolean`. Optional. Default: `false`.
Whether to keep `container.id` on container metrics. If false, the Collector uses the ID only
to look up the container's pod, then removes it. If true, each container's series keep it, as
the Datadog containerd check does with `container_id`, so queries can group by container
instance. Each container restart then starts a new series.
* **`collect_open_file_descriptors`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect `container.file_descriptor.count`, the number of file descriptors open
across all of a container's processes. If true, the Collector reports the metric. If false, it
reports everything else and omits this one. The count is read from the node's process table
under `root_path`, with one daemon call per container to list its processes, so its cost grows
with the number of containers and the processes each runs. The Collector can read descriptor
counts only when it runs as root, because another user's open descriptors are readable only by
root. In Kubernetes the Helm chart already requires `nodeCollector.securityContext.runAsRoot`
for this integration, because the containerd socket itself is readable only by root.
* **`root_path`**
Type: `string`. Optional.
Root of the node file system when the Collector runs in a container with the node root
bind-mounted, for example `/hostfs`. In Kubernetes the Helm chart mounts it and sets this
value, so it rarely needs setting by hand. The Collector reads it for three fields the daemon
doesn't report: each container's open file descriptor count, the kernel memory total the
kernel prints in each container's `memory.stat`, and the node's memory, which it reports as
`container.memory.usage.limit` for a container with no memory limit. Without it, the
descriptor count isn't reported, kernel memory is the sum of the kernel stack and slab
readings the daemon does report, which is lower than the true total, and a container with no
memory limit reports no `container.memory.usage.limit`. In `host` mode the Collector runs on
the node it reports on, so this value defaults to `/`. It stays unset in `node` mode outside
the Helm chart, where nothing mounts the node root or sets this value for you. Set it to an
empty string to turn off the node file system reads where the default would otherwise apply.
* **`containers`**
Type: `object`. Optional.
Settings for containerd container metrics collection.
* **`containers.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether this integration instance collects container metrics. If true, the Collector reports
per-container readings and image sizes from the daemon this instance reads. If false, the
instance collects nothing, the same result as turning the whole instance off with its own
`enabled` setting, because container metrics are all this integration collects.
# Datadog
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/datadog
DogStatsD metrics, Datadog APM traces, and APM span metrics from apps instrumented with Datadog clients.
The Datadog integration requires CXDOT Collector 1.4.0 or greater.
[Datadog](https://www.datadoghq.com/) is an observability platform. Use the Datadog
CXDOT Collector integration with the CXDOT Collector to collect DogStatsD metrics, Datadog
application performance monitoring (APM) traces, and APM span metrics from apps running
in your environment. The integration also accepts metrics and traces that a Datadog
Agent forwards.
## Supported telemetry types
The Datadog CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | Yes |
| Events | No |
## Prerequisites
The Datadog CXDOT Collector integration has the following prerequisites:
* Make the DogStatsD and APM listeners reachable from each telemetry sender.
## Configure
The Datadog CXDOT Collector integration is enabled by default. To configure it, follow
these steps:
1. Send DogStatsD metrics over UDP port `9125` and APM traffic over TCP port `9126`.
If you use the admission controller for node-local routing, add the
`admission.cxdot.paloaltonetworks.com/enabled: "true"` label to each pod template
that uses Datadog instrumentation. If you set tracer or DogStatsD endpoints
yourself, send to the node IP on those ports. With the chart default
(`nodeCollector.hostNetwork: true`), the node Collector DaemonSet exposes matching
`hostPort` values and no `cxdot-node-collector` Service exists. When
`nodeCollector.hostNetwork` is `false`, or when the admission controller runs in
`service` mode, the chart also creates a `cxdot-node-collector` Service in your
release namespace that you can target instead of the node IP.
2. Optional: Forward metrics and traces from a Datadog Agent. In the Agent
configuration, set `dd_url` to the Collector address on port `9126` from the
previous step, such as `http://NODE_IP:9126`. To keep sending to Datadog as well,
add that address to `additional_endpoints` instead. For traces, set
`apm_config.apm_dd_url` or `apm_config.additional_endpoints` the same way.
The Collector accepts metric series, distributions, and service checks from the
Agent. Datadog Agent 7.81.0 and 7.81.1 send series to the v3 series endpoint by
default. Other Agent versions send series to the v2 endpoint by default when the
destination isn't Datadog. The Collector accepts both endpoints but doesn't accept
these Agent payloads:
* Distributions sent to the v3 sketches endpoint: The Collector discards them
without returning an error, so keep the Agent's distributions on the default
endpoint.
* Events and host metadata: The Collector rejects them.
3. If apps send APM traffic directly to the Collector, choose how to produce
APM span metrics. Apps that don't compute APM stats require the Collector
to compute them. For example, add the following to the `values.yaml` for your Helm
chart:
```yaml theme={null}
collection:
cxdot:
integrations:
datadog:
apm:
stats:
compute: true
```
Leave `compute` set to `false` when apps compute APM stats or when a Datadog Agent
forwards APM traffic. The Agent forwards sampled traces, so computing stats from
those traces reports fewer requests than expected. With `compute` set to `false`,
the Collector uses the APM stats payloads from the apps or Agent.
4. Optional: Remove labels from APM span metrics to reduce the number of time series
they produce. APM span metrics carry a label for each dimension that APM stats
group requests by, such as `http.route`, `http.request.method`, and
`server.address`, and for the container tags in the stats. Each combination of
label values is a separate time series. List the labels to remove in
`apm.stats.exclude_attributes`. For example, add the following to the
`values.yaml` for your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
datadog:
apm:
stats:
exclude_attributes:
- http.route
- server.address
```
The setting applies whether the Collector computes span metrics or uses APM stats
payloads from apps or an Agent.
5. Optional: Enable cgroup inode resolution when clients send a cgroup inode instead of
a full container ID. For example, add the following to the `values.yaml` for your Helm
chart:
```yaml theme={null}
collection:
cxdot:
integrations:
datadog:
origin_detection:
cgroup_inode: true
```
This setting mounts the node's cgroup file system read-only into the Collector.
Full container IDs don't require this setting. Origin detection adds metadata to
telemetry from discovered containers.
6. Optional: Disable either or both intake capabilities. For example, add the following
to the `values.yaml` for your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
datadog:
dogstatsd:
enabled: false
apm:
enabled: false
```
Set `dogstatsd.enabled` to `false` to disable DogStatsD metrics, and set
`apm.enabled` to `false` to disable APM traces, span metrics, and metrics that a
Datadog Agent forwards.
### Validate
To validate the Datadog CXDOT Collector integration, follow these steps:
1. Generate app traffic that emits a DogStatsD metric and an APM trace.
2. In the Live Telemetry Analyzer, filter for
`cxdot.integration.name=datadog`. Confirm that the expected DogStatsD metric names
appear. If APM stats are available, also confirm that
`traces.span.metrics.calls` and `traces.span.metrics.duration` appear.
3. In Metrics Explorer, run the following query:
```text theme={null}
count by ("__name__") ({"cxdot.integration.name"="datadog"})
```
Confirm that the query returns the expected DogStatsD and APM span metric names.
4. In Trace Explorer, filter for `cxdot.integration.name=datadog`. Confirm that the
trace from the generated traffic appears with the expected service name and spans.
### Troubleshooting
* APM span metrics report fewer requests than expected when a Datadog Agent forwards
traffic: Set `apm.stats.compute` to `false` so the Collector uses the stats payloads
that the Agent computes before trace sampling.
* Apps don't send metrics or traces after manual configuration: Confirm ports
`9125` and `9126`, not Datadog Agent defaults `8125` and `8126`. If endpoints
use the node IP, confirm the node Collector `hostPort` values match. If they
use a Service, confirm the chart created `cxdot-node-collector` (only when
`nodeCollector.hostNetwork` is `false` or admission controller `service` mode)
and that apps target that Service in your namespace.
## Configuration reference
Configure one Datadog integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.datadog`. In a Collector configuration file,
place them under `cxdot.integrations.datadog`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Datadog integration instance. If true, the Collector receives telemetry
through enabled Datadog intake capabilities. If false, the Collector doesn't run this
integration instance.
* **`origin_detection`**
Type: `object`. Optional.
Settings for identifying the container that sends DogStatsD metrics or Datadog traces. The
Collector uses the container identity to attach workload metadata to the telemetry.
* **`origin_detection.cgroup_inode`**
Type: `boolean`. Optional. Default: `false`.
Whether to resolve a cgroup inode sent by a client to its container identity. If true, the
Collector mounts the node's cgroup file system read-only and resolves cgroup inodes. If false,
it resolves only full container IDs.
* **`origin_detection.socket`**
Type: `boolean`. Optional. Default: `false`.
Whether to identify the sending container from Unix socket credentials. If true, the Collector
requires host process access and uses socket credentials for DogStatsD traffic received
through a `unixgram` listener. If false, it doesn't use socket credentials.
* **`dogstatsd`**
Type: `object`. Optional.
Settings for receiving and aggregating DogStatsD metrics.
* **`dogstatsd.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to receive DogStatsD metrics. If true, the Collector listens on the configured
DogStatsD addresses. If false, it doesn't receive DogStatsD metrics.
* **`dogstatsd.listeners`**
Type: `array of object`. Optional. Default: `[{"endpoint":"0.0.0.0:9125","transport":"udp"}]`.
Network addresses on which the Collector receives DogStatsD metrics. Configure at least one
listener. A `unixgram` listener requires the node Collector to run as root so that it can
create the socket.
* **`dogstatsd.listeners[].endpoint`**
Type: `string`. Required.
Network address or Unix socket path on which the Collector receives DogStatsD metrics.
* **`dogstatsd.listeners[].transport`**
Type: `string`. Required.
Transport for the DogStatsD listener. Use `udp` for a network listener or `unixgram` for a
Unix socket. Allowed values: `udp`, `unixgram`.
* **`dogstatsd.aggregation_interval`**
Type: `duration`. Optional. Default: `60s`.
How often the Collector emits aggregated DogStatsD metrics. Set this interval to the licensed
metrics resolution.
* **`dogstatsd.inactive_expire_after`**
Type: `duration`. Optional. Default: `2m`.
How long an aggregated time series can receive no samples before the Collector expires it and
emits a staleness marker. The marker uses the time of the next expected sample, so set this
duration within the out-of-order window accepted by the metrics backend.
* **`apm`**
Type: `object`. Optional.
Settings for receiving Datadog traces and span metrics.
* **`apm.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to receive Datadog trace traffic. If true, the Collector listens for traces and stats
payloads. If false, it doesn't receive Datadog trace traffic.
* **`apm.listener`**
Type: `object`. Optional.
Network address on which the Collector receives Datadog trace traffic. A Unix stream socket
requires the node Collector to run as root so that it can create the socket.
* **`apm.listener.endpoint`**
Type: `string`. Required. Default: `0.0.0.0:9126`.
Address or Unix socket path on which the Collector receives Datadog trace traffic.
* **`apm.listener.transport`**
Type: `string`. Required. Default: `tcp`.
Transport for the trace listener. Use `tcp` for a network listener or `unix` for a Unix stream
socket. Allowed values: `tcp`, `unix`.
* **`apm.stats`**
Type: `object`. Optional.
Settings for producing span metrics.
* **`apm.stats.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to produce span metrics. If true, the Collector processes received stats payloads or
metrics computed from raw spans. If false, it drops received stats payloads. Set this field to
`true` when `compute` is `true`.
* **`apm.stats.normalize_tags`**
Type: `boolean`. Optional. Default: `true`.
Whether to normalize span metric labels using Datadog tag character rules. If true, the
Collector lowercases label values, and the names of labels that keep their Datadog tag name,
and replaces unsupported characters. If false, it preserves them after Datadog stats
processing. This setting doesn't modify traces or span tags.
* **`apm.stats.exclude_attributes`**
Type: `array of string`. Optional. Default: `[]`.
Attributes to remove from span metrics, listed by attribute name, such as `server.address` or
`http.route`. Span metrics keep every attribute that isn't listed. Excluding a
high-cardinality attribute reduces the number of time series that the Collector sends. The
`service.name`, `span.name`, `span.kind`, and `status.code` attributes can't be excluded.
Enrichment can add some excluded attributes back, such as `host.name`, `k8s.cluster.name`, and
`k8s.deployment.name`. Kubernetes enrichment adds pod attributes only to span metrics that
keep `container.id`, or both `k8s.namespace.name` and `k8s.pod.name`.
* **`apm.stats.compute`**
Type: `boolean`. Optional. Default: `false`.
Whether the Collector computes span metrics from received traces. If true, the Collector drops
received stats payloads and computes metrics from raw spans. If false, it uses stats payloads
received from apps or a Datadog Agent. Don't enable this setting for Agent-forwarded traffic
because the Agent forwards sampled traces, which results in a request count lower than the
actual count.
# Docker
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/docker
Per-container CPU, memory, block I/O, network, process and uptime metrics from a Docker daemon, plus the daemon's own container and image counts.
The Docker integration requires CXDOT Collector 1.4.0 or greater.
[Docker](https://www.docker.com/) is a platform for building and running applications
in containers.
Use the Docker integration with the CXDOT Collector to collect
per-container resource metrics and container counts from Docker daemons running in
your environment.
The Docker integration supports Docker Engine 29.0 or greater.
## Supported telemetry types
The Docker integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Docker integration has the following prerequisites:
* Run Docker Engine on the hosts or Kubernetes nodes you collect from. Most Kubernetes
clusters run containerd instead, which exposes no Docker daemon for this integration
to read. To confirm which runtime your nodes run, run the following command and read
the `CONTAINER-RUNTIME` column:
```shell theme={null}
kubectl get nodes -o wide
```
* Run your hosts or nodes on Linux with cgroups v2, which most current distributions
use. On a cgroups v1 machine the integration still reports container and image counts
and the per-container metrics the Docker daemon serves, but not the fields read from
the machine's cgroup tree: block I/O operation counts, memory reclaim events, kernel
and swap memory, and open file descriptors. To confirm which version a host or node
uses, run the following command on it and confirm that it reports `cgroup2fs`:
```shell theme={null}
stat -fc %T /sys/fs/cgroup
```
* Make the Docker daemon reachable from the Collector, either through the Unix socket
on the machine the Collector runs on or over a TCP address the daemon listens on.
## Configure
The Docker integration is disabled by default. Follow the steps for where the CXDOT
Collector runs: directly on each Docker host, or on Kubernetes with the CXDOT Collector
Helm chart.
### Configure on a host
To configure the Docker integration on a host, follow these steps:
1. Enable the integration. Run the Collector in host mode on each Docker host and add
the following to the Collector configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
docker:
enabled: true
```
Each Collector reads the Docker daemon on its own host and reports the containers
that daemon runs. For more information about running the Collector on a host, see
[install the CXDOT Collector on Linux](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/linux).
2. Give the Collector access to the Docker socket. Run the Collector as root, or as an
account in the `docker` group, which owns the socket. For example, add the account
that runs the Collector to the `docker` group:
```shell theme={null}
sudo usermod -aG docker COLLECTOR_USER
```
Replace `COLLECTOR_USER` with the name of that account, then restart the Collector.
An account other than root also needs `cxdot.debug.socket_path` set to a path in a
directory that account can write to. The default debug socket directory is under
`/var/run`, and a Collector that can't create it doesn't start.
Running as root is also required to emit `container.file_descriptor.count`.
Membership in the `docker` group doesn't grant it. A Collector that doesn't run as
root reports every other metric and skips this one.
3. Optional: Collect from a daemon at another address, such as one that listens on a TCP
port. For example, add the following to the Collector configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
docker:
enabled: true
endpoint: tcp://127.0.0.1:2375
```
Open file descriptors are counted on the host the Collector runs on, so a daemon at
any address other than a Unix socket, `localhost`, or `127.0.0.1` reports no
`container.file_descriptor.count`.
4. Optional: Exclude the containers of images you don't want reported, such as
short-lived build agents. For example, add the following to the Collector
configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
docker:
enabled: true
excluded_images:
- registry.example.com/build-agents/*
```
### Configure on Kubernetes
To configure the Docker integration on Kubernetes, follow these steps:
1. Enable the integration. For example, add the following to the `values.yaml` for your
CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
docker:
enabled: true
```
Each Collector reads the Docker daemon on its own node and reports the containers
that daemon runs. That work runs on the node Collector. For more information about
Collector tiers and node placement, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
2. Allow the node Collector to run as root. For example, add the following to the
`values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
nodeCollector:
securityContext:
runAsRoot: true
```
`runAsRoot` is required for a Unix socket endpoint. `runAsRoot` is also required to emit
`container.file_descriptor.count`.
Leave `collect_open_file_descriptors` out of your `values.yaml` to keep the default, where
the Collector reports the count when it can read it and skips it when it can't. Writing
`collect_open_file_descriptors: true` makes the metric a requirement instead: the chart
then refuses to deploy unless the Collector runs as root and reads a daemon on its own
node.
3. Optional: Collect from a daemon at another address, such as one that listens on a TCP
port. For example, add the following to the `values.yaml` for your CXDOT Collector Helm
chart:
```yaml theme={null}
collection:
cxdot:
integrations:
docker:
enabled: true
endpoint: tcp://127.0.0.1:2375
```
Open file descriptors are counted on the node the Collector runs on, so a daemon at any
address other than a Unix socket, `localhost`, or `127.0.0.1` reports no
`container.file_descriptor.count`. Don't set `collect_open_file_descriptors: true` for
such an endpoint, because the chart then refuses to deploy.
4. Optional: Exclude the containers of images you don't want reported, such as
short-lived build agents. For example, add the following to the `values.yaml` for your
CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
docker:
enabled: true
excluded_images:
- registry.example.com/build-agents/*
```
### Validate
To validate the Docker integration, follow these steps:
1. In
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=docker`. Confirm that the metric reports `1`, meaning the
Collector reached the daemon and listed its containers and images. A value of `0`
means that one of those listings failed. The `host.name` attribute identifies which
host's or node's daemon a reading describes.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
count by ("host.name") ({"container.cpu.utilization"})
```
Confirm that the query returns one time series per host or node, each counting the
containers running there.
### Troubleshooting
* The health metric reports `0` and the Collector logs `client version 1.44 is too new`:
The daemon runs a Docker Engine release older than 25.0, which serves an older API
version than the integration requests by default. Set `api_version` to the maximum API
version the message reports, which `docker version` also shows for the server. The
integration doesn't fully support Docker Engine releases older than 29.0, so some
metrics can be missing on them.
* Every other metric arrives, but `container.file_descriptor.count` is missing: Descriptor
counts come from each process's own entry under `/proc`, on the machine the containers
run on, and only that process's own user and root can read them. A Collector that
doesn't run as root reads none of them and reports no count for any container. A
Collector reading a daemon on another machine reports no count either, whatever it
runs as, because the counts are on that machine. For a daemon on the same machine, run
the Collector as root, as shown in Configure, or set `collect_open_file_descriptors` to
`false` to stop collecting the metric.
## Configuration reference
Configure one Docker integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.docker`. In a Collector configuration file,
place them under `cxdot.integrations.docker`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`endpoint`**
Type: `string`. Optional. Default: `unix:///var/run/docker.sock`.
The Docker daemon the Collector reads container stats from. Either a Unix socket such as
`unix:///var/run/docker.sock`, or a TCP address such as `tcp://host:2375`. The default
connects to the daemon on the node the Collector runs on: directly in `host` mode, and in
Kubernetes because the Helm chart mounts that node's socket into the Collector.
* **`api_version`**
Type: `string`. Optional. Default: `1.44`.
Docker Engine API version the Collector requests from the daemon. A daemon rejects a version
newer than its own API version, which `docker version` reports for the server. The Collector
supports API versions 1.25 and later. The default 1.44 works with Docker Engine 25.0 and
later.
* **`excluded_images`**
Type: `array of string`. Optional. Default: `[]`.
Images whose containers aren't reported. Each entry is a literal name, a glob, or a `/regex/`,
matched against the whole image reference the container was created from, tag included, rather
than against `container.image.name`. For example, `nginx` excludes containers created from
`nginx` but not from `nginx:1.27`. List `nginx:*` as well to exclude every tag.
* **`env_vars_to_metric_labels`**
Type: `object`. Optional. Default: `{}`.
Container environment variables to report as resource attributes, as pairs of an environment
variable name and the attribute name its value is reported under. The Collector adds each
attribute to every series from a container that sets the variable, and counts containers in
`container.count` separately for each combination of these attributes, for stopped containers
as well as running ones. For example, map `MESOS_TASK_ID` to `mesos.task.id` to identify the
scheduler task each container runs. Each attribute name can appear only once, and the
Collector rejects a configuration that maps two variables to the same attribute.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
How often the Collector collects metrics from the Docker daemon.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for the Docker daemon to respond during one collection. This
value must not exceed `collection_interval`. If the deadline expires, that collection fails.
* **`collect_open_file_descriptors`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect `container.file_descriptor.count`, the number of file descriptors open
across all of a container's processes. If true, the Collector reports the metric. If false, it
reports everything else and omits this one. The cost of this metric grows with the number of
processes in the reported containers and the descriptors each has open, because every
collection counts them again. Working out which container a process belongs to takes a read
for every process on the node. That answer is cached and rechecked only every few dozen
collections, so its cost is paid mostly on the first collection. Turning the metric off leaves
every other field read under `root_path` collecting normally. The Collector can read
descriptor counts only for a daemon on its own node, and only when it runs as root, because
another user's open descriptors are readable only by root. On a host, run the Collector as
root. In Kubernetes, set `nodeCollector.securityContext.runAsRoot` in the Helm chart. Left
unset, the setting takes its default without making the metric a requirement: a count the
Collector can't read is skipped, with a warning, rather than reported. Written out as `true`,
it becomes a requirement: the Helm chart fails to render unless the daemon is on the same node
as the Collector and `runAsRoot` is set.
* **`collect_container_size`**
Type: `boolean`. Optional. Default: `false`.
Whether to collect the size of each running container's file system:
`container.filesystem.writable_layer.usage`, the size of its writable layer, and
`container.filesystem.rootfs.usage`, the size of its image and writable layer together. If
true, the Collector reports both. If false, it reports neither. Computing the sizes makes the
Docker daemon walk the writable layer of every container, which is slow on a node with many
containers or large writable layers. To limit that load, the Collector requests and reports
the sizes on one collection in five, so each size has one value every five
`collection_interval` periods. A collection that requests sizes and runs past `timeout` fails
like any other. A container whose size the daemon can't compute is skipped.
* **`root_path`**
Type: `string`. Optional.
Root of the node file system when the Collector runs in a container with the node root
bind-mounted, for example `/hostfs`. In Kubernetes the Helm chart mounts it and sets this
value, so it rarely needs setting by hand. The Collector reads it for the per-container cgroup
fields the Docker daemon's stats API doesn't report on cgroups v2: block I/O operation counts,
memory reclaim events, kernel and swap memory, and open file descriptors. Those fields come
from the node's cgroup tree instead. In `host` mode against a daemon on the same node, meaning
a Unix socket or a `tcp://` endpoint on a loopback host such as `127.0.0.1` or `localhost`,
the Collector runs on the node it reports on, so this value defaults to `/` and those fields
are read from that node's own `/proc` and `/sys/fs/cgroup`. It stays unset for a `tcp://`
endpoint naming another host, because these fields can't be collected without access to that
host's file system. It also stays unset in `node` mode outside the Helm chart, where nothing
mounts the node root or sets this value for you. When this value is unset, those fields aren't
collected. Set it to `""` to switch the fields off where the default would otherwise apply.
* **`containers`**
Type: `object`. Optional.
Settings for Docker container metrics collection.
* **`containers.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
# Elasticsearch
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/elasticsearch
Collect cluster, node, index, operating system, process, and JVM metrics from Elasticsearch.
The Elasticsearch integration requires CXDOT Collector 1.7.0 or greater.
[Elasticsearch](https://www.elastic.co/elasticsearch) is a distributed search and
analytics engine. Use the Elasticsearch integration with the CXDOT Collector to collect
cluster, node, operating system, process, and Java Virtual Machine metrics from
Elasticsearch servers running in your environment.
The Elasticsearch integration supports Elasticsearch 7.9 or later.
## Supported telemetry types
The Elasticsearch integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Elasticsearch integration has the following prerequisites:
* If Elasticsearch security is enabled, create a monitoring user with the `monitor`
or `manage` cluster privilege. The `monitor` privilege provides the required
read-only access. For more information, see
[Elasticsearch security privileges](https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges).
* Make the Elasticsearch HTTP API reachable from the CXDOT Collector.
## Configure
The Elasticsearch integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the integration, follow these steps:
1. To collect from Elasticsearch pods in Kubernetes, add a CXDOT integration annotation
to the pod template. The annotation key must end with the container name, and its
value can reference credentials and a certificate authority stored in a Kubernetes
Secret in the same namespace. For example, add the following annotation to your
Elasticsearch workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/elasticsearch: |
schema_version: v1.14
elasticsearch:
endpoints:
- endpoint: https://${target.host}:${target.port.http}
username: cxdot
password: ${k8s_secret:elasticsearch-monitoring/password}
tls:
ca_pem: ${k8s_secret:elasticsearch-monitoring/ca.crt}
spec:
containers:
- name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:9.1.4
ports:
- name: http
containerPort: 9200
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.http}` with the container port named `http`, and
`${k8s_secret:elasticsearch-monitoring/password}` and
`${k8s_secret:elasticsearch-monitoring/ca.crt}` with the `password` and `ca.crt` keys
of the `elasticsearch-monitoring` Secret. Elasticsearch enables security and HTTPS by
default, so the endpoint uses `https://` and `ca.crt` holds the certificate authority
that signed the Elasticsearch HTTP certificate. To allow the Collector to read the
Secret, add the pod's namespace to `apiServer.metadataServer.secretAllowlist` in the
Helm values for your CXDOT Collector.
The Collector also discovers Elasticsearch pods that carry the
`app.kubernetes.io/name: elasticsearch` label and expose an unsecured HTTP API on
port `9200`. A CXDOT integration annotation takes precedence over the label for its
container. To stop collecting from a container, set `elasticsearch: {enabled: false}`
in the annotation. Metrics from each discovered pod include that pod's Kubernetes
metadata. For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
2. Optional: To collect from Elasticsearch servers outside your Kubernetes cluster,
configure static targets. Supply the password
through your deployment's secret management. For example, add the following to
the `values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
elasticsearch:
endpoints:
- endpoint: https://elasticsearch.example.com:9200
username: cxdot
password: "${env:ELASTICSEARCH_PASSWORD}"
```
When you configure static targets, this integration instance collects from
exactly those targets instead of discovered targets. In Kubernetes cluster mode, the
elected cluster Collector scrapes static targets. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
3. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the `values.yaml` for
your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
elasticsearch: {}
elasticsearch/edge:
endpoints:
- endpoint: elasticsearch.example.com:9200
```
The `elasticsearch/edge` key defines a named instance for the static target. The
bare `elasticsearch` key continues to discover pods.
4. Optional: Disable the integration. For example, add the following to the
`values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
elasticsearch:
enabled: false
```
### Validate
To validate the Elasticsearch integration, follow these steps:
1. In
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=elasticsearch`. Confirm that each reachable Elasticsearch
target reports `1`. A value of `0` means the Collector hit an error collecting from
that target. The `cxdot.integration.target`, `server.address`, and `server.port`
attributes identify the target.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query after Elasticsearch has indexed documents:
```text theme={null}
sum by ("server.address", "server.port") ({"elasticsearch.node.documents", "state"="active"})
```
With the default `nodes: [_local]` setting, confirm that the query returns one time
series per target and that each value is greater than `0` once the cluster has
indexed documents. Each value counts active documents on the Elasticsearch node that
answered that target's scrape, not the whole cluster.
## Configuration reference
Configure one Elasticsearch integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.elasticsearch`. In a Collector
configuration file, place them under `cxdot.integrations.elasticsearch`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Elasticsearch integration instance. If true, the Collector collects
Elasticsearch metrics. If false, the Collector doesn't run this integration instance.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Elasticsearch targets. Each `endpoint` is either `host:port` for an HTTP connection or a full
HTTP or HTTPS URL. When this list contains targets, this integration instance collects from
exactly those targets and doesn't use discovery. When the list is empty or omitted, the
integration discovers Elasticsearch targets from Kubernetes pod labels and discovery
annotations. Configure a second named integration instance to use both listed targets and
discovery.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Elasticsearch target as either `host:port` for an HTTP connection or a full HTTP or HTTPS URL.
* **`username`**
Type: `string`. Optional.
Username for HTTP basic authentication to the targets in `endpoints`. Set `username` and
`password` together. Targets discovered through discovery annotations use the credentials in
their annotations.
* **`password`**
Type: `string`. Optional.
Password for HTTP basic authentication to the targets in `endpoints`. Set `username` and
`password` together. The Collector masks this value in diagnostic output, logs, and errors.
Targets discovered through discovery annotations use the credentials in their annotations.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector collects metrics from each Elasticsearch target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time allowed to collect metrics from one Elasticsearch target. The value must not
exceed `collection_interval`.
* **`nodes`**
Type: `array of string`. Optional. Default: `["_local"]`.
Elasticsearch node selectors to collect. Use `_local` to collect the node that receives the
request, `_all` to collect every node in the cluster, or Elasticsearch node names and selector
expressions. An empty list disables node metrics.
* **`skip_cluster_metrics`**
Type: `boolean`. Optional. Default: `false`.
If true, don't collect cluster metrics, including pending task and index template metrics. If
false, collect cluster metrics.
* **`indices`**
Type: `array of string`. Optional. Default: `[]`.
Elasticsearch index names and index selector expressions to collect. Use `_all` to collect
every index. An empty list disables index metrics.
* **`pending_tasks`**
Type: `boolean`. Optional. Default: `true`.
If true, collect the number, priority, and average queue time of pending cluster tasks. If
false, don't request pending task details or emit pending task metrics.
* **`tls`**
Type: `object`. Optional.
Transport Layer Security (TLS) settings for the HTTPS targets in `endpoints`. The Collector
verifies server certificates by default. Targets discovered through annotations use the TLS
settings in their annotations.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the
Elasticsearch server certificate. If omitted, the Collector uses the system certificate
authority pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the Elasticsearch server
certificate.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the Elasticsearch endpoint
requires mutual TLS authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the Elasticsearch endpoint requires
mutual TLS authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. If true, the Collector uses an unencrypted connection.
If false, the Collector uses TLS for HTTPS endpoints.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the Elasticsearch server certificate. If true, the connection
is encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the Elasticsearch certificate instead of the endpoint hostname. Use
this setting when the certificate name differs from the endpoint hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
# Envoy
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/envoy
Envoy listener, cluster, and traffic metrics.
The Envoy integration requires CXDOT Collector 1.4.0 or greater.
[Envoy](https://www.envoyproxy.io/) is an open source edge and service proxy for
cloud-native applications. Use the Envoy CXDOT Collector integration with the CXDOT
Collector to collect listener, cluster, and traffic metrics from Envoy proxies running
in your environment.
## Supported telemetry types
The Envoy CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Envoy CXDOT Collector integration has the following prerequisites:
* Configure Envoy to expose metrics at `/stats/prometheus`.
* Make the Envoy metrics endpoint reachable from the CXDOT Collector.
## Configure
The Envoy integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the Envoy CXDOT Collector integration, follow these steps:
1. To collect from Envoy pods in Kubernetes, add a CXDOT integration annotation to the
pod template. The annotation key must end with the container name. For example, add
the following annotation to your Envoy workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/envoy: |
schema_version: v1.14
envoy:
endpoints:
- endpoint: ${target.host}:${target.port.admin}
spec:
containers:
- name: envoy
image: envoyproxy/envoy:v1.36.9
ports:
- name: admin
containerPort: 9901
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.admin}` with the container port named `admin`.
The Collector also discovers Envoy pods that carry the `app.kubernetes.io/name: envoy`
label and listen on port `8001` or `9901`. A CXDOT integration annotation takes
precedence over the label for its container. To stop collecting from a container, set
`envoy: {enabled: false}` in the annotation. For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
2. Optional: To collect from Envoy proxies outside your Kubernetes cluster, configure
static targets. For example, add the following to the `values.yaml` for
your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
envoy:
endpoints:
- endpoint: 10.0.0.5:8001
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets.
3. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the `values.yaml` for
your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
envoy: {}
envoy/edge:
endpoints:
- endpoint: 10.0.0.5:8001
```
The `envoy/edge` key defines a named instance for the static targets. The bare
`envoy` key continues to discover pods.
### Validate
To validate the Envoy CXDOT Collector integration, follow these steps:
1. In the Live Telemetry Analyzer, filter for `cxdot.integration.name=envoy`. Confirm
that the Envoy metric names appear.
2. In Metrics Explorer, run the following query:
```text theme={null}
{"cxdot.integration.target.health", "cxdot.integration.name"="envoy"}
```
Confirm that the query returns one time series for each Envoy proxy you expect,
with the scraped URL in the `cxdot.integration.target` attribute, and that each
reachable proxy reports `1`.
3. In Metrics Explorer, run the following query:
```text theme={null}
count by ("url.full") ({"envoy.server.live"})
```
Confirm that every Envoy proxy you expect appears in the results.
## Configuration reference
Configure one Envoy integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.envoy`. In a Collector configuration file,
place them under `cxdot.integrations.envoy`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Envoy integration instance. If true, the Collector collects metrics
from Envoy targets. If false, it doesn't run this integration instance.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Envoy targets as `host:port` values or complete HTTP or HTTPS URLs. For `host:port`, the
Collector requests `/stats/prometheus` over HTTP.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Envoy target as `host:port` or a complete HTTP or HTTPS URL. For `host:port`, the Collector
requests `/stats/prometheus` over HTTP.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
How often the Collector requests metrics from each Envoy target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for an Envoy metrics request to complete.
* **`max_samples`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`.
Maximum number of samples accepted from one metric collection. A value of `0`, the default,
means no limit. A collection that exceeds the limit fails and reports `up` as `0` instead of
returning an incomplete set of samples.
* **`follow_redirects`**
Type: `boolean`. Optional. Default: `true`.
Whether to follow HTTP redirects. If true, the Collector follows redirects. If false, a
redirect causes the metric collection to fail.
* **`metrics`**
Type: `object`. Optional.
Settings for collecting and naming Envoy metrics.
* **`metrics.include`**
Type: `array of string`. Optional. Default: `[]`.
Metrics to collect, in addition to the default set. Each entry is a regular expression matched
against the metric name.
* **`metrics.exclude`**
Type: `array of string`. Optional. Default: `[]`.
Metrics to drop, matched the same way as `include`. Applied afterwards, so it subtracts from
what `include` chose.
* **`metrics.rename`**
Type: `object`. Optional. Default: `{}`.
Renames metrics, as `{old: new}`. User-configured renames take precedence over default
renames.
* **`labels`**
Type: `object`. Optional.
Which samples to drop, by label value.
* **`labels.sample_drop_rules`**
Type: `object`. Optional. Default: `{}`.
Drops a whole sample when one of its labels matches. Each key is a label name. The value is a
list of regular expressions matched against the label's value. To drop every sample the label
appears on with a non-empty value, use `".+"`.
# HAProxy
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/haproxy
HAProxy connection, request, and session metrics.
The HAProxy integration requires CXDOT Collector 1.4.0 or greater.
[HAProxy](https://www.haproxy.org/) is an open source load balancer and reverse proxy
for TCP and HTTP applications. Use the HAProxy CXDOT Collector integration to collect
connection, request, and session metrics from HAProxy servers running in your
environment.
## Supported telemetry types
The HAProxy CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The HAProxy CXDOT Collector integration has the following prerequisites:
* An HAProxy stats page that exposes the CSV export.
* Network access from the CXDOT Collector to the HAProxy stats page.
## Configure
The HAProxy integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the HAProxy CXDOT Collector integration, follow these steps:
1. Configure HAProxy to expose statistics at `/stats` on port `8404`. For example,
add the following frontend to the HAProxy configuration:
```text theme={null}
frontend stats
bind :8404
mode http
stats enable
stats uri /stats
```
2. To collect from HAProxy pods in Kubernetes, add a CXDOT integration annotation to the
pod template. The annotation key must end with the container name. For example, add
the following annotation to your HAProxy workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/haproxy: |
schema_version: v1.14
haproxy:
endpoints:
- endpoint: ${target.host}:${target.port.stats}
spec:
containers:
- name: haproxy
image: haproxy:3.0-alpine
ports:
- name: stats
containerPort: 8404
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.stats}` with the container port named `stats`.
The Collector also discovers HAProxy pods that carry the
`app.kubernetes.io/name: haproxy` label and expose the stats page on port `8404`. A
CXDOT integration annotation takes precedence over the label for its container. To
stop collecting from a container, set `haproxy: {enabled: false}` in the annotation.
For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
3. Optional: To collect from HAProxy servers outside your Kubernetes cluster, configure
static targets. For example, add the following to the `values.yaml` for
your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
haproxy:
endpoints:
- endpoint: haproxy.example.com:8404
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets.
4. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the `values.yaml` for
your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
haproxy: {}
haproxy/edge:
endpoints:
- endpoint: haproxy.example.com:8404
```
The `haproxy/edge` key defines a named instance for the static targets. The bare
`haproxy` key continues to discover pods.
### Validate
To validate the HAProxy CXDOT Collector integration, follow these steps:
1. In Metrics Explorer, run the following query:
```text theme={null}
{"cxdot.integration.target.health", "cxdot.integration.name"="haproxy"}
```
Confirm that the query returns one time series for each stats URL you configured,
with the URL in the `cxdot.integration.target` attribute, and that each reachable
URL reports `1`.
2. In Metrics Explorer, run the following query:
```text theme={null}
count by ("server.address", "server.port") ({"haproxy.sessions.count"})
```
Confirm that the query returns the expected time series for each target.
## Configuration reference
Configure one HAProxy integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.haproxy`. In a Collector configuration file,
place them under `cxdot.integrations.haproxy`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this HAProxy integration instance. If true, the Collector collects metrics
from HAProxy targets. If false, it doesn't run this integration instance.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
HAProxy stats listeners. For a `host:port` value, the Collector requests
`http://:/stats`; for a full HTTP or HTTPS URL, it requests the URL as written.
Either way it reads the CSV output.
* **`endpoints[].endpoint`**
Type: `string`. Required.
HAProxy statistics listener as `host:port`. The Collector requests `/stats` over HTTP and
reads its CSV output.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
How often the Collector requests statistics from each HAProxy target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for an HAProxy statistics request to complete.
* **`disable_keep_alives`**
Type: `boolean`. Optional. Default: `true`.
Whether to close the connection after each statistics request. If true, the Collector closes
the connection so that an idle connection doesn't increase `haproxy.sessions.count`. If false,
the Collector keeps the connection open for reuse. Annotation-discovered endpoints instead
take connection persistence from the annotation's `persist_connections`,
`tls_use_host_header`, `headers`, and `extra_headers` fields.
* **`tls`**
Type: `object`. Optional.
Transport layer security (TLS) settings for HTTPS targets. Certificate verification is enabled
unless `insecure_skip_verify` is true. These settings don't apply to HTTP targets. Discovery
annotations can provide target-specific TLS settings.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to the CA cert. For a client this verifies the server certificate. For a server this
verifies client certificates. If empty uses system root CA. (optional)
* **`tls.ca_pem`**
Type: `string`. Optional.
In memory PEM encoded cert. (optional)
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the TLS cert to use for TLS required connections. (optional)
* **`tls.cert_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS cert to use for TLS required connections. (optional)
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a
safe default list is used. See
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go)
for a list of supported cipher suites.
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
contains the elliptic curves that will be used in an ECDHE handshake, in preference order
Defaults to empty list and "crypto/tls" defaults are used, internally.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
If true, load system CA certificates pool in addition to the certificates configured in this
struct.
* **`tls.insecure`**
Type: `boolean`. Optional.
In gRPC and HTTP when set to true, this is used to disable the client transport security. See
[https://godoc.org/google.golang.org/grpc#WithInsecure](https://godoc.org/google.golang.org/grpc#WithInsecure)
for gRPC. Please refer to
[https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for more
information. (optional, default false)
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
InsecureSkipVerify will enable TLS but not verify the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the TLS key to use for TLS required connections. (optional)
* **`tls.key_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS key to use for TLS required connections. (optional)
* **`tls.max_version`**
Type: `string`. Optional.
MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls
for defaults. (optional)
* **`tls.min_version`**
Type: `string`. Optional.
MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used.
(optional)
* **`tls.reload_interval`**
Type: `duration`. Optional.
ReloadInterval specifies the duration after which the certificate will be reloaded If not set,
it will never be reloaded (optional)
* **`tls.server_name_override`**
Type: `string`. Optional.
ServerName requested by client for virtual hosting. This sets the ServerName in the TLSConfig.
Please refer to [https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for
more information. (optional)
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module configuration
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.
# Hasura
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/hasura
Hasura GraphQL Engine request, subscription, event trigger, and Postgres connection metrics.
The Hasura integration requires CXDOT Collector 1.13.0 or greater.
[Hasura GraphQL Engine](https://hasura.io/) serves a GraphQL API over your databases
and services. Use the Hasura integration to collect GraphQL request, subscription,
event trigger, and PostgreSQL connection metrics from Hasura GraphQL Engine Enterprise
Edition instances running in your environment.
The Hasura integration supports Hasura GraphQL Engine 2.36 or greater.
## Supported telemetry types
The Hasura integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Hasura integration has the following prerequisites:
* Run Hasura GraphQL Engine Enterprise Edition with an active license. Community
Edition and unlicensed Enterprise Edition don't serve metrics.
* Enable the metrics API on each Hasura instance by adding `metrics` to
`HASURA_GRAPHQL_ENABLED_APIS`, such as
`HASURA_GRAPHQL_ENABLED_APIS=metadata,graphql,pgdump,config,metrics`. If the instance sets
`HASURA_GRAPHQL_METRICS_SECRET`, every request for metrics must present that secret
as a bearer token. For more information, see
[Integrate Prometheus with Hasura](https://hasura.io/docs/2.0/observability/enterprise-edition/prometheus/integrate-prometheus-grafana/).
To confirm that an instance serves metrics, request `/v1/metrics` from a machine
that can reach it and confirm that the request returns a successful status code.
For example:
```shell theme={null}
curl -i http://hasura.example.com:8080/v1/metrics
```
If the instance sets `HASURA_GRAPHQL_METRICS_SECRET`, present that value as a
bearer token:
```shell theme={null}
curl -i -H "Authorization: Bearer METRICS_SECRET" http://hasura.example.com:8080/v1/metrics
```
* Make port `8080`, or the port that `HASURA_GRAPHQL_SERVER_PORT` sets, reachable on
each Hasura instance from the CXDOT Collector.
## Configure
The Hasura integration is enabled by default, but doesn't collect data until you
configure targets. Add a CXDOT integration annotation to your Hasura pods or to a Service
in front of them, or list the Hasura instances to monitor.
To configure the Hasura integration, follow these steps:
1. To collect from Hasura pods in Kubernetes, add a CXDOT integration annotation to the
pod template. The annotation key must end with the container name. For example, add
the following annotation to your Hasura workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/hasura: |
schema_version: v1.16
hasura:
endpoints:
- endpoint: ${target.host}:${target.port.http}
spec:
containers:
- name: hasura
image: hasura/graphql-engine
ports:
- name: http
containerPort: 8080
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.http}` with the container port named `http`. Metrics from each
annotated pod include that pod's Kubernetes metadata. This annotation sets no
metrics secret, so use it for instances that don't set
`HASURA_GRAPHQL_METRICS_SECRET`, or see the step about the metrics secret for
annotated pods.
2. Alternatively, to collect from Hasura instances outside your Kubernetes cluster or
at addresses that you choose, list each instance in `endpoints`. For example, add
the following to the Helm values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
hasura:
endpoints:
- endpoint: hasura-1.example.com:8080
- endpoint: hasura-2.example.com:8080
- endpoint: https://hasura-3.example.com/v1/metrics
```
When you list endpoints, the integration collects from exactly those endpoints
instead of from annotated pods and Services. In Kubernetes, the elected
cluster Collector collects from each endpoint that you list, one time rather than
once per node. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
List an address that reaches one Hasura instance. Each request to an address that
balances across replicas, such as a Kubernetes Service in front of several pods,
reaches a different replica, so the metrics mix the replicas' values. For a
Hasura deployment with several replicas, list each replica's own address. For
example, a StatefulSet with a headless Service gives each pod a stable DNS name.
Metrics from listed endpoints don't carry Kubernetes metadata from the Hasura
pods. Use the `server.address` and `server.port` attributes to identify each
instance.
3. Optional: To collect from both annotated pods and listed endpoints, list the
endpoints in a second integration instance. For example, add the following to the
Helm values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
hasura: {}
hasura/edge:
endpoints:
- endpoint: hasura-1.example.com:8080
```
The `hasura/edge` key defines a named instance for the listed endpoints. The bare
`hasura` key lists no endpoints, so the integration continues to collect from
annotated pods and Services.
4. Optional: If you can't change the pod template, configure the Service in front of
the instances' pods with a CXDOT integration annotation instead. The
`integrations.cxdot.paloaltonetworks.com/endpoints` key makes each ready pod behind
the Service a separate target, so the metrics don't mix the replicas' values. For
example, add the following annotation to that Service:
```yaml theme={null}
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/endpoints: |
schema_version: v1.16
hasura:
endpoints:
- endpoint: ${target.host}:${target.port.http}
spec:
ports:
- name: http
port: 80
targetPort: 8080
```
The Collector replaces `${target.host}` with the IP address of each pod and
`${target.port.http}` with the pod port that the Service port named `http` forwards
to. This annotation sets no metrics secret, so use it for instances that don't set
`HASURA_GRAPHQL_METRICS_SECRET`. The Collector reads these annotations only when
`endpoints` is empty.
5. Optional: To supply the metrics secret for listed endpoints, mount the secret from a
Kubernetes Secret in the namespace of your CXDOT Collector with the chart's
`clusterCollector.extraVolumes` and
`clusterCollector.extraVolumeMounts` values, then set `metrics_secret_file` to the
mounted path. For example:
```yaml theme={null}
clusterCollector:
extraVolumes:
- name: hasura-metrics-secret
secret:
secretName: hasura-metrics-secret
extraVolumeMounts:
- name: hasura-metrics-secret
mountPath: /etc/cxdot/hasura
readOnly: true
collection:
cxdot:
integrations:
hasura:
metrics_secret_file: /etc/cxdot/hasura/secret
endpoints:
- endpoint: hasura-1.example.com:8080
```
Kubernetes mounts each key of the Secret as a file named after the key, so the
`/etc/cxdot/hasura/secret` path in this example exists only if the Secret
stores the metrics secret under the key `secret`. For a different key, set
`metrics_secret_file` to the path for that key. The Collector sends the same
secret to every endpoint in one integration instance.
6. Optional: Add a named integration instance for listed Hasura deployments that use
a different metrics secret. Mount each instance's Secret as in the previous step,
with its own volume and mount path. For example:
```yaml theme={null}
collection:
cxdot:
integrations:
hasura:
metrics_secret_file: /etc/cxdot/hasura/secret
endpoints:
- endpoint: hasura-1.example.com:8080
hasura/billing:
metrics_secret_file: /etc/cxdot/hasura-billing/secret
endpoints:
- endpoint: hasura-billing.example.com:8080
```
The `hasura/billing` key defines a second integration instance with its own
endpoints and settings. Its metrics carry the
`cxdot.integration.instance.name` attribute with the value `billing`.
7. Optional: To collect from annotated pods that set a metrics secret, mount the Secret
into the node Collector and allow its path. The `metrics_secret_file` setting takes
the path of a file that the Collector reads, so an annotation can't carry the
secret itself. The Collector rejects a `hasura` block that names a file outside
`allowed_collector_file_paths`, which allows no paths by default. The Secret must be
in the namespace of your CXDOT Collector. For example:
```yaml theme={null}
nodeCollector:
extraVolumes:
- name: hasura-metrics-secret
secret:
secretName: hasura-metrics-secret
extraVolumeMounts:
- name: hasura-metrics-secret
mountPath: /etc/cxdot/hasura
readOnly: true
collection:
cxdot:
integrations:
discovery:
kubernetes:
annotation_restrictions:
allowed_collector_file_paths:
- /etc/cxdot/hasura
custom_pod_host: deny
```
Then set `metrics_secret_file: /etc/cxdot/hasura/secret` in the `hasura` block of
the pod annotation, where `secret` is the key that holds the metrics secret in the
Kubernetes Secret. After you allow a path, an annotation on any pod in your cluster
can name the file, and the Collector sends the secret to that annotation's target.
The `custom_pod_host: deny` setting limits each pod annotation's target to the pod's
own IP address, so the secret reaches only annotated pods. Allow only paths that hold
secrets that you intend annotated pods to use.
8. Optional: If the OpenMetrics integration also scrapes your Hasura pods or Service,
disable OpenMetrics on that workload to avoid duplicate metrics. For example, set
`openmetrics: {enabled: false}` in a CXDOT integration annotation on the pod or
Service. For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Hasura integration, follow these steps:
1. In the [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for
`__name__=cxdot.integration.target.health` and
`cxdot.integration.name=hasura`. Confirm that each Hasura instance reports
`1` for `cxdot.integration.target.health`, identified by its
`server.address` and `server.port` attributes.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while Hasura serves GraphQL requests:
```text theme={null}
sum by ("server.address", "graphql.operation.type") (rate({"hasura.graphql.requests"}[$__rate_interval]))
```
Confirm that the query returns a time series for each instance and operation type
that serves requests.
### Troubleshooting
* An endpoint reports `0` for `cxdot.integration.target.health`: Confirm that the
instance meets the requirements in the Prerequisites section and that
`metrics_secret_file` holds the instance's current metrics secret. If you set
`max_samples`, a collection that exceeds the limit also reports `0`.
* Source health metrics don't appear: Hasura reports source health only for
sources that have a
[source health check](https://hasura.io/docs/2.0/deployment/health-checks/source-health-check/)
configured.
## Configuration reference
Configure one Hasura integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.hasura`. In a Collector configuration file,
place them under `cxdot.integrations.hasura`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Hasura integration instance. If true, the Collector collects metrics
from the endpoints that this instance is configured for. If false, the Collector doesn't run
this integration instance.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Hasura GraphQL Engine endpoints to monitor. Specify a full HTTP or HTTPS URL that includes the
`/v1/metrics` path, or use `host:port` format to request the `/v1/metrics` path over HTTP. For
a URL without a path, the Collector requests `/metrics`, which Hasura doesn't serve. Hasura
exposes metrics only in Enterprise Edition, with `metrics` in `HASURA_GRAPHQL_ENABLED_APIS`.
Each entry is one target, so list an address that reaches one Hasura instance. An address that
balances requests across replicas, such as a Kubernetes Service with several pods, reaches a
different replica on each collection. The integration instance collects only from the
endpoints listed here.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Hasura GraphQL Engine address, as a full HTTP or HTTPS URL or in `host:port` format. For
`host:port`, the Collector requests the `/v1/metrics` path over HTTP. A full URL must include
the `/v1/metrics` path, such as `https://hasura.example.com/v1/metrics`. For a URL without a
path, the Collector requests `/metrics`, which Hasura doesn't serve.
* **`metrics_secret_file`**
Type: `string`. Optional. Default: empty string.
Path to a file that holds the value of Hasura's `HASURA_GRAPHQL_METRICS_SECRET`. The Collector
sends this value as a bearer token on every request. The Collector rereads the file when it
changes. If Hasura has no metrics secret, omit this setting.
* **`tls`**
Type: `object`. Optional.
Transport layer security (TLS) settings for HTTPS endpoints. The Collector verifies
certificates unless `insecure_skip_verify` is `true`. These settings don't apply to HTTP
endpoints.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the Hasura
server certificate. If set, the Collector trusts only the certificate authorities in this file
instead of the system certificate authority pool.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the Hasura server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the server certificate.
* **`tls.server_name`**
Type: `string`. Optional.
Server name to verify in the Hasura server certificate instead of the endpoint hostname. The
Collector also sends this name as the TLS server name indication. Use this setting when the
certificate name differs from the endpoint hostname.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the integration collects metrics from each Hasura endpoint.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time allowed to collect metrics from a Hasura endpoint during one interval. The value
must be greater than zero.
* **`max_samples`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`.
Maximum number of samples accepted from one metric collection. A value of `0`, the default,
means no limit. A collection that exceeds the limit fails and reports the target as unhealthy
instead of returning an incomplete set of samples. If your Hasura version labels request
metrics by operation, the number of samples grows with the number of distinct operations that
a deployment serves.
* **`metrics`**
Type: `object`. Optional.
Settings that control which Hasura metrics the integration collects and how it names them.
* **`metrics.include`**
Type: `array of string`. Optional. Default: `[]`.
Regular expressions for metrics to collect in addition to the integration's default metric
set. Each expression must match a whole metric name as Hasura exposes it, without a `_total`
suffix. A matched metric outside the default set keeps its exposed name.
* **`metrics.exclude`**
Type: `array of string`. Optional. Default: `[]`.
Regular expressions for metrics to drop. Each expression must match a whole metric name as
Hasura exposes it, without a `_total` suffix, such as `hasura_otel_.*`. Exclusions apply
before renaming and take precedence over `include`.
* **`metrics.rename`**
Type: `object`. Optional. Default: `{}`.
Mapping of metric names as Hasura exposes them, without a `_total` suffix, to the names that
the Collector reports. These mappings take precedence over the integration's default metric
names. Renaming a metric also collects it.
* **`labels`**
Type: `object`. Optional.
Settings that drop metric samples based on their label values. Rules match the label names
that Hasura exposes. The integration reports `operation_name` as `graphql.operation.name` and
`operation_type` as `graphql.operation.type`. It reports the `source_name` label of Postgres
connection metrics as `db.client.connection.pool.name`. In a rule, use the label name that
Hasura exposes, not the reported name. Other labels, such as `trigger_name` and the
`source_name` label of other metrics, keep their names.
* **`labels.sample_drop_rules`**
Type: `object`. Optional. Default: `{}`.
Drops a whole sample when one of its labels matches. Each key is a label name. The value is a
list of regular expressions matched against the label's value. To drop every sample the label
appears on with a non-empty value, use `".+"`.
# Apache HBase
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/hbase
Apache HBase master and RegionServer metrics collected over JMX, including requests and latency, regions and store files, the block cache, flushes and compactions, the write-ahead log, and the Java Virtual Machine runtime.
The Apache HBase integration requires CXDOT Collector 1.17.0 or greater.
[Apache HBase](https://hbase.apache.org/) is an open source distributed database that
stores large tables on Apache Hadoop. Use the Apache HBase integration with the CXDOT
Collector to collect master, RegionServer, and Java Virtual Machine (JVM) runtime metrics
from HBase clusters running in your environment.
The Apache HBase integration supports Apache HBase 2.5 or greater.
## Supported telemetry types
The Apache HBase integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Apache HBase integration has the following prerequisites:
* Enable remote Java Management Extensions (JMX) monitoring on the master and on each
RegionServer. HBase disables remote JMX by default. Each role runs its own JVM, so set
the `com.sun.management.jmxremote` system properties in `HBASE_MASTER_OPTS` and in
`HBASE_REGIONSERVER_OPTS` in `hbase-env.sh`. The commented example in `hbase-env.sh`
uses port `10101` for the master and port `10102` for the RegionServer. For example,
the following lines enable remote JMX on those ports without authentication or
Transport Layer Security (TLS):
```shell theme={null}
export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Djava.rmi.server.hostname=SERVER_ADDRESS"
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE \
-Dcom.sun.management.jmxremote.port=10101 \
-Dcom.sun.management.jmxremote.rmi.port=10101"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE \
-Dcom.sun.management.jmxremote.port=10102 \
-Dcom.sun.management.jmxremote.rmi.port=10102"
```
Replace `SERVER_ADDRESS` with the server's address as the CXDOT Collector reaches it.
Setting `com.sun.management.jmxremote.rmi.port` to the same value as
`com.sun.management.jmxremote.port` serves the JMX registry and the connection it
returns on one port, so each process needs one open port for JMX. For more
information, see [JMX](https://hbase.apache.org/docs/configuration/important#jmx) in
the HBase documentation.
* Make the JMX port and the address each process advertises for Remote Method
Invocation (RMI) connections reachable from the CXDOT Collector. Set
`java.rmi.server.hostname` to an address the CXDOT Collector can resolve, or
configure the integration's advertised host and port overrides when that address isn't
reachable.
* Restrict JMX access to trusted clients. In production, enable JMX password
authentication and TLS on the master and RegionServers, and configure the
integration's `username`, `password`, `registry_tls`, and `tls` settings to match. The
JMX section of the HBase documentation shows the `HBASE_JMX_BASE` settings for both.
## Configure
The Apache HBase integration is enabled by default. You can configure targets either by
annotating master and RegionServer pods in your Kubernetes cluster or by listing static
endpoints in your Helm values. The integration collects from masters and RegionServers
separately: a CXDOT integration annotation or a static endpoint list names the role it
configures, and the metrics from each target carry `hbase.role` set to `master` or
`regionserver`. To configure the integration, follow these steps:
1. To collect from HBase pods in Kubernetes, add a CXDOT integration annotation to the
pod template of the master workload and to the pod template of the RegionServer
workload. The annotation key must end with the container name, its value names the
role under `hbase`, and it can reference JMX credentials stored in a Kubernetes
Secret in the same namespace. For example, add the following annotation to your
HBase master workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/master: |
schema_version: v1.17
hbase:
master:
endpoints:
- endpoint: ${target.host}:${target.port.jmx}
username: cxdot
password: ${k8s_secret:hbase-jmx/password}
spec:
containers:
- name: master
image: example.com/hbase:2.6.7
ports:
- name: jmx
containerPort: 10101
```
Add the following annotation to your RegionServer workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/regionserver: |
schema_version: v1.17
hbase:
regionserver:
endpoints:
- endpoint: ${target.host}:${target.port.jmx}
username: cxdot
password: ${k8s_secret:hbase-jmx/password}
spec:
containers:
- name: regionserver
image: example.com/hbase:2.6.7
ports:
- name: jmx
containerPort: 10102
```
The Collector replaces `${target.host}` with the pod IP address, `${target.port.jmx}`
with the container port named `jmx`, and `${k8s_secret:hbase-jmx/password}` with the
`password` key of the `hbase-jmx` Secret. Each master and RegionServer pod becomes its
own target. To allow the Collector to read the Secret, add the pod's namespace to
`apiServer.metadataServer.secretAllowlist` in the Helm values for your CXDOT
Collector.
2. Optional: To collect from HBase servers outside your Kubernetes cluster, configure
static targets for each role. For example, add the following to the Helm values file
for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
hbase:
master:
endpoints:
- endpoint: hbase-master.example.com:10101
regionserver:
endpoints:
- endpoint: hbase-rs-0.example.com:10102
- endpoint: hbase-rs-1.example.com:10102
```
When you configure static targets for a role, this integration instance collects from
exactly those targets for that role instead of discovered targets. Each role's list
stands on its own: listing masters under `master.endpoints` leaves RegionServer
discovery on. In cluster mode, the cluster Collector that wins leader election
scrapes static targets.
3. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the Helm values file for
your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
hbase: {}
hbase/external:
master:
endpoints:
- endpoint: hbase-master.example.com:10101
regionserver:
endpoints:
- endpoint: hbase-rs-0.example.com:10102
```
The `hbase/external` key defines a named instance for the static targets. The bare
`hbase` key continues to discover pods.
4. Optional: If the master and RegionServers require JMX authentication or TLS,
configure the matching settings for static targets, and provide the password through
your deployment's secret management. For example, the following Helm values reference
the `HBASE_JMX_PASSWORD` environment variable and a mounted certificate authority
file:
```yaml theme={null}
collection:
cxdot:
integrations:
hbase:
master:
endpoints:
- endpoint: hbase-master.example.com:10101
regionserver:
endpoints:
- endpoint: hbase-rs-0.example.com:10102
username: cxdot
password: "${env:HBASE_JMX_PASSWORD}"
registry_tls: true
tls:
ca_file: /etc/cxdot/hbase-tls/ca.crt
```
The `username`, `password`, `registry_tls`, and `tls` settings apply to every master
and RegionServer that the instance collects from. Every Collector loads the same
integration settings and rejects a `username` without a `password`, so set the
password variable on both the node and cluster Collectors with the
`nodeCollector.extraEnv` and `clusterCollector.extraEnv` Helm values. Mount the
certificate authority file into the cluster Collector, which collects from static
targets, with the `clusterCollector.extraVolumes` and
`clusterCollector.extraVolumeMounts` Helm values.
For annotated pods, set these settings in the CXDOT integration annotation instead,
and supply the certificate authority from a Kubernetes Secret with
`tls.ca_pem: ${k8s_secret:hbase-tls/ca.crt}`. The Collector rejects an annotation
that sets `tls.ca_file`, or any other setting that names a file, unless the file is
under
`collection.cxdot.integrations.discovery.kubernetes.annotation_restrictions.allowed_collector_file_paths`
in your Helm values, which allows no files by default.
5. Optional: Disable the integration, or one of its roles. For example, add the
following to the Helm values file for your CXDOT Collector to stop collecting from
masters and RegionServers alike:
```yaml theme={null}
collection:
cxdot:
integrations:
hbase:
enabled: false
```
To keep collecting from RegionServers and stop collecting from masters, set
`master.enabled` to `false` instead.
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Apache HBase integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=hbase`. Confirm that `cxdot.integration.target.health`
reports `1` for each master and each RegionServer. A value of `0` means the CXDOT
Collector hit an error connecting to or collecting from that target. The
`hbase.role`, `cxdot.integration.target`, `server.address`, and `server.port`
attributes identify the target.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
sum by ("server.address", "server.port") ({"hbase.master.region_server.count", "hbase.region_server.state"="live"})
```
Confirm that the query returns one time series per master, each reporting the number
of RegionServers that master sees as live.
3. In Metrics Explorer, run the following query while the cluster serves reads and
writes:
```text theme={null}
sum by ("server.address", "server.port", "hbase.request.type") (rate({"hbase.region_server.request.count"}[$__rate_interval]))
```
Confirm that the query returns a `read` and a `write` time series for each
RegionServer.
### Troubleshooting
* `hbase.wal.*` time series appear for a master: The master keeps a write-ahead log for
its procedure store and reports it through the same metrics as a RegionServer's log.
Filter on `hbase.role="regionserver"` to see the logs that record table writes.
* A duration statistic such as `hbase.region_server.operation.duration.p99` reads `0`
while the cluster serves requests: HBase computes its minimum, maximum, mean, median,
and p99 statistics over the operations since its last metrics snapshot, which it
takes every 10 seconds by default, as `*.period` in
`hadoop-metrics2-hbase.properties` sets. An interval without an operation of that
kind reads `0`, and an operation faster than a millisecond rounds down to `0`. The
matching `.count` metrics are cumulative, so query a rate of them for throughput.
For more information about CXDOT Collector integrations, see the
[integrations catalog](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector).
## Configuration reference
Configure one Apache HBase integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.hbase`. In a Collector configuration
file, place them under `cxdot.integrations.hbase`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Apache HBase integration instance. If true, the Collector collects from
the masters and RegionServers the instance configures or discovers. If false, the Collector
doesn't run the instance.
* **`master`**
Type: `object`. Optional.
Settings for collecting from HBase masters. Masters are discovered from workload annotations,
or listed here as endpoints.
* **`master.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether this instance collects from HBase masters. If true, the Collector collects from the
masters it discovers or the targets in `master.endpoints`. If false, the Collector doesn't
collect from masters, and RegionServer collection isn't affected.
* **`master.endpoints`**
Type: `array of object`. Optional. Default: `[]`.
HBase master Java Management Extensions (JMX) targets. When this list is empty or omitted, the
integration uses automatic target discovery. When the list contains targets, this integration
instance collects from exactly those targets and doesn't automatically discover masters.
Configure a second named instance to use both methods. Each endpoint can be a `host:port`
Remote Method Invocation (RMI) registry address or a `service:jmx:rmi` URL.
* **`master.endpoints[].endpoint`**
Type: `string`. Required.
HBase master JMX endpoint as either a `host:port` RMI registry address or a `service:jmx:rmi`
URL.
* **`regionserver`**
Type: `object`. Optional.
Settings for collecting from HBase RegionServers. RegionServers are discovered from workload
annotations, or listed here as endpoints.
* **`regionserver.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether this instance collects from HBase RegionServers. If true, the Collector collects from
the RegionServers it discovers or the targets in `regionserver.endpoints`. If false, the
Collector doesn't collect from RegionServers, and master collection isn't affected.
* **`regionserver.endpoints`**
Type: `array of object`. Optional. Default: `[]`.
HBase RegionServer Java Management Extensions (JMX) targets. When this list is empty or
omitted, the integration uses automatic target discovery. When the list contains targets, this
integration instance collects from exactly those targets and doesn't automatically discover
RegionServers. Configure a second named instance to use both methods. Each endpoint can be a
`host:port` Remote Method Invocation (RMI) registry address or a `service:jmx:rmi` URL.
* **`regionserver.endpoints[].endpoint`**
Type: `string`. Required.
HBase RegionServer JMX endpoint as either a `host:port` RMI registry address or a
`service:jmx:rmi` URL.
* **`registry_tls`**
Type: `boolean`. Optional. Default: `false`.
Whether to use Transport Layer Security (TLS) for the RMI registry connection. If true, the
Collector uses TLS. If false, the Collector uses an unencrypted registry connection.
* **`advertised_host_override`**
Type: `string`. Optional. Default: empty string.
Host the Collector uses for RMI server connections instead of the host advertised by returned
RMI stubs. When empty, the Collector uses the registry endpoint host.
* **`advertised_port_override`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`. Maximum: `65535`.
Port the Collector uses for RMI server connections instead of the port advertised by returned
RMI stubs. When set to `0`, the Collector uses the advertised port.
* **`username`**
Type: `string`. Optional.
Username for JMX authentication, used for every master and RegionServer. Configure `username`
and `password` together.
* **`password`**
Type: `string`. Optional.
Password for JMX authentication, used for every master and RegionServer. Configure `username`
and `password` together.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector collects metrics from each HBase JMX endpoint.
* **`bean_detection_interval`**
Type: `duration`. Optional. Default: `10m`.
How often the Collector refreshes the set of available JMX beans.
* **`bean_limit`**
Type: `integer`. Optional. Default: `35000`. Minimum: `1`.
Maximum number of JMX bean matches collected from each endpoint. When the number of matches
exceeds this value, the integration drops beans according to the attribute mapping priority.
* **`target_system`**
Type: `string`. Optional. Default: `hbase`.
Comma-delimited attribute mapping names to apply. The HBase mapping, which covers both masters
and RegionServers, is enabled by default, and the Java Virtual Machine (JVM) mapping is
included automatically. Add `-jvm` to disable JVM metrics when at least one other mapping is
configured.
* **`attribute_mapping_paths`**
Type: `array of string`. Optional. Default: `[]`.
Directories and files containing custom JMX attribute mappings. The Collector searches these
paths before the embedded HBase and JVM mappings.
* **`tls`**
Type: `object`. Optional. Default: `{}`.
TLS certificate and client authentication settings for RMI registry and server connections.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the JMX
server certificate. If omitted, the Collector uses the system certificate authority pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the JMX server
certificate.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the JMX server requires mutual
TLS authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the JMX server requires mutual TLS
authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses secure default cipher suites. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses its default curves.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. This setting must be false. Use `registry_tls` to
control transport security for the RMI registry.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the JMX server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the highest
TLS version it supports.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the JMX certificate instead of the endpoint hostname. Use this
setting when the certificate name differs from the endpoint hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
# Host
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/host
Operating system metrics from the machine running the Collector, including CPU, memory, disk, file system, network, load, paging, process counts, and uptime.
The Host integration requires CXDOT Collector 1.4.0 or greater.
Use the Host CXDOT Collector integration to collect operating system metrics from
the machine where the CXDOT Collector runs, including CPU, memory, disk, file
system, network, load, paging, processes, and uptime. The integration can also
count the processes that match named checks and collect per-process metrics.
## Supported telemetry types
The Host CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Host CXDOT Collector integration has the following prerequisites:
* When you deploy the CXDOT Collector with the Helm chart on Linux, the chart
mounts the node's file system read-only at `/hostfs` and sets `root_path` so
metrics describe the node rather than the Collector container. No extra volume
mapping is required.
* For another container-based Linux deployment, bind-mount the host root file
system read-only into the container and set `root_path` to that mount point.
For example, mount the host root at `/hostfs` and set `root_path: /hostfs`.
Without this mount, the integration reports metrics for the container instead
of the host.
* When the CXDOT Collector runs directly on the host, you don't need a file
system mount.
## Configure
The Host CXDOT Collector integration is enabled by default. It monitors the
machine where the node Collector runs and doesn't require target endpoints or
pod labels for discovery.
On Kubernetes, the node Collector runs one Host integration instance per node.
For more information about Collector tiers and node placement, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
Host metrics receive base deployment enrichment, such as cluster and host
identity labels. They aren't scoped to individual pods.
By default, the integration collects CPU, memory, disk, file system, network,
load, paging, and uptime metrics on Linux, macOS, and Windows, plus process
counts on Linux and macOS. On Linux, it also collects network-interface
configuration from `/sys/class/net` and system-wide file descriptor usage. On
Windows, it also collects the CPU queue length, the file cache size, the commit
limit and commit charge, and the open handle count across all processes. The
network family also collects TCP statistics on Windows, split by IPv4 and IPv6.
The interface configuration metrics describe the interfaces the Collector
process can see. They match the node's interfaces when the Collector runs with
host networking or directly on the host.
Process checks and per-process metrics run only after you configure them, so a
default installation collects neither. Per-process metrics can substantially
increase time series cardinality. For more information, see the Monitor
processes section.
Shared timing settings apply to every metric family, and `root_path` applies on
Linux only. You can enable or disable each family, and most families also pass
through additional settings. On Windows, the `processes.config` settings have
no effect. For the complete field list, accepted values, and defaults, see the
configuration reference on this page.
To configure the Host CXDOT Collector integration, follow these steps:
1. Optional: Adjust shared settings or individual metric families. For example,
add the following to the `values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
host:
collection_interval: 30s
filesystem:
enabled: false
```
2. Optional: Count the processes that match named checks, and collect detailed
per-process metrics for the processes you choose. For example, add the
following to the `values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
host:
process:
config:
checks:
- name: nginx
executable_name:
values: [nginx]
per_process_metrics:
include_matches:
- executable_name:
values: [postgres, haproxy]
```
This example counts the processes named `nginx` every collection interval
and collects per-process metrics for processes named `postgres` or
`haproxy`. For all options, see the Monitor processes section.
3. Optional: Disable the integration. For example, add the following to the
`values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
host:
enabled: false
```
### Validate
To validate the Host CXDOT Collector integration, follow these steps:
1. In the Live Telemetry Analyzer, filter for
`__name__=cxdot.integration.target.health` and
`cxdot.integration.name=host`. Confirm that each series reports `1` for a
healthy node. Use the `cxdot.integration.target` and `host.name` attributes
to identify the node and metric family.
2. In Metrics Explorer, run the following query:
```text theme={null}
count by ("host.name") ({"system.uptime"})
```
Confirm that the query returns one time series per node. Use the `host.name`
label to identify the node.
3. Optional: If you configured process checks, run the following query in
Metrics Explorer and confirm that it returns one series per check:
```text theme={null}
{"system.process.check.count"}
```
Use the `cxdot.process.check` attribute to identify each check. A check that
matches no process reports `0`.
### Troubleshooting
* A check reports `0` for a running process: The check's selector can't read one
of its fields, or doesn't match the value. Check the Collector logs
for an unreadable-field warning. An `executable_path` selector needs `root` or
the `CAP_SYS_PTRACE` capability on Linux, and a `pid_file` must be readable by
the Collector.
* A check has no count and `cxdot.integration.target.health` reports `0` for
`cxdot.integration.check="process"`: The Collector can't read the process
table. Confirm that `root_path` points at the host's root file system and that
`/proc` is mounted without `hidepid`.
## Monitor processes
The `process` setting has two parts. Both run only when you configure them.
`process.enabled` defaults to `true`, and with no checks and no per-process
selection, the integration collects nothing for it. Set `process.enabled` to
`false` to turn both parts off.
* A process check counts the processes that match a name and a set of
selectors. It reports the count every interval, including `0`.
* Per-process metrics, such as `process.cpu.time` and `process.memory.usage`,
describe individual processes.
Both parts run on Linux, macOS, and Windows.
### Configure process checks
Each check has a unique `name` and at least one selector field. Add the
following to the `values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
host:
process:
config:
checks_collection_interval: 15s
checks:
# A process with this executable name.
- name: nginx
executable_name:
values: [nginx]
# A Java service, matched on its command line.
- name: kafka
command_line:
values: ['kafka\.Kafka']
match_type: regexp
# A daemon that writes its process ID to a file. The name guards
# against a stale file whose ID another program now uses.
- name: haproxy
pid_file: /var/run/haproxy.pid
executable_name:
values: [haproxy]
# A worker pool owned by a service user, children included.
- name: gunicorn_app
executable_name:
values: [gunicorn]
owner:
values: [appsvc]
include_children: true
```
The check `name` becomes the `cxdot.process.check` attribute, so keep it stable
when you change the selectors.
By default, checks run at the integration's `collection_interval`. Set
`checks_collection_interval` to count processes more often without collecting
per-process metrics more often. Each check reports one time series per host, so
a shorter interval adds little cost.
### Match processes
Checks, `include_matches`, and `exclude_matches` share one set of matching
rules:
* Within a field, any value can match. `values: [redis-server, redis-sentinel]`
matches either name.
* Across fields, every field must match. A selector with `executable_name` and
`owner` matches processes that satisfy both.
* Across list items, any item can match. A process matches `include_matches`
when at least one item matches it.
* A process can belong to several checks. Each check is independent, and the
first match doesn't win.
* A field the Collector can't read doesn't match. For example, a process with an
unreadable executable path doesn't match an `executable_path` selector.
* A process with no executable or command line, such as a Linux kernel thread,
has an empty `executable_path` and `command_line`. No `strict` value matches
an empty field.
* `match_type: strict`, the default, compares the whole value. On Windows,
strict comparison of `executable_name`, `executable_path`, and `owner` ignores
case.
* `match_type: regexp` uses RE2 syntax and matches anywhere in the value. Anchor
the expression with `^` and `$` to match the whole value. Regular expressions
are case-sensitive on every operating system. Use `(?i)` to ignore case.
* `pid_file` matches the process whose ID is on the first line of the file. A
missing file, a path that isn't a regular file, a file that doesn't parse, or
an ID with no running process matches nothing, so the check reports `0`. The
Collector reads the file once per interval, under `root_path` on a Kubernetes
node.
* `include_children: true` adds every descendant of every matching process,
and each process counts once per check. A child whose parent has exited is no
longer found through that parent.
The following table shows what each field matches:
| Field | Linux | Windows | macOS |
| - | - | - | - |
| `executable_name` | Kernel process name | Image name, including `.exe` | Process name |
| `executable_path` | Target of `/proc//exe` | Full path of the image | Full path of the executable |
| `command_line` | Arguments joined by single spaces | Raw command line | Arguments joined by spaces |
| `owner` | User name of the real user ID | `DOMAIN\user` | User name of the process |
On Linux, a kernel name truncated to 15 characters is extended from the first
command-line argument. On a Kubernetes node, the Collector resolves `owner` from
the node's `/etc/passwd`, so the name is the host's.
### Select per-process metrics
Per-process metrics are off until you select processes under
`per_process_metrics`. The Collector selects:
* every process, if `all_processes` is `true`
* plus the processes that match `include_matches`
* plus every member of every check, if `include_checks` is `true`, including
descendants for a check that sets `include_children`
* minus the processes that match `exclude_matches`
Exclusions never change check counts. Setting `exclude_matches` alone doesn't
select every other process. For example, add the following to the `values.yaml`
for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
host:
process:
config:
per_process_metrics:
include_checks: true
include_matches:
- executable_name:
values: [postgres, haproxy]
exclude_matches:
- command_line:
values: ['^python ']
match_type: regexp
```
To collect per-process metrics for every process except a few, set
`all_processes: true` and list the exceptions under `exclude_matches`.
On a Kubernetes node, per-process metrics don't carry the `process.owner`
attribute, because the Collector container has no user list to resolve owner
names from. An `owner` selector still matches, because the Collector resolves
it from the node's `/etc/passwd`.
#### Control the cost of selection
The Collector decides whether to select a process before it reads any of the
process's metrics. To decide, it reads only the fields the selectors use, and
stops at the first field that rules a selector out. A process that isn't
selected costs only those reads, whichever fields you select on, and never
causes a read error to be logged. Only `all_processes` makes the Collector read
metrics for every process.
When `all_processes` is `true`, `mute_process_io_error` defaults to `true`,
because a Collector that isn't `root` can't read the I/O counters of other
users' processes. Set it to `false` to log those errors.
`mute_process_user_error` defaults to `true` when `all_processes` is `true`, or
when `root_path` is set to a path other than `/`, such as on a Kubernetes node,
where the Helm chart sets it to `/hostfs`. The Collector reads process owners
from its own user list, which has no entry for most user IDs when the Collector
runs in a container. On a Kubernetes node, the owner read fails for every
process. Set it to `false` to log those errors.
`all_processes` also reads executable paths the Collector may not be allowed
to read: other users' processes on Linux when the Collector isn't `root`, and
protected processes on Windows, where reading the process name fails too.
`mute_process_exe_error` and `mute_process_name_error` default to `false`, so
set both to `true` to stop `all_processes` from logging read errors.
### Move process settings to schema version 1.17
Before schema version 1.17, `process.config` took a different set of settings,
such as `include` and `exclude`. A configuration that declares an earlier
`schema_version` keeps working: the Collector converts these settings at
startup, and the Helm chart still accepts them. To declare schema version 1.17
or later, rewrite them as shown in the following table:
| Earlier setting | Current setting |
| - | - |
| `include` | An `executable_name` item in `per_process_metrics.include_matches`, with `names` as its `values` and the same `match_type` |
| `exclude` | An `executable_name` item in `per_process_metrics.exclude_matches`, with `names` as its `values` and the same `match_type` |
| `metrics` | `per_process_metrics.metrics` |
| `resource_attributes` | `per_process_metrics.resource_attributes` |
| `scrape_process_delay` | `per_process_metrics.scrape_process_delay` |
| Each `mute_process_*` setting | The same setting under `per_process_metrics` |
| `include.regexp` | None. Remove it. |
| `exclude.regexp` | None. Remove it. |
An earlier configuration with `process.enabled: true` and no `include`
collected per-process metrics for every process. To keep collecting them, set
`per_process_metrics.all_processes: true`. An earlier configuration also logged
the read errors that the current defaults mute in some cases. For more
information, see the Control the cost of selection section.
If a configuration declares schema version 1.17 or later and sets an earlier
setting, the Collector runs neither process checks nor per-process metrics, and
logs an error that names the setting. A `process.config` that mixes earlier and
current settings fails validation.
### Permissions
The Collector reads process details with its own permissions:
* On Linux, any user can read process names, command lines, and owners. Reading
`executable_path` for another user's process requires `root` or the
`CAP_SYS_PTRACE` capability. The Helm chart runs the node Collector as a
non-root user by default, so an `executable_path` selector matches only the
processes that run as the same user as the Collector unless you grant the
capability.
* A `/proc` file system mounted with `hidepid=2` hides other users' processes,
including init (PID 1), from a Collector that isn't `root`. The Collector then
treats the process table as unreadable: checks report no count, and
`cxdot.integration.target.health` reports `0`.
* On Windows, protected processes deny their path and owner. Their command line
reads as empty, so a `command_line` selector doesn't match them, and the
Collector logs no warning for it.
* A `pid_file` must be readable by the Collector. A file readable only by
`root` matches nothing for a non-root Collector.
When a selector can't read a field, the Collector logs a warning, at most once
every 10 minutes for each check or selector. It also logs a warning at startup
when an `executable_path` selector lacks the permission to read other users'
executables.
### Process check telemetry
Each check reports the `system.process.check.count` metric, with the
`cxdot.process.check` attribute set to the check name. The metric carries the
host attributes that every Host integration metric has, and no per-process
attributes.
For example, on a host that runs one Kafka broker and no `mongod`, the
integration reports these series:
```text theme={null}
system.process.check.count{cxdot.process.check="kafka"} 1
system.process.check.count{cxdot.process.check="mongod"} 0
cxdot.integration.target.health{cxdot.integration.check="process"} 1
```
The count distinguishes a stopped process from missing data:
| Situation | Count | Health |
| - | - | - |
| A matching process is running | `1` or more | `1` |
| No process matches and the process table is readable | `0` | `1` |
| The Collector can't read the process table | No value | `0` |
| The Collector or host is down | No value | No value |
The health series exists only when checks are configured. It reports `1` when
the Collector read the process table, whatever the count is.
In the rows with no value, a series doesn't disappear at once. After the
Collector stops reporting it, queries return its last value for five minutes,
and then return no value.
The Collector reports no count when it can't read the process table, for
example when `root_path` is wrong or `/proc` isn't mounted. It treats a table
that can't be the host's the same way: an empty one, or, outside Windows, one
without init (PID 1), which is what the Collector reads when the host's `/proc`
isn't mounted under `root_path`. This way, a Collector problem doesn't look like
every check failing at once.
A process can belong to several checks, and `include_children` can pull the same
process into a check that already counts it. Summing `system.process.check.count`
across checks therefore counts overlapping processes more than once. Sum across
hosts for the same check, and filter on `cxdot.process.check` to read one check.
### Alert on a stopped process
Group monitors by `host.name` and `cxdot.process.check`. The following queries
cover common cases.
These queries return no result when the count has no value, which happens when
the Collector or host is down, or when the Collector can't read the process
table. A condition such as `< 1` doesn't fire in those cases. To alert in those
cases too, add a
[missing data condition](https://docs-xcor.paloaltonetworks.com/investigate/alerts/monitors/data-model#missing-data-conditions)
to the monitor, or create a separate monitor that alerts when
`cxdot.integration.target.health` is `0` or has no value.
To alert when `mongod` isn't running on a host that's configured for it, use a
liveness query:
```text theme={null}
{"system.process.check.count", "cxdot.process.check"="mongod"} < 1
```
To alert when 4 of the last 5 readings are less than `1`, use the following query.
The step after the colon is the checks interval, and the window is 5 times the
step, so the window holds 5 readings. At the default 60 seconds that's `[5m:1m]`.
If you change `checks_collection_interval`, change both: at 15 seconds, use
`[75s:15s]`.
```text theme={null}
sum_over_time(({"system.process.check.count", "cxdot.process.check"="kafka"} < bool 1)[5m:1m]) >= 4
```
To alert when a worker pool shrinks, set monitor thresholds on the count. For
example, the following queries match a critical threshold of `2` and a warning
threshold of `4`:
```text theme={null}
{"system.process.check.count", "cxdot.process.check"="gunicorn_app"} < 2
{"system.process.check.count", "cxdot.process.check"="gunicorn_app"} < 4
```
## Configuration reference
Configure one Host integration instance with the following settings. In Helm values, place these
settings under `collection.cxdot.integrations.host`. In a Collector configuration file, place
them under `cxdot.integrations.host`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`collection_interval`**
Type: `duration`. Optional. Default: `60s`.
How often the Collector collects operating system metrics.
* **`timeout`**
Type: `duration`. Optional. Default: `60s`.
Maximum time allowed for one collection.
* **`root_path`**
Type: `string`. Optional. Default: empty string.
Root of the host file system when the Collector runs in a container with the host root
bind-mounted (for example, `/hostfs`). The Collector uses this path so metric collection reads
the node instead of the container. Omit when the Collector runs directly on the host.
* **`cpu`**
Type: `object`. Optional.
Settings for collecting CPU usage metrics.
* **`cpu.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`cpu.config`**
Type: `object`. Optional. Default:
`{"metrics":{"system.cpu.physical.count":{"enabled":true},"system.cpu.utilization":{"enabled":true}}}`.
Advanced settings for CPU metrics, passed through to the Collector unchanged. The default
enables this integration's standard metric set.
* **`memory`**
Type: `object`. Optional.
Settings for collecting memory usage metrics.
* **`memory.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`memory.config`**
Type: `object`. Optional. Default:
`{"metrics":{"system.linux.memory.available":{"enabled":true},"system.memory.limit":{"enabled":true},"system.memory.linux.shared":{"enabled":true},"system.memory.utilization":{"enabled":true}}}`.
Advanced settings for memory metrics, passed through to the Collector unchanged. The default
enables this integration's standard metric set.
* **`filesystem`**
Type: `object`. Optional.
Settings for collecting file system usage metrics.
* **`filesystem.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`filesystem.config`**
Type: `object`. Optional. Default:
`{"include_virtual_filesystems":true,"metrics":{"system.filesystem.utilization":{"enabled":true}}}`.
Advanced settings for file system metrics, passed through to the Collector unchanged. The
default enables this integration's standard metric set.
* **`filesystem.config.include_virtual_filesystems`**
Type: `boolean`. Optional. Default: `true`.
Include virtual and bind-mounted file systems. Containerized Collectors require this to report
file systems from a bind-mounted host root.
* **`filesystem.config.exclude_devices`**
Type: `object`. Optional.
Filter that excludes filesystems by device name. Set `match_type` to `strict` to match names
exactly or `regexp` to match them as regular expressions. The scraper requires `match_type`
when this filter is set.
* **`filesystem.config.exclude_devices.devices`**
Type: `array of string`. Optional.
Device names or patterns to exclude, for example, `/dev/loop0`.
* **`filesystem.config.exclude_fs_types`**
Type: `object`. Optional.
Filter that excludes filesystems by type. Set `match_type` to `strict` to match types exactly
or `regexp` to match them as regular expressions. The scraper requires `match_type` when this
filter is set.
* **`filesystem.config.exclude_fs_types.fs_types`**
Type: `array of string`. Optional.
Filesystem types or patterns to exclude, for example, `tmpfs` or `overlay`.
* **`filesystem.config.exclude_mount_points`**
Type: `object`. Optional.
Filter that excludes filesystems by mount point. Set `match_type` to `strict` to match mount
points exactly or `regexp` to match them as regular expressions. The scraper requires
`match_type` when this filter is set. When `root_path` is set, specify mount points as the
host sees them, not as the container does.
* **`filesystem.config.exclude_mount_points.mount_points`**
Type: `array of string`. Optional.
Mount points or patterns to exclude, for example, `/var/lib/docker`.
* **`filesystem.config.include_devices`**
Type: `object`. Optional.
Filter that limits filesystem metrics to the listed device names. Set `match_type` to `strict`
to match names exactly or `regexp` to match them as regular expressions. The scraper requires
`match_type` when this filter is set.
* **`filesystem.config.include_devices.devices`**
Type: `array of string`. Optional.
Device names or patterns to include, for example, `/dev/nvme0n1p2`.
* **`filesystem.config.include_fs_types`**
Type: `object`. Optional.
Filter that limits filesystem metrics to the listed filesystem types. Set `match_type` to
`strict` to match types exactly or `regexp` to match them as regular expressions. The scraper
requires `match_type` when this filter is set.
* **`filesystem.config.include_fs_types.fs_types`**
Type: `array of string`. Optional.
Filesystem types or patterns to include, for example, `ext4` or `xfs`.
* **`filesystem.config.include_mount_points`**
Type: `object`. Optional.
Filter that limits filesystem metrics to the listed mount points. Set `match_type` to `strict`
to match mount points exactly or `regexp` to match them as regular expressions. The scraper
requires `match_type` when this filter is set. When `root_path` is set, specify mount points
as the host sees them, not as the container does.
* **`filesystem.config.include_mount_points.mount_points`**
Type: `array of string`. Optional.
Mount points or patterns to include, for example, `/` or `/data`.
* **`network`**
Type: `object`. Optional.
Settings for collecting network interface and connection metrics.
* **`network.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`network.config`**
Type: `object`. Optional. Default:
`{"metrics":{"system.network.conntrack.count":{"enabled":true},"system.network.conntrack.max":{"enabled":true}}}`.
Advanced settings for network metrics, passed through to the Collector unchanged. The default
enables this integration's standard metric set.
* **`disk`**
Type: `object`. Optional.
Settings for collecting disk I/O metrics.
* **`disk.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`disk.config`**
Type: `object`. Optional. Default: `{}`.
Advanced settings for disk metrics, passed through to the Collector unchanged.
* **`load`**
Type: `object`. Optional.
Settings for collecting system load average metrics.
* **`load.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`load.config`**
Type: `object`. Optional. Default: `{}`.
Advanced settings for load metrics, passed through to the Collector unchanged.
* **`paging`**
Type: `object`. Optional.
Settings for collecting paging and swap activity metrics.
* **`paging.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`paging.config`**
Type: `object`. Optional. Default: `{}`.
Advanced settings for paging metrics, passed through to the Collector unchanged.
* **`processes`**
Type: `object`. Optional.
Settings for collecting process count metrics on Linux and macOS, and the processor queue
length on Windows.
* **`processes.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`processes.config`**
Type: `object`. Optional. Default: `{}`.
Advanced settings for process count metrics, passed through to the Collector unchanged. Linux
and macOS only; Windows ignores them.
* **`uptime`**
Type: `object`. Optional.
Settings for collecting system uptime metrics.
* **`uptime.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`uptime.config`**
Type: `object`. Optional. Default: `{}`.
Advanced settings for uptime metrics, passed through to the Collector unchanged.
* **`netclass`**
Type: `object`. Optional.
Settings for collecting per-interface configuration metrics from `/sys/class/net`.
* **`netclass.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`file_handles`**
Type: `object`. Optional.
Settings for collecting system-wide file-descriptor counts from `/proc/sys/fs/file-nr` on
Linux, and the open handle count on Windows.
* **`file_handles.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`process`**
Type: `object`. Optional.
Settings for process checks, which count the processes that match each named check, and
per-process metrics. Each runs only when configured. Both run on Linux, macOS, and Windows.
* **`process.enabled`**
Type: `boolean`. Optional. Default: `true`.
Turns process checks and per-process metrics on. With no checks and no per-process selection,
nothing runs. Set to `false` to turn both off.
* **`process.config`**
Type: `object`. Optional. Default: `{}`.
Process checks and per-process metric selection.
* **`process.config.per_process_metrics`**
Type: `object`. Optional. Default: `{}`.
Which processes get per-process metrics, such as `process.cpu.time`, and how they're
collected. No process is selected by default. Per-process metrics produce one set of time
series per process. The Collector reads only the fields a selector needs to decide whether a
process is selected, and collects metrics only for the processes it selects. Only
`all_processes` makes it collect every process.
* **`process.config.per_process_metrics.all_processes`**
Type: `boolean`. Optional. Default: `false`.
If `true`, selects every process, except those that match `exclude_matches`. The Collector
then collects every process each interval. If `false`, only `include_matches` and
`include_checks` select processes.
* **`process.config.per_process_metrics.include_checks`**
Type: `boolean`. Optional. Default: `false`.
If `true`, selects every process that each check in `checks` counts, including descendants
when the check sets `include_children`. If `false`, checks don't select processes for
per-process metrics.
* **`process.config.per_process_metrics.include_matches`**
Type: `array of object`. Optional. Default: `[]`.
Selects the processes that match any item.
* **`process.config.per_process_metrics.include_matches[].command_line`**
Type: `object`. Optional.
Matches the process command line, with arguments joined by single spaces.
* **`process.config.per_process_metrics.include_matches[].command_line.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.per_process_metrics.include_matches[].command_line.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.per_process_metrics.include_matches[].executable_name`**
Type: `object`. Optional.
Matches the process name, such as `nginx`. On Windows, the name includes the `.exe` extension.
On Linux and macOS, a name the kernel truncates to 15 characters is extended from the first
command-line argument.
* **`process.config.per_process_metrics.include_matches[].executable_name.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.per_process_metrics.include_matches[].executable_name.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.per_process_metrics.include_matches[].executable_path`**
Type: `object`. Optional.
Matches the full path of the process executable. Reading the path of another user's process on
Linux requires the Collector to run as `root` or with the `CAP_SYS_PTRACE` capability.
* **`process.config.per_process_metrics.include_matches[].executable_path.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.per_process_metrics.include_matches[].executable_path.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.per_process_metrics.include_matches[].owner`**
Type: `object`. Optional.
Matches the user name that owns the process. On Windows, the name has the form `DOMAIN\user`.
* **`process.config.per_process_metrics.include_matches[].owner.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.per_process_metrics.include_matches[].owner.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.per_process_metrics.include_matches[].pid_file`**
Type: `string`. Optional.
Absolute path of a file that holds a process ID. Matches the process with the ID on the first
line of the file. The Collector reads the file each interval and must have permission to read
it. A missing or unreadable file, a path that isn't a regular file, a file that doesn't
contain an ID, or an ID with no running process matches no process.
* **`process.config.per_process_metrics.exclude_matches`**
Type: `array of object`. Optional. Default: `[]`.
Processes that match any item never get per-process metrics. Exclusions don't affect check
counts, and setting this doesn't select every other process.
* **`process.config.per_process_metrics.exclude_matches[].command_line`**
Type: `object`. Optional.
Matches the process command line, with arguments joined by single spaces.
* **`process.config.per_process_metrics.exclude_matches[].command_line.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.per_process_metrics.exclude_matches[].command_line.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.per_process_metrics.exclude_matches[].executable_name`**
Type: `object`. Optional.
Matches the process name, such as `nginx`. On Windows, the name includes the `.exe` extension.
On Linux and macOS, a name the kernel truncates to 15 characters is extended from the first
command-line argument.
* **`process.config.per_process_metrics.exclude_matches[].executable_name.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.per_process_metrics.exclude_matches[].executable_name.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.per_process_metrics.exclude_matches[].executable_path`**
Type: `object`. Optional.
Matches the full path of the process executable. Reading the path of another user's process on
Linux requires the Collector to run as `root` or with the `CAP_SYS_PTRACE` capability.
* **`process.config.per_process_metrics.exclude_matches[].executable_path.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.per_process_metrics.exclude_matches[].executable_path.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.per_process_metrics.exclude_matches[].owner`**
Type: `object`. Optional.
Matches the user name that owns the process. On Windows, the name has the form `DOMAIN\user`.
* **`process.config.per_process_metrics.exclude_matches[].owner.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.per_process_metrics.exclude_matches[].owner.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.per_process_metrics.exclude_matches[].pid_file`**
Type: `string`. Optional.
Absolute path of a file that holds a process ID. Matches the process with the ID on the first
line of the file. The Collector reads the file each interval and must have permission to read
it. A missing or unreadable file, a path that isn't a regular file, a file that doesn't
contain an ID, or an ID with no running process matches no process.
* **`process.config.per_process_metrics.metrics`**
Type: `object`. Optional. Default: `{}`.
Turns individual per-process metrics on or off, for example
`process.disk.operations: {enabled: true}`.
* **`process.config.per_process_metrics.resource_attributes`**
Type: `object`. Optional. Default: `{}`.
Turns individual per-process resource attributes on or off. Selectors match a process whether
or not its attributes are turned on.
* **`process.config.per_process_metrics.mute_process_all_errors`**
Type: `boolean`. Optional. Default: `false`.
Stops logging every error the Collector encounters while reading a process.
* **`process.config.per_process_metrics.mute_process_name_error`**
Type: `boolean`. Optional. Default: `false`.
Stops logging errors for process names the Collector can't read.
* **`process.config.per_process_metrics.mute_process_exe_error`**
Type: `boolean`. Optional. Default: `false`.
Stops logging errors for executable paths the Collector can't read.
* **`process.config.per_process_metrics.mute_process_cgroup_error`**
Type: `boolean`. Optional. Default: `false`.
Stops logging errors for control groups the Collector can't read.
* **`process.config.per_process_metrics.mute_process_io_error`**
Type: `boolean`. Optional.
Stops logging errors for I/O counters the Collector can't read. When unset, these errors are
muted if `all_processes` is `true`, and logged otherwise.
* **`process.config.per_process_metrics.mute_process_user_error`**
Type: `boolean`. Optional.
Stops logging errors for process owners the Collector can't read. When unset, these errors are
muted if `all_processes` is `true` or `root_path` is set to a path other than `/`, as on a
Kubernetes node, and logged otherwise.
* **`process.config.per_process_metrics.scrape_process_delay`**
Type: `duration`. Optional. Default: `0s`.
Skips a process until it has been running for this long.
* **`process.config.checks_collection_interval`**
Type: `duration`. Optional.
How often the Collector counts the processes for each check. When unset, checks use
`collection_interval`. Set a shorter interval to detect a stopped process sooner without
collecting per-process metrics more often.
* **`process.config.checks`**
Type: `array of object`. Optional. Default: `[]`.
Named process checks. Every collection interval, the Collector reports the number of processes
that match each check as `system.process.check.count`, including `0` when none match. A
process can belong to several checks, so summing the counts across checks can count a process
more than once.
* **`process.config.checks[].name`**
Type: `string`. Required. Minimum length: `1`.
Identifies the check. It becomes the `cxdot.process.check` attribute on the check's count.
Names must be unique.
* **`process.config.checks[].include_children`**
Type: `boolean`. Optional. Default: `false`.
Also counts every descendant of each matching process.
* **`process.config.checks[].command_line`**
Type: `object`. Optional.
Matches the process command line, with arguments joined by single spaces.
* **`process.config.checks[].command_line.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.checks[].command_line.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.checks[].executable_name`**
Type: `object`. Optional.
Matches the process name, such as `nginx`. On Windows, the name includes the `.exe` extension.
On Linux and macOS, a name the kernel truncates to 15 characters is extended from the first
command-line argument.
* **`process.config.checks[].executable_name.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.checks[].executable_name.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.checks[].executable_path`**
Type: `object`. Optional.
Matches the full path of the process executable. Reading the path of another user's process on
Linux requires the Collector to run as `root` or with the `CAP_SYS_PTRACE` capability.
* **`process.config.checks[].executable_path.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.checks[].executable_path.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.checks[].owner`**
Type: `object`. Optional.
Matches the user name that owns the process. On Windows, the name has the form `DOMAIN\user`.
* **`process.config.checks[].owner.match_type`**
Type: `string`. Optional. Default: `strict`.
`strict` matches the whole value exactly. `regexp` matches a regular expression anywhere in
the value. Anchor it with `^` and `$` to match the whole value. Allowed values: `strict`,
`regexp`.
* **`process.config.checks[].owner.values`**
Type: `array of string`. Required. Minimum items: `1`.
Values to compare. A process matches when any value matches.
* **`process.config.checks[].pid_file`**
Type: `string`. Optional.
Absolute path of a file that holds a process ID. Matches the process with the ID on the first
line of the file. The Collector reads the file each interval and must have permission to read
it. A missing or unreadable file, a path that isn't a regular file, a file that doesn't
contain an ID, or an ID with no running process matches no process.
# HTTP Check
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/http_check
Availability, response time, and certificate expiry metrics for the HTTP endpoints your services depend on.
The HTTP Check integration requires CXDOT Collector 1.4.0 or greater.
[Hypertext Transfer Protocol (HTTP)](https://developer.mozilla.org/en-US/docs/Web/HTTP)
is the protocol clients use to request resources over the web. Use the
HTTP Check CXDOT Collector integration with the CXDOT Collector to collect
availability, response time, and certificate expiry metrics from the HTTP and HTTPS
endpoints your services depend on.
The HTTP Check CXDOT Collector integration supports HTTP and HTTPS URLs.
## Supported telemetry types
The HTTP Check CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The HTTP Check CXDOT Collector integration has the following prerequisites:
* Make each URL you want to monitor reachable from the CXDOT Collector.
## Configure
The HTTP Check integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the integration, follow these steps:
1. To monitor a URL served by a pod in Kubernetes, such as its readiness endpoint, add a
CXDOT integration annotation to the pod template. The annotation key must end with
the container name. For example, add the following annotation to your workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/web: |
schema_version: v1.14
http_check:
endpoints:
- endpoint: http://${target.host}:${target.port.http}/healthz
spec:
containers:
- name: web
image: registry.example.com/web:1.0
ports:
- name: http
containerPort: 8080
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.http}` with the container port named `http`.
2. Optional: To monitor URLs that pods in your cluster don't serve, such as an API
outside your Kubernetes cluster, configure static targets. For example, add the
following to the `values.yaml` file for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
http_check:
endpoints:
- endpoint: https://api.example.com/healthz
proxy_url: http://proxy.example.com:8080
- endpoint: http://status.example.com/ready
method: HEAD
```
The integration instance requests only the listed URLs and doesn't discover annotated
targets. In Kubernetes mode, the cluster Collector monitors static
targets. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
3. Optional: Trust a private certificate authority for static HTTPS targets. Mount
the authority's certificate with the chart's `clusterCollector.extraVolumes` and
`clusterCollector.extraVolumeMounts` values, then set `tls.ca_file` to the
mounted path. For example, add the following to the `values.yaml` file for your
CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
http_check:
endpoints:
- endpoint: https://api.internal.example.com/healthz
tls:
ca_file: /etc/ssl/certs/internal-ca.pem
```
The `tls` settings apply to every static target.
4. Optional: Configure separate integration instances to monitor both annotated pods and
static targets. For example, add the following to the `values.yaml` file for your
CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
http_check: {}
http_check/external:
endpoints:
- endpoint: https://api.example.com/healthz
```
The `http_check/external` key defines a named instance for the static targets.
Configuring a named instance suppresses the implicit default instance, so the empty
`http_check: {}` entry is required to keep discovering annotated pods.
5. Optional: Disable the integration to stop monitoring annotated targets. For
example, add the following to the `values.yaml` file for your CXDOT Collector
Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
http_check:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the HTTP Check CXDOT Collector integration, follow these steps:
1. In the Live Telemetry Analyzer, add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=http_check`
Confirm that one time series appears for each configured URL, identified by the
`cxdot.integration.target` attribute.
2. In Metrics Explorer, run the following query:
```text theme={null}
{"cxdot.integration.target.health", "cxdot.integration.name"="http_check"}
```
Confirm that each reachable URL reports `1` and each unreachable URL reports `0`.
3. In Metrics Explorer, run the following query:
```text theme={null}
{"httpcheck.duration", "cxdot.integration.name"="http_check"}
```
Confirm that the query returns the response time in milliseconds for each
reachable URL.
### Troubleshooting
* A URL reports `0` for `cxdot.integration.target.health`: In Metrics Explorer, run
the following query to group recent failed checks by URL and failure class:
```text theme={null}
sum by ("cxdot.integration.target", "error.message") (count_over_time({"httpcheck.error", "cxdot.integration.name"="http_check"}[$__rate_interval]))
```
The `error.message` attribute identifies whether the request timed out, failed DNS
lookup, was refused, failed TLS negotiation, or failed for another reason.
## Configuration reference
Configure one HTTP Check integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.http_check`. In a Collector configuration
file, place them under `cxdot.integrations.http_check`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this HTTP Check integration instance. If true, the Collector monitors the
configured URLs. If false, it doesn't run this integration instance.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
URLs to monitor. The Collector requests each entry on its own schedule and reports it as a
separate target.
* **`endpoints[].endpoint`**
Type: `string`. Required.
URL to request, including the `http` or `https` scheme. For example,
`https://api.example.com/healthz`. An HTTPS URL also reports the number of seconds until its
server certificate expires.
* **`endpoints[].method`**
Type: `string`. Optional. Default: `GET`.
HTTP method for the request.
* **`endpoints[].headers`**
Type: `object`. Optional. Default: `{}`.
Additional request headers as name-value pairs. Set the `Host` header to request a virtual
host by its network address.
* **`endpoints[].proxy_url`**
Type: `string`. Optional.
Proxy URL for this endpoint, for example `http://proxy.example.com:8080`. When unset, the
Collector uses the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector requests each URL. Every collection performs an HTTP request against
the target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for each HTTP request to complete.
* **`tls`**
Type: `object`. Optional.
TLS settings for all HTTPS endpoints in `endpoints`. Certificate verification is enabled
unless `insecure_skip_verify` is `true`. Targets found from annotations use the annotation's
TLS settings.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to the CA cert. For a client this verifies the server certificate. For a server this
verifies client certificates. If empty uses system root CA. (optional)
* **`tls.ca_pem`**
Type: `string`. Optional.
In memory PEM encoded cert. (optional)
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the TLS cert to use for TLS required connections. (optional)
* **`tls.cert_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS cert to use for TLS required connections. (optional)
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a
safe default list is used. See
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go)
for a list of supported cipher suites.
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
contains the elliptic curves that will be used in an ECDHE handshake, in preference order
Defaults to empty list and "crypto/tls" defaults are used, internally.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
If true, load system CA certificates pool in addition to the certificates configured in this
struct.
* **`tls.insecure`**
Type: `boolean`. Optional.
In gRPC and HTTP when set to true, this is used to disable the client transport security. See
[https://godoc.org/google.golang.org/grpc#WithInsecure](https://godoc.org/google.golang.org/grpc#WithInsecure)
for gRPC. Please refer to
[https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for more
information. (optional, default false)
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
InsecureSkipVerify will enable TLS but not verify the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the TLS key to use for TLS required connections. (optional)
* **`tls.key_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS key to use for TLS required connections. (optional)
* **`tls.max_version`**
Type: `string`. Optional.
MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls
for defaults. (optional)
* **`tls.min_version`**
Type: `string`. Optional.
MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used.
(optional)
* **`tls.reload_interval`**
Type: `duration`. Optional.
ReloadInterval specifies the duration after which the certificate will be reloaded If not set,
it will never be reloaded (optional)
* **`tls.server_name_override`**
Type: `string`. Optional.
ServerName requested by client for virtual hosting. This sets the ServerName in the TLSConfig.
Please refer to [https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for
more information. (optional)
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module configuration
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.
# JMX
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/jmx
Runtime metrics from Java apps that expose Java Management Extensions.
The JMX integration requires CXDOT Collector 1.4.0 or greater.
[Java](https://www.oracle.com/java/) is a widely used programming language and runtime
platform. Use the JMX integration to collect runtime metrics from Java apps that expose
Java Management Extensions (JMX) in your environment.
The JMX integration supports Java 8 or greater.
## Supported telemetry types
The JMX integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The JMX integration has the following prerequisites:
* Enable remote monitoring through
[Java Management Extensions (JMX)](https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html)
when you start each Java app. Set the remote registry and Remote Method
Invocation (RMI) connector to ports that the CXDOT Collector can reach. Use the
same port for both connections and advertise a reachable host or IP address. For
example, add these Java system properties:
```shell theme={null}
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9012
-Dcom.sun.management.jmxremote.rmi.port=9012
-Djava.rmi.server.hostname=
```
* Make the JMX registry and remote connector reachable from the CXDOT Collector.
## Configure
The JMX integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the JMX integration, follow these steps:
1. To collect from Java app pods in Kubernetes, add a CXDOT integration annotation to
the pod template. The annotation key must end with the container name, and its value
can reference JMX credentials stored in a Kubernetes Secret in the same namespace.
For example, add the following annotation to your Java workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/app: |
schema_version: v1.14
jmx:
endpoints:
- endpoint: ${target.host}:${target.port.jmx}
username: cxdot
password: ${k8s_secret:jmx-monitoring/password}
spec:
containers:
- name: app
image: eclipse-temurin:17-jre
ports:
- name: jmx
containerPort: 9012
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.jmx}` with the container port named `jmx`, and
`${k8s_secret:jmx-monitoring/password}` with the `password` key of the
`jmx-monitoring` Secret. To allow the Collector to read the Secret, add the pod's
namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for your
CXDOT Collector.
2. Optional: To collect from Java apps outside your Kubernetes cluster, configure static
targets. For example, add the following to the Helm values file for your CXDOT
Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
jmx:
endpoints:
- endpoint: java.example.com:9012
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets. In cluster mode, the cluster
Collector that wins leader election scrapes static targets.
3. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the Helm values file for
your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
jmx: {}
jmx/external:
endpoints:
- endpoint: java.example.com:9012
```
The `jmx/external` key defines a named instance for the static targets. The bare
`jmx` key continues to discover pods.
4. Optional: Configure the integration's authentication and Transport Layer Security
(TLS) settings to match the remote JMX agent. Supply the username and password
together. If a remote stub advertises an address that the CXDOT Collector can't
reach, override its advertised host or port in the integration configuration.
5. Optional: Disable the integration. For example, add the following to the Helm
values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
jmx:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the JMX integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=jmx`. Confirm that `cxdot.integration.target.health`
reports `1` for each reachable target. The `cxdot.integration.target`, `server.address`, and
`server.port` attributes identify the target.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
count by ("server.address", "server.port") ({"jvm.thread.count", "cxdot.integration.name"="jmx"})
```
Confirm that the query returns a nonzero value for each target.
For more information about CXDOT Collector integrations, see the
[integrations catalog](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector).
## Configuration reference
Configure one JMX integration instance with the following settings. In Helm values, place these
settings under `collection.cxdot.integrations.jmx`. In a Collector configuration file, place
them under `cxdot.integrations.jmx`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to run the JMX integration. If true, the Collector collects JMX metrics. If false, the
Collector doesn't run this integration.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
JMX targets. Each endpoint can be a `host:port` Remote Method Invocation (RMI) registry
address or a `service:jmx:rmi` URL. When this list isn't empty, the integration collects from
exactly these targets instead of discovered targets.
* **`endpoints[].endpoint`**
Type: `string`. Required.
JMX target as a `host:port` RMI registry address or a `service:jmx:rmi` URL.
* **`registry_tls`**
Type: `boolean`. Optional. Default: `false`.
Whether to use TLS for the RMI registry connection. If true, the Collector uses TLS. If false,
it uses an unencrypted registry connection.
* **`advertised_host_override`**
Type: `string`. Optional. Default: empty string.
Host to use instead of the host advertised by returned Remote Method Invocation (RMI) stubs.
When empty, the integration uses the host from the endpoint.
* **`advertised_port_override`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`. Maximum: `65535`.
Port to use instead of the port advertised by returned RMI stubs. A value of `0` uses the
advertised port.
* **`username`**
Type: `string`. Optional.
JMX authentication username. Configure with password.
* **`password`**
Type: `string`. Optional.
JMX authentication password. Configure with username.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
Time between metric collections from each JMX target.
* **`bean_detection_interval`**
Type: `duration`. Optional. Default: `10m`.
Time between JMX bean discovery refreshes.
* **`bean_limit`**
Type: `integer`. Optional. Default: `35000`. Minimum: `1`.
Maximum number of JMX bean matches collected from each endpoint. When the number of matches
exceeds this value, the integration drops beans according to the attribute mapping priority.
* **`target_system`**
Type: `string`. Optional. Default: `jvm`.
Comma-delimited attribute mapping names. Names must start with a lowercase letter or digit and
contain only lowercase letters, digits, underscores, and hyphens. The JVM mapping is included
automatically; add -jvm to disable it when at least one other mapping is configured.
* **`attribute_mapping_paths`**
Type: `array of string`. Optional. Default: `[]`.
Directories and files searched before the built-in Java Virtual Machine (JVM) attribute
mapping.
* **`tls`**
Type: `object`. Optional. Default: `{}`.
TLS certificate and client authentication settings for RMI registry and server connections.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to the CA cert. For a client this verifies the server certificate. For a server this
verifies client certificates. If empty uses system root CA. (optional)
* **`tls.ca_pem`**
Type: `string`. Optional.
In memory PEM encoded cert. (optional)
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the TLS cert to use for TLS required connections. (optional)
* **`tls.cert_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS cert to use for TLS required connections. (optional)
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a
safe default list is used. See
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go)
for a list of supported cipher suites.
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
contains the elliptic curves that will be used in an ECDHE handshake, in preference order
Defaults to empty list and "crypto/tls" defaults are used, internally.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
If true, load system CA certificates pool in addition to the certificates configured in this
struct.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. This setting must be false. Use `registry_tls` to
control transport security for the RMI registry.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the JMX server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the TLS key to use for TLS required connections. (optional)
* **`tls.key_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS key to use for TLS required connections. (optional)
* **`tls.max_version`**
Type: `string`. Optional.
MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls
for defaults. (optional)
* **`tls.min_version`**
Type: `string`. Optional.
MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used.
(optional)
* **`tls.reload_interval`**
Type: `duration`. Optional.
ReloadInterval specifies the duration after which the certificate will be reloaded If not set,
it will never be reloaded (optional)
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the JMX certificate instead of the endpoint hostname. Use this
setting when the certificate name differs from the endpoint hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module configuration
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.
# Kafka
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/kafka
Apache Kafka broker and Java Virtual Machine runtime metrics collected over JMX.
The Apache Kafka integration requires CXDOT Collector 1.7.0 or greater.
[Apache Kafka](https://kafka.apache.org/) is an open source distributed event streaming
platform. Use the Kafka integration with the CXDOT Collector to collect broker and Java
Virtual Machine (JVM) runtime metrics from Kafka brokers running in your environment.
The Kafka integration supports Apache Kafka 3.8 or greater.
## Supported telemetry types
The Kafka integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Kafka integration has the following prerequisites:
* Enable remote Java Management Extensions (JMX) monitoring on each broker. Kafka
disables remote JMX by default. Set the `JMX_PORT` environment variable before you
start the broker, or set the equivalent `com.sun.management.jmxremote` system
properties in `KAFKA_JMX_OPTS`. `JMX_PORT` sets the same port for the JMX registry and
for the connection it returns, so the broker needs one open port for JMX. For more
information, see
[Monitoring](https://kafka.apache.org/documentation/#monitoring) in the Kafka
documentation.
* Make the JMX port and the address the broker advertises for JMX connections reachable
from the CXDOT Collector. Set `java.rmi.server.hostname` in `KAFKA_JMX_OPTS` to an
address the CXDOT Collector can resolve, or configure the integration's advertised host
and port overrides when that address isn't reachable. For example, the following
environment variables enable remote JMX on port `9999` without authentication or
Transport Layer Security (TLS):
```shell theme={null}
export JMX_PORT=9999
export KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Djava.rmi.server.hostname=BROKER_ADDRESS"
```
Replace `BROKER_ADDRESS` with the broker's address as the CXDOT Collector reaches it. In
production, enable JMX authentication and TLS on the broker and configure the
integration to match.
## Configure
The Kafka integration is enabled by default. You can configure targets either by
annotating broker pods in your Kubernetes cluster or by listing static endpoints in your
Helm values. To configure the Kafka integration, follow these steps:
1. To collect from Kafka broker pods in Kubernetes, add a CXDOT integration annotation
to the pod template. The annotation key must end with the container name, and its
value can reference JMX credentials stored in a Kubernetes Secret in the same
namespace. For example, add the following annotation to your Kafka brokers:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/kafka: |
schema_version: v1.14
kafka:
endpoints:
- endpoint: ${target.host}:${target.port.jmx}
username: cxdot
password: ${k8s_secret:kafka-jmx/password}
spec:
containers:
- name: kafka
image: apache/kafka:3.8.1
ports:
- name: jmx
containerPort: 9999
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.jmx}` with the container port named `jmx`, and
`${k8s_secret:kafka-jmx/password}` with the `password` key of the `kafka-jmx` Secret.
Each broker pod becomes its own target. To allow the Collector to read the Secret, add
the pod's namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values
for your CXDOT Collector.
2. Optional: To collect from brokers outside your Kubernetes cluster, configure static
targets. For example, add the following to the Helm values file for your CXDOT
Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
kafka:
endpoints:
- endpoint: kafka-0.example.com:9999
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets. In cluster mode, the cluster Collector
that wins leader election scrapes static targets.
3. Optional: Configure a second integration instance to collect from both annotated
brokers and static targets. For example, add the following to the Helm values file for
your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
kafka: {}
kafka/edge:
endpoints:
- endpoint: kafka-0.example.com:9999
```
The `kafka/edge` key defines a named instance for the static targets. The bare
`kafka` key continues to discover pods.
4. Optional: If the brokers require JMX authentication or TLS, configure the matching
settings for static targets, and provide the password through your deployment's
secret management. For example, the following Helm values reference the
`KAFKA_JMX_PASSWORD` environment variable:
```yaml theme={null}
collection:
cxdot:
integrations:
kafka:
endpoints:
- endpoint: kafka-0.example.com:9999
username: cxdot
password: "${env:KAFKA_JMX_PASSWORD}"
```
For annotated broker pods, supply the credentials in the CXDOT integration annotation
instead.
5. Optional: Disable the integration. For example, add the following to the Helm values
file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
kafka:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Kafka integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=kafka`. Confirm that `cxdot.integration.target.health`
reports `1` for each reachable broker. A value of `0` means the CXDOT Collector hit an
error collecting from that broker. The `cxdot.integration.target`, `server.address`,
and `server.port` attributes identify the broker.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
sum by ("server.address", "server.port") ({"kafka.broker.partition.count", "cxdot.integration.name"="kafka"})
```
Confirm that the query returns one time series per broker, with that broker's
partition count as the value.
### Troubleshooting
* Metrics for a new topic, or for a request type the brokers haven't served yet, are
missing: Kafka registers the beans for topics and request types when they're first
used, and the integration refreshes its list of beans at each
`bean_detection_interval`, which defaults to 10 minutes. The missing time series
appear after the next refresh.
* The `kafka.broker.raft.*`, `kafka.broker.metadata.*`, and `kafka.broker.snapshot.*`
metrics are missing: Only a broker running in KRaft mode reports them, except for
`kafka.broker.metadata.controller`, which brokers in both modes report. A broker
running in ZooKeeper mode reports `kafka.broker.zookeeper.session.event.count` and
`kafka.broker.leader.election.count` instead, which a KRaft broker never reports.
For more information about CXDOT Collector integrations, see the
[integrations catalog](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector).
## Configuration reference
Configure one Apache Kafka integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.kafka`. In a Collector configuration
file, place them under `cxdot.integrations.kafka`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Kafka integration instance. If true, the Collector runs the instance.
If false, the Collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Kafka broker JMX targets. When this list is empty or omitted, the integration uses automatic
target discovery. When the list contains targets, this integration instance collects from
exactly those targets and doesn't automatically discover targets. Configure a second named
instance to use both methods. Each endpoint can be a `host:port` Remote Method Invocation
(RMI) registry address or a `service:jmx:rmi` URL.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Kafka broker JMX endpoint as either a `host:port` Remote Method Invocation (RMI) registry
address or a `service:jmx:rmi` URL.
* **`registry_tls`**
Type: `boolean`. Optional. Default: `false`.
Whether to use TLS for the RMI registry connection. If true, the Collector uses TLS. If false,
the Collector uses an unencrypted registry connection.
* **`advertised_host_override`**
Type: `string`. Optional. Default: empty string.
Host the Collector uses for Remote Method Invocation (RMI) server connections instead of the
host advertised by returned RMI stubs. When empty, the Collector uses the registry endpoint
host.
* **`advertised_port_override`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`. Maximum: `65535`.
Port the Collector uses for RMI server connections instead of the port advertised by returned
RMI stubs. When set to `0`, the Collector uses the advertised port.
* **`username`**
Type: `string`. Optional.
Username for JMX authentication. Configure `username` and `password` together.
* **`password`**
Type: `string`. Optional.
Password for JMX authentication. Configure `username` and `password` together.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector collects metrics from each Kafka broker JMX endpoint.
* **`bean_detection_interval`**
Type: `duration`. Optional. Default: `10m`.
How often the Collector refreshes the set of available JMX beans. Kafka registers beans for
topics and request types when they're first used, so their metrics appear after the next
refresh.
* **`bean_limit`**
Type: `integer`. Optional. Default: `35000`. Minimum: `1`.
Maximum number of JMX bean matches collected from each endpoint. When the number of matches
exceeds this value, the integration drops beans according to the attribute mapping priority.
* **`target_system`**
Type: `string`. Optional. Default: `kafka`.
Comma-delimited attribute mapping names to apply. The Kafka broker mapping is enabled by
default, and the Java Virtual Machine (JVM) mapping is included automatically. Add `-jvm` to
disable JVM metrics when at least one other mapping is configured.
* **`attribute_mapping_paths`**
Type: `array of string`. Optional. Default: `[]`.
Directories and files containing custom Java Management Extensions (JMX) attribute mappings.
The Collector searches these paths before the embedded Kafka and Java Virtual Machine (JVM)
mappings.
* **`tls`**
Type: `object`. Optional. Default: `{}`.
TLS certificate and client authentication settings for RMI registry and server connections.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to the CA cert. For a client this verifies the server certificate. For a server this
verifies client certificates. If empty uses system root CA. (optional)
* **`tls.ca_pem`**
Type: `string`. Optional.
In memory PEM encoded cert. (optional)
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the TLS cert to use for TLS required connections. (optional)
* **`tls.cert_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS cert to use for TLS required connections. (optional)
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a
safe default list is used. See
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go)
for a list of supported cipher suites.
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
contains the elliptic curves that will be used in an ECDHE handshake, in preference order
Defaults to empty list and "crypto/tls" defaults are used, internally.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
If true, load system CA certificates pool in addition to the certificates configured in this
struct.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. This setting must be false. Use `registry_tls` to
control transport security for the RMI registry.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the JMX server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the TLS key to use for TLS required connections. (optional)
* **`tls.key_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS key to use for TLS required connections. (optional)
* **`tls.max_version`**
Type: `string`. Optional.
MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls
for defaults. (optional)
* **`tls.min_version`**
Type: `string`. Optional.
MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used.
(optional)
* **`tls.reload_interval`**
Type: `duration`. Optional.
ReloadInterval specifies the duration after which the certificate will be reloaded If not set,
it will never be reloaded (optional)
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the JMX certificate instead of the endpoint hostname. Use this
setting when the certificate name differs from the endpoint hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module configuration
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.
# Kafka Consumer
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/kafka_consumer
Apache Kafka consumer group offsets and lag, partition offsets and replicas, and cluster broker counts collected from the Kafka admin API.
The Apache Kafka Consumer integration requires CXDOT Collector 1.10.0 or greater.
[Apache Kafka](https://kafka.apache.org/) is an open source distributed event streaming
platform. Use the Kafka Consumer integration to collect consumer group offsets and lag,
partition offsets and replica counts, and broker counts from the Kafka clusters running in
your environment.
The Kafka Consumer integration supports Apache Kafka 3.8 or greater.
## Supported telemetry types
The Kafka Consumer integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Kafka Consumer integration has the following prerequisites:
* Make every broker in the cluster reachable from the CXDOT Collector at the address the
broker advertises. The Collector connects to the cluster through one bootstrap address,
learns the other brokers from the cluster metadata, and then connects to each broker at
its advertised listener. If the Collector can't reach one of the brokers, it reports no
consumer group metrics for the cluster in that collection interval.
To list the advertised addresses, run the `kafka-broker-api-versions.sh` tool from the
`bin` directory of a Kafka installation, on a host or pod with the same network access as
the CXDOT Collector:
```shell theme={null}
kafka-broker-api-versions.sh --bootstrap-server BOOTSTRAP_ADDRESS
```
Replace `BOOTSTRAP_ADDRESS` with the `host:port` that the integration connects to. The
output lists each broker by its advertised address and ID. Confirm that no broker's entry
reports `ERROR`. For a cluster that requires authentication or TLS, pass the client
settings in a properties file with the `--command-config` option.
* If your cluster requires authentication, prepare credentials for SASL `PLAIN`,
`SCRAM-SHA-256`, or `SCRAM-SHA-512`, for Amazon Managed Streaming for Apache Kafka (MSK)
Identity and Access Management (IAM) authentication, or for Kerberos. If your cluster
enforces authorization, grant the principal that the Collector authenticates as the
`Describe` operation on the topics and consumer groups to report. For more information,
see [Authorization](https://kafka.apache.org/documentation/#security_authz) in the Kafka
documentation. With MSK IAM authentication, Kafka access control lists don't apply to
IAM identities, so grant the equivalent permissions in an IAM policy instead.
## Configure
The Kafka Consumer integration is enabled by default and monitors each Kafka cluster
that you identify with a CXDOT integration annotation or a static target. Each target
reports on a whole cluster through any one of its brokers, so configure exactly one
target for each cluster. With a target for each broker, the integration reports every
time series once per broker.
To configure the Kafka Consumer integration, follow these steps:
1. To monitor a Kafka cluster running in Kubernetes, add a CXDOT integration annotation
to the Service in front of the brokers, such as a bootstrap Service. The
`integrations.cxdot.paloaltonetworks.com/service` key makes the Service's cluster IP
address the single target for the Kafka cluster, and its value can reference SASL
credentials stored in a Kubernetes Secret in the same namespace. Annotate the Service,
not the broker pods, because each annotated broker pod becomes a separate target for
the whole cluster. For example, add the following annotation to your bootstrap
Service:
```yaml theme={null}
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/service: |
schema_version: v1.14
kafka_consumer:
endpoints:
- endpoint: ${target.host}:${target.port.kafka}
auth:
sasl:
mechanism: SCRAM-SHA-512
username: cxdot
password: ${k8s_secret:kafka-monitoring/password}
spec:
ports:
- name: kafka
port: 9092
targetPort: 9092
```
The Collector replaces `${target.host}` with the Service's cluster IP address,
`${target.port.kafka}` with the Service port named `kafka`, and
`${k8s_secret:kafka-monitoring/password}` with the `password` key of the
`kafka-monitoring` Secret. To allow the Collector to read the Secret, add the
Service's namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values
for your CXDOT Collector.
2. Optional: To monitor Kafka clusters outside your Kubernetes cluster, configure
static targets. Add one entry for each cluster, and point it at a bootstrap address
that resolves to several brokers, such as a DNS name, a Kubernetes Service, or a load
balancer. For example, add the following to the `values.yaml` file for the CXDOT
Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
kafka_consumer:
endpoints:
- endpoint: kafka-bootstrap.example.com:9092
```
This integration instance monitors exactly the listed clusters and doesn't discover
annotated targets. In a Kubernetes deployment, one elected replica of the cluster-tier
CXDOT Collector monitors static targets. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
3. Optional: Configure separate integration instances to collect from both annotated
Services and static targets. For example, add the following to the `values.yaml` file
for the CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
kafka_consumer: {}
kafka_consumer/external:
endpoints:
- endpoint: kafka-bootstrap.example.com:9092
```
The `kafka_consumer/external` key defines a named instance for the static targets.
Configuring a named instance suppresses the implicit default instance, so the empty
`kafka_consumer: {}` entry is required to keep discovering annotated targets.
4. Optional: If your static targets require authentication or TLS, configure the `auth` and
`tls` settings, and provide the password through your deployment's secret management.
For example, the following Helm values authenticate with `SCRAM-SHA-512`, verify the
brokers' certificates against a certificate authority file mounted into the Collector,
and reference the `KAFKA_CONSUMER_SASL_PASSWORD` environment variable:
```yaml theme={null}
collection:
cxdot:
integrations:
kafka_consumer:
endpoints:
- endpoint: kafka-bootstrap.example.com:9093
auth:
sasl:
mechanism: SCRAM-SHA-512
username: cxdot
password: "${env:KAFKA_CONSUMER_SASL_PASSWORD}"
tls:
ca_file: /etc/kafka/ca.pem
```
The `auth` setting accepts one mechanism at a time: `sasl` with `PLAIN`,
`SCRAM-SHA-256`, `SCRAM-SHA-512`, or MSK IAM authentication, or `kerberos`. The
Collector rejects an `auth` block that sets both `sasl` and `kerberos` when it loads
the configuration. For MSK IAM authentication, set the AWS Region in
`auth.sasl.aws_msk.region`, because the Collector doesn't detect it. The Collector
masks passwords in its debug output and logs. For
annotated targets, supply credentials and TLS settings in the CXDOT integration
annotation instead, and supply the certificate authority from a Kubernetes Secret with
`tls.ca_pem: ${k8s_secret:kafka-monitoring/ca.crt}`. The Collector rejects an
annotation that sets `tls.ca_file`, `auth.kerberos.keytab_file`, or any other setting
that names a file, unless the file is under
`collection.cxdot.integrations.discovery.kubernetes.annotation_restrictions.allowed_collector_file_paths`
in your Helm values, which allows no files by default.
5. Optional: Limit what the integration collects from clusters with many topics,
partitions, or consumer groups. The integration reports several time series for each
partition of every topic that `topic_match` admits, and requests the offsets of all of
those partitions on every collection. For static targets, narrow `topic_match` and
`group_match`. For example, the following Helm values report only topics whose names
start with `orders.` and consumer groups whose names start with `orders-`:
```yaml theme={null}
collection:
cxdot:
integrations:
kafka_consumer:
endpoints:
- endpoint: kafka-bootstrap.example.com:9092
topic_match: '^orders\.'
group_match: '^orders-'
```
To limit collection further, remove `topics` from `scrapers` to stop collecting topic
and partition metrics, or turn off individual metrics with `metrics`. A CXDOT
integration annotation sets these settings in its own block.
6. Optional: Disable the integration. For example, add the following to the `values.yaml`
file for the CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
kafka_consumer:
enabled: false
```
For more information about how the CXDOT Collector discovers targets, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Kafka Consumer integration, follow these steps:
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=kafka_consumer`
Confirm that each monitored cluster reports `1`. A value of `0` means the
CXDOT Collector hit an error collecting from that cluster. The
`cxdot.integration.target` attribute identifies the cluster by the bootstrap
address the Collector connects to.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
max by ("kafka.cluster.id", "group", "topic") ({"kafka.consumer_group.lag_sum", "cxdot.integration.name"="kafka_consumer"})
```
Confirm that the query returns a time series for each consumer group and each topic
where the group has committed offsets, with the group's total lag across the topic's
partitions as the value. The `kafka.cluster.id` attribute identifies the cluster.
### Troubleshooting
* The health metric reports `1`, but consumer group metrics are missing or intermittent:
The health metric needs a response from only one broker, but consumer group metrics need
a connection to every broker. When the Collector can't reach one broker at its advertised
address, it drops all consumer group metrics for that collection interval, along with the
offsets of the partitions that broker leads. Check the advertised addresses as described
in the Prerequisites section.
* Consumer group and partition time series appear once for each broker pod: More than one
target monitors the same cluster, typically because the annotations are on the broker
pods instead of the cluster's Service. Annotate the Service instead, and list each
cluster once among static targets.
* A consumer group reports members but no offsets or lag, or lag is missing for some
partitions: The integration reports offsets and lag only for partitions where the group
has committed an offset. A partition the group hasn't committed to has no lag time
series, rather than a lag of `0`. Lag is the partition's high watermark minus the group's
committed offset, and is never less than `0`.
## Configuration reference
Configure one Apache Kafka Consumer integration instance with the following settings. In Helm
values, place these settings under `collection.cxdot.integrations.kafka_consumer`. In a
Collector configuration file, place them under `cxdot.integrations.kafka_consumer`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Kafka Consumer integration instance. If true, the Collector runs the
instance. If false, the Collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Kafka clusters to monitor, one entry per cluster. Each `endpoint` is the `host:port` of one
broker in that cluster. The Collector learns the remaining brokers from cluster metadata and
must be able to reach every broker at the address it advertises. If it can't reach one of
them, it reports no consumer group metrics for that cluster in that collection interval. The
Collector first reaches the cluster through this one address, so point each `endpoint` at a
bootstrap address that resolves to several brokers, such as a DNS name, a Kubernetes Service,
or a load balancer. An outage of a single broker when the Collector starts then doesn't leave
the cluster unmonitored. Listing several brokers of the same cluster reports that cluster once
per entry. When this list is empty or omitted, the integration uses automatic target
discovery. When the list contains clusters, this integration instance monitors exactly those
clusters and doesn't automatically discover targets. Configure a second named instance to use
both methods.
* **`endpoints[].endpoint`**
Type: `string`. Required.
`host:port` of the cluster's bootstrap address.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector collects metrics from each Kafka cluster. Targets discovered through
annotations don't use this setting or `timeout`. Their annotations determine how often the
Collector collects from them.
* **`timeout`**
Type: `duration`. Optional. Default: `15s`.
How long one collection from a cluster can run before the Collector abandons it. One
collection makes several requests to the brokers, and this setting bounds all of them
together. Keep it no longer than `collection_interval` so that a slow collection doesn't hold
up the next one.
* **`initial_delay`**
Type: `duration`. Optional. Default: `1s`.
How long the Collector waits after starting before it first collects metrics.
* **`scrapers`**
Type: `array of string`. Optional. Default: `["brokers","topics","consumers"]`. Minimum items:
`1`.
Which groups of metrics to collect. `brokers` reports the number of brokers in the cluster.
`topics` reports partition counts, partition offsets, and replica counts. It produces several
time series for each partition of every topic that `topic_match` admits, and the Collector
requests the offsets of all of those partitions on every collection. `consumers` reports the
members of each consumer group, and the committed offset and lag of each partition where the
group has committed an offset. Lag is the partition's high watermark, which
`kafka.partition.current_offset` also reports, minus the group's committed offset, and is
never less than `0`.
* **`topic_match`**
Type: `regex`. Optional. Default: `^[^_].*$`.
Regular expression selecting the topics to report, both for partition metrics and for consumer
group offsets and lag. The expression uses RE2 syntax and matches any part of a topic name
unless you anchor it with `^` and `$`. The default excludes topics whose names start with an
underscore, which Kafka and common platform components use for internal topics. With `topics`
in `scrapers`, the Collector reports several time series for each partition of every matched
topic and requests all of their offsets on every collection. A narrower expression lowers that
cost on clusters with many partitions. Targets discovered through annotations don't use this
setting. Their annotations determine which topics they report.
* **`group_match`**
Type: `regex`. Optional. Default: `.*`.
Regular expression selecting the consumer groups to report. The expression uses RE2 syntax and
matches any part of a group name unless you anchor it with `^` and `$`. The default reports
every consumer group in the cluster. This setting doesn't narrow the partition metrics: with
`topics` in `scrapers`, the Collector still reports several time series for each partition of
every topic that `topic_match` admits and requests all of their offsets on every collection.
Targets discovered through annotations don't use this setting. Their annotations determine
which consumer groups they report.
* **`cluster_alias`**
Type: `string`. Optional. Default: empty string.
A name for the cluster. When set, it is reported as the `kafka.cluster.alias` resource
attribute on the series the Kafka metrics receiver emits, whatever
`resource_attributes.cluster_alias.enabled` says.
* **`client_id`**
Type: `string`. Optional. Default: `otel-collector`. Minimum length: `1`.
Client ID the Collector presents to the brokers, which they can use for access control lists,
quotas, and request logging.
* **`protocol_version`**
Type: `string`. Optional. Default: empty string.
Kafka version whose protocol the Collector speaks, such as `3.8.0`. When empty, the Collector
negotiates the protocol version with each broker.
* **`conn_idle_timeout`**
Type: `duration`. Optional. Default: `9m`.
Roughly how long the Collector keeps an idle connection to a broker open before closing it.
* **`auth`**
Type: `object`. Optional.
Authentication for the clusters in `endpoints`, with either SASL (`sasl`) or Kerberos
(`kerberos`). When omitted, the Collector connects without authenticating. The Collector
rejects the deprecated `plain_text` and `auth.tls` settings: use `sasl` with the `PLAIN`
mechanism and the top-level `tls` setting instead. Targets discovered through annotations use
the authentication settings in their annotations.
* **`auth.sasl`**
Type: `object`. Optional.
SASL authentication settings.
* **`auth.sasl.mechanism`**
Type: `string`. Optional.
SASL mechanism the Collector authenticates with. Set it whenever you configure `sasl`.
`PLAIN`, `SCRAM-SHA-256`, and `SCRAM-SHA-512` authenticate with `username` and `password`.
`AWS_MSK_IAM_OAUTHBEARER` authenticates to Amazon Managed Streaming for Apache Kafka (MSK)
with Identity and Access Management (IAM) credentials from Amazon Web Services (AWS). The
Collector loads those credentials from the default AWS credential chain, such as environment
variables or a role for its Kubernetes service account, and signs them for the region in
`aws_msk.region`. MSK clients that use IAM authentication connect over TLS, so configure `tls`
as well. Allowed values: `PLAIN`, `SCRAM-SHA-256`, `SCRAM-SHA-512`, `AWS_MSK_IAM_OAUTHBEARER`.
* **`auth.sasl.password`**
Type: `string`. Optional.
Password for the `PLAIN`, `SCRAM-SHA-256`, and `SCRAM-SHA-512` mechanisms, which require it.
The Collector masks this value in its debug output and logs.
* **`auth.sasl.aws_msk`**
Type: `object`. Optional.
Settings for the `AWS_MSK_IAM_OAUTHBEARER` mechanism.
* **`auth.sasl.aws_msk.region`**
Type: `string`. Optional.
AWS Region of the MSK cluster, such as `us-east-1`. Required for the `AWS_MSK_IAM_OAUTHBEARER`
mechanism: the Collector rejects a target whose Region is empty and reports no health metric
for it.
* **`auth.sasl.username`**
Type: `string`. Optional.
Username for the `PLAIN`, `SCRAM-SHA-256`, and `SCRAM-SHA-512` mechanisms, which require it.
* **`auth.kerberos`**
Type: `object`. Optional.
Kerberos authentication settings. The Collector authenticates with the keytab in `keytab_file`
when that setting isn't empty, and with `password` otherwise.
* **`auth.kerberos.password`**
Type: `string`. Optional.
Password for `username`, used when `keytab_file` is empty. The Collector masks this value in
its debug output and logs.
* **`auth.kerberos.config_file`**
Type: `string`. Optional.
Path to the Kerberos configuration file, usually `krb5.conf`, that lists the key distribution
centers for `realm`.
* **`auth.kerberos.disable_fast_negotiation`**
Type: `boolean`. Optional.
Whether to leave Flexible Authentication Secure Tunneling (FAST) negotiation out of the ticket
requests that the Collector sends. If true, the Collector leaves it out. Set it to true when
your key distribution center rejects that negotiation. If false, the Collector includes it.
* **`auth.kerberos.keytab_file`**
Type: `string`. Optional.
Path to a keytab file that holds the key for `username`. When set, the Collector authenticates
with the keytab instead of `password`.
* **`auth.kerberos.realm`**
Type: `string`. Optional.
Realm of `username`, such as `EXAMPLE.COM`.
* **`auth.kerberos.service_name`**
Type: `string`. Optional.
Service name in the brokers' principals, such as `kafka`.
* **`auth.kerberos.use_keytab`**
Type: `boolean`. Optional.
The Collector accepts this setting but ignores it. Whether the Collector authenticates with a
keytab depends only on `keytab_file`.
* **`auth.kerberos.username`**
Type: `string`. Optional.
Principal name the Collector authenticates as, without the realm.
* **`tls`**
Type: `object`. Optional.
Transport Layer Security (TLS) settings for the clusters in `endpoints`. When this block is
present, even empty, the Collector connects to the brokers over TLS and verifies their
certificates against the system certificate authority pool, unless other `tls` settings change
that. When omitted, the Collector connects without TLS. Targets discovered through annotations
use the TLS settings in their annotations.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication. The
Collector masks this value in its debug output and logs.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the brokers'
certificates. If omitted, the Collector uses the system certificate authority pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the brokers'
certificates.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the brokers require mutual TLS
authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the brokers require mutual TLS
authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to connect without TLS. If true and no certificate authority is configured, the
Collector connects to the brokers without TLS. If false, the Collector connects over TLS.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the brokers' certificates. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificates.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in each broker's certificate instead of the broker's hostname. Use this
setting when the certificates name a host other than the addresses the brokers advertise.
* **`metadata`**
Type: `object`. Optional.
How the Collector maintains the cluster metadata it uses to route requests to brokers, and how
it retries requests that a broker can't answer yet. Of these settings, only `full` has no
effect.
* **`metadata.full`**
Type: `boolean`. Optional. Default: `true`.
The Collector accepts this setting but ignores it.
* **`metadata.refresh_interval`**
Type: `duration`. Optional. Default: `10m0s`.
How long the Collector keeps the cluster metadata it caches to route requests to brokers
before it refreshes that metadata. Each collection still reads the current list of brokers,
topics, and partitions for its metrics. If omitted, the Collector refreshes the cached
metadata every 10 minutes.
* **`metadata.retry`**
Type: `object`. Optional.
How the Collector retries a request that a broker can't answer yet, such as during a leader
election or while the cluster starts.
* **`metadata.retry.backoff`**
Type: `duration`. Optional. Default: `250ms`.
How long the Collector waits before it first retries a request. Each later retry waits about
twice as long as the one before, up to 5 seconds or this value, whichever is longer. The value
can't be negative. If omitted, the Collector waits 250 milliseconds.
* **`metadata.retry.max`**
Type: `integer`. Optional. Default: `20`.
Maximum number of times the Collector retries a request that a broker can't answer yet before
it gives up on that request. The value can't be negative. If omitted, the Collector retries up
to 20 times.
* **`metrics`**
Type: `object`. Optional.
Per-metric settings, keyed by metric name. Set `enabled: true` to collect a metric that's off
by default, such as `kafka.topic.replication_factor`, or `enabled: false` to stop collecting
one. Every metric except `kafka.brokers` also accepts `attributes`, the subset of its
attributes to keep, and `aggregation_strategy`, which combines data points that become
identical after the other attributes are dropped: `sum`, `avg`, `min`, or `max`. For example,
`kafka.consumer_group.lag` with `attributes: [group, topic]` reports one time series per
consumer group and topic instead of one per partition. Targets discovered through annotations
don't use this setting.
* **`resource_attributes`**
Type: `object`. Optional.
Which cluster identity resource attributes to report on every metric.
* **`resource_attributes.cluster_id`**
Type: `object`. Optional.
Settings for the `kafka.cluster.id` resource attribute.
* **`resource_attributes.cluster_id.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to report the cluster ID from the cluster's metadata as the `kafka.cluster.id`
resource attribute.
* **`resource_attributes.cluster_alias`**
Type: `object`. Optional.
Settings for the `kafka.cluster.alias` resource attribute.
* **`resource_attributes.cluster_alias.enabled`**
Type: `boolean`. Optional. Default: `false`.
Whether to report the `kafka.cluster.alias` resource attribute when `cluster_alias` is empty.
A non-empty `cluster_alias` is always reported, so this setting has no effect alongside one.
# Kubernetes
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/kubernetes
Kubernetes workload, node, cluster state, and control-plane metrics, and Kubernetes logs.
The Kubernetes integration requires CXDOT Collector 1.4.0 or greater.
[Kubernetes](https://kubernetes.io/) is an open source system for automating the
deployment, scaling, and management of containerized applications. Use the Kubernetes
CXDOT Collector integration with the CXDOT Collector to collect workload, node, cluster
state, and control-plane metrics and Kubernetes logs.
This CXDOT Collector integration supports Kubernetes 1.31 or greater. It supports managed
and self-managed distributions that implement the upstream Kubernetes APIs. Provider
restrictions on control-plane endpoints and audit logs can limit the telemetry available
from managed clusters.
## Supported telemetry types
This CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | Yes |
| Metrics | Yes |
| Traces | No |
| Events | No |
Kubernetes Events are collected through the logs signal.
## Prerequisites
This CXDOT Collector integration has the following prerequisites:
* Deploy the CXDOT Collector to your cluster with the CXDOT Collector Helm chart. For
more information, see
[Install the Collector on Kubernetes](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes).
* Grant the collector service accounts the Kubernetes API permissions required by the
enabled capabilities. The Helm chart creates the required roles and bindings, so the
identity that installs the chart must be permitted to create them.
* Make the Kubernetes API and the endpoints for each enabled Kubernetes component
reachable from the collector tier that collects them. Each node collector connects
directly to its node's kubelet on port `10250` for kubelet and cAdvisor metrics.
* To collect scheduler and controller manager metrics from discovered pods, schedule
node collectors on control-plane nodes. These nodes commonly have taints that the
node collectors must tolerate. API server metrics don't need a node collector on a
control-plane node.
* Leave `clusterCollector.enabled` enabled in the CXDOT Collector Helm chart when you
want API server metrics, cluster resource state metrics, Kubernetes Events as logs,
or leader-elected static targets for control-plane components. The chart enables the
cluster collector by default. Cluster-scoped capabilities don't run when it's
disabled.
* To collect `k8s.state.hpa.status.metric.current`, make the metrics API
that each `HorizontalPodAutoscaler` targets available in your cluster: `metrics.k8s.io`,
typically served by metrics-server, for CPU and memory targets. The autoscaler
controller records a current metric reading only when that API answers, and the CXDOT
Collector reports the metric only where that reading exists.
* Audit log collection is supported only when the API server writes its audit log to
`/var/log/kubernetes/audit.log`. Managed Kubernetes providers typically don't expose
this file, and audit log webhook backends aren't supported.
## Configure
This CXDOT Collector integration is enabled by default when you install the CXDOT
Collector with the CXDOT Collector Helm chart. To change what it collects, follow these
steps:
You can enable or disable collection, identify the cluster, and choose how the CXDOT
Collector authenticates to the Kubernetes API.
The following table summarizes each component:
| Component | Collects | Enabled by default | Configurable behavior |
| - | - | - | - |
| `kubelet` | Pod, container, node, and volume metrics from the kubelet stats API | Yes | Collection cadence, timeout, and metric selection |
| `kubelet_metrics` | Kubelet lifecycle, runtime operation, API client, and Go runtime metrics | Yes | Collection cadence and timeout |
| `cadvisor` | Per-container CPU, memory, and block I/O metrics from cAdvisor | Yes | Collection cadence, timeout, and sample timestamps |
| `container_logs` | Pod standard output and standard error logs with pod and container metadata | No | Log collection |
| `audit_logs` | Kubernetes API server audit records from control-plane nodes | No | Log collection |
| `cluster` | Cluster resource state metrics and resource-change logs | Yes | Namespaces, collection cadence, timeout, metric selection, and Secret metadata collection |
| `events` | Kubernetes Events from all namespaces as logs | Yes | Event collection |
| `apiserver` | Kubernetes API server request, performance, and service-level indicator metrics | No | Collection cadence, timeout, and static targets |
| `scheduler` | Kubernetes scheduler queue, scheduling, and service-level indicator metrics | Yes | Collection cadence, timeout, and static targets |
| `controller_manager` | Kubernetes controller work queue, reconciliation, and service-level indicator metrics | Yes | Collection cadence, timeout, and static targets |
| `kube_proxy` | kube-proxy network programming and request metrics | No | Collection cadence, timeout, and static targets |
| `coredns` | CoreDNS request, response, cache, and process metrics | Yes | Collection cadence, timeout, and static targets |
Custom kubelet and cluster metric selections replace their default metric selections.
When you customize either set, restate every default metric that you want to retain.
Enabling Secret metadata collection grants the cluster Collector permission to list and
watch Secret objects across the cluster. For the complete list of fields, accepted
values, and defaults, consult the configuration reference on this page.
1. Optional: Enable metrics from additional Kubernetes components. The CXDOT Collector
discovers supported component pods by their standard labels and ports. It discovers
the API server from the endpoints of the `kubernetes` Service in the `default`
namespace, which managed and self-managed clusters both provide, and one
leader-elected cluster Collector replica scrapes them. For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
For example, add the following to the `values.yaml` for your CXDOT Collector Helm
chart:
```yaml theme={null}
collection:
cxdot:
integrations:
kubernetes:
apiserver:
enabled: true
kube_proxy:
enabled: true
```
Metrics from each discovered pod include that pod's Kubernetes metadata.
2. Optional: Add tolerations for tainted nodes whose node-local components you want to
monitor. A node collector must run on a control-plane node to collect its scheduler,
controller manager, and audit log. For example, tolerate the standard control-plane
taint:
```yaml theme={null}
nodeCollector:
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
```
3. Optional: To collect from a CoreDNS deployment that doesn't carry the standard
`k8s-app: kube-dns` label, such as one that serves a private zone, add a CXDOT
integration annotation to its pod template. The annotation key must end with the
container name. For example, add the following annotation to your CoreDNS deployment:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/coredns: |
schema_version: v1.14
kubernetes:
coredns:
static_targets:
- endpoint: ${target.host}:${target.port.metrics}
# Disable unused control-plane components in this annotation block.
scheduler:
enabled: false
controller_manager:
enabled: false
kube_proxy:
enabled: false
spec:
containers:
- name: coredns
image: registry.k8s.io/coredns/coredns:v1.12.0
ports:
- name: metrics
containerPort: 9153
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.metrics}` with the container port named `metrics`. A CXDOT integration
annotation takes precedence over the standard labels for its container. To stop
collecting from a container, set `kubernetes: {enabled: false}` in the annotation.
4. Optional: To collect from Kubernetes components that the CXDOT Collector can't
discover, such as a scheduler that runs outside your cluster's pods, configure static
targets. Managed Kubernetes providers might not expose scheduler or controller manager
metrics endpoints. This CXDOT Collector integration can't collect those metrics
unless the provider exposes a reachable endpoint. For example, add the following to
the `values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
kubernetes:
scheduler:
static_targets:
- endpoint: scheduler.example.com:10259
```
Static targets turn off discovery for that component: the CXDOT Collector scrapes
exactly the endpoints you list. One leader-elected cluster Collector replica
collects static API server, scheduler, controller manager, and CoreDNS targets per
cluster. Static kube-proxy targets run on the node tier. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
### API server attributes
API server metrics from a managed control plane identify the endpoint, not a pod.
Managed providers such as Amazon EKS, Google Kubernetes Engine, and Azure Kubernetes
Service run the API server outside your cluster, so your cluster has no pod or node to
attribute the metrics to.
On a self-managed cluster, the CXDOT Collector matches each API server endpoint to its
pod by address and port, and attaches that pod's metadata.
The following table lists the attributes that API server metrics carry on each type of
cluster:
| Attribute | Self-managed | Managed |
| - | - | - |
| `k8s.cluster.name`, `job`, `server.address`, `server.port` | Yes | Yes |
| `k8s.node.name`, `host.name` | Yes | No |
| `k8s.pod.name`, `k8s.namespace.name`, `k8s.pod.status.phase` | Yes | No |
| `cxdot.k8s.pod.owner.kind`, `cxdot.k8s.pod.owner.name`, `cxdot.k8s.pod.qos_class`, `cxdot.k8s.pod.priority_class`, `cxdot.k8s.pod.runtime_class` | Yes | No |
| `k8s.container.name`, `cxdot.k8s.container.display_name`, `container.image.name`, `container.image.tag`, `cxdot.container.image.short_name` | Yes | No |
| `cxdot.openshift.deployment.name`, `cxdot.openshift.deployment_config.name` | Where the pod carries them | No |
To compare API server metrics across managed clusters, group them by `server.address`
rather than by a node or pod attribute.
### Validate
To validate this CXDOT Collector integration, follow these steps:
1. In the Live Telemetry Analyzer, add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=kubernetes`
Confirm that time series appear for the targets you enabled.
2. In Metrics Explorer, run the following query:
```text theme={null}
avg by ("k8s.cluster.name", "server.address") ({"cxdot.integration.target.health", "cxdot.integration.name"="kubernetes"})
```
Confirm that each reachable target reports `1`.
3. In Metrics Explorer, run the following query:
```text theme={null}
avg by ("k8s.cluster.name", "k8s.node.name") ({"k8s.node.cpu.usage"})
```
Confirm that the query returns the expected time series for each node.
4. Optional: If you enabled Kubernetes Events, in Logs Explorer, search for
`"cxdot.integration.name":=kubernetes "k8s.event.reason":*`. Confirm that events
from your cluster appear.
## Configuration reference
Configure one Kubernetes integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.kubernetes`. In a Collector configuration
file, place them under `cxdot.integrations.kubernetes`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`cluster_name`**
Type: `string`. Optional.
Cluster identifier injected as the `k8s.cluster.name` resource attribute on every signal. NB:
deployments that set a global cluster identifier apply it last, overriding this one — the
CXDOT Collector Helm chart does, and rejects a `cluster_name` here that disagrees with its own
value rather than letting the two diverge silently.
* **`keep_container_id`**
Type: `boolean`. Optional. Default: `false`.
Whether to keep `container.id` on the kubelet and cAdvisor container metrics. If false, the
Collector uses the ID only to look up the container's pod, then removes it. If true, each
container's series keep it, as the Datadog kubelet check does with `container_id`, so queries
can group by container instance. Each container restart then starts a new series.
* **`auth`**
Type: `string`. Optional. Default: `serviceAccount`.
How the integration authenticates to the Kubernetes API. `serviceAccount` uses the in-cluster
pod token; `kubeConfig` reads \$KUBECONFIG / \~/.kube/config (kubectl-style); `none` is
unauthenticated. Allowed values: `serviceAccount`, `kubeConfig`, `none`.
* **`kubelet`**
Type: `object`. Optional.
Settings for collecting node, pod, container, and volume metrics from each node's kubelet
stats endpoint.
* **`kubelet.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`kubelet.collection_interval`**
Type: `duration`. Optional. Default: `20s`.
How often the Collector collects metrics from each node's kubelet.
* **`kubelet.timeout`**
Type: `duration`. Optional. Default: `20s`.
Maximum time the Collector waits for a kubelet stats response during one collection.
* **`kubelet.metrics`**
Type: `object`. Optional. Default:
`{"k8s.container.cpu_limit_utilization":{"enabled":true},"k8s.container.memory_limit_utilization":{"enabled":true},"k8s.node.system_container.cpu.usage":{"enabled":true},"k8s.node.system_container.memory.usage":{"enabled":true},"k8s.pod.cpu_limit_utilization":{"enabled":true},"k8s.pod.cpu_request_utilization":{"enabled":true},"k8s.pod.memory_limit_utilization":{"enabled":true},"k8s.pod.memory_request_utilization":{"enabled":true},"k8s.pod.volume.usage":{"enabled":true}}`.
Pass-through to the kubeletstats receiver's `metrics:` block — per-metric `enabled:` toggles
for metrics that are off by default upstream, keyed by metric name. Validated against the
receiver's own config schema. Setting this replaces the whole default map below rather than
merging into it, so restate any default you still want. The Collector never reports
`container.uptime` from the kubelet, even if you turn it on here. The Docker and containerd
integrations report container uptime under that name for the same containers. On nodes that
run neither integration, compute uptime from `k8s.state.pod.container.state_started`, each
container's start time in Unix seconds.
* **`kubelet_metrics`**
Type: `object`. Optional.
Settings for collecting the kubelet's own Prometheus metrics from each node.
* **`kubelet_metrics.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`kubelet_metrics.collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector scrapes each node's kubelet metrics endpoint.
* **`kubelet_metrics.timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one scrape to complete.
* **`cadvisor`**
Type: `object`. Optional.
Settings for collecting container resource metrics from each node's cAdvisor endpoint.
* **`cadvisor.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`cadvisor.collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector scrapes each node's cAdvisor endpoint.
* **`cadvisor.timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one scrape to complete.
* **`cadvisor.honor_timestamps`**
Type: `boolean`. Optional. Default: `true`.
Whether to keep the timestamps cAdvisor attaches to its samples, which date from its last
internal housekeeping pass and can trail the scrape by tens of seconds. Set false to stamp
samples at scrape time instead — for ingest paths whose sample-recency window is tight
enough to reject samples that are already old when scraped.
* **`container_logs`**
Type: `object`. Optional.
Settings for collecting container logs from each node.
* **`container_logs.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`audit_logs`**
Type: `object`. Optional.
Settings for collecting Kubernetes API server audit logs.
* **`audit_logs.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`cluster`**
Type: `object`. Optional.
Settings for collecting cluster-level object state — deployments, pods, nodes, and other
resources — from the Kubernetes API.
* **`cluster.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`cluster.namespaces`**
Type: `array of string`. Optional. Default: `[]`.
Restrict cluster resource collection to these namespaces. Omitted or empty collects every
namespace.
* **`cluster.collection_interval`**
Type: `duration`. Optional. Default: `10s`.
How often the Collector reads cluster object state.
* **`cluster.timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one read to complete.
* **`cluster.allow_secrets_read`**
Type: `boolean`. Optional. Default: `false`.
Allow the cluster collector to read Secrets cluster-wide (list/watch), which
kube-state-metrics requires to emit the Secret metadata metrics
(`kubernetes_state.secret.count` and `.type`). Off by default: because Kubernetes LIST/WATCH
return full Secret objects including `data`, the grant exposes every Secret's contents to the
collector's ServiceAccount. Leave it off unless you need these metrics.
* **`cluster.metrics`**
Type: `object`. Optional. Default:
`{"k8s.container.status.reason":{"enabled":true},"k8s.pod.status_reason":{"enabled":true},"k8s.service.endpoint.count":{"enabled":true}}`.
Pass-through to the k8s\_cluster receiver's `metrics:` block — per-metric `enabled:` toggles
for metrics that are off by default upstream, keyed by metric name. Validated against the
receiver's own config schema. Setting this replaces the whole default map below rather than
merging into it, so restate any default you still want.
* **`events`**
Type: `object`. Optional.
Settings for collecting Kubernetes events as log records.
* **`events.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`apiserver`**
Type: `object`. Optional.
Settings for scraping this Kubernetes control-plane component's metrics endpoint.
* **`apiserver.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`apiserver.collection_interval`**
Type: `duration`. Optional. Default: `30s`.
How often the Collector scrapes the component's metrics endpoint.
* **`apiserver.timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one scrape to complete.
* **`apiserver.static_targets`**
Type: `array of object`. Optional. Default: `[]`.
Endpoints to scrape instead of discovering this component. A non-empty list turns off
discovery for the component, and the Collector scrapes exactly the listed endpoints. Omit the
list or leave it empty to discover the component's endpoints automatically.
* **`apiserver.static_targets[].endpoint`**
Type: `string`. Required.
`host:port` of the scrape target, for example, `127.0.0.1:6443`.
* **`scheduler`**
Type: `object`. Optional.
Settings for scraping this Kubernetes control-plane component's metrics endpoint.
* **`scheduler.collection_interval`**
Type: `duration`. Optional. Default: `30s`.
How often the Collector scrapes the component's metrics endpoint.
* **`scheduler.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`scheduler.static_targets`**
Type: `array of object`. Optional. Default: `[]`.
Endpoints to scrape instead of discovering this component. A non-empty list turns off
discovery for the component, and the Collector scrapes exactly the listed endpoints. Omit the
list or leave it empty to discover the component's endpoints automatically.
* **`scheduler.static_targets[].endpoint`**
Type: `string`. Required.
`host:port` of the scrape target, for example, `127.0.0.1:6443`.
* **`scheduler.timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one scrape to complete.
* **`controller_manager`**
Type: `object`. Optional.
Settings for scraping this Kubernetes control-plane component's metrics endpoint.
* **`controller_manager.collection_interval`**
Type: `duration`. Optional. Default: `30s`.
How often the Collector scrapes the component's metrics endpoint.
* **`controller_manager.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`controller_manager.static_targets`**
Type: `array of object`. Optional. Default: `[]`.
Endpoints to scrape instead of discovering this component. A non-empty list turns off
discovery for the component, and the Collector scrapes exactly the listed endpoints. Omit the
list or leave it empty to discover the component's endpoints automatically.
* **`controller_manager.static_targets[].endpoint`**
Type: `string`. Required.
`host:port` of the scrape target, for example, `127.0.0.1:6443`.
* **`controller_manager.timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one scrape to complete.
* **`kube_proxy`**
Type: `object`. Optional.
Settings for scraping the kube-proxy metrics endpoint on each node.
* **`kube_proxy.collection_interval`**
Type: `duration`. Optional. Default: `30s`.
How often the Collector scrapes the component's metrics endpoint.
* **`kube_proxy.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`kube_proxy.static_targets`**
Type: `array of object`. Optional. Default: `[]`.
Endpoints to scrape instead of discovering this component. A non-empty list turns off
discovery for the component, and the Collector scrapes exactly the listed endpoints. Omit the
list or leave it empty to discover the component's endpoints automatically.
* **`kube_proxy.static_targets[].endpoint`**
Type: `string`. Required.
`host:port` of the scrape target, for example, `127.0.0.1:6443`.
* **`kube_proxy.timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one scrape to complete.
* **`coredns`**
Type: `object`. Optional.
Settings for scraping CoreDNS metrics from CoreDNS pods on each node, plus optional
cluster-tier targets in `static_targets`.
* **`coredns.collection_interval`**
Type: `duration`. Optional. Default: `30s`.
How often the Collector scrapes the component's metrics endpoint.
* **`coredns.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`coredns.static_targets`**
Type: `array of object`. Optional. Default: `[]`.
Endpoints to scrape instead of discovering this component. A non-empty list turns off
discovery for the component, and the Collector scrapes exactly the listed endpoints. Omit the
list or leave it empty to discover the component's endpoints automatically.
* **`coredns.static_targets[].endpoint`**
Type: `string`. Required.
`host:port` of the scrape target, for example, `127.0.0.1:6443`.
* **`coredns.timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one scrape to complete.
# Linux
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/linux
Journal records and unit-state metrics from systemd on Linux hosts, optional forwarded syslog records, and target health for the journal, system bus, and listener.
The Linux integration requires CXDOT Collector 1.7.0 or greater.
[Linux](https://www.kernel.org/) is an open source operating system kernel used by
server distributions such as Debian, Ubuntu, and Red Hat Enterprise Linux. Use the
Linux integration to collect systemd journal records, systemd unit states, and
forwarded syslog records from Linux hosts.
The `journald` and `systemd` capabilities support Linux distributions running
systemd 239 or greater. The `syslog` capability doesn't require systemd.
## Supported telemetry types
The Linux integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | Yes |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Linux integration has the following prerequisites:
* Run the Collector in host mode on each
[Linux host](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/linux).
* The `journald` capability is enabled by default. When enabled, the host must
have `journalctl`, and the account that runs the Collector must be able to read
the system journal. The `root` account and members of the `systemd-journal`
group normally have access. Some distributions also grant access through
groups such as `adm` or `wheel`. Run `id -nG ACCOUNT` to list an account's
groups, and use `getfacl` to inspect journal access control lists.
To run the Linux integration without journal access, set
`cxdot.integrations.linux.journald.enabled` to `false`. The `systemd` and `syslog`
capabilities don't require journal access.
* The `systemd` capability, enabled by default, requires the host to run systemd as
its service manager and make the D-Bus system bus available. Run
`systemctl --version` to confirm the systemd version.
* Disable a capability if the host doesn't meet its requirements. A host that enables
only the `syslog` capability doesn't require systemd or `journalctl`.
## Configure
The Linux integration runs by default on Linux hosts. It collects journal records of
priority `info` and more severe from the whole system journal, and the active state of
each matching, currently loaded systemd service unit. Journal collection starts at the
end of the journal when the Collector starts, so records already in the journal aren't
collected. Forwarded syslog collection is off by default.
To configure the Linux integration, follow these steps:
1. Run the Collector in host mode and export journal records to your tenant. The
default configuration requires no `linux` block. Configure
[tenant egress](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/configure/telemetry-egress)
with logs enabled. For example, add the following to the Collector configuration
file:
```yaml theme={null}
cxdot:
mode: host
egress:
tenant:
org_name: MY_ORG
api_token: ${env:CHRONOSPHERE_API_TOKEN}
signals:
logs:
enabled: true
```
2. Optional: Keep the journal read position across Collector restarts. By default the
Collector resumes at the end of the journal after a restart, so records written
while it was down aren't collected. Enable checkpoint storage and name a directory
that already exists and that the account running the Collector can write to. For
example, add the following to the Collector configuration file:
```yaml theme={null}
cxdot:
mode: host
storage:
checkpoints:
enabled: true
directory: /var/lib/cxdot-collector
```
3. Optional: Accept syslog forwarded by the host's syslog daemon or by network
devices. By default, the listener accepts UDP on `127.0.0.1:5514` and parses
RFC 5424 messages. For example, add the following to the Collector configuration
file:
```yaml theme={null}
cxdot:
mode: host
integrations:
linux:
syslog:
enabled: true
```
Then, configure the sender to forward to the listener. For example, for rsyslog,
create `/etc/rsyslog.d/50-cxdot.conf` with the following content and restart
rsyslog:
```text theme={null}
if $programname != 'cxdot-collector' then {
action(type="omfwd"
target="127.0.0.1"
port="5514"
protocol="udp"
template="RSYSLOG_SyslogProtocol23Format")
}
```
The protocol-23 template is broadly available across versions and is accepted by
the listener's RFC 5424 parser.
The condition on the program name excludes log records that the Collector writes.
Without it, the error the Collector writes when an export fails is forwarded to
the listener and exported again, which fails again. The `journald` capability
drops records that the Collector writes; the `syslog` capability doesn't, so the
sender must exclude them. If the host's syslog daemon forwards other records that
the `journald` capability also collects, the two capabilities produce duplicate
records. Narrow the sender's selection, or disable `journald` only when you intend
syslog to replace journal collection.
4. Optional: Change the listener's address, transport, or message format. Set `udp`
or `tcp`, not both, because the listener uses one transport. Set `protocol` to the
format the sender emits. For example, add the following to the Collector
configuration file to accept RFC 3164 messages from other hosts over TCP:
```yaml theme={null}
cxdot:
mode: host
integrations:
linux:
syslog:
enabled: true
tcp:
listen_address: "0.0.0.0:6514"
protocol: rfc3164
```
With the default Linux privileged-port threshold, a listen address on a port lower
than `1024` requires the Collector to run as `root` or with the
`CAP_NET_BIND_SERVICE` Linux capability.
RFC 3164 timestamps carry no time zone. If the senders' clocks show a zone other
than UTC, set `location` to that zone so the Collector reads their timestamps
correctly.
5. Optional: Secure the TCP listener, or match the sender's framing. A listener that
accepts connections from other hosts carries log records across the network, so
configure TLS for it with a certificate and key the Collector can read, and set
`client_ca_file` to accept only senders that present a certificate signed by that
authority. If the sender frames each message with its length in octets, set
`enable_octet_counting: true`. For example, add the following to the Collector
configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
linux:
syslog:
enabled: true
tcp:
listen_address: "0.0.0.0:6514"
enable_octet_counting: true
tls:
cert_file: /etc/cxdot-collector/syslog.crt
key_file: /etc/cxdot-collector/syslog.key
client_ca_file: /etc/cxdot-collector/senders-ca.crt
location: America/New_York
```
Then configure the senders to connect with TLS and to use the same framing. The
`udp` listener has no TLS or framing settings.
6. Optional: Narrow journal collection. Set `priority` to a more severe level to
collect fewer records, or set `units` to collect from specific systemd units only.
For example, add the following to the Collector configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
linux:
journald:
priority: warning
units:
- sshd.service
- nginx.service
```
7. Optional: Select the currently loaded systemd units to report state for. The `units`
list replaces the default `*.service` pattern, so include that pattern to continue
reporting services. Each unit produces one time series per possible state, so a
wide pattern on a host with many units produces many time series. For example, add
the following to the Collector configuration file to report timers and services:
```yaml theme={null}
cxdot:
mode: host
integrations:
linux:
systemd:
units:
- "*.service"
- "*.timer"
```
The Collector also reports `systemd.service.restarts`, the number of times systemd
has automatically restarted each service. Set `service_restarts: false` to stop
collecting it. A configuration with a `linux` block that declares a `schema_version`
before 1.8 keeps this metric off until you raise the version. Set
`service_cpu_time: true` to also collect CPU time per service.
This setting requires cgroup v2 on the host.
8. Optional: Disable the integration, or one of its capabilities, to stop collecting
from a host. For example, add the following to the Collector configuration file to
stop collecting unit states while continuing to collect journal records:
```yaml theme={null}
cxdot:
mode: host
integrations:
linux:
systemd:
enabled: false
```
Set `enabled: false` directly under `linux` to disable the whole integration.
### Validate
To validate the Linux integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for
`__name__=cxdot.integration.target.health cxdot.integration.name=linux`. Confirm
that each enabled capability reports `1`. Use the `cxdot.integration.check` and
`cxdot.integration.target` attributes to identify the capability and the host for
each result.
2. Optional: If the `systemd` capability is enabled, in
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
{"systemd.unit.state", "systemd.unit.name"="systemd-journald.service",
"systemd.unit.active_state"="active"}
```
Confirm that the query returns a time series with the value `1` for each Linux
host. If you narrowed `units`, query a unit that the list includes.
3. Optional: If the `journald` capability is enabled, on a Linux host, write a test
record to the journal:
```shell theme={null}
logger -t cxdot-test "Linux integration test"
```
In [Logs Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/query-logs),
filter for `["cxdot.integration.name"] = "linux" AND "Linux integration test"`.
Confirm that the record appears with its `SYSLOG_IDENTIFIER` field set to
`cxdot-test`, and its `service.name` attribute set to `cxdot-test` or, if you set
`journald.service`, to that value.
4. Optional: If you enabled the syslog listener, send a test message to it from the
host. Adjust the address, port, and transport if you changed the listener:
```shell theme={null}
logger -n 127.0.0.1 -P 5514 -d -t cxdot-test "Linux syslog test"
```
In [Logs Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/query-logs),
filter for `["cxdot.integration.name"] = "linux" AND "Linux syslog test"`.
Confirm that the record appears. If you set `syslog.service`, confirm that its
`service.name` attribute is set to that value.
For more information about CXDOT Collector integrations, see the
[integrations catalog](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector).
### Troubleshooting
* The `journald` capability reports health `0`: The account that runs the Collector
can't read the system journal, `journalctl` isn't on its `PATH`, or the host has no
system journal. Run `journalctl --system --lines=1` as that account. A message that
mentions `insufficient permissions` means the account lacks access to one or more
system journal files. Check its groups and the journal access control lists.
* The `journald` capability reports health `1`, but no records appear: The Collector
collects only records written after it started, and only records of priority `info`
and more severe unless `priority` says otherwise. Also confirm that a logs exporter
is configured. If you use tenant egress, enable
`cxdot.egress.tenant.signals.logs.enabled: true`.
* No records from the service that runs the Collector appear through `journald`: The
`journald` capability drops records written by the `cxdot-collector.service` unit and
the `cxdot-collector` process. A syslog forwarder can reintroduce those records unless
its selector excludes them.
* The `systemd` capability reports health `0`: The Collector can't reach the system
bus. The host doesn't run systemd, or the Collector runs in a container without the
system bus socket. Disable the `systemd` capability on such hosts.
* The `syslog` capability reports health `0`: Another process holds the listen address,
usually the host's own syslog daemon or a second Collector, or the port is lower than
`1024` and the Collector lacks the privilege to bind it. Change
`listen_address` or grant the privilege, then restart the Collector.
* Forwarded syslog records arrive as a single opaque line: The sender's format doesn't
match `protocol`. The default rsyslog forwarding template and syslog-ng's `network()`
destination emit RFC 3164, so set `protocol: rfc3164` for those senders.
* Records forwarded over TCP run together or arrive cut mid-message: The sender's framing
doesn't match the listener's. A sender that prefixes each message with its length needs
`enable_octet_counting: true`.
* RFC 3164 records carry a timestamp that's off by a whole number of hours: The senders'
clocks show a time zone other than UTC. Set `location` to that zone.
* The `syslog` capability reports health `0` and the Collector logs a failed-to-load-location
error at startup: The `location` value isn't a valid time zone name. Use an Internet
Assigned Numbers Authority (IANA) name such as `America/New_York`. The Collector reads
zone names from the host's time zone database, typically the `tzdata` package under
`/usr/share/zoneinfo`, so a valid name also fails on a host that lacks this data.
Install the package or use `UTC`.
* `systemd.service.restarts` is missing and the Collector logs a collection error: The
host runs a systemd release older than 235, which the integration doesn't support.
Set `service_restarts: false` on such hosts to stop the error.
* `service_cpu_time` is enabled, but `systemd.service.cpu.time` is missing and the
Collector logs a collection error: The host uses cgroup v1 or a hybrid hierarchy,
and per-service CPU time requires cgroup v2. Run
`stat -fc %T /sys/fs/cgroup`, which prints `cgroup2fs` on a host that supports it.
## Enable checkpoint storage
> Requires CXDOT Collector v1.5.0+otel-0.157.0 or later.
The CXDOT Collector can use checkpoint storage for systemd journal records collected
by the Linux integration. If checkpoint storage is enabled, the Collector saves its
journal read position to disk, and will resume from that saved position if the
Collector restarts. This lets the Collector retrieve logs retained by the systemd
journal while the Collector was stopped. If checkpoint storage is disabled, the
Collector starts reading logs from the end of each journal after a restart, and won't
collect any logs written while it was stopped.
Checkpoint storage is disabled by default. To enable it, follow these steps:
1. Create a directory where the Collector can save checkpoint files. The Collector
must have write permissions for this directory, and Palo Alto Networks
recommends restricting access to this directory so that other users or processes
can't write to it.
2. Add the following values to your CXDOT Collector configuration file:
```yaml theme={null}
cxdot:
storage:
checkpoints:
enabled: true
directory: PATH
```
Replace *`PATH`* with the absolute path to the directory that you created in
the previous step.
3. Optional: Add `create_directory: true` to your CXDOT Collector configuration file:
```yaml theme={null}
cxdot:
storage:
checkpoints:
create_directory: true
```
This setting is disabled by default. If `create_directory` is enabled, the
Collector creates the directory specified in `checkpoints.directory` if that
directory doesn't already exist. If `create_directory` is disabled, and the
directory specified in `checkpoints.directory` doesn't already exist, the
Collector will fail to start.
4. Optional: Add `fsync: true` to your CXDOT Collector configuration file:
```yaml theme={null}
cxdot:
storage:
checkpoints:
fsync: true
```
This setting is disabled by default. If `fsync` is enabled, the Collector saves
its log read positions to disk immediately, which reduces the chance of losing
the latest checkpoint during an restart, but increases the number of writes to
disk. If `fsync` is disabled, the operation system controls when to write
checkpoints to disk.
5. Restart the CXDOT Collector.
6. Confirm that the directory you created contains a checkpoint file. Checkpoint
file names begin with `receiver_`.
### Delete old checkpoint files
The CXDOT Collector doesn't delete checkpoint files. Outdated checkpoint files can
create unnecessary backlogs in certain scenarios, so Palo Alto Networks recommends
deleting any files in the checkpoint directory if you're re-enabling checkpoint
storage after an extended period of time.
To delete old checkpoint files, follow these steps:
1. Stop the Collector. Never delete checkpoint files while the Collector is running.
2. Delete the files in the Collector's checkpoint directory. If you plan to continue
using checkpoint storage, don't delete the directory itself.
3. Start the Collector.
## Configuration reference
Configure one Linux integration instance with the following settings. In a Collector
configuration file, place them under `cxdot.integrations.linux`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`collection_interval`**
Type: `duration`. Optional. Default: `60s`.
How often the Collector collects systemd unit state and checks whether each enabled capability
can reach what it reads. Journal and syslog records arrive as they're written, so this setting
doesn't pace log collection.
* **`timeout`**
Type: `duration`. Optional. Default: `60s`.
Time limit for each unit-state collection and each health check. The journal health check runs
`journalctl`, and this is the deadline on that command.
* **`journald`**
Type: `object`. Optional.
Settings for collecting records from the systemd journal on each host, and for reporting
whether the Collector can read that journal.
* **`journald.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`journald.priority`**
Type: `string`. Optional. Default: `info`.
Lowest journal priority to collect. The value follows the `journalctl` convention of this
level and more severe. This setting controls how many journal records the Collector sends, so
watch the volume after you configure a logs exporter. `info` is the level at which `sshd`,
`sudo`, `cron`, and most daemons write records such as logins. Set a more severe level, such
as `warning`, when your hosts produce more volume than you want to collect. Allowed values:
`emerg`, `alert`, `crit`, `err`, `warning`, `notice`, `info`, `debug`.
* **`journald.units`**
Type: `array of string`. Optional. Minimum items: `1`.
Names of systemd units to collect journal records from, for example `sshd.service`. When
unset, the Collector collects the whole journal. Use `priority` to control volume, and this
setting to limit collection to the units you need. Whatever this setting contains, the
Collector drops its own records, matched by the `cxdot-collector.service` unit or the
`cxdot-collector` process name. When systemd runs the Collector, its log output lands in the
journal, so without this exclusion an export failure would be read back as a record and sent
through the pipeline that's failing.
* **`journald.drop_fields`**
Type: `regex`. Optional. Default:
`^(__|_AUDIT_|_(BOOT|MACHINE)_ID|_CAP_EFFECTIVE|_CMDLINE|_EXE|_SELINUX_CONTEXT|_STREAM_ID|_RUNTIME_SCOPE|_SOURCE_.*TIMESTAMP|_SYSTEMD_(CGROUP|SLICE|USER_SLICE|OWNER_UID|SESSION|INVOCATION_ID)|_HOSTNAME|SYSLOG_(PID|TIMESTAMP|RAW))`.
Minimum length: `1`.
Regular expression matched against each field name in a journal record's body. Every field
that matches is deleted before export. A journal record's body contains nearly the entire
`journalctl --output=json` entry, typically 20 to 30 fields and roughly ten times the size of
the message itself. The Collector uses `__REALTIME_TIMESTAMP` as the record timestamp and
removes that field before this expression runs. The default removes identifier and bookkeeping
fields: `__CURSOR`, `_BOOT_ID`, `_MACHINE_ID`, `_CMDLINE`, `_EXE`, the `_SYSTEMD_` cgroup and
session fields, `_HOSTNAME`, and the `SYSLOG_` transport fields. `_HOSTNAME` is removed
because every record already carries the host as a resource attribute. `SYSLOG_PID`,
`SYSLOG_TIMESTAMP`, and `SYSLOG_RAW` are sender-provided values that can differ from the
journal's trusted process ID, timestamp, and normalized message. The fields that remain are
the ones an operator filters on: `MESSAGE`, `PRIORITY`, which the Collector also maps to the
record's severity, `_SYSTEMD_UNIT`, `SYSLOG_IDENTIFIER`, `SYSLOG_FACILITY`, `_PID`, `_COMM`,
`_TRANSPORT`, `_UID`, `_GID`, and any field a program wrote into its own journal entries, such
as `CODE_*`, `UNIT`, and `USER_UNIT`. `SYSLOG_FACILITY` remains because nothing else on the
record says whether a syslog-transported message came from `auth`, `authpriv`, `cron`, or
`daemon`. To keep a field the default removes, set a pattern that doesn't match it. To keep
every field, set a pattern that matches no field name, such as `^$`. The pattern can't contain
backslashes or double quotes, so write `[0-9]` rather than `\d`. Journal field names contain
only uppercase letters, digits, and underscores, so a pattern over them needs no escapes.
Matching is unanchored unless the pattern anchors it, which is why the default begins with
`^`. The pattern must be a valid RE2 regular expression. A pattern that doesn't compile, such
as one with an unbalanced parenthesis, is rejected when the Collector loads its configuration,
with an error that names this setting.
* **`journald.service`**
Type: `string`. Optional. Minimum length: `1`.
Service name assigned to every journal record as its `service.name` attribute. When unset,
Docker container records use the image's short name, such as `nginx`. A container record
without a usable image, such as one started from an image digest or from a runtime that
doesn't record the image, uses its log tag if you set one with `--log-opt tag`, and otherwise
`docker`. Other records use the first available value from `SYSLOG_IDENTIFIER`, the systemd
user unit, the systemd unit, or `_COMM`. A unit name loses its trailing `.service`. If none of
these values are available, the record keeps the host's resource-level `service.name`. Set
this field only when one name fits every record, such as when `units` selects one service. The
value can't begin or end with whitespace.
* **`systemd`**
Type: `object`. Optional.
Settings for collecting the state of systemd units on each host, and for reporting whether the
Collector can reach the system bus it reads them from.
* **`systemd.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`systemd.units`**
Type: `array of string`. Optional. Default: `["*.service"]`. Minimum items: `1`.
Patterns for the systemd units to report state for, in the systemd sense of unit: `.service`,
`.timer`, `.socket`, `.mount`, and so on. The list replaces the default, so include
`*.service` to keep reporting services. The Collector reports matching, currently loaded
units; it doesn't enumerate every unit file installed on disk. This is the setting to narrow
when the number of time series matters. `systemd.unit.state` is emitted once per unit per
possible `active_state`, and there are eight states, so a host with 120 loaded matching
service units produces around 960 time series from it. Each unit is also its own resource,
carrying `systemd.unit.name`. An explicit list of unit names, or a subset of services such as
`["sshd.service", "nginx.service"]`, brings the count down on a host with an unusual number of
units. Widen the list the same way, for example `["*.service", "*.timer"]`.
* **`systemd.service_cpu_time`**
Type: `boolean`. Optional. Default: `false`.
Whether to collect `systemd.service.cpu.time`, the total CPU time per service. If true, the
Collector reads each service's CPU time from its cgroup on every collection. If false, the
metric isn't collected. Requires cgroup v2, the unified hierarchy. On a cgroup v1 or hybrid
host, each service contributes a partial collection error, and the Collector logs the combined
error once per collection interval. RHEL and CentOS 7 and 8, Ubuntu before 21.10, Amazon Linux
2, and Debian 10 all default to a non-unified hierarchy. To confirm the hierarchy, run
`stat -fc %T /sys/fs/cgroup`, which prints `cgroup2fs` on a unified host.
* **`systemd.service_restarts`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect `systemd.service.restarts`, the number of times systemd has automatically
restarted each service since the service was last started by hand. The value is the unit's
`NRestarts` property, which counts restarts that a `Restart=` setting triggered after the
process exited. A manual `systemctl restart` isn't counted and resets the count to zero. The
Collector reads the property over the system bus on every collection, one time series per
matching `.service` unit, with no cgroup requirement. A rising value identifies a service that
keeps exiting while `systemd.unit.state` reports it `active` between restarts. The property
exists on systemd 235 and later. If false, the metric isn't collected.
* **`syslog`**
Type: `object`. Optional.
Settings for the syslog listener each host opens, and for reporting whether that listener is
up.
* **`syslog.enabled`**
Type: `boolean`. Optional. Default: `false`.
Whether to accept syslog forwarded by `rsyslog`, `syslog-ng`, or a network device. If true,
the Collector opens a listener and collects the messages sent to it as log records. If false,
the Collector opens no listener. The other capabilities read state the Collector can already
see, while this one collects nothing until a sender is configured to forward to it. On a host
that runs `rsyslog` or `syslog-ng`, the journal generally carries the same records already.
`enabled: true` on its own listens on UDP `127.0.0.1:5514` and parses RFC 5424. Set `udp` or
`tcp` to move or change the listener, and `protocol` to match what the sender emits. Journal
and syslog records require a logs exporter. If you use tenant egress, enable
`cxdot.egress.tenant.signals.logs`.
* **`syslog.udp`**
Type: `object`. Optional. Default: `{"listen_address":"127.0.0.1:5514"}`.
UDP listener. The default is the loopback address on a high port, which suits a forwarder on
the same host and is the only address that's safe to choose by default: `0.0.0.0` would open
the host to the network, and the conventional port 514 needs privilege to bind and is usually
already held by the host's syslog daemon. Widen the address to accept from other hosts, for
example `0.0.0.0:5514`. Set `tcp` instead for a TCP listener. The two blocks are exclusive.
* **`syslog.udp.listen_address`**
Type: `string`. Required. Minimum length: `1`.
`:` to receive syslog messages over UDP on. Required when `syslog.udp` is
configured.
* **`syslog.tcp`**
Type: `object`. Optional.
TCP listener, for forwarders configured to use TCP. Unset by default. Set it in place of
`udp`, not beside it. The listener splits the stream on newlines and accepts plaintext
connections unless `enable_octet_counting` or `tls` say otherwise.
* **`syslog.tcp.listen_address`**
Type: `string`. Required. Minimum length: `1`.
`:` to accept syslog connections on. Required when `syslog.tcp` is configured.
* **`syslog.tcp.enable_octet_counting`**
Type: `boolean`. Optional. Default: `false`.
Whether each message on the TCP stream starts with its length in octets, the octet-counting
framing of RFC 6587. If false, the Collector splits the stream on newlines, which is the
framing `rsyslog` and `syslog-ng` emit over TCP unless configured otherwise. Set true for a
sender configured for octet counting, such as `rsyslog` with `TCP_Framing="octet-counted"`. A
stream framed one way and read the other produces records that run together or are split
mid-message.
* **`syslog.tcp.tls`**
Type: `object`. Optional.
Transport layer security (TLS) settings for the TCP listener. When set, the listener accepts
only TLS connections. Requires a certificate and key: either `cert_file` and `key_file`, or
`cert_pem` and `key_pem`. A file and its PEM alternative can't both be set. The Collector
masks `key_pem` and the trusted platform module authorization values in diagnostic output. Set
`client_ca_file` to require and verify a client certificate from each sender. When unset, the
listener accepts plaintext connections, which suits a forwarder on the same host. A listener
that accepts connections from other hosts carries log records across the network, so configure
TLS for it and configure the senders to use TLS. Only TCP supports TLS; `udp` has no
equivalent setting.
* **`syslog.tcp.tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded certificate file the listener presents to each sender. Pair it with
`key_file`; `cert_pem` and `key_pem` are the in-memory alternative.
* **`syslog.tcp.tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded certificate content the listener presents to each sender, in place of `cert_file`.
* **`syslog.tcp.tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites the listener accepts, in preference order. If omitted, the Collector uses
the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`syslog.tcp.tls.client_ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file. If set, the listener
requires each sender to present a certificate signed by that authority and rejects connections
that don't. If omitted, the listener accepts any sender that completes the TLS handshake.
* **`syslog.tcp.tls.client_ca_file_reload`**
Type: `boolean`. Optional.
Whether to reload `client_ca_file` when the file changes on disk, so a rotated authority takes
effect without restarting the Collector. If false, the Collector reads the file once at
startup.
* **`syslog.tcp.tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves the listener accepts for an elliptic curve Diffie-Hellman ephemeral handshake,
in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`syslog.tcp.tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded private key file for the certificate in `cert_file`.
* **`syslog.tcp.tls.key_pem`**
Type: `string`. Optional.
PEM-encoded private key content for the certificate in `cert_pem`, in place of `key_file`.
* **`syslog.tcp.tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the listener accepts. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`syslog.tcp.tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the listener accepts. If omitted, the minimum version is TLS 1.2.
* **`syslog.tcp.tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads the listener's certificate and key files, so a renewed
certificate takes effect without a restart. If omitted, the Collector doesn't reload them.
* **`syslog.tcp.tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the listener's private key.
* **`syslog.tcp.tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`syslog.tcp.tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`syslog.tcp.tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`syslog.tcp.tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
* **`syslog.protocol`**
Type: `string`. Optional. Default: `rfc5424`.
Wire format the sender emits. `rfc5424` is the current format. `rfc3164` is the older format,
which the default `rsyslog` forwarding template, the `syslog-ng` `network()` destination, and
most network appliances emit unless configured otherwise. A record that arrives in one format
while the listener expects the other isn't parsed and is forwarded as one opaque line. `none`
skips parsing and keeps each line as the record body, for a sender that conforms to neither
format. Allowed values: `rfc5424`, `rfc3164`, `none`.
* **`syslog.location`**
Type: `string`. Optional. Default: `UTC`. Minimum length: `1`.
Time zone to interpret RFC 3164 timestamps in, as a name from the Internet Assigned Numbers
Authority time zone database, such as `America/New_York`. An RFC 3164 timestamp carries no
zone, so without this setting the Collector reads it as UTC, and records from a sender whose
clock shows local time get a timestamp that's off by the zone offset. Set it to the zone the
senders use. RFC 5424 timestamps carry their own offset, so this setting doesn't affect them.
The time zone of the host running the Collector isn't consulted. A name the Collector can't
load stops the listener from starting, and the integration's listener health reports the
failure.
* **`syslog.service`**
Type: `string`. Optional. Minimum length: `1`.
Service name assigned to every syslog record as its `service.name` attribute. When unset,
records keep the host's resource-level `service.name`. Set this field when every sender
forwards records from one service. The value can't contain backticks, backslashes, or
parentheses, and can't begin or end with whitespace.
# MarkLogic
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/marklogic
MarkLogic cluster, database, forest, host, server, request, transaction, storage, and health metrics.
The MarkLogic integration requires CXDOT Collector 1.9.0 or greater.
[MarkLogic](https://www.progress.com/marklogic) is a multi-model database for
operational and transactional applications. Use the MarkLogic integration with the CXDOT
Collector to collect cluster, database, forest, host, server, request, transaction, and
storage metrics from MarkLogic servers running in your environment.
The MarkLogic integration supports MarkLogic 11.0 or greater.
## Supported telemetry types
The MarkLogic integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The MarkLogic integration has the following prerequisites:
* Make the
[MarkLogic Management REST API](https://docs.marklogic.com/11.0/REST/management)
reachable from the CXDOT Collector. The default port is `8002`.
* Create a MarkLogic monitoring user with the `manage-user` role. If you collect
database and forest health metrics, assign the `manage-admin` role instead.
* Configure the Management REST API to accept HTTP Digest or HTTP Basic
authentication.
## Configure
The MarkLogic integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the integration, follow these steps:
1. To collect from MarkLogic pods in Kubernetes, add a CXDOT integration annotation to
the pod template. The annotation key must end with the container name, and its value
can reference credentials stored in a Kubernetes Secret in the same namespace. For
example, add the following annotation to your MarkLogic workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/marklogic: |
schema_version: v1.14
marklogic:
endpoints:
- endpoint: ${target.host}:${target.port.manage}
username: cxdot
password: ${k8s_secret:marklogic-monitor/password}
spec:
containers:
- name: marklogic
image: marklogicdb/marklogic-db:11.2.0-ubi
ports:
- name: manage
containerPort: 8002
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.manage}` with the container port named `manage`, and
`${k8s_secret:marklogic-monitor/password}` with the `password` key of the
`marklogic-monitor` Secret. To allow the Collector to read the Secret, add the pod's
namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for your
CXDOT Collector.
2. Optional: To collect from MarkLogic servers outside your Kubernetes cluster, configure
static targets. In cluster mode, the leader-elected
cluster Collector scrapes static targets. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
Make the password available to the cluster Collector process. For example, add the
following to `values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
clusterCollector:
extraEnv:
- name: MARKLOGIC_PASSWORD
valueFrom:
secretKeyRef:
name: marklogic-monitor
key: password
collection:
cxdot:
integrations:
marklogic:
endpoints:
- endpoint: marklogic.example.com:8002
auth_type: digest
username: cxdot
password: "${env:MARKLOGIC_PASSWORD}"
```
A nonempty `endpoints` list disables annotation discovery for that integration
instance. The CXDOT Collector collects from only the listed targets.
3. Optional: Configure a second integration instance to collect from annotated pods and
static targets at the same time. For example, add the following to `values.yaml` for
your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
marklogic:
enabled: true
marklogic/external:
endpoints:
- endpoint: marklogic.example.com:8002
auth_type: digest
username: cxdot
password: "${env:MARKLOGIC_PASSWORD}"
```
The `marklogic/external` key defines a named integration instance for static
targets. The bare `marklogic` key continues to discover pods. Make the
`MARKLOGIC_PASSWORD` environment variable available to both Collector processes.
4. Optional: Collect database and forest health metrics after you assign the
monitoring user the `manage-admin` role. For example, add the following to
`values.yaml` for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
marklogic:
enable_health_metrics: true
```
5. Optional: Disable the integration. For example, add the following to `values.yaml`
for your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
marklogic:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the MarkLogic integration, follow these steps:
1. In
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=marklogic`. Confirm that each reachable target reports `1`
for `cxdot.integration.target.health`. A value of `0` means the Collector hit an error
collecting from that target. The `server.address` and `server.port` attributes
identify each target.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while MarkLogic handles active requests:
```text theme={null}
max by ("server.address", "server.port") ({"marklogic.cluster.request.active.count"})
```
Confirm that the query returns a value greater than `0` for each target.
## Configuration reference
Configure one MarkLogic integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.marklogic`. In a Collector configuration
file, place them under `cxdot.integrations.marklogic`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to run this MarkLogic integration instance. If true, the Collector collects MarkLogic
metrics. If false, the Collector doesn't run this integration instance.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
MarkLogic Management REST API targets. Each entry can contain a `host:port` value or a full
HTTP or HTTPS base URL. When this list isn't empty, the integration collects from exactly
these targets instead of targets found through annotation discovery.
* **`endpoints[].endpoint`**
Type: `string`. Required.
MarkLogic Management REST API target as a `host:port` value or a full HTTP or HTTPS base URL.
A `host:port` value uses HTTP.
* **`auth_type`**
Type: `string`. Optional. Default: `digest`.
Authentication method for the targets in `endpoints`. Set to `digest` for HTTP Digest
authentication or `basic` for HTTP Basic authentication. Allowed values: `basic`, `digest`.
* **`username`**
Type: `string`. Optional.
MarkLogic username for the targets in `endpoints`.
* **`password`**
Type: `string`. Optional.
MarkLogic password for the targets in `endpoints`. The Collector masks this value in
diagnostic output, logs, and errors.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
Time between metric collections from each MarkLogic target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time allowed to collect metrics from one MarkLogic target. The value must not exceed
`collection_interval`.
* **`enable_health_metrics`**
Type: `boolean`. Optional. Default: `false`.
Whether to collect database and forest health states. If true, the integration queries
`/manage/v2?view=health`, and the configured user must have the `manage-admin` role. If false,
the integration doesn't query that endpoint or collect database and forest health metrics.
* **`resource_filters`**
Type: `array of object`. Optional. Default: `[]`.
The integration collects metrics for a resource only if it matches at least one inclusion rule
and no exclusion rule. Exclusion rules take precedence over inclusion rules.
* **`resource_filters[].resource_type`**
Type: `string`. Required.
MarkLogic resource type to filter. Allowed values: `database`, `forest`, `host`, `server`.
* **`resource_filters[].pattern`**
Type: `regex`. Required.
Go regular expression matched against the resource name from the beginning.
* **`resource_filters[].include`**
Type: `boolean`. Optional. Default: `true`.
Whether matching resources are eligible for per-resource metric collection. If true, matching
resources are eligible. If false, matching resources are excluded.
* **`resource_filters[].group`**
Type: `string`. Optional. Default: empty string.
Match only resources in this MarkLogic group. Leave empty to match resources in every group.
* **`tls`**
Type: `object`. Optional.
TLS certificate and client authentication settings for HTTPS MarkLogic Management REST API
targets.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the MarkLogic
server certificate. If omitted, the Collector uses the system certificate authority pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the MarkLogic server
certificate.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the MarkLogic target requires
mutual TLS authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the MarkLogic target requires mutual
TLS authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. If true, the Collector uses an unencrypted connection.
If false, the endpoint scheme controls whether the connection uses TLS.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the MarkLogic server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the MarkLogic certificate instead of the endpoint hostname. Use this
setting when the certificate name differs from the endpoint hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
# Memcached
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/memcached
Memcached cache, operation, and connection metrics.
The Memcached integration requires CXDOT Collector 1.4.0 or greater.
[Memcached](https://memcached.org/) is a distributed memory object caching system. Use
the Memcached CXDOT Collector integration with the CXDOT Collector to collect cache,
operation, and connection metrics from Memcached servers running in your environment.
The integration supports Memcached 1.6 or greater.
## Supported telemetry types
The integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The integration has the following prerequisites:
* A Memcached server that listens on a TCP port the CXDOT Collector can reach. Unix domain
sockets aren't supported.
* A Memcached server that accepts unauthenticated connections. The integration uses
the plain-text `stats` command and doesn't support servers that require SASL
authentication.
## Configure
The Memcached integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the integration, follow these steps:
1. To collect from Memcached pods in Kubernetes, add a CXDOT integration annotation to
the pod template. The annotation key must end with the container name. For example,
add the following annotation to your Memcached workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/memcached: |
schema_version: v1.14
memcached:
endpoints:
- endpoint: ${target.host}:${target.port.memcached}
spec:
containers:
- name: memcached
image: memcached:1.6
ports:
- name: memcached
containerPort: 11211
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.memcached}` with the container port named `memcached`.
The Collector also discovers Memcached pods that carry the
`app.kubernetes.io/name: memcached` label and listen on port `11211`. A CXDOT
integration annotation takes precedence over the label for its container. To stop
collecting from a container, set `memcached: {enabled: false}` in the annotation. For
more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
2. Optional: To collect from Memcached servers outside your Kubernetes cluster,
configure static targets. For example, add the following to the `values.yaml` for
your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
memcached:
endpoints:
- endpoint: memcached.example.com:11211
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets.
3. Optional: Configure a second integration instance to collect from both discovered
pods and static targets. For example, add the following to the `values.yaml` for
your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
memcached: {}
memcached/external:
endpoints:
- endpoint: memcached.example.com:11211
```
The `memcached/external` key defines a named instance for the static targets. The
bare `memcached` key continues to discover pods.
4. Optional: Disable the integration when you don't want the CXDOT Collector to collect
Memcached metrics. For example, add the following to the `values.yaml` for your CXDOT
Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
memcached:
enabled: false
```
### Validate
To validate the integration, follow these steps:
1. In Live Telemetry Analyzer, filter for
`__name__=cxdot.integration.target.health` and
`cxdot.integration.name=memcached`. Confirm that each expected target reports `1`.
A value of `1` means that the `stats` command succeeded. A value of `0` means that
it failed. Use the `server.address` and `server.port` attributes to identify each
target.
2. In Metrics Explorer, run the following query:
```text theme={null}
count by ("server.address", "server.port") ({"memcached.uptime"})
```
Confirm that the query returns one time series per target.
## Configuration reference
Configure one Memcached integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.memcached`. In a Collector configuration
file, place them under `cxdot.integrations.memcached`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to run the Memcached integration. If true, the Collector collects Memcached metrics.
If false, the Collector doesn't run this integration.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Memcached targets. Each entry's `endpoint` is `host:port`, for example,
`memcached.default.svc:11211`. When this list isn't empty, the integration collects from
exactly these targets instead of discovered targets. The integration uses the plain-text
`stats` command and doesn't support servers that require authentication.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Memcached target in `host:port` format.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
Time between metric collections from each Memcached target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time to wait for each Memcached metric collection.
# Apache Mesos
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/mesos
Apache Mesos cluster metrics read from the masters' and agents' HTTP APIs, including cluster-wide task, agent, and resource counts, per-framework and per-role allocations, and each agent's tasks, executors, and resources, plus Apache Aurora scheduler metrics, including task counts by state, resource offers, preemptions, and cron activity.
The Apache Mesos integration requires CXDOT Collector 1.8.0 or greater.
[Apache Mesos](https://mesos.apache.org/) is a cluster manager that shares the
resources of a cluster among distributed applications. Use the Apache Mesos
integration to collect cluster, framework, task, resource, and process metrics from
the Mesos masters and agents running in your environment. The integration also
collects scheduler metrics from the [Apache Aurora](https://aurora.apache.org/)
schedulers that run on them.
The Apache Mesos integration supports Apache Mesos 1.4 or greater and Apache Aurora
0.17 or greater.
## Supported telemetry types
The Apache Mesos integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Apache Mesos integration has the following prerequisites:
* Make the HTTP API of each Mesos master and agent, and the HTTP server of each
Aurora scheduler, reachable from the CXDOT Collector. By default, masters listen on
port `5050` and agents listen on port `5051`. An Aurora scheduler listens on the
port that its `-http_port` flag sets.
* Allow unauthenticated read access to each master and agent. The CXDOT Collector
doesn't send credentials, so a master or agent that runs with
[`--authenticate_http_readonly=true`](https://mesos.apache.org/documentation/latest/authentication/)
rejects its requests. Mesos allows unauthenticated read access by default.
## Configure
The Apache Mesos integration is enabled by default and collects from the masters,
agents, and schedulers that you list. In a typical deployment, the CXDOT Collector
runs on each Mesos node and collects from the Mesos processes on that node. To
configure the Apache Mesos integration, follow these steps:
1. On each agent node, list the local agent and set `cluster_name`. For example, add
the following to the Collector configuration file on an agent node:
```yaml theme={null}
cxdot:
mode: host
integrations:
mesos:
agent:
cluster_name: production
endpoints:
- endpoint: localhost:5051
```
The CXDOT Collector reports `cluster_name` as the `mesos.cluster` attribute on every
metric. The Collector doesn't read the cluster name from Mesos, so set the same
value on every node in one cluster. The Collector adds the node's `host.name` to
every metric, which identifies the node when every endpoint is `localhost`.
2. On each master node, list the local master and set `cluster_name`. For example,
add the following to the Collector configuration file on a master node:
```yaml theme={null}
cxdot:
mode: host
integrations:
mesos:
master:
cluster_name: production
endpoints:
- endpoint: localhost:5050
```
Configure every master node, not only the current leader. Every master reports
its own process and host metrics, but only the elected leading master reports
cluster-wide metrics, such as task, agent, framework, and resource counts.
Configuring every master keeps cluster-wide metrics arriving after Mesos elects a
new leader, and still reports one copy of them.
3. Optional: Collect from Aurora schedulers. On each scheduler node, list the local
scheduler at the port that its `-http_port` flag sets, and set `cluster_name` to
the value you set for the Mesos cluster that the schedulers run on. For example:
```yaml theme={null}
cxdot:
mode: host
integrations:
mesos:
aurora:
cluster_name: production
endpoints:
- endpoint: localhost:8081
```
Configure every scheduler node. Every scheduler reports its own process metrics,
but only the leading scheduler reports cluster metrics, such as task counts,
resource offers, preempted tasks, and cron activity.
4. Optional: Report per-framework, per-role, and per-task metrics. Set `frameworks`
and `roles` on master nodes and `tasks` on agent nodes. For example, the following
values on a master node report per-framework metrics for the `marathon` framework
and per-role metrics for the `production` role:
```yaml theme={null}
cxdot:
mode: host
integrations:
mesos:
master:
cluster_name: production
endpoints:
- endpoint: localhost:5050
frameworks:
- marathon
roles:
- production
```
On an agent node, `tasks: [checkout]` under `agent` reports the allocated
resources of each task whose name contains `checkout`. These metrics are off by
default because each framework name, role name, and matching task adds time
series. Framework and role names must match exactly. Task name fragments match any
part of a task name, ignoring case. To report every framework or every role
instead, set `master.all_frameworks` or `master.all_roles` to `true`.
On a node that runs more than one of these processes, such as a master and an Aurora
scheduler, list them under one `mesos` key, with a `master`, `agent`, or `aurora`
block for each process.
To collect from a node that doesn't run the CXDOT Collector, list that node's address
instead of `localhost` in another node's configuration. List each master, agent, and
scheduler for only one Collector, because a target that two Collectors list reports
its metrics twice. If you run the Collector in Kubernetes instead, list each node's
address under `collection.cxdot.integrations.mesos` in the Helm values file for your CXDOT
Collector.
### Validate
To validate the Apache Mesos integration, follow these steps:
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=mesos`
Confirm that one time series appears for each configured master, agent, and
Aurora scheduler, and that each reports `1`. Use `host.name`,
`cxdot.integration.target`, and `cxdot.integration.check` to identify each
process. `The cxdot.integration.check` values for the Mesos integration are
`mesos_master`, `mesos_agent`, or `aurora`.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
max by ("mesos.cluster") ({"mesos.cluster.agent.count", "mesos.agent.state"="active", "cxdot.integration.name"="mesos"})
```
Confirm that the result matches the number of active agents in each cluster.
### Troubleshooting
* A target reports `0` for `cxdot.integration.target.health`: Confirm that the
endpoint is reachable from the CXDOT Collector, allows unauthenticated read access,
and is listed under the role its process runs. A master listed under
`agent.endpoints`, or an agent listed under `master.endpoints`, reports `0`.
* An Aurora scheduler reports `0` for `cxdot.integration.target.health`: Confirm that
the port in its endpoint matches the `-http_port` flag that the scheduler runs with.
A scheduler started without `-http_port` listens on a random port that can change
each time it restarts. To test the endpoint, request `/vars.json` from it, such as
`curl http://localhost:8081/vars.json`, and confirm that it returns a successful
status code.
* Per-task metrics don't appear: Confirm that a fragment in `agent.tasks` matches part
of the task name and that the task is active. When the fragments match more tasks on
one agent than `agent.max_tasks` allows, the CXDOT Collector reports no per-task
metrics for that agent and reports `cxdot.integration.target.health` as `0` for it.
* Per-framework or per-role metrics don't appear with `all_frameworks` or `all_roles`
set: When the elected master reports more framework names than
`master.max_frameworks`, or more roles than `master.max_roles`, the CXDOT Collector
reports none of those metrics and reports `cxdot.integration.target.health` as `0`
for the master.
## Configuration reference
Configure one Apache Mesos integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.mesos`. In a Collector configuration
file, place them under `cxdot.integrations.mesos`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Apache Mesos integration instance. If true, the Collector runs the
instance. If false, the Collector doesn't run it.
* **`collection_interval`**
Type: `duration`. Optional. Default: `2m`.
How often the Collector collects metrics from each master, agent, and Aurora scheduler.
* **`timeout`**
Type: `duration`. Optional. Default: `1m`.
Maximum time for one collection from a master, agent, or Aurora scheduler. The Collector caps
the timeout at `collection_interval`.
* **`tls`**
Type: `object`. Optional.
TLS settings for masters, agents, and Aurora schedulers whose endpoints are `https` URLs. The
Collector doesn't use these settings for an endpoint in `host:port` form, which it reaches
over HTTP. The Collector verifies server certificates by default.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the server
certificates of masters, agents, and Aurora schedulers. If omitted, the Collector uses the
system certificate authority pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the server certificates
of masters, agents, and Aurora schedulers.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when masters, agents, and Aurora
schedulers require mutual TLS authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when masters, agents, and Aurora schedulers
require mutual TLS authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to ignore the other TLS settings when no certificate authority is configured. If true
and neither `ca_file` nor `ca_pem` is set, the Collector connects to HTTPS endpoints with
default TLS settings and verifies their certificates against the system certificate authority
pool. If false, the Collector applies the configured TLS settings. The scheme of each
endpoint, not this setting, decides whether the Collector uses TLS.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the server certificates of masters, agents, and Aurora
schedulers. If true, the connection is encrypted but isn't authenticated and is vulnerable to
man-in-the-middle attacks. If false, the Collector verifies the certificates.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the certificates of masters, agents, and Aurora schedulers instead of
the endpoint hostname. Use this setting when the certificate name differs from the endpoint
hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
* **`master`**
Type: `object`. Optional.
Settings for collecting from Mesos masters. Every master reports its own process and host
metrics. Only the elected leading master reports cluster-wide metrics, because a standby
master's copies of them are stale or zero. Listing every master therefore reports one copy of
the cluster-wide metrics.
* **`master.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect from Mesos masters. If true, the Collector collects from the masters in
`master.endpoints`. If false, the Collector doesn't collect from any master.
* **`master.endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Masters to collect from. Each entry is the IP address or hostname of one master, as the
Collector reaches it, and the port of the master's HTTP API, which is `5050` by default. Don't
include a path. The Collector reaches an entry in `host:port` form over HTTP. To reach a
master over HTTPS, give the full URL, such as `https://mesos-master-1.example.com:5050`. List
every master so that cluster-wide metrics continue after a new leader is elected.
* **`master.endpoints[].endpoint`**
Type: `string`. Required.
Master endpoint as either `host:port` or a full HTTP or HTTPS URL without a path. For
`host:port`, the Collector uses HTTP.
* **`master.cluster_name`**
Type: `string`. Optional. Minimum length: `1`.
Value of the `mesos.cluster` attribute on every metric from a master. Required when
`master.endpoints` lists a master. The Collector doesn't read the cluster name from Mesos, so
set the same value for every master and agent in one cluster.
* **`master.frameworks`**
Type: `array of string`. Optional. Default: `[]`.
Exact names of the frameworks for which the elected master reports per-framework task counts
and allocated resources. Frameworks that share a name are reported together. When empty, the
Collector reports no per-framework metrics unless `all_frameworks` is `true`. Each name adds
time series.
* **`master.all_frameworks`**
Type: `boolean`. Optional. Default: `false`.
Whether to report per-framework metrics for every framework registered with the elected
master. If true, `frameworks` must be empty, and each distinct framework name adds four time
series. Frameworks that share a name are reported together, but a cluster that registers a
framework under a new name for every job adds time series with each job. If false, the
Collector reports per-framework metrics only for the names in `frameworks`.
* **`master.max_frameworks`**
Type: `integer`. Optional. Default: `1000`. Minimum: `1`.
Maximum number of distinct framework names that one collection reports when `all_frameworks`
is `true`. When the elected master reports more, the Collector reports no per-framework
metrics from that collection and reports `cxdot.integration.target.health` as `0` for the
master. The collection's other metrics are still reported.
* **`master.roles`**
Type: `array of string`. Optional. Default: `[]`.
Exact names of the roles for which the elected master reports per-role framework counts,
weights, and allocated resources. When empty, the Collector reports no per-role metrics and
doesn't request role information unless `all_roles` is `true`. Each name adds time series.
* **`master.all_roles`**
Type: `boolean`. Optional. Default: `false`.
Whether to report per-role metrics for every role that the elected master lists, including the
default role `*`. If true, `roles` must be empty, and each role adds up to five time series.
If false, the Collector reports per-role metrics only for the names in `roles`.
* **`master.max_roles`**
Type: `integer`. Optional. Default: `1000`. Minimum: `1`.
Maximum number of roles that one collection reports when `all_roles` is `true`. When the
elected master lists more, the Collector reports no per-role metrics from that collection and
reports `cxdot.integration.target.health` as `0` for the master. The collection's other
metrics are still reported.
* **`agent`**
Type: `object`. Optional.
Settings for collecting from Mesos agents.
* **`agent.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect from Mesos agents. If true, the Collector collects from the agents in
`agent.endpoints`. If false, the Collector doesn't collect from any agent.
* **`agent.endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Agents to collect from. Each entry is the IP address or hostname of one agent, as the
Collector reaches it, and the port of the agent's HTTP API, which is `5051` by default. Don't
include a path. Entries take the same `host:port` and URL forms as `master.endpoints`.
* **`agent.endpoints[].endpoint`**
Type: `string`. Required.
Agent endpoint as either `host:port` or a full HTTP or HTTPS URL without a path. For
`host:port`, the Collector uses HTTP.
* **`agent.cluster_name`**
Type: `string`. Optional. Minimum length: `1`.
Value of the `mesos.cluster` attribute on every metric from an agent. Required when
`agent.endpoints` lists an agent. The Collector doesn't read the cluster name from Mesos, so
set the same value for every master and agent in one cluster.
* **`agent.tasks`**
Type: `array of string`. Optional. Default: `[]`.
Task name fragments that select tasks for per-task metrics. For each active task on an agent
whose name contains a fragment, ignoring case, the Collector reports the task's allocated
CPUs, memory, and disk, labeled with the task name, task ID, and framework ID. A nonempty list
adds a request for the agent's full state to every collection. When empty, the Collector
reports no per-task metrics. A blank fragment is rejected because it matches every task.
* **`agent.max_tasks`**
Type: `integer`. Optional. Default: `1000`. Minimum: `1`.
Maximum number of active tasks that `agent.tasks` can select on one agent. When the fragments
match more tasks, the Collector reports no per-task metrics for that agent and reports
`cxdot.integration.target.health` as `0` for it.
* **`aurora`**
Type: `object`. Optional.
Settings for collecting from Apache Aurora schedulers. Every scheduler reports its own process
metrics. Only the leading scheduler reports cluster metrics, such as task counts, resource
offers, preempted tasks, and cron activity, so listing every scheduler reports one copy of
them.
* **`aurora.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect from Apache Aurora schedulers. If true, the Collector collects from the
schedulers in `aurora.endpoints`. If false, the Collector doesn't collect from any scheduler.
* **`aurora.endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Aurora schedulers to collect from. Each entry is the IP address or hostname of one scheduler,
as the Collector reaches it, and the port of its HTTP server, which its `-http_port` flag
sets. Don't include a path. Entries take the same `host:port` and URL forms as
`master.endpoints`. List every scheduler so that cluster metrics continue after a new leader
is elected.
* **`aurora.endpoints[].endpoint`**
Type: `string`. Required.
Aurora scheduler endpoint as either `host:port` or a full HTTP or HTTPS URL without a path.
For `host:port`, the Collector uses HTTP.
* **`aurora.cluster_name`**
Type: `string`. Optional. Minimum length: `1`.
Value of the `mesos.cluster` attribute on every metric from an Aurora scheduler. Required when
`aurora.endpoints` lists a scheduler. Aurora doesn't report the Mesos cluster that it runs on,
so set the `master.cluster_name` of that cluster to select scheduler and cluster metrics
together.
# Micrometer
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/micrometer
Metrics from Java apps instrumented with Micrometer, including Spring Boot, sent to the CXDOT Collector over OTLP.
[Micrometer](https://micrometer.io/) is the metrics instrumentation library Spring Boot uses
for Java Virtual Machine (JVM) apps. Use Micrometer's OTLP registry to send your services'
metrics to the [CXDOT Collector](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector)
running on the same node.
For the Micrometer integration, there is nothing to configure in the CXDOT Collector. Each
service pushes its own metrics over OTLP to the
[OTLP integration](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/otlp),
which the CXDOT Collector runs by default.
Because the metrics arrive through the OTLP integration, they carry
`cxdot.integration.name=otlp`, not `micrometer`. The Micrometer integration stays listed as
available after its metrics arrive, and it reports no health status.
Adding the OTLP registry is additive. Spring Boot sends every metric to every registry the
app includes, so your existing StatsD or Datadog registry keeps sending what it sends today.
The CXDOT Collector supports Micrometer 1.11 or greater.
## Supported telemetry types
The CXDOT Collector supports these telemetry types from Micrometer:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
Sending Micrometer metrics over OTLP has the following prerequisites:
* Find each service's Spring Boot version: look for `spring-boot` in its Gradle or Maven
dependencies. The setup differs by Spring Boot line.
* Micrometer 1.11 or greater, the first version that sends delta temporality. Spring Boot
3.1 and later include it. Spring Boot 2 and 3.0 include an older version. See
[Upgrade Micrometer](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/micrometer#upgrade-micrometer).
Upgrading Micrometer doesn't require upgrading Spring Boot.
* Run the CXDOT Collector on each node with host networking, the Helm chart's default. OTLP
ingest is on by default, so apps send to their node's IP address on port `4318`.
## Configure
Follow the section for each service's Spring Boot line, then confirm collection with the
steps in Validate.
### Spring Boot 2 (2.5 to 2.7)
Spring Boot 2 includes Micrometer 1.7 to 1.9 and doesn't configure the OTLP registry itself.
To send metrics from a Spring Boot 2 service, follow these steps:
1. Upgrade Micrometer to 1.11 or greater. See
[Upgrade Micrometer](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/micrometer#upgrade-micrometer).
2. Add the Micrometer OTLP registry. For example, add the following to the `dependencies`
block of `build.gradle`:
```groovy theme={null}
implementation 'io.micrometer:micrometer-registry-otlp'
```
Keep any registry the app already uses, such as StatsD, until you stop sending to it.
3. Define the OTLP registry as a bean. Spring Boot adds it beside your other registries and
applies your common tags and distribution settings to it. For example, add the following
class to your app:
```java theme={null}
import io.micrometer.core.instrument.Clock;
import io.micrometer.registry.otlp.OtlpConfig;
import io.micrometer.registry.otlp.OtlpMeterRegistry;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
@Configuration(proxyBeanMethods = false)
class OtlpMetricsConfig {
@Bean
OtlpMeterRegistry otlpMeterRegistry(Environment env, Clock clock) {
OtlpConfig config = key -> env.getProperty("management.otlp.metrics.export."
+ key.substring("otlp.".length()).replaceAll("([A-Z])", "-$1").toLowerCase());
return new OtlpMeterRegistry(config, clock);
}
}
```
4. Point the registry at the CXDOT Collector on the same node, and set delta temporality. For
example, set these environment variables on the app's container:
```yaml theme={null}
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: MANAGEMENT_OTLP_METRICS_EXPORT_URL
value: http://$(HOST_IP):4318/v1/metrics
- name: MANAGEMENT_OTLP_METRICS_EXPORT_AGGREGATIONTEMPORALITY
value: delta
```
If your services already set `HOST_IP` or `DD_AGENT_HOST` for StatsD, reuse it: both
hold the node's address. The same settings work as `management.otlp.metrics.export.url`
and `management.otlp.metrics.export.aggregation-temporality` in your app's configuration.
5. Set `OTEL_SERVICE_NAME` to the service's name, and any other resource attributes with
`OTEL_RESOURCE_ATTRIBUTES`. The bean doesn't take the name from `spring.application.name`.
6. Optional: Turn on percentile histograms, so Palo Alto Networks Cortex XCOR can calculate
percentiles across all of a service's instances. Set
`management.metrics.distribution.percentiles-histogram.http.server.requests=true` for each
timer you want percentiles for. If the service also sends to Datadog through the StatsD
registry, wait until you turn StatsD off. The setting makes StatsD send timers as
distributions. Datadog then stops receiving the timers' `.avg`, `.count`, `.max`,
`.median`, and `.95percentile` metrics.
Client-side percentiles, the `management.metrics.distribution.percentiles` setting, don't
reach Cortex XCOR from a timer that also has service level objective (SLO)
boundaries. The OTLP registry sends that timer's histogram instead of the percentiles. Use
percentile histograms for those timers.
7. Optional: To get each timer's exact maximum, register a gauge in your app that reads it.
For example, use a Micrometer `TimeGauge` over `Timer.max()`. Without a gauge, you can only
estimate a timer's maximum from its percentile histogram buckets.
### Spring Boot 3 (3.0 to 3.5)
Spring Boot 3 configures the OTLP registry for you. Spring Boot 3.1 and later include
Micrometer 1.11 or greater and have an aggregation temporality setting. Spring Boot 3.0
includes Micrometer 1.10 and has no such setting, so it needs two extra steps, marked in the
following list. To send metrics from a Spring Boot 3 service, follow these steps:
1. Spring Boot 3.0 only: Upgrade Micrometer to 1.11 or greater, since 3.0 includes 1.10. See
[Upgrade Micrometer](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/micrometer#upgrade-micrometer).
2. Add the Micrometer OTLP registry. For example, add the following to the `dependencies`
block of `build.gradle`:
```groovy theme={null}
implementation 'io.micrometer:micrometer-registry-otlp'
```
Spring Boot manages the version. Keep any registry the app already uses, such as StatsD,
until you stop sending to it.
3. Spring Boot 3.0 only: Define the registry's configuration as a bean. Spring Boot 3.0 has
no aggregation temporality setting, and builds the registry from your bean instead of its
own. For example, add the following class to your app:
```java theme={null}
import io.micrometer.registry.otlp.OtlpConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
@Configuration(proxyBeanMethods = false)
class OtlpMetricsConfig {
@Bean
OtlpConfig otlpConfig(Environment env) {
return key -> env.getProperty("management.otlp.metrics.export."
+ key.substring("otlp.".length()).replaceAll("([A-Z])", "-$1").toLowerCase());
}
}
```
With the bean, also set `OTEL_SERVICE_NAME` to the service's name, and any other resource
attributes with `OTEL_RESOURCE_ATTRIBUTES`.
4. Point the registry at the CXDOT Collector on the same node, and set delta temporality. For
example, set these environment variables on the app's container:
```yaml theme={null}
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: MANAGEMENT_OTLP_METRICS_EXPORT_URL
value: http://$(HOST_IP):4318/v1/metrics
- name: MANAGEMENT_OTLP_METRICS_EXPORT_AGGREGATIONTEMPORALITY
value: delta
```
If your services already set `HOST_IP` or `DD_AGENT_HOST` for StatsD, reuse it: both
hold the node's address. The same settings work as `management.otlp.metrics.export.url`
and `management.otlp.metrics.export.aggregation-temporality` in your app's configuration.
5. Optional: Turn on percentile histograms, so Cortex XCOR can calculate
percentiles across all of a service's instances. Set
`management.metrics.distribution.percentiles-histogram.http.server.requests=true` for each
timer you want percentiles for. If the service also sends to Datadog through the StatsD
registry, wait until you turn StatsD off. The setting makes StatsD send timers as
distributions. Datadog then stops receiving the timers' `.avg`, `.count`, `.max`,
`.median`, and `.95percentile` metrics.
Client-side percentiles, the `management.metrics.distribution.percentiles` setting, don't
reach Cortex XCOR from a timer that also has service level objective (SLO)
boundaries. The OTLP registry sends that timer's histogram instead of the percentiles. Use
percentile histograms for those timers.
6. Optional: To get each timer's exact maximum, register a gauge in your app that reads it.
For example, use a Micrometer `TimeGauge` over `Timer.max()`. Without a gauge, you can only
estimate a timer's maximum from its percentile histogram buckets.
### Spring Boot 4 (4.0 and 4.1)
Spring Boot 4 includes Micrometer 1.16 or greater, and configures the OTLP registry once the
app includes Spring Boot's OpenTelemetry module. To send metrics from a Spring Boot 4 service,
follow these steps:
1. Add the Micrometer OTLP registry and Spring Boot's OpenTelemetry module. For example, add
the following to the `dependencies` block of `build.gradle`:
```groovy theme={null}
implementation 'io.micrometer:micrometer-registry-otlp'
implementation 'org.springframework.boot:spring-boot-opentelemetry'
```
`spring-boot-starter-opentelemetry` also includes the module. Without it, Spring Boot 4
doesn't configure the OTLP registry, and logs nothing about it. Keep any registry the app
already uses, such as StatsD, until you stop sending to it.
2. Point the registry at the CXDOT Collector on the same node, and set delta temporality. For
example, set these environment variables on the app's container:
```yaml theme={null}
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: MANAGEMENT_OTLP_METRICS_EXPORT_URL
value: http://$(HOST_IP):4318/v1/metrics
- name: MANAGEMENT_OTLP_METRICS_EXPORT_AGGREGATIONTEMPORALITY
value: delta
```
If your services already set `HOST_IP` or `DD_AGENT_HOST` for StatsD, reuse it: both
hold the node's address. The same settings work as `management.otlp.metrics.export.url`
and `management.otlp.metrics.export.aggregation-temporality` in your app's configuration.
On Spring Boot 4.1, OpenTelemetry environment variables such as
`OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_METRIC_EXPORT_INTERVAL` override these settings.
If the app's container sets them for another OpenTelemetry exporter, set
`management.opentelemetry.map-environment-variables=false` so the registry keeps your
settings.
3. Optional: Turn on percentile histograms, so Cortex XCOR can calculate
percentiles across all of a service's instances. Set
`management.metrics.distribution.percentiles-histogram.http.server.requests=true` for each
timer you want percentiles for. If the service also sends to Datadog through the StatsD
registry, wait until you turn StatsD off. The setting makes StatsD send timers as
distributions. Datadog then stops receiving the timers' `.avg`, `.count`, `.max`,
`.median`, and `.95percentile` metrics.
Client-side percentiles, the `management.metrics.distribution.percentiles` setting, don't
reach Cortex XCOR from a timer that also has service level objective (SLO)
boundaries. The OTLP registry sends that timer's histogram instead of the percentiles. Use
percentile histograms for those timers.
4. Optional: For each timer's exact maximum:
* Spring Boot 4.1: Set
`management.otlp.metrics.export.publish-max-gauge-for-histograms=true`. The registry
then also sends each timer's maximum as a gauge, such as `http.server.requests.max`.
* Spring Boot 4.0: Register a gauge in your app that reads the timer's maximum. For
example, use a Micrometer `TimeGauge` over `Timer.max()`.
### Upgrade Micrometer
Spring Boot 2 and 3.0 include a Micrometer version older than 1.11. To upgrade Micrometer,
follow these steps:
1. Check the version. In Gradle, run `./gradlew dependencyInsight --dependency
micrometer-core`. In Maven, run `mvn dependency:tree -Dincludes=io.micrometer`.
2. Set the version with the form that matches how your build manages dependency versions:
* Gradle with the Spring dependency management plugin
(`io.spring.dependency-management`). Add the following to `build.gradle`:
```groovy theme={null}
ext['micrometer.version'] = '1.13.15'
```
* Gradle with Spring Boot's bill of materials imported as a platform. Add the following to
the `dependencies` block. Use `enforcedPlatform` so it overrides the version Spring
Boot's bill of materials sets:
```groovy theme={null}
implementation enforcedPlatform('io.micrometer:micrometer-bom:1.13.15')
```
* Maven with `spring-boot-starter-parent` as the parent. Add the following to `pom.xml`:
```xml theme={null}
1.13.15
```
* Maven importing `spring-boot-dependencies` as a bill of materials. Import the
Micrometer bill of materials first, so its versions win:
```xml theme={null}
io.micrometer
micrometer-bom
1.13.15
pom
import
```
3. Check the version again. If it still shows the old version, the form doesn't match how
your build manages versions. The build ignores a property it doesn't read and reports no
error.
### Validate
To validate collection, follow these steps:
1. In the [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter on `__name__=jvm.memory.used`. Confirm that time series from your app arrive.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
sum by ("service.name") (rate({"http.server.requests_count"}[5m]))
```
Confirm that the query reports a value for your app.
### Troubleshooting
* No OTLP metrics from a Spring Boot 2 app: Confirm that the app defines the registry bean,
and that Micrometer is 1.11 or greater.
* No OTLP metrics from a Spring Boot 4 app: Confirm that the app includes
`spring-boot-opentelemetry`. On Spring Boot 4.1, also read the URL in the app's
`Failed to publish metrics to OTLP receiver` warnings. An `OTEL_EXPORTER_OTLP_ENDPOINT` set
for another exporter, often on port `4317`, overrides the registry's URL. In that case, set
`management.opentelemetry.map-environment-variables=false`.
* Micrometer still reports the old version after you upgrade: The Gradle or Maven form doesn't
match your build. For example, `ext['micrometer.version']` has no effect when your build
imports Spring Boot's bill of materials as a Gradle platform. Use the form in
[Upgrade Micrometer](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/micrometer#upgrade-micrometer)
that matches your build.
* Counters and timers look cumulative: The app isn't sending delta temporality. On Spring
Boot 2, use the registry bean exactly as shown. A bean that maps only exact property names
misses the `aggregation-temporality` setting. On Spring Boot 3.0, Spring Boot ignores the
setting unless the app defines the `OtlpConfig` bean. Before Spring Boot 4.1,
`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` doesn't replace the setting.
* Timer maximums are missing: Cortex XCOR keeps a histogram's count, sum, and
buckets, but not its maximum, whatever the temporality. Send the maximum as a gauge, as
the optional maximum step for your Spring Boot line describes.
* Metrics carry `service.name="unknown_service"`: On Spring Boot 2 and 3.0, set
`OTEL_SERVICE_NAME` on the app.
* Request counts are double what you expect: The app's metrics reach the CXDOT Collector by
two paths, for example over OTLP and as DogStatsD forwarded by another agent. Send each
app's metrics by one path.
## Turn off your previous registry
Keep your existing registry until the service's dashboards and monitors work with the OTLP
metrics. Their queries don't change on their own: the OTLP registry sends different metric
names and shapes, so rewrite each query with the forms in Query Micrometer metrics. While both
registries send, expect the old and new charts to agree in level but not point for point,
because each registry samples gauges at its own moments.
Queries on Datadog's `.median` and `.95percentile` timer metrics, and on client-side
percentiles of a timer with SLO boundaries, need percentile histograms on that timer. Without
them, the OTLP registry sends nothing to calculate those values from. With the StatsD
registry, turning on percentile histograms also changes what Datadog receives, so turn them on
as part of the cutover.
When the dashboards and monitors work, turn off the old registry and restart the service:
| Registry | Spring Boot 3 and 4 | Spring Boot 2 |
| - | - | - |
| StatsD | `management.statsd.metrics.export.enabled=false` | `management.metrics.export.statsd.enabled=false` |
| Datadog | `management.datadog.metrics.export.enabled=false` | `management.metrics.export.datadog.enabled=false` |
## Query Micrometer metrics
Cortex XCOR keeps Micrometer's dotted metric names, so queries quote them. Your
Micrometer tags carry over as labels of the same name.
The following table lists queries for common questions about a service, and the timer
setting each query needs:
| You want | Query | Needs |
| - | - | - |
| Request rate | `sum(rate({"http.server.requests_count"}[5m]))` | none |
| Average latency | `sum(rate({"http.server.requests_sum"}[5m])) / sum(rate({"http.server.requests_count"}[5m]))` | none |
| p95 latency | `histogram_quantile(0.95, sum by (le) (rate({"http.server.requests_bucket"}[5m])))` | Percentile histograms |
| Share of requests under 200 ms | `histogram_fraction(0, 200, sum by (le) (rate({"http.server.requests_bucket"}[5m])))` | An SLO boundary at 200 ms, or percentile histograms |
| Maximum latency, estimated | `histogram_quantile(1, sum by (le) (rate({"http.server.requests_bucket"}[5m])))` | Percentile histograms |
| Maximum latency, exact | `max({"http.server.requests.max"})` | The maximum gauge, on Spring Boot 4.1 |
| A gauge | `{"jvm.memory.used"}` | none |
| A counter | `rate({"logback.events"}[5m])` | none |
Cortex XCOR stores a histogram's count, sum, and buckets, but not its maximum.
Without a gauge, a timer's maximum is an estimate: the upper bound of the bucket that holds
the slowest request. On Spring Boot 4.1, set
`management.otlp.metrics.export.publish-max-gauge-for-histograms=true`. The registry then also
sends each timer's maximum as a gauge named after the timer, such as
`{"http.server.requests.max"}`. On earlier Spring Boot lines, register a gauge in your app
that reads the timer's maximum. For example, use a Micrometer `TimeGauge` over `Timer.max()`.
# MongoDB
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/mongodb
MongoDB server performance and health metrics, including operations, connections, locks, WiredTiger cache, replication, and database storage.
The MongoDB integration requires CXDOT Collector 1.12.0 or greater.
[MongoDB](https://www.mongodb.com/) is a document database. Use the MongoDB integration
to collect operation, connection, lock, cache, replication, and storage metrics from
MongoDB servers running in your environment.
The MongoDB integration supports MongoDB 6.0 or greater.
## Supported telemetry types
The MongoDB integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The MongoDB integration has the following prerequisites:
* Create a monitoring user in MongoDB for the CXDOT Collector. Connect to the server with
`mongosh` as a user that can create users. On a replica set, connect to the primary.
Grant the monitoring user the `clusterMonitor` role on the `admin` database and the
`read` role on the `local` database:
```javascript theme={null}
db.getSiblingDB("admin").createUser({
user: "cxdot",
pwd: passwordPrompt(),
roles: [
{ role: "clusterMonitor", db: "admin" },
{ role: "read", db: "local" }
]
})
```
Replace `cxdot` with the username for your environment. The `clusterMonitor` role grants
read-only access to server, replication, and database statistics. The `read` role on
`local` lets the Collector read the replication operations log. To collect the
`collection` metric group, also grant the monitoring user the `read` role on each
database whose collections it reads.
* On a sharded cluster, create the monitoring user in two places. Create it through a
`mongos` router, which stores the user on the config servers, so that the Collector can
authenticate to each `mongos` and each config server member. Then create the same user
on each shard's replica set by connecting directly to that shard's primary. The
Collector connects directly to each shard member, and a direct connection authenticates
against the shard's own
[shard-local users](https://www.mongodb.com/docs/manual/core/security-users/#shard-local-users).
* Make port `27017` or your custom MongoDB port reachable from the CXDOT Collector.
## Configure
The MongoDB integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values.
The integration supports standalone servers, replica sets, and sharded clusters. Each
server is a separate target: every `mongod`, including each replica set member, shard
member, and config server member, and every `mongos` router. The Collector connects
directly to each target and reports that server's own metrics.
Some metrics come only from servers in certain roles:
* Storage statistics for each database come from a standalone server, from the primary of
a replica set that isn't part of a sharded cluster, and from each `mongos` router. Other
replica set members, shard members, and config server members report these statistics
for their `local` database only.
* Connection pool metrics come from each `mongos` router and from each shard member and
config server member.
* The logical session count comes from each `mongos` router.
* Replication metrics come from replica set members.
To configure the integration, follow these steps:
1. To collect from MongoDB pods in Kubernetes, add a CXDOT integration annotation to the
pod template for every pod that runs `mongod` or `mongos`. The annotation key must end
with the container name, and its value can reference credentials stored in a
Kubernetes Secret in the same namespace. For example, add the following annotation to
your MongoDB workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/mongod: |
schema_version: v1.14
mongodb:
instances:
- endpoint: ${target.host}:${target.port.mongodb}
username: cxdot
password: ${k8s_secret:mongodb-credentials/password}
spec:
containers:
- name: mongod
image: mongo:8.0
ports:
- name: mongodb
containerPort: 27017
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.mongodb}` with the container port named `mongodb`, and
`${k8s_secret:mongodb-credentials/password}` with the `password` key of the
`mongodb-credentials` Secret. To allow the Collector to read the Secret, add the
pod's namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for
your CXDOT Collector.
2. Optional: To collect from MongoDB servers outside your Kubernetes cluster, configure
static targets. List every server as its own
entry. One elected replica of the cluster-tier CXDOT Collector collects from static
targets, so provide the password to that tier through a Kubernetes Secret. For more
information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
To add the `mongodb.cluster.name` attribute to every metric from a target, set that
entry's `cluster_name`. For example, add the following to the Helm values file for
your CXDOT Collector:
```yaml theme={null}
clusterCollector:
extraEnv:
- name: MONGODB_PASSWORD
valueFrom:
secretKeyRef:
name: mongodb-credentials
key: password
collection:
cxdot:
integrations:
mongodb:
instances:
- endpoint: mongodb-0.example.com:27017
cluster_name: orders
- endpoint: mongodb-1.example.com:27017
cluster_name: orders
username: cxdot
password: "${env:MONGODB_PASSWORD}"
```
When you configure static targets, this integration instance collects from exactly
those targets and stops collecting from discovered targets.
3. Optional: Collect from annotated pods and static targets at the same time by
configuring a second instance of the integration. For example, add the following to
the Helm values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
mongodb: {}
mongodb/static:
instances:
- endpoint: mongodb.example.com:27017
username: cxdot
password: "${env:MONGODB_PASSWORD}"
```
The `mongodb` key is the default instance, which collects from discovered targets. The
`mongodb/static` key defines a named instance that collects from the static targets
and reads its password from the `MONGODB_PASSWORD` environment variable. Provide this
variable through `clusterCollector.extraEnv`. Keep the `mongodb` key: after you
configure any MongoDB instance, the CXDOT Collector runs only the instances that you
configure.
4. Optional: Collect additional metric groups. By default, the integration collects none
of them. In the Helm values, these settings apply to the targets you list there. For
an annotated pod, set them in its CXDOT integration annotation. For example, add the
settings to the `mongodb/static` instance from the previous step in the Helm values
file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
mongodb: {}
mongodb/static:
instances:
- endpoint: mongodb.example.com:27017
username: cxdot
password: "${env:MONGODB_PASSWORD}"
additional_metrics:
- metrics.commands
- tcmalloc
- top
- collection
collection_stats:
databases:
- shop
collections:
- orders
- customers
```
The metric groups differ in the load they add to your servers:
* `metrics.commands` and `tcmalloc` read the server status the Collector already reads
at every collection interval, so they add no load.
* `top` runs one `top` command on every `mongod` that isn't an arbiter at every
collection interval. For each collection on which the server has run an operation
since it started, the command produces a count and a time series for each operation
type and each kind of lock access.
* `collection` runs on a standalone server, on the primary of a replica set that isn't
part of a sharded cluster, and on every `mongos` router you configure as a target.
Each router reports the statistics of every collection in the sharded cluster.
Enable the group on an instance that lists one router. Otherwise, the Collector reads
the same statistics once per router and reports each collection once per router. The
group runs every `collection_stats.interval` and reads each collection's statistics
with one aggregation per collection. Set `collection_stats.databases` and
`collection_stats.collections` to limit which databases and collections it reads.
When `collection_stats.collections` is empty, the Collector lists the collections
of each database and reads at most `collection_stats.max_collections_per_database`
of them.
5. Optional: Collect index access counts. The integration doesn't collect them by
default, because collecting them adds load on a server with many collections: at
every collection interval, the Collector lists the collections of each database and
reads the index statistics of each collection. In the Helm values, this setting
applies to the targets you list there. For an annotated pod, set it in its CXDOT
integration annotation. For example, add the setting to the `mongodb/static` instance
in the Helm values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
mongodb: {}
mongodb/static:
instances:
- endpoint: mongodb.example.com:27017
username: cxdot
password: "${env:MONGODB_PASSWORD}"
collect_index_stats: true
```
6. Optional: Collect the CPU usage of the `mongod` and `mongos` processes. The MongoDB
integration doesn't report it. Enable per-process metrics in the Host integration on
the nodes that run your servers. For example, add the following to the Helm values
file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
host:
process:
enabled: true
config:
include:
match_type: strict
names:
- mongod
- mongos
metrics:
process.cpu.utilization:
enabled: true
```
7. Optional: Disable the integration. For example, add the following to the Helm values
file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
mongodb:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the MongoDB integration, follow these steps:
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=mongodb`
Confirm that each target reports `1`, identified by its `server.address` and
`server.port` attributes. A value of `0` means that the CXDOT Collector couldn't
connect to the target or authenticate to it, for example, because the server rejected
the monitoring user's credentials.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while clients send operations to the MongoDB servers:
```text theme={null}
sum by ("server.address", "server.port") (rate({"mongodb.operation.count"}[$__rate_interval]))
```
Confirm that the query returns a value greater than `0` for each target.
### Troubleshooting
* Replication metrics are missing: MongoDB reports these metrics only on
replica set members, so a standalone server doesn't produce them. On a replica set
member, confirm that the monitoring user holds the `read` role on the `local`
database, which the operations log metrics require.
* Storage statistics are missing for some databases: The Collector reads these
statistics for at most 100 databases on each server. Only servers in the roles listed in
the Configure section report storage statistics for your databases.
* A shard member reports `0` for `cxdot.integration.target.health`: The monitoring user
exists only on the config servers. Create it on the shard's replica set, as described in
the prerequisites.
* An arbiter reports `0` for `cxdot.integration.target.health` and no other metrics: An
arbiter keeps no users, so it rejects connections that authenticate. Configure the
arbiter's target without credentials, for example in a separate integration instance
that sets no `username`.
## Configuration reference
Configure one MongoDB integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.mongodb`. In a Collector configuration file,
place them under `cxdot.integrations.mongodb`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to run the MongoDB integration. If true, the Collector collects MongoDB metrics. If
false, the Collector doesn't run this integration.
* **`username`**
Type: `string`. Optional. Default: empty string.
MongoDB username for connections to the configured targets. Set `username` and `password`
together. The Collector authenticates when `username` or `auth_mechanism` is set. Otherwise,
it connects without authenticating.
* **`password`**
Type: `string`. Optional.
MongoDB password for connections to the configured targets. Set `username` and `password`
together. The Collector masks this value in diagnostic output, logs, and errors.
* **`auth_source`**
Type: `string`. Optional. Default: `admin`.
Database that holds the credentials for the configured targets.
* **`auth_mechanism`**
Type: `string`. Optional. Default: empty string.
Authentication mechanism for the configured targets. When empty, the Collector negotiates a
Salted Challenge Response Authentication Mechanism (SCRAM) with the server. Allowed values:
empty string, `SCRAM-SHA-1`, `SCRAM-SHA-256`, `MONGODB-X509`, `MONGODB-AWS`, `GSSAPI`,
`PLAIN`.
* **`scheme`**
Type: `string`. Optional. Default: `mongodb`.
Connection string scheme for the configured targets. With `mongodb+srv`, each instance's
`endpoint` is a DNS name, without a port, whose DNS service record lists the servers to
connect to, and `direct_connection` must be false. Allowed values: `mongodb`, `mongodb+srv`.
* **`replica_set`**
Type: `string`. Optional. Default: empty string.
Replica set name that the configured targets must belong to. When empty, the Collector doesn't
verify the replica set name.
* **`direct_connection`**
Type: `boolean`. Optional. Default: `true`.
If true, connects to each target as a single server, without discovering the rest of its
replica set, so each replica set member reports its own metrics. If false, the connection
follows the replica set topology, and the Collector also connects to each replica set
secondary it finds at startup, with the same `tls` settings and `timeout`. Replication
operation counts come from the server the connection reads, not from each secondary. Must be
false when `scheme` is `mongodb+srv`.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
Time between metric collections from each configured MongoDB target.
* **`timeout`**
Type: `duration`. Optional. Default: `15s`.
Maximum time to wait when connecting to each configured MongoDB target and for each metric
collection from it. Set `timeout` to no more than `collection_interval` to prevent one
collection from overlapping the next.
* **`collect_index_stats`**
Type: `boolean`. Optional. Default: `false`.
Whether to collect `mongodb.index.access.count`, the number of index accesses for each
collection, summed over the collection's indexes. If true, at every collection interval the
Collector lists the collections of every database except `local` and reads the index
statistics of every collection, on every target. This adds load in proportion to the number of
collections on the server. If false, the Collector doesn't list collections or read index
statistics. Applies to the configured targets. Targets discovered through annotations use the
setting in their annotations instead. When their annotations turn it on, the Collector reads
every collection of every database except `local` on those targets, regardless of which
databases and collections the annotations name.
* **`additional_metrics`**
Type: `array of string`. Optional. Default: `[]`.
Optional metric groups to collect in addition to the default metrics. By default, no group is
collected. The `metrics.commands` group counts how many times the server ran the `count`,
`createIndexes`, `delete`, `findAndModify`, `insert`, and `update` commands, split by whether
each run succeeded or failed, as `mongodb.command.count`. The `tcmalloc` group reports memory
allocator readings, such as the bytes allocated, the heap size, and the free bytes the
allocator holds, as the `mongodb.tcmalloc.*` metrics. The `top` group counts how many
operations of each kind ran on each collection and the time they took, as
`mongodb.collection.operation.count` and `mongodb.collection.operation.time`, and the same
split by whether each operation held a read or a write lock, as
`mongodb.collection.access.count` and `mongodb.collection.access.time`. It's collected from
every `mongod` that isn't an arbiter, for every collection the server has run an operation on
since it started. The `collection` group reports each collection's storage statistics,
operation latencies, and full collection scans, such as `mongodb.collection.data.size`,
`mongodb.collection.operation.latency.time`, and `mongodb.collection.scan.count`. It's
collected from a standalone server, from the primary of a replica set that isn't part of a
sharded cluster, and from every `mongos` router configured as a target. Each router reports
every collection in the sharded cluster, with each shard's statistics separately, so list one
router in an instance that enables the group to read them once. It's collected every
`collection_stats.interval`, for the databases and collections that `collection_stats`
selects. `metrics.commands` and `tcmalloc` read the server status the Collector already reads
at every collection interval, so they add no load on the server. `top` runs one `top` command
at every collection interval. `collection` runs one `listCollections` command per database,
unless `collection_stats.collections` names the collections, and one `$collStats` aggregation
per collection, at every `collection_stats.interval`. Applies to the configured targets.
Targets discovered through annotations use the setting in their annotations instead.
* **`collection_stats`**
Type: `object`. Optional.
Settings for the `collection` group of `additional_metrics`: which databases and collections
it reads, how many collections per database, and how often. Applies to the configured targets.
Targets discovered through annotations take the matching settings from their annotations
instead.
* **`collection_stats.databases`**
Type: `array of string`. Optional. Default: `[]`.
Databases whose collections the `collection` group reads. When empty, the Collector reads
every database on the target, up to 100. On targets discovered through annotations, the group
reads every database when the annotations turn on database autodiscovery, and otherwise only
the database the annotations name, `admin` by default.
* **`collection_stats.collections`**
Type: `array of string`. Optional. Default: `[]`.
Collections the `collection` group reads in each database. When empty, the Collector reads
every collection the monitoring user is authorized to list in each database, up to
`max_collections_per_database`. On targets discovered through annotations, the collections the
annotations name apply only while database autodiscovery is off.
* **`collection_stats.max_collections_per_database`**
Type: `integer`. Optional. Default: `100`. Minimum: `1`.
Maximum number of collections the `collection` group reads in each database when `collections`
is empty. Targets discovered through annotations use the setting in their annotations instead.
* **`collection_stats.interval`**
Type: `duration`. Optional. Default: `5m`.
Time between reads of the `collection` group. Each read costs one `$collStats` aggregation per
collection, so it runs less often than `collection_interval` by default. When it's no longer
than `collection_interval`, the group is read at every collection interval. A read that
doesn't finish within `timeout` stops there, and the next read continues from where it
stopped. Targets discovered through annotations use the setting in their annotations instead.
* **`instances`**
Type: `array of object`. Optional. Default: `[]`.
MongoDB targets. When this list isn't empty, this integration instance collects from exactly
these targets and stops discovering targets through autodiscovery annotations.
* **`instances[].endpoint`**
Type: `string`. Required.
Network address of the MongoDB server in `host:port` format, for example,
`mongodb.default.svc:27017`. With the `mongodb+srv` scheme, a DNS name without a port.
* **`instances[].cluster_name`**
Type: `string`. Optional.
Name of the MongoDB cluster the target belongs to. When set, the Collector adds it as the
`mongodb.cluster.name` resource attribute to every metric from this target. When unset,
metrics from this target don't carry the attribute. Targets discovered through annotations use
the cluster name in their annotations.
* **`tls`**
Type: `object`. Optional. Default: `{"insecure":true}`.
TLS settings for connections to the configured MongoDB targets. By default, the connection is
unencrypted. The Collector connects with TLS when `insecure` is false or when `ca_file` or
`ca_pem` is set, and verifies the server certificate unless `insecure_skip_verify` is true.
The default applies only when you set no `tls` option: if you set any, also set
`insecure: true` to keep the connection unencrypted. With the `mongodb+srv` scheme, the
Collector always connects with TLS, and when `insecure` is true and no certificate authority
is set it verifies the server certificate against the system certificate authorities.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the MongoDB
server certificate. Setting it enables TLS even when `insecure` is true. If omitted, the
Collector uses the system certificate authority pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the MongoDB server
certificate. Setting it enables TLS even when `insecure` is true.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the MongoDB server requires
mutual TLS or `MONGODB-X509` authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the MongoDB server requires mutual TLS
or `MONGODB-X509` authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to also trust the system certificate authority pool when `ca_file` or `ca_pem` is set.
If true, the Collector trusts both sources. If false, it trusts only the configured
certificate authorities. With neither `ca_file` nor `ca_pem` set, the Collector always uses
the system pool.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. If true, the Collector uses an unencrypted connection
unless `ca_file` or `ca_pem` is set. If false, the Collector connects with TLS.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the MongoDB server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS or
`MONGODB-X509` authentication.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS or `MONGODB-X509`
authentication.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use, such as `1.3`. If omitted, the Collector
uses the maximum version supported by the Go TLS library.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use, such as `1.2`. If omitted, the minimum
version is TLS 1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the MongoDB server certificate instead of the endpoint hostname. Use
this setting when the certificate name differs from the endpoint hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
# MySQL
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/mysql
MySQL server performance and health metrics, including buffer pool, connections, commands, query throughput, and index usage.
The MySQL integration requires CXDOT Collector 1.4.0 or greater.
[MySQL](https://www.mysql.com/) is a relational database for transactional
applications. Use the MySQL CXDOT Collector integration with the CXDOT Collector to
collect connection, query, and storage metrics from MySQL servers running in your
environment.
The MySQL CXDOT Collector integration supports MySQL 8.4 or greater.
## Supported telemetry types
The MySQL CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | Yes |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The MySQL CXDOT Collector integration has the following prerequisites:
* Enable the MySQL Performance Schema. On each MySQL server the CXDOT Collector
monitors, connect with a MySQL client and run:
```sql theme={null}
SHOW VARIABLES LIKE 'performance_schema';
```
Confirm that the value is `ON`.
* Create a MySQL account for the CXDOT Collector. On each MySQL server the CXDOT
Collector monitors, connect as an account with permission to create users and grant
privileges. For the complete metric set, grant the monitoring account the following
privileges:
```sql theme={null}
GRANT PROCESS, REPLICATION CLIENT ON *.* TO 'cxdot'@'%';
GRANT SELECT ON performance_schema.* TO 'cxdot'@'%';
GRANT SELECT ON mysql.innodb_index_stats TO 'cxdot'@'%';
```
Replace `cxdot` and `%` with the account name and allowed host for your environment.
* Make port `3306`, or your custom MySQL port, reachable from the CXDOT Collector.
## Configure
The MySQL integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the MySQL CXDOT Collector integration, follow these steps:
1. To collect from MySQL pods in Kubernetes, add a CXDOT integration annotation to the
pod template. The annotation key must end with the container name, and its value can
reference credentials stored in a Kubernetes Secret in the same namespace. For
example, add the following annotation to your MySQL workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/mysql: |
schema_version: v1.14
mysql:
instances:
- endpoint: ${target.host}:${target.port.mysql}
username: cxdot
password: ${k8s_secret:mysql-monitoring/password}
spec:
containers:
- name: mysql
image: mysql:8.4
ports:
- name: mysql
containerPort: 3306
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.mysql}` with the container port named `mysql`, and
`${k8s_secret:mysql-monitoring/password}` with the `password` key of the
`mysql-monitoring` Secret. To allow the Collector to read the Secret, add the pod's
namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for your
CXDOT Collector.
2. Optional: To collect from specific MySQL servers, such as a Kubernetes Service or a
server outside your cluster, configure static targets and provide the password
through your deployment's secret management. For example, the
following Helm values reference the `MYSQL_PASSWORD` environment variable:
```yaml theme={null}
collection:
cxdot:
integrations:
mysql:
instances:
- endpoint: mysql.default.svc:3306
username: cxdot
password: "${env:MYSQL_PASSWORD}"
```
When you configure static targets, this integration instance collects from exactly
those targets and stops reading CXDOT integration annotations.
3. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the Helm values for your
CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
mysql: {}
mysql/external:
instances:
- endpoint: mysql.default.svc:3306
username: cxdot
password: "${env:MYSQL_PASSWORD}"
```
The `mysql/external` key defines a named instance for the static targets, with its
own credentials. The bare `mysql` key continues to collect from annotated pods.
For more information about how the CXDOT Collector discovers targets, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the MySQL CXDOT Collector integration, follow these steps:
1. In Live Telemetry Analyzer, filter for `cxdot.integration.name=mysql`. Confirm that
`cxdot.integration.target.health` appears and reports `1` for each target.
2. In Metrics Explorer, run the following query while the MySQL servers handle query
traffic:
```text theme={null}
sum by ("server.address", "server.port") (rate({"mysql.query.count"}[$__rate_interval]))
```
Confirm that the query returns the expected time series for each target.
## Configuration reference
Configure one MySQL integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.mysql`. In a Collector configuration file,
place them under `cxdot.integrations.mysql`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to run the MySQL integration. If true, the Collector collects MySQL metrics. If false,
the Collector doesn't run this integration.
* **`username`**
Type: `string`. Optional. Default: `root`.
MySQL username for connections to the configured targets.
* **`password`**
Type: `string`. Optional.
MySQL password for connections to the configured targets. The Collector masks this value in
diagnostic output, logs, and errors.
* **`database`**
Type: `string`. Optional. Default: empty string.
Database to use for connections to the configured targets.
* **`allow_native_passwords`**
Type: `boolean`. Optional. Default: `true`.
If true, permits MySQL native password authentication. If false, rejects connections that
require the native password authentication method.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
Time between metric collections from each MySQL target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time to wait for each MySQL metric collection.
* **`instances`**
Type: `array of object`. Optional. Default: `[]`.
MySQL targets. Each entry's `endpoint` is `host:port`, for example, `mysql.default.svc:3306`.
When this list isn't empty, the integration collects from exactly these targets instead of
targets found through discovery annotations. If no listed or discovered targets exist, the
integration doesn't collect metrics.
* **`instances[].endpoint`**
Type: `string`. Required.
MySQL target in `host:port` format.
* **`tls`**
Type: `object`. Optional.
TLS settings for connections to the configured MySQL targets. When set, the connection uses
TLS and verifies the server certificate. Set `insecure_skip_verify` to true to skip
certificate verification, or set `insecure` to true to use an unencrypted connection.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to the CA cert. For a client this verifies the server certificate. For a server this
verifies client certificates. If empty uses system root CA. (optional)
* **`tls.ca_pem`**
Type: `string`. Optional.
In memory PEM encoded cert. (optional)
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the TLS cert to use for TLS required connections. (optional)
* **`tls.cert_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS cert to use for TLS required connections. (optional)
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a
safe default list is used. See
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go)
for a list of supported cipher suites.
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
contains the elliptic curves that will be used in an ECDHE handshake, in preference order
Defaults to empty list and "crypto/tls" defaults are used, internally.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
If true, load system CA certificates pool in addition to the certificates configured in this
struct.
* **`tls.insecure`**
Type: `boolean`. Optional.
In gRPC and HTTP when set to true, this is used to disable the client transport security. See
[https://godoc.org/google.golang.org/grpc#WithInsecure](https://godoc.org/google.golang.org/grpc#WithInsecure)
for gRPC. Please refer to
[https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for more
information. (optional, default false)
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
InsecureSkipVerify will enable TLS but not verify the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the TLS key to use for TLS required connections. (optional)
* **`tls.key_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS key to use for TLS required connections. (optional)
* **`tls.max_version`**
Type: `string`. Optional.
MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls
for defaults. (optional)
* **`tls.min_version`**
Type: `string`. Optional.
MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used.
(optional)
* **`tls.reload_interval`**
Type: `duration`. Optional.
ReloadInterval specifies the duration after which the certificate will be reloaded If not set,
it will never be reloaded (optional)
* **`tls.server_name_override`**
Type: `string`. Optional.
ServerName requested by client for virtual hosting. This sets the ServerName in the TLSConfig.
Please refer to [https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for
more information. (optional)
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module configuration
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.
# Neo4j
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/neo4j
Neo4j transaction, query, page cache, checkpoint, Bolt connection, and JVM metrics, scraped from the server's Prometheus endpoint.
The Neo4j integration requires CXDOT Collector 1.10.0 or greater.
[Neo4j](https://neo4j.com/) is a graph database that stores data as nodes and the
relationships between them. Use the Neo4j integration to collect transaction, query,
cache, checkpoint, Bolt connection, and Java Virtual Machine (JVM) metrics from Neo4j
servers running in your environment.
The Neo4j integration supports Neo4j 4.4, and Neo4j 5.26 or greater.
## Supported telemetry types
The Neo4j integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Known limitations
The Neo4j integration doesn't yet collect cluster (Raft) metrics, such as leadership,
the commit and applied indexes, and replication attempts and failures. In a clustered
deployment, each server still reports its own server-wide and per-database metrics.
On Neo4j 4.4, the integration also doesn't collect cluster catch-up and store copy
metrics.
## Prerequisites
The Neo4j integration has the following prerequisites:
* Run Neo4j Enterprise Edition, which exposes the metrics endpoint. To verify the
edition, run the following query in Cypher Shell and confirm that `edition` reports
`enterprise`:
```cypher theme={null}
CALL dbms.components() YIELD name, versions, edition;
```
* Enable the Neo4j Prometheus endpoint and bind it to an address that the CXDOT
Collector can reach. Neo4j disables the endpoint by default and binds it to
`localhost:2004`. For example, add the following settings to `neo4j.conf`:
```properties theme={null}
server.metrics.prometheus.enabled=true
server.metrics.prometheus.endpoint=0.0.0.0:2004
```
For the Neo4j Docker image, set
`NEO4J_server_metrics_prometheus_enabled=true` and
`NEO4J_server_metrics_prometheus_endpoint=0.0.0.0:2004`.
Neo4j 4.4 names these settings without the `server.` prefix:
`metrics.prometheus.enabled` and `metrics.prometheus.endpoint`.
* Restrict access to the metrics endpoint. The endpoint doesn't support encryption
or authentication and must not be exposed to the internet. For more information,
see [Expose metrics](https://neo4j.com/docs/operations-manual/current/monitoring/metrics/expose/)
in the Neo4j documentation.
* Select the metrics that Neo4j exposes with `server.metrics.filter`. The default
filter omits some supported metrics, including page cache eviction and Bolt
response metrics. To make all supported metrics available, add the following
setting to `neo4j.conf`:
```properties theme={null}
server.metrics.filter=*
```
On Neo4j 4.4, the setting is `metrics.filter`.
The integration reads the metrics endpoint without connecting to a database or
running queries. It doesn't require Neo4j credentials.
## Configure
The Neo4j integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the integration, follow these steps:
1. To collect from Neo4j pods in Kubernetes, add a CXDOT integration annotation to the
pod template. The annotation key must end with the container name. For example, add
the following annotation to your Neo4j workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/neo4j: |
schema_version: v1.14
neo4j:
endpoints:
- endpoint: ${target.host}:${target.port.metrics}
spec:
containers:
- name: neo4j
image: neo4j:5.26-enterprise
ports:
- name: metrics
containerPort: 2004
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.metrics}` with the container port named `metrics`, and collects from
the `/metrics` path on that port.
2. Optional: To collect from Neo4j servers outside your Kubernetes cluster, configure
static targets. For example, add the following to the
Helm values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
neo4j:
endpoints:
- endpoint: neo4j-0.example.com:2004
- endpoint: http://neo4j-1.example.com:2004/metrics
```
A nonempty `endpoints` list disables discovery for that integration instance. The
CXDOT Collector collects from only the listed targets. In a Kubernetes deployment,
one elected replica of the cluster-tier CXDOT Collector monitors static targets. For
more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
List each server's address instead of a load-balanced address to preserve per-server
metrics. The `collection_interval` and `timeout` settings in your Helm values apply
only to listed endpoints. For an annotated pod, set them in its CXDOT integration
annotation.
3. Optional: Configure separate integration instances to collect from annotated pods
and static targets at the same time. For example:
```yaml theme={null}
collection:
cxdot:
integrations:
neo4j: {}
neo4j/external:
endpoints:
- endpoint: neo4j-0.example.com:2004
```
The bare `neo4j` key continues to discover pods. The `neo4j/external` key
defines a named instance for static targets. Keep the bare `neo4j` key: after you
configure any Neo4j instance, the CXDOT Collector runs only the instances that you
configure.
4. Optional: Disable the integration. For example, add the following to the Helm
values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
neo4j:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Neo4j integration, follow these steps:
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=neo4j`
Confirm that each target reports `1`. A value of `0` means the CXDOT Collector
hit an error collecting from that target. The `cxdot.integration.target`
attribute identifies each endpoint.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while your applications run transactions against Neo4j:
```text theme={null}
sum by ("server.address", "server.port", "db.namespace") (rate({"neo4j.transaction.committed", "cxdot.integration.name"="neo4j"}[$__rate_interval]))
```
Confirm that the query returns a value greater than `0` for each active database.
The `server.address`, `server.port`, and `db.namespace` attributes identify the
server and database.
### Troubleshooting
* `cxdot.integration.target.health` reports `0`: Confirm that the metrics endpoint is
enabled, bound to an address the CXDOT Collector can reach, and accessible through
your network policy or firewall.
* `neo4j.node.count`, `neo4j.relationship.count`, and
`neo4j.relationship_type.count` are missing: Neo4j releases earlier than 2025.03
leave these counts out of the default metrics filter. Add `*neo4j.count*` to
`server.metrics.filter`. This setting replaces the default filter, so retain any
default patterns that you need.
* A query filtered by database returns no results: Replace periods and hyphens in the
database name with underscores. For example, Neo4j reports `sales-eu.prod` as
`sales_eu_prod` in `db.namespace`.
* Raft metrics are missing from a clustered deployment: The integration doesn't yet
collect them, as the Known limitations section describes.
* `jvm.gc.collection.count`, `jvm.gc.collection.time`, and the heap pools of
`jvm.memory.used` are missing: The integration collects these metrics only from
servers that use the G1 garbage collector.
## Configuration reference
Configure one Neo4j integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.neo4j`. In a Collector configuration file,
place them under `cxdot.integrations.neo4j`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Neo4j integration instance. If true, the Collector runs the instance.
If false, the Collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Neo4j Prometheus metrics endpoints to collect from. When this list is empty or omitted, the
integration uses autodiscovery. When the list contains endpoints, this integration instance
collects from exactly those endpoints and doesn't use autodiscovery. Configure a second, named
instance to use both methods. Give each endpoint as `host:port` or as a full HTTP or HTTPS
URL. The server exposes the endpoint only when `server.metrics.prometheus.enabled` is `true`,
at the address set by `server.metrics.prometheus.endpoint`.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Neo4j metrics endpoint as either `host:port` or a full HTTP or HTTPS URL. For `host:port`, the
Collector requests `http://:/metrics`. For a full URL, the Collector requests the
URL as written, or its `/metrics` path when the URL has no path.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector collects metrics from each endpoint in `endpoints`.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for one collection from an endpoint in `endpoints`. The value
must be greater than zero. A value longer than `collection_interval` is lowered to
`collection_interval`.
* **`max_samples`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`.
Maximum number of samples accepted from one metric collection. A value of `0`, the default,
means no limit. A collection that exceeds the limit fails and reports `up` as `0` instead of
returning an incomplete set of samples.
* **`follow_redirects`**
Type: `boolean`. Optional. Default: `true`.
Whether to follow HTTP redirects. If true, the Collector follows redirects. If false, a
redirect causes the metric collection to fail.
* **`databases`**
Type: `array of string`. Optional. Default: `[]`.
Databases to collect per-database metrics from. Server-wide metrics are always collected. When
this list is empty or omitted, the Collector collects metrics for every database.
* **`labels`**
Type: `object`. Optional.
Settings that drop metric samples based on their label values.
* **`labels.sample_drop_rules`**
Type: `object`. Optional. Default: `{}`.
Drops a whole sample when one of its labels matches. Each key is a label name. The value is a
list of regular expressions matched against the label's value. To drop every sample the label
appears on with a non-empty value, use `".+"`.
# NGINX
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/nginx
NGINX connection and request metrics scraped from the stub_status endpoint.
The NGINX integration requires CXDOT Collector 1.4.0 or greater.
[NGINX](https://nginx.org/) is a web server, reverse proxy, and load balancer. Use the
NGINX CXDOT Collector integration with the CXDOT Collector to collect connection and request
metrics from NGINX servers running in your environment.
## Supported telemetry types
The NGINX CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The NGINX CXDOT Collector integration has the following prerequisites:
* Use an NGINX build that includes the
[`ngx_http_stub_status_module`](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html).
To confirm that your build includes the module, run:
```shell theme={null}
nginx -V 2>&1 | grep -- --with-http_stub_status_module
```
* Make the NGINX status endpoint reachable from the CXDOT Collector.
## Configure
The NGINX CXDOT Collector integration is enabled by default. You can configure targets
either by annotating pods in your Kubernetes cluster or by listing static endpoints in
your Helm values. To configure the integration, follow these steps:
1. Configure NGINX to expose status information at `/status`. For example, add the
following location to the NGINX server configuration:
```nginx theme={null}
location = /status {
stub_status;
}
```
2. To collect from NGINX pods in Kubernetes, add a CXDOT integration annotation to the
pod template. The annotation key must end with the container name. For example, add
the following annotation to your NGINX workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/nginx: |
schema_version: v1.14
nginx:
endpoints:
- endpoint: ${target.host}:${target.port.status}
spec:
containers:
- name: nginx
image: nginx:1.27
ports:
- name: status
containerPort: 80
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.status}` with the container port named `status`.
The Collector also discovers NGINX pods that carry the
`app.kubernetes.io/name: nginx` label and listen on port `80`. A CXDOT integration
annotation takes precedence over the label for its container. To stop collecting from
a container, set `nginx: {enabled: false}` in the annotation. For more information,
see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
3. Optional: To collect from NGINX servers outside your Kubernetes cluster, configure
static targets. For example, add the following to the `values.yaml` for your CXDOT
Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
nginx:
endpoints:
- endpoint: 10.0.0.5:80
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets.
4. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the `values.yaml` for
your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
nginx: {}
nginx/edge:
endpoints:
- endpoint: 10.0.0.5:80
```
The `nginx/edge` key defines a named instance for the static targets. The bare
`nginx` key continues to discover pods.
### Validate
To validate the NGINX CXDOT Collector integration, follow these steps:
1. In the [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `cxdot.integration.name="nginx"` and
`__name__="cxdot.integration.target.health"`. Confirm that the metric reports `1`
for each reachable NGINX target.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while the NGINX servers receive
traffic:
```text theme={null}
sum by ("server.address", "server.port") (rate({"nginx.requests"}[$__rate_interval]))
```
Confirm that the query returns the expected time series for each target.
## Configuration reference
Configure one NGINX integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.nginx`. In a Collector configuration file,
place them under `cxdot.integrations.nginx`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this NGINX integration instance. If true, the Collector runs the instance.
If false, the Collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
NGINX targets. When this list is empty or omitted, the integration uses autodiscovery. When
the list contains targets, this integration instance collects from exactly those targets and
doesn't use autodiscovery. Configure a second named instance to use both methods. For a
`host:port` value, the Collector requests `http://:/status`. For a full URL, the
Collector requests the URL as written. An `https` URL must include the status path.
* **`endpoints[].endpoint`**
Type: `string`. Required.
NGINX endpoint as either `host:port` or a full HTTP or HTTPS URL. For `host:port`, the
Collector requests the `/status` path over HTTP.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
How often the Collector collects metrics from each NGINX endpoint.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for an NGINX endpoint to respond during one collection. This
value must not exceed `collection_interval`. If the deadline expires, that collection fails.
* **`disable_keep_alives`**
Type: `boolean`. Optional. Default: `true`.
Close the scrape connection after each collection instead of holding it open with keep-alive.
A held connection remains in the NGINX `waiting` state for `keepalive_timeout` and inflates
`nginx.connections_current{state="waiting"}`, so connections close by default. Set this value
to `false` to reuse one connection across collections. Annotation-discovered endpoints instead
take connection persistence from the annotation's `persist_connections`,
`tls_use_host_header`, `headers`, and `extra_headers` fields.
* **`tls`**
Type: `object`. Optional.
TLS settings for connections to NGINX endpoints. These settings apply only to endpoints that
use `https`. The Collector verifies server certificates by default.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the NGINX
server certificate. If omitted, the Collector uses the system certificate authority pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the NGINX server
certificate.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the NGINX endpoint requires
mutual TLS authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the NGINX endpoint requires mutual TLS
authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. If true, the Collector uses an unencrypted connection.
If false, the Collector uses TLS for HTTPS endpoints.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the NGINX server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the NGINX certificate instead of the endpoint hostname. Use this
setting when the certificate name differs from the endpoint hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
# OpenMetrics
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/openmetrics
Metrics scraped from OpenMetrics and Prometheus endpoints.
The OpenMetrics integration requires CXDOT Collector 1.4.0 or greater.
[OpenMetrics](https://openmetrics.io/) defines a standard format for exposing metrics.
Use the OpenMetrics CXDOT Collector integration to collect metrics from OpenMetrics and
Prometheus endpoints running in your environment.
## Supported telemetry types
The OpenMetrics CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The OpenMetrics CXDOT Collector integration has the following prerequisites:
* Make each OpenMetrics or Prometheus endpoint reachable from the CXDOT Collector.
* Identify the metric names to collect from each endpoint.
## Configure
The OpenMetrics integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the OpenMetrics CXDOT Collector integration, follow these steps:
1. To collect from app pods in Kubernetes, add a CXDOT integration annotation to the pod
template that specifies the metrics endpoint URL and the metrics to collect. The
annotation key must end with the container name. For example, add the following
annotation to your workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/app: |
schema_version: v1.14
openmetrics:
scrape:
endpoints:
- endpoint: http://${target.host}:${target.port.metrics}/metrics
metrics:
include:
- requests
spec:
containers:
- name: app
image: registry.example.com/shop/api:1.4
ports:
- name: metrics
containerPort: 9090
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.metrics}` with the container port named `metrics`.
2. Optional: To scrape specific endpoints, such as an app outside your Kubernetes
cluster, configure static targets. For example, add the following to the
`values.yaml` for your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
openmetrics:
scrape:
endpoints:
- endpoint: http://app.example.com/metrics
metrics:
include:
- requests
```
When `scrape.endpoints` isn't empty, this integration instance collects from exactly
those endpoints and doesn't discover annotated targets.
3. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the `values.yaml` for
your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
openmetrics: {}
openmetrics/external:
scrape:
endpoints:
- endpoint: http://app.example.com/metrics
metrics:
include:
- requests
```
The `openmetrics/external` key defines a named instance for the static targets. The
bare `openmetrics` key continues to collect from annotated pods.
For more information about how the CXDOT Collector discovers targets, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the OpenMetrics CXDOT Collector integration, follow these steps:
1. In Metrics Explorer, run the following query:
```text theme={null}
{"cxdot.integration.target.health", "cxdot.integration.name"="openmetrics"}
```
Confirm that each target reports `1`.
2. In the Live Telemetry Analyzer, filter for
`cxdot.integration.name=openmetrics`. Confirm that the metric names you configured
appear.
3. When you configured static targets, run the following query in Metrics Explorer:
```text theme={null}
count by ("server.address", "server.port") ({"requests"})
```
Confirm that the query returns the expected time series for each static target.
## Configuration reference
Configure one OpenMetrics integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.openmetrics`. In a Collector
configuration file, place them under `cxdot.integrations.openmetrics`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to run the OpenMetrics integration. If true, the Collector collects metrics from
configured or discovered endpoints. If false, the Collector doesn't run this integration.
* **`scrape`**
Type: `object`. Optional.
Settings for collecting metrics from OpenMetrics endpoints.
* **`scrape.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect OpenMetrics metrics. If true, the Collector collects metrics from
configured or discovered endpoints. If false, it doesn't collect OpenMetrics metrics.
* **`scrape.endpoints`**
Type: `array of object`. Optional. Default: `[]`.
OpenMetrics endpoints. Each entry identifies one target and the metrics to collect from it.
When this list isn't empty, the integration collects from exactly these endpoints instead of
endpoints found through discovery annotations.
* **`scrape.endpoints[].endpoint`**
Type: `string`. Required.
Full URL of the metrics endpoint, for example `https://app.svc:9090/metrics?format=text`.
Metric collection uses the path and query exactly as given.
* **`scrape.endpoints[].namespace`**
Type: `string`. Optional. Default: empty string.
A name recorded on every time series from this endpoint, as the `cxdot.openmetrics.namespace`
resource attribute. Metric names stay exactly as the target exposes them, so this groups an
endpoint's telemetry without changing what its metrics are called.
* **`scrape.endpoints[].service`**
Type: `string`. Optional. Default: empty string.
Overrides the `service.name` resource attribute for this endpoint.
* **`scrape.endpoints[].metrics`**
Type: `object`. Required.
Which metrics to collect, and how to reshape them.
* **`scrape.endpoints[].metrics.include`**
Type: `array of string`. Required. Minimum items: `1`.
Target metrics to collect. The integration always collects its health and collection status
metrics. Each entry is a regular expression matched against the metric name. Type suffixes are
not part of the name: a counter exposed as `requests_total` is collected as `requests`,
because OpenMetrics calls that family `requests` and carries the type separately. To collect
every target metric, use `".*"`.
* **`scrape.endpoints[].metrics.exclude`**
Type: `array of string`. Optional. Default: `[]`.
Target metrics to exclude from the metrics selected by `include`. Each entry is a regular
expression matched against the metric name. Health and collection status metrics aren't
excluded.
* **`scrape.endpoints[].metrics.rename`**
Type: `object`. Optional. Default: `{}`.
Metric renames, as `{old: new}`. Only an exact name can be renamed. The integration ignores a
rename whose key is a regular expression.
* **`scrape.endpoints[].metrics.types`**
Type: `object`. Optional. Default: `{}`.
Metric type overrides, as `{name: counter}`. Keys are exact metric names or regular
expressions. Values are `counter` or `gauge`. A metric without a declared type is otherwise
read as a gauge.
* **`scrape.endpoints[].metrics.strip_prefix`**
Type: `string`. Optional. Default: empty string.
A prefix removed from every metric name during collection. Removed first, so every other
option here, `include` included, refers to the shortened name.
* **`scrape.endpoints[].labels`**
Type: `object`. Optional.
Settings for renaming labels and dropping samples.
* **`scrape.endpoints[].labels.rename`**
Type: `object`. Optional. Default: `{}`.
Label renames, as `{old: new}`. A rename changes the label name without removing the label, so
distinct time series remain distinct. Renaming a label to a name the time series already has
overwrites that label's value.
* **`scrape.endpoints[].labels.sample_drop_rules`**
Type: `object`. Optional. Default: `{}`.
Drops a whole sample when one of its labels matches. Each key is a label name. The value is a
list of regular expressions matched against the label's value. To drop every sample the label
appears on with a non-empty value, use `".+"`.
* **`scrape.endpoints[].tags`**
Type: `array of string`. Optional. Default: `[]`.
Extra resource attributes in `key:value` format to add to every time series from this
endpoint. The integration ignores an entry without a colon.
* **`scrape.endpoints[].interval`**
Type: `duration`. Optional. Default: `15s`.
Time between metric collections from this endpoint.
* **`scrape.endpoints[].timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time to wait for each metric collection.
* **`scrape.endpoints[].max_samples`**
Type: `integer`. Optional. Default: `0`.
Maximum number of samples accepted from one metric collection. A value of `0`, the default,
means no limit. A collection that exceeds the limit fails and reports `up` as `0` instead of
returning an incomplete set of samples.
* **`scrape.endpoints[].follow_redirects`**
Type: `boolean`. Optional. Default: `true`.
Whether to follow HTTP redirects. If true, the Collector follows redirects. If false, a
redirect causes the metric collection to fail.
# Oracle Database
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/oracle
Oracle Database health and workload metrics, including sessions, wait and response time, cache hit ratios, I/O, and tablespace usage per pluggable database.
The Oracle Database integration requires CXDOT Collector 1.11.0 or greater.
[Oracle Database](https://www.oracle.com/database/) is a relational database management
system. Use the Oracle Database integration to collect session, wait time, cache, I/O,
and tablespace metrics from Oracle Database instances running in your environment.
The Oracle Database integration supports Oracle Database 19c or greater.
## Supported telemetry types
The Oracle Database integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Oracle Database integration has the following prerequisites:
* Determine whether your database is a container database. Connect to the database
with a SQL client and run the following query:
```sql theme={null}
SELECT cdb FROM v$database;
```
A value of `YES` means the database is a container database. Connect the integration
to the root container. From there, it reports instance-wide metrics and per-container
metrics for the root and each pluggable database, identified by the `oracle.db.pdb`
attribute. If the integration connects to a pluggable database, per-container metrics
cover that database only.
* Create a database user for the CXDOT Collector. For a container database, connect to
the root container as `SYSDBA` and run the following statements to create a common user
that can read every container's statistics. For more information about `CONTAINER_DATA`,
see
[`ALTER USER`](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-USER.html)
in the Oracle Database documentation.
```sql expandable theme={null}
CREATE USER c##cxdot IDENTIFIED BY "PASSWORD" CONTAINER = ALL;
ALTER USER c##cxdot SET CONTAINER_DATA = ALL CONTAINER = CURRENT;
GRANT CREATE SESSION TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$asm_diskgroup_stat TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$con_sysmetric TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$con_sysstat TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$containers TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$database TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$datafile TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$instance TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$lock TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$osstat TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$parameter TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$pdbs TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$pgastat TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$process TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$resource_limit TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$rsrcmgrmetric TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$session TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$sgainfo TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$sysmetric TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$sysstat TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON v_$transaction TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON cdb_data_files TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON cdb_services TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON cdb_tablespace_usage_metrics TO c##cxdot CONTAINER = ALL;
GRANT SELECT ON cdb_tablespaces TO c##cxdot CONTAINER = ALL;
```
For a database that isn't a container database, connect as `SYSDBA` and run the
following statements instead:
```sql expandable theme={null}
CREATE USER cxdot IDENTIFIED BY "PASSWORD";
GRANT CREATE SESSION TO cxdot;
GRANT SELECT ON v_$asm_diskgroup_stat TO cxdot;
GRANT SELECT ON v_$con_sysmetric TO cxdot;
GRANT SELECT ON v_$containers TO cxdot;
GRANT SELECT ON v_$database TO cxdot;
GRANT SELECT ON v_$datafile TO cxdot;
GRANT SELECT ON v_$instance TO cxdot;
GRANT SELECT ON v_$lock TO cxdot;
GRANT SELECT ON v_$osstat TO cxdot;
GRANT SELECT ON v_$parameter TO cxdot;
GRANT SELECT ON v_$pgastat TO cxdot;
GRANT SELECT ON v_$process TO cxdot;
GRANT SELECT ON v_$resource_limit TO cxdot;
GRANT SELECT ON v_$rsrcmgrmetric TO cxdot;
GRANT SELECT ON v_$session TO cxdot;
GRANT SELECT ON v_$sgainfo TO cxdot;
GRANT SELECT ON v_$sysmetric TO cxdot;
GRANT SELECT ON v_$sysstat TO cxdot;
GRANT SELECT ON v_$transaction TO cxdot;
GRANT SELECT ON cdb_data_files TO cxdot;
GRANT SELECT ON cdb_tablespace_usage_metrics TO cxdot;
GRANT SELECT ON cdb_tablespaces TO cxdot;
```
Replace `PASSWORD` with a password for the user. To reuse an existing monitoring user,
run every statement except `CREATE USER` for that user.
* Make the Oracle Database listener, typically on port `1521`, reachable from the CXDOT
Collector over TCP. The integration uses a user name and password. It doesn't support
the `TCPS` protocol, Oracle wallets, or net service names from a `tnsnames.ora` file.
## Configure
The integration is enabled by default. You can configure targets either by annotating
pods and Services in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the Oracle Database integration, follow these steps:
1. To collect from Oracle Database pods in Kubernetes, add a CXDOT integration
annotation to the pod template. The annotation key must end with the container name,
and its value specifies the database service name and references credentials stored in
a Kubernetes Secret in the same namespace. For example, add the following annotation
to your Oracle Database workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/oracle: |
schema_version: v1.14
oracle:
instances:
- endpoint: ${target.host}:${target.port.listener}
service: ORCLCDB
username: "c##cxdot"
password: ${k8s_secret:oracle-credentials/password}
spec:
containers:
- name: oracle
image: container-registry.oracle.com/database/enterprise:21.3.0.0
ports:
- name: listener
containerPort: 1521
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.listener}` with the container port named `listener`, and
`${k8s_secret:oracle-credentials/password}` with the `password` key of the
`oracle-credentials` Secret. To allow the Collector to read the Secret, add the pod's
namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for your
CXDOT Collector.
2. Optional: To collect from Oracle Database instances outside your Kubernetes cluster,
configure static targets instead of annotated targets. Supply the password through your
deployment's secret management and expose it on the cluster-tier CXDOT Collector
through `clusterCollector.extraEnv`. For example, add the following to the
`values.yaml` file for the CXDOT Collector Helm chart:
```yaml theme={null}
clusterCollector:
extraEnv:
- name: ORACLE_PASSWORD
valueFrom:
secretKeyRef:
name: oracle-credentials
key: password
collection:
cxdot:
integrations:
oracle:
username: "c##cxdot"
password: "${env:ORACLE_PASSWORD}"
instances:
- endpoint: oracle.example.com:1521
service: ORCLCDB
```
This integration instance collects only the listed instances and disables
autodiscovery. Every instance uses the same `username` and `password`. Use a
separate integration instance for different credentials. One elected cluster-tier
CXDOT Collector replica collects static targets. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
3. Optional: Report SQL query results as metrics. Add `custom_queries` to a static
instance or to an instance in a CXDOT integration annotation. The following query
reports free space for each Automatic Storage Management (ASM) disk group as
`oracle.asm_diskgroup.free_mb`. The `asm_diskgroup_name` attribute identifies
the disk group:
```yaml theme={null}
collection:
cxdot:
integrations:
oracle:
username: "c##cxdot"
password: "${env:ORACLE_PASSWORD}"
instances:
- endpoint: oracle.example.com:1521
service: ORCLCDB
custom_queries:
- metric_prefix: oracle.asm_diskgroup
query: SELECT name, free_mb FROM v$asm_diskgroup
columns:
- name: asm_diskgroup_name
type: tag
- name: free_mb
type: gauge
```
Grant the database user `SELECT` on each view or table that a query reads. This
example requires `SELECT` on `v_$asm_diskgroup`. For a query in a pluggable
database, also grant `SET CONTAINER` in that database.
4. Optional: Configure separate integration instances to collect from both annotated
and static targets. For example, add the following to the `values.yaml` file for the
CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
oracle: {}
oracle/external:
username: "c##cxdot"
password: "${env:ORACLE_PASSWORD}"
instances:
- endpoint: oracle.example.com:1521
service: ORCLCDB
```
The `oracle/external` key holds the static targets. A named instance replaces the
implicit default, so the empty `oracle: {}` entry keeps autodiscovery enabled.
5. Optional: Disable the integration. For example, add the following to the
`values.yaml` file for the CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
oracle:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Oracle Database integration, follow these steps:
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=oracle`
Confirm that each target reports `1`, identified by its `server.address` and
`server.port` attributes. The `cxdot.integration.check` attribute separates the
connection status, `oracle`, from the query status, `oracle_query`.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
sum by ("server.address", "server.port", "oracle.db.pdb") ({"oracledb.session.count"})
```
Confirm that the query returns time series for each target. For a target connected to
a root container, confirm that the query returns a time series for `CDB$ROOT` and for
each open pluggable database.
### Troubleshooting
* Metrics report only `CDB$ROOT` in the `oracle.db.pdb` attribute: the database user
can't read the statistics of other containers. Run the `ALTER USER` statement from the
Prerequisites section, which sets the user's `CONTAINER_DATA` to `ALL`.
* Some metrics are missing, such as execution and commit counts or resource limits: the
database user lacks a Prerequisites grant. The CXDOT Collector logs `Error scraping
metrics` with `ORA-00942`. The `oracle_query` health check can report `1` while these
metrics are missing because it doesn't cover every query. If you reuse a monitoring
user from another tool, confirm grants on `v_$sysstat`, `v_$con_sysstat`, and
`v_$resource_limit`, and for a pluggable database also on `v_$parameter`,
`v_$transaction`, and `v_$lock`.
* Average active sessions, CPU usage, physical reads and writes, session counts by type
and status, and total Program Global Area (PGA) memory carry no `oracle.db.pdb`
attribute while other per-container metrics, such as tablespace metrics, do: the
integration reports instance-wide totals until it confirms it can
read each container's statistics. When the database isn't open yet, for example right
after its pod restarted, the Collector logs `failed to detect Oracle version`,
`failed to detect CDB status`, or `per-PDB grants probe failed` and retries each
collection until the database answers. Those first two messages also mean the user
lacks `SELECT` on `v_$instance` or `v_$database`. Grant access, and the next collection
detects the database without a restart. When the user lacks `SELECT` on
`v_$con_sysstat`, the Collector logs `per-PDB grants not available` and stops
retrying. Grant access and restart the CXDOT Collector.
* Custom query metrics are missing and the `oracle_query` health check reports `0`: a
custom query failed. The CXDOT Collector logs `Error scraping metrics` with
`custom query`. A query fails if its result has a different number of columns than
its `columns` list, or if a metric column contains a `NULL` or a value that isn't
numeric.
Use `NVL` or `COALESCE` for columns that can contain `NULL`.
* Tablespace metrics are missing while other metrics arrive: the tablespace queries
timed out, or the user lacks a grant on the `cdb_` views. A timed-out tablespace query
retries only after a full tablespace collection interval. Raise `timeout` in your Helm
values or in a CXDOT integration annotation.
## Configuration reference
Configure one Oracle Database integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.oracle`. In a Collector configuration
file, place them under `cxdot.integrations.oracle`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
If true, the Collector collects Oracle Database metrics from the instances listed in
`instances`, or from targets discovered through annotations when the list is empty. If false,
the Collector doesn't collect Oracle Database metrics.
* **`username`**
Type: `string`. Optional.
Oracle Database user for the configured instances. The Collector requires it when `instances`
contains entries. For a container database, use a common user that can read every container's
statistics.
* **`password`**
Type: `string`. Optional.
Password for `username`. The Collector requires it to start collecting from `instances`
entries, and masks the value in diagnostic output, logs, and errors.
* **`collection_interval`**
Type: `duration`. Optional. Default: `60s`.
How often to collect metrics from each configured Oracle Database instance. Oracle Database
recomputes system metrics, such as hit ratios and rates, every 15 or 60 seconds. Discovered
targets use the collection interval in their annotation instead.
* **`timeout`**
Type: `duration`. Optional. Default: `20s`.
Maximum time to collect metrics from an Oracle Database instance during one interval. Each
tablespace query gets this limit. All custom queries share one additional limit. An interval
that runs both tablespace queries and custom queries can take up to four times this value. A
value of `0s` disables all time limits. Discovered targets use the query timeout in their
annotation, or this default when no timeout is set, limited to their collection interval.
* **`tablespace_collection_interval`**
Type: `duration`. Optional. Default: `600s`.
How often the integration collects tablespace metrics from each configured instance. The
tablespace queries read every container's data files, so they run less often than the other
queries. Between those queries, the integration reports the most recent tablespace values
every `collection_interval`. Targets discovered through annotations use the tablespace
interval in their annotation instead.
* **`collect_system_metrics`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect the core system metrics Oracle Database computes in `V$SYSMETRIC`: cache
hit ratios, session counts and utilization, the wait time ratio, logon, transaction, scan, and
sort rates, SQL service latency, and temporary space usage. If false, the Collector reports
none of them. Applies to the configured targets. Annotation-discovered targets use the
`sysmetrics` setting of their own annotation instance instead.
* **`collect_extended_system_metrics`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect the extended system metrics from `V$SYSMETRIC`: CPU usage and host load,
logical and physical I/O rates, data file and network I/O, parse rates and ratios, redo
generation, checkpoint and block change rates, cache hit ratios, and process utilization. If
false, the Collector reports none of them. Applies to the configured targets.
Annotation-discovered targets collect them only when their annotation instance enables
Database Monitoring with `dbm: true` and leaves `sysmetrics` on.
* **`collect_process_memory`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect the Program Global Area (PGA) memory each Oracle Database process has
allocated, is using, and can free, with its maximum. The Collector reports one time series per
process, so this family grows with the number of processes on the instance. If false, the
Collector doesn't read `V$PROCESS` memory. Applies to the configured targets.
Annotation-discovered targets use the `process_memory` setting of their own annotation
instance instead.
* **`collect_inactive_sessions`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect the time since each inactive session's last call, one time series per
session. If false, the Collector doesn't report `oracledb.session.last_call.age`. Applies to
the configured targets. Annotation-discovered targets use the `inactive_sessions` setting of
their own annotation instance instead.
* **`collect_session_counts`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect `oracledb.sessions.usage`, the number of sessions by session type and
status. If false, the Collector doesn't report it. Applies to the configured targets.
Annotation-discovered targets count sessions when their annotation instance leaves
`user_sessions_count` on and at least one of `process_memory` and `inactive_sessions` on.
* **`collect_tablespaces`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect tablespace metrics: the size, limit, utilization, and status of every
tablespace, read every `tablespace_collection_interval`. If false, the Collector doesn't run
the tablespace queries. Applies to the configured targets. Annotation-discovered targets use
the `tablespaces` setting of their own annotation instance instead.
* **`collect_shared_memory`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect `oracledb.sga.size`, the size of each System Global Area component. If
false, the Collector doesn't read `V$SGAINFO`. Applies to the configured targets.
Annotation-discovered targets collect it only when their annotation instance enables Database
Monitoring with `dbm: true` and leaves `shared_memory` on.
* **`collect_resource_manager`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect the CPU time each Resource Manager consumer group consumed and waited for.
If false, the Collector doesn't read `V$RSRCMGRMETRIC`. Applies to the configured targets.
Annotation-discovered targets collect it only when their annotation instance enables Database
Monitoring with `dbm: true` and leaves `resource_manager` on.
* **`collect_asm`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect the space and offline disks of each Automatic Storage Management disk
group. If false, the Collector doesn't read `V$ASM_DISKGROUP_STAT`. A database without
Automatic Storage Management reports none. Applies to the configured targets.
Annotation-discovered targets use the `asm` setting of their own annotation instance instead.
* **`instances`**
Type: `array of object`. Optional. Default: `[]`.
Oracle Database instances to monitor. Each discovered target uses the credentials in its
annotation.
* **`instances[].endpoint`**
Type: `string`. Required.
`host:port` of the database listener, such as `oracle.default.svc:1521`.
* **`instances[].service`**
Type: `string`. Required. Minimum length: `1`.
Oracle Database service name. For a container database, use the root container's service to
collect from every pluggable database.
* **`instances[].tags`**
Type: `array of string`. Optional. Default: `[]`.
Resource attributes in `key:value` format to add to every time series from this instance. For
example, `dbname:billing` adds `dbname` with the value `billing`. Values can contain colons.
The integration ignores entries without a colon and keeps the last value for repeated keys. A
tag can't replace an attribute set by the integration or by the collector-wide
`resource_attributes`. Discovered targets apply `tags` from their annotation instance in the
same way.
* **`instances[].custom_queries`**
Type: `array of object`. Optional. Default: `[]`.
SQL queries that report results as metrics for this instance. Each query runs every collection
interval unless it sets `collection_interval`. A query failure reports no metrics for that
collection and sets the `oracle_query` health check to `0`. Other metrics and queries
continue. Grant the database user `SELECT` on every view and table that the queries read.
* **`instances[].custom_queries[].query`**
Type: `string`. Required. Minimum length: `1`.
SQL statement to run. Each result row produces one data point for each metric column. Tag
columns become attributes on those data points.
* **`instances[].custom_queries[].metric_prefix`**
Type: `string`. Optional. Default: `oracle`.
Prefix of every metric name the query reports. A metric name is the prefix, a period, and the
column's `name`, such as `oracle.asm_diskgroup.free_mb`.
* **`instances[].custom_queries[].columns`**
Type: `array of object`. Required. Minimum items: `1`.
One entry for each column the query returns, in the order the query returns them. The query
fails when it returns a different number of columns. An entry without a `name`, such as `{}`,
skips its column.
* **`instances[].custom_queries[].columns[].name`**
Type: `string`. Optional.
Metric name suffix for a metric column, or attribute name for a `tag` column.
* **`instances[].custom_queries[].columns[].type`**
Type: `string`. Optional.
How the integration reports the column. `tag` adds the value as an attribute on each of the
row's data points and leaves it off when the value is `NULL`. `gauge` reports the value as a
gauge. `count` adds up a non-negative column across rows with the same attribute values and
adds that total to a cumulative counter on every run. `monotonic_count` and `rate` report the
value as a cumulative counter, for a column that only increases until the database restarts.
Use the `increase` or `rate` function to query a counter's change. Allowed values: `tag`,
`gauge`, `count`, `monotonic_count`, `rate`.
* **`instances[].custom_queries[].tags`**
Type: `array of string`. Optional. Default: `[]`.
Attributes to add to every data point of the query, each in the form `key:value`. The value
can contain colons. The integration ignores an entry without a colon. A tag here replaces a
`tag` column of the same name.
* **`instances[].custom_queries[].collection_interval`**
Type: `number`. Optional. Minimum: `1`.
Seconds between query runs, truncated to whole seconds. The query runs during the first
collection that falls no earlier than half a collection interval before the interval passes,
so collection timing jitter doesn't skip runs. Between runs, each collection reports the
metrics from the last run, or none if that run failed. When unset, the query runs every
collection interval. The Datadog Agent's Oracle check accepts this setting but runs every
query during each collection. A query carried over from the Agent with this setting runs less
often here.
* **`instances[].custom_queries[].pdb`**
Type: `string`. Optional. Default: `CDB$ROOT`.
Oracle Database container in which to run the query. This setting applies when `service` names
a container database's root container. The integration adds the container name to every data
point as the `oracle.db.pdb` attribute. A connection to a pluggable database or a database
without containers ignores this setting and runs the query where it connects. A query in a
pluggable database requires the database user to have the `SET CONTAINER` privilege in that
pluggable database.
# OTLP
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/otlp
Logs, metrics, and traces ingested over the OpenTelemetry Protocol from instrumented apps.
The OTLP integration requires CXDOT Collector 1.4.0 or greater.
[OpenTelemetry Protocol (OTLP)](https://opentelemetry.io/docs/specs/otlp/) is
OpenTelemetry's vendor-neutral protocol for transmitting metrics, logs, and traces.
Use the OTLP CXDOT Collector integration to ingest telemetry from instrumented apps
with the CXDOT collector.
## Supported telemetry types
The OTLP CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | Yes |
| Metrics | Yes |
| Traces | Yes |
| Events | No |
## Prerequisites
The OTLP CXDOT Collector integration has the following prerequisites:
* Instrument your apps with an OpenTelemetry SDK or another client that
exports OTLP over gRPC or HTTP.
* Configure network access from your apps to an OTLP endpoint that the CXDOT collector
serves.
## Configure
The OTLP CXDOT Collector integration is enabled by default. To configure it, follow
these steps:
1. Configure each app's OTLP exporter endpoint. When the CXDOT collector runs as a
DaemonSet with host networking, use the node's host IP so the app sends to the
collector on the same node. Send OTLP over gRPC on port `4317` or HTTP on port
`4318`. If you use the admission controller for routing, add the
`admission.cxdot.paloaltonetworks.com/enabled: "true"` label to each app's pod
template and recreate existing pods.
2. Optional: Disable OTLP ingest. For example, add the following to the `values.yaml`
for your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
otlp:
enabled: false
```
### Validate
To validate the OTLP CXDOT Collector integration, follow these steps:
1. Generate telemetry from an instrumented app, including any metrics, logs, and traces
the app exports.
2. In Live Telemetry Analyzer, filter for `cxdot.integration.name=otlp`. Confirm that
the metric names from your app appear.
3. In Metrics Explorer, run the following query:
```text theme={null}
count by ("service.name") ({"cxdot.integration.name"="otlp"})
```
Confirm that the query returns the expected time series for each instrumented
service.
4. In Trace Explorer, filter for `cxdot.integration.name=otlp`. Confirm that traces
from the generated traffic appear with the expected service name and spans.
## Configuration reference
Configure one OTLP integration instance with the following settings. In Helm values, place these
settings under `collection.cxdot.integrations.otlp`. In a Collector configuration file, place
them under `cxdot.integrations.otlp`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this OTLP integration instance. If true, the Collector accepts OTLP
telemetry on the configured endpoints. If false, the Collector doesn't run this integration
instance.
* **`grpc`**
Type: `object`. Optional.
Settings for receiving telemetry over OTLP/gRPC.
* **`grpc.endpoint`**
Type: `string`. Optional. Default: `0.0.0.0:4317`.
Network address and port where the Collector accepts OTLP/gRPC connections. Use an address in
`host:port` format.
* **`grpc.max_connection_age`**
Type: `duration`. Optional. Default: `30m`.
Maximum time that an OTLP/gRPC connection remains open before the client reconnects. Periodic
reconnection helps distribute clients across Collector replicas behind a load-balancing
service.
* **`http`**
Type: `object`. Optional.
Settings for receiving telemetry over OTLP/HTTP.
* **`http.endpoint`**
Type: `string`. Optional. Default: `0.0.0.0:4318`.
Network address and port where the Collector accepts OTLP/HTTP connections. Use an address in
`host:port` format.
# PostgreSQL
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/postgres
PostgreSQL connection and workload metrics.
The PostgreSQL integration requires CXDOT Collector 1.4.0 or greater.
[PostgreSQL](https://www.postgresql.org/) is an open source object-relational database
system. Use the PostgreSQL CXDOT Collector integration with the CXDOT Collector to
collect connection and workload metrics from PostgreSQL servers running in your
environment.
## Supported telemetry types
The integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The integration has the following prerequisites:
* Create a PostgreSQL role that can authenticate with a password and connect to the
`postgres` database and every non-template database on each target.
* To collect `ANALYZE` progress metrics (`postgresql.analyze.*`, PostgreSQL 13 and
later) for operations run by other roles, grant the monitoring role the predefined
`pg_monitor` role. Grant `pg_monitor` only when you need that metric family. The role
can read privileged server statistics.
* Make each PostgreSQL endpoint reachable from the CXDOT Collector.
## Configure
The integration is enabled by default. You can configure targets either by annotating
pods in your Kubernetes cluster or by listing static endpoints in your Helm values. To
configure the integration, follow these steps:
1. To collect from PostgreSQL pods in Kubernetes, add a CXDOT integration annotation to
the pod template. The annotation key must end with the container name, and its value
can reference credentials stored in a Kubernetes Secret in the same namespace. For
example, add the following annotation to your PostgreSQL workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/postgres: |
schema_version: v1.14
postgres:
instances:
- endpoint: ${target.host}:${target.port.postgres}
username: cxdot
password: ${k8s_secret:postgres-monitoring/password}
spec:
containers:
- name: postgres
image: postgres:17
ports:
- name: postgres
containerPort: 5432
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.postgres}` with the container port named `postgres`, and
`${k8s_secret:postgres-monitoring/password}` with the `password` key of the
`postgres-monitoring` Secret. To allow the Collector to read the Secret, add the
pod's namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for
your CXDOT Collector.
2. Optional: To collect from PostgreSQL servers outside your Kubernetes cluster,
configure static targets, and provide the password through your deployment's secret
management. For example, add the following to the `values.yaml` for your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
postgres:
instances:
- endpoint: postgres.example.com:5432
username: cxdot
password: "${env:POSTGRES_PASSWORD}"
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets.
To add attributes to every time series from a target, list `key:value` entries in
its `tags`, such as `tags: ["team:billing"]` under an `instances` entry.
3. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the `values.yaml` for
your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
postgres: {}
postgres/external:
instances:
- endpoint: postgres.example.com:5432
username: cxdot
password: "${env:POSTGRES_PASSWORD}"
```
The `postgres/external` key defines a named instance for the static targets, with
its own credentials. The bare `postgres` key continues to collect from annotated
pods.
4. Optional: Report per-table metrics for selected tables: live and dead rows,
heap-only tuple updates, sequential scans, index scans, and locks. List the tables
in `relations`, by exact name or by regular expression. For example, add the
following to the `values.yaml` for your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
postgres:
relations:
- relation_regex: ^orders
schemas: [public]
```
The integration reports these metrics only for tables in the database it connects
to. Discovered targets use the `relations` in their annotation instead.
5. Optional: Disable the integration. For example, add the following to the
`values.yaml` for your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
postgres:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the integration, follow these steps:
1. In the [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for
`__name__=cxdot.integration.target.health` and
`cxdot.integration.name=postgres`. Confirm that each reachable target reports
`1` for `cxdot.integration.target.health`, identified by its `server.address`
and `server.port` attributes.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while clients are connected to the
PostgreSQL servers:
```text theme={null}
sum by ("server.address", "server.port") ({"postgresql.backends"})
```
Confirm that the query returns the expected time series for each target.
## Configuration reference
Configure one PostgreSQL integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.postgres`. In a Collector configuration
file, place them under `cxdot.integrations.postgres`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this PostgreSQL integration instance. If true, the Collector collects
PostgreSQL metrics. If false, the Collector doesn't run this integration instance.
* **`username`**
Type: `string`. Optional. Default: `postgres`.
PostgreSQL user for connections to every configured instance.
* **`password`**
Type: `string`. Optional.
PostgreSQL password for connections to every configured instance. The Collector requires it to
start collecting from `instances` entries, and masks the value in diagnostic output, logs, and
errors.
* **`database`**
Type: `string`. Optional. Default: `postgres`.
Database the integration connects to on every configured instance, for the statistics
PostgreSQL reports per connected database. Targets discovered through annotations connect to
the database their annotation names.
* **`relations`**
Type: `array of object`. Optional. Default: `[]`.
Tables to report per-table metrics for, in the connected database: live and dead rows,
heap-only tuple updates, sequential scans, index scans for each index, and locks. A table
matches when it matches any entry. When the list is empty, the integration doesn't report
these metrics. Targets discovered through annotations use the `relations` in their annotation
instead.
* **`relations[].relation_name`**
Type: `string`. Optional. Minimum length: `1`.
Exact name of a table to match. Set either `relation_name` or `relation_regex`.
* **`relations[].relation_regex`**
Type: `string`. Optional. Minimum length: `1`.
PostgreSQL regular expression that matches table names, such as `^orders_`. The expression
matches anywhere in the name unless you anchor it. PostgreSQL checks the expression when it
runs the queries, so an invalid expression stops these metrics rather than failing at startup.
Set either `relation_name` or `relation_regex`.
* **`relations[].schemas`**
Type: `array of string`. Optional. Default: `[]`.
Schemas the entry matches tables in. When empty, the entry matches tables in every schema.
* **`relations[].relkind`**
Type: `array of string`. Optional. Default: `[]`.
Kinds of relation to report locks for, as PostgreSQL `pg_class.relkind` codes, such as `r`
(table), `i` (index), `S` (sequence), `v` (view), `m` (materialized view), `p` (partitioned
table), and `I` (partitioned index). A code PostgreSQL doesn't use matches nothing. When
empty, the entry reports locks on relations of every kind. Only lock metrics use this setting.
* **`max_relations`**
Type: `integer`. Optional. Default: `300`. Minimum: `1`.
Maximum number of tables to report live and dead rows, heap-only tuple updates, and sequential
scans for in each collection. When more tables match, which ones report is unspecified. Index
scans and locks aren't limited.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
How often the integration collects metrics from each PostgreSQL instance.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time allowed to collect metrics from a PostgreSQL instance during one interval. A
value of `0s` disables the timeout.
* **`instances`**
Type: `array of object`. Optional. Default: `[]`.
PostgreSQL instances to monitor. Each discovered target uses the credentials and TLS settings
in its annotation.
* **`instances[].endpoint`**
Type: `string`. Required.
Network address of the PostgreSQL instance in `host:port` format.
* **`instances[].tags`**
Type: `array of string`. Optional. Default: `[]`.
Resource attributes in `key:value` format to add to every time series from this instance. For
example, `team:billing` adds `team` with the value `billing`. Values can contain colons. The
integration ignores entries without a colon and keeps the last value for repeated keys. A tag
can't replace an attribute set by the integration or by the collector-wide
`resource_attributes`. Discovered targets apply `tags` from their annotation instance in the
same way.
* **`tls`**
Type: `object`. Optional.
Transport Layer Security (TLS) settings for connections to the configured instances. By
default, both of the integration's connections use TLS, but only one verifies the server
certificate: the `cxdot_internal_postgres` receiver does and the `postgresql` receiver
doesn't. Set `insecure_skip_verify` to choose for both. Set `insecure` to `true` to connect
without TLS. Targets discovered through annotations use the TLS settings in their annotations
instead.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the
PostgreSQL server certificate. If omitted, the Collector uses the system certificate authority
pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the PostgreSQL server
certificate.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the PostgreSQL endpoint
requires mutual TLS authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the PostgreSQL instance requires mutual
TLS authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. If true, the Collector uses an unencrypted connection.
If false, the Collector connects with TLS.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional. Default: `true`.
Whether to skip verification of the PostgreSQL server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
# Redis
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/redis
Redis server health and performance metrics, including memory, clients, commands, keyspace, persistence, replication, and cluster state.
The Redis integration requires CXDOT Collector 1.12.0 or greater.
[Redis](https://redis.io/) is an in-memory data store that applications use as a
database, cache, and message broker. Use the Redis integration to collect memory,
client, command, key, persistence, replication, cluster, and slow log metrics from
Redis servers running in your environment.
The Redis integration supports Redis Open Source 7.2 or greater.
## Supported telemetry types
The Redis integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Redis integration has the following prerequisites:
* Make port `6379`, or your custom Redis port, reachable from the CXDOT Collector over
TCP. The integration doesn't support Unix domain sockets.
* If your Redis servers require authentication, prepare credentials for the CXDOT
Collector. On a server protected only by the `requirepass` password, the Collector
authenticates with that password, so you don't need to create a user. On a server
that uses an
[access control list](https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/)
(ACL), connect with `redis-cli` as a user that can manage users, and create a user
that can run only the commands the Collector sends:
```shell theme={null}
redis-cli ACL SETUSER cxdot on '>PASSWORD' -@all +ping +info '+cluster|info' '+slowlog|get'
```
Replace `PASSWORD` with a password for this user. The examples on this page use the
username `cxdot`. If you choose another username, use it in the configuration too.
To keep the user after the server restarts, run `ACL SAVE` if the server loads its
users from an ACL file, or `CONFIG REWRITE` if it loads them from its configuration
file.
* If you enable the optional collections in the Configure section, grant their
additional permissions. Collecting connections per client name needs
`+client|list`. Collecting key lengths needs
`+type +llen +scard +zcard +hlen +xlen`, `+scan` when `keys` contains a glob
pattern, read access to the keys you list (for example, `'%R~queue:*'`), and
`+select` when the keys are in databases other than `0`. The Collector doesn't
report a length for a key that the user can't read. Per-command statistics come
from `INFO` and need no extra permission.
* On Redis 7.2 or greater, the `redis.acl.denied` metric counts requests that ACL
rules deny, including requests from the Collector. Each collection that reads a key
the user can't read causes a denial with `redis.acl.denied.reason` set to `key`.
Each time the Collector connects, it sends `CLIENT SETINFO` to report its client
library name. The Collector doesn't depend on this command, but each denied
`CLIENT SETINFO` request increments the count for the `cmd` reason and appears in
the ACL log. Therefore, the count increases with every connection. To keep these
denials out of `redis.acl.denied` and the ACL log, also grant `+client|setinfo`.
Redis versions before 7.2 reject `+client|setinfo`, so omit it on those versions.
## Configure
The Redis integration is enabled by default. It collects from each Redis server
independently, whether the server is a standalone server, a primary, or a replica,
and whether or not it runs in cluster mode. The Collector doesn't follow cluster
redirects or use discovered servers to find other nodes. Make sure that the Collector
discovers each node that you want to monitor, or list the node as a static target.
### Configure on Kubernetes
You can configure targets in Kubernetes either by annotating Redis pods or by listing
static endpoints in your Helm values. To configure the Redis integration in Kubernetes,
follow these steps:
1. To collect from Redis pods in Kubernetes, add a CXDOT integration annotation to the
pod template. The annotation key must end with the container name, and its value can
reference credentials stored in a Kubernetes Secret in the same namespace. For
example, add the following annotation to your Redis workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/redis: |
schema_version: v1.14
redis:
instances:
- endpoint: ${target.host}:${target.port.redis}
username: cxdot
password: ${k8s_secret:redis-credentials/password}
spec:
containers:
- name: redis
image: redis:7.4
ports:
- name: redis
containerPort: 6379
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.redis}` with the container port named `redis`, and
`${k8s_secret:redis-credentials/password}` with the `password` key of the
`redis-credentials` Secret. To allow the Collector to read the Secret, add the pod's
namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for your
CXDOT Collector.
The Collector also discovers Redis pods that carry the `app.kubernetes.io/name: redis`
label and listen on port `6379`. The Collector connects without credentials or TLS to
every pod that it finds by label. A CXDOT integration annotation takes precedence over
the label for its container. To stop collecting from a container, set
`redis: {enabled: false}` in the annotation. Metrics from each discovered pod include
that pod's Kubernetes metadata. For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
2. Optional: To collect from Redis servers outside your Kubernetes cluster, configure
static targets. For example, add the following to the Helm values file for your
CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
redis:
instances:
- endpoint: redis-1.example.com:6379
- endpoint: redis-2.example.com:6379
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets. Static targets use the integration's
`username`, `password`, and `tls` settings. The cluster Collector collects from
static targets, so provide any password environment variable through
`clusterCollector.extraEnv`. For more information about Collector tiers, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
3. Optional: Collect per-command statistics, open connections per client name, or the
lengths of specific keys. These collections are off by default. In the Helm values,
these settings apply to the static targets that the same integration instance lists.
For example, add the following to that instance in the Helm values file for your
CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
redis:
command_stats: true
collect_client_metrics: true
keys:
- "queue:*"
- jobs
```
Per-command statistics add one time series for each command that the server has run.
Client metrics run `CLIENT LIST`, whose response grows with the number of
connections. Each key length reads the key type and its type-specific length. A glob
pattern in `keys`, such as `queue:*`, also scans every key in each database that
holds keys. On a server with many keys, list key names rather than patterns where
possible. For an annotated pod, set them in its CXDOT integration annotation.
4. Optional: Configure a second integration instance to collect from both annotated
pods and static targets, or to use different credentials for some static targets. For
example, add the following to the Helm values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
redis: {}
redis/external:
username: cxdot
password: "${env:EXTERNAL_REDIS_PASSWORD}"
instances:
- endpoint: redis-1.example.com:6379
```
The `redis/external` key defines a named instance for the static targets, with its
own credentials. The bare `redis` key continues to collect from discovered targets.
Provide `EXTERNAL_REDIS_PASSWORD` through `clusterCollector.extraEnv`.
5. Optional: Disable the integration. For example, add the following to the Helm values
file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
redis:
enabled: false
```
### Configure on a host
To configure the Redis integration on a host outside Kubernetes, such as a virtual
machine, [install the CXDOT Collector on Linux](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/linux)
on each Redis host. Run the Collector in host mode and list the local server. For
example, add the following to the Collector configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
redis:
username: cxdot
password: "${env:REDIS_PASSWORD}"
instances:
- endpoint: localhost:6379
```
The example reads the password from the `REDIS_PASSWORD` environment variable of the
Collector process. On a host, the integration collects only from the servers in
`instances`. The Collector adds the host's `host.name` attribute to every metric. When
every endpoint is `localhost`, `host.name` identifies the server. To collect from more
than one server on a host, such as several cluster nodes on different ports, list each
one.
### Validate
To validate the Redis integration, follow these steps:
1. In Live Telemetry Analyzer, filter for `__name__=cxdot.integration.target.health`
and `cxdot.integration.name=redis`. Confirm that each expected target reports `1`.
A value of `0` means that the Collector couldn't connect to the server,
authenticate, or run `PING` and `INFO`. Use the `server.address` and `server.port`
attributes, and `host.name` on hosts, to identify each target.
2. In Metrics Explorer, run the following query:
```text theme={null}
count by ("host.name", "server.address", "server.port") ({"redis.uptime"})
```
Confirm that the query returns one time series per target.
### Troubleshooting
* A target reports `0` and the Collector logs `NOAUTH Authentication required` or
`WRONGPASS`: The server requires credentials that the Collector didn't send, or the
supplied credentials don't match. Static targets use the integration's `username`
and `password`, and targets that the Collector finds by annotation use the
credentials in their annotations. Servers that the Collector finds by label connect
without credentials, so configure a password-protected server with a CXDOT
integration annotation instead.
* Some metrics are missing from a [Valkey](https://valkey.io/) server: The integration
collects from Valkey, a fork of Redis, on a best-effort basis. Metrics that Valkey
reports differently from Redis might be missing.
* A target reports `0` for a while after the Redis server starts: A server that loads
its dataset from disk at startup rejects `PING` until loading finishes, so the
Collector reports it as unreachable until then.
* Metrics don't carry the server's primary or replica role: The Collector reports the
role once per server, as the `redis.role` metric with a `role` attribute, so
promoting a replica doesn't start new time series for every metric. To filter by
role, join on the server's identity. For example, the following query returns
memory use for primaries only:
```text theme={null}
{"redis.memory.used"} and on ("host.name", "server.address", "server.port") {"redis.role", role="primary"}
```
* Slow log metrics don't include entries from before the Collector started: The
`redis.slowlog.duration` histogram counts each slow log entry once and starts from
the newest entry when the Collector first reads the slow log, after the Redis server
restarts, or after the Collector reaches a different server. Because each collection
reads at most the newest 128 entries, the histogram counts only part of a burst of
more than 128 slow commands within one collection interval.
## Configuration reference
Configure one Redis integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.redis`. In a Collector configuration file,
place them under `cxdot.integrations.redis`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to run the Redis integration. If true, the Collector collects Redis metrics. If false,
the Collector doesn't run this integration.
* **`username`**
Type: `string`. Optional. Default: empty string.
Redis ACL username for connections to the configured targets. Leave empty to authenticate as
the Redis `default` user. Targets that the Collector finds by annotation use the credentials
in their annotations. Targets that the Collector finds by label don't use this setting.
* **`password`**
Type: `string`. Optional.
Redis password for connections to the configured targets: the `requirepass` password, or the
ACL user's password when `username` is set. The Collector reports a target as unreachable when
the target requires a password that the Collector doesn't send. Targets that the Collector
finds by annotation use the credentials in their annotations. Targets that the Collector finds
by label don't use this setting. The Collector masks this value in configuration views,
diagnostic output, and logs.
* **`collection_interval`**
Type: `duration`. Optional. Default: `10s`.
Time between metric collections from each configured target. Use a Go duration string, such as
`10s` or `1m`. Targets that the Collector finds by label use the integration default. Targets
that the Collector finds by annotation use the collection interval their annotations set.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time allowed to collect metrics from one configured Redis target. Use a Go duration
string, such as `10s` or `1m`. The value must not exceed `collection_interval`. Discovered
targets use the timeout from their discovery configuration.
* **`instances`**
Type: `array of object`. Optional. Default: `[]`.
Redis targets. Each entry's `endpoint` is `host:port`, for example, `redis.default.svc:6379`.
Enclose a literal IPv6 address in brackets, such as `[2001:db8::1]:6379`. When this list isn't
empty, the integration collects from exactly these targets instead of discovered targets. On a
host, the integration collects only from this list. In a Redis Cluster, list every node: each
node reports only its own state, and the Collector doesn't discover other nodes from a listed
node.
* **`instances[].endpoint`**
Type: `string`. Required.
Redis target in `host:port` format. Enclose a literal IPv6 address in brackets, such as
`[2001:db8::1]:6379`.
* **`command_stats`**
Type: `boolean`. Optional. Default: `false`.
Whether to collect per-command statistics from configured targets through the
`INFO commandstats` section: the number of calls to each command and the CPU time spent
running it. If true, the Collector reports `redis.cmd.calls` and `redis.cmd.usec`, with one
time series for each command that the server has run. If false, the Collector doesn't report
them. Targets that the Collector finds by annotation use the `command_stats` setting in their
annotations. Targets that the Collector finds by label don't collect these statistics.
* **`collect_client_metrics`**
Type: `boolean`. Optional. Default: `false`.
Whether to count the open connections to each configured target by the name that clients set
with `CLIENT SETNAME`. If true, the Collector runs `CLIENT LIST` at each collection and
reports `redis.clients.connection.count`, counting connections without a name as `unknown`. If
false, the Collector doesn't run `CLIENT LIST` or report `redis.clients.connection.count`. The
`CLIENT LIST` reply grows with the number of connections. Targets that the Collector finds by
annotation use the `collect_client_metrics` setting in their annotations. Targets that the
Collector finds by label don't collect these metrics.
* **`keys`**
Type: `array of string`. Optional. Default: `[]`.
Keys whose lengths the Collector reports as `redis.key.length` for configured targets. Each
entry is a key name or a glob pattern. An entry that contains `*`, `?`, or `[` without a
preceding backslash is a glob pattern. The length is the number of elements in a list, set,
sorted set, hash, or stream, and `1` for a string. Each collection reads every listed key in
every database that holds keys, or only in the database specified by `db` when that setting is
set. A glob pattern scans every key in each database that the Collector reads, so its cost
grows with the number of keys on the server. When a read fails or doesn't finish within
`timeout`, the Collector reports no key lengths for that collection. A listed key that has no
elements in any database reports `0`. A glob pattern that matches nothing in a nonempty
database reports no time series. Targets that the Collector finds by annotation use the `keys`
setting in their annotations. Targets that the Collector finds by label don't collect key
lengths.
* **`db`**
Type: `integer`. Optional. Minimum: `0`.
Number of the database to read `keys` from. If omitted, the Collector reads every database
that holds keys. If this database holds no keys, the Collector reports `0` for every entry in
`keys`. Only `keys` uses this setting, because every other metric covers the whole server.
* **`warn_on_missing_keys`**
Type: `boolean`. Optional. Default: `true`.
Whether to log a warning for each entry in `keys` that has no elements in any database that
the Collector reads. If true, the Collector logs the warning at each collection. If false, the
Collector reports a length of `0` for the entry without logging an entry-specific warning. The
Collector still logs a warning when the Redis keyspace is empty, the selected database holds
no keys, or a key-length read fails.
* **`tls`**
Type: `object`. Optional.
TLS settings for connections to the configured targets. TLS is on when `insecure` is `false`
or the block sets `ca_file` or `ca_pem`. With TLS on, the Collector verifies the server
certificate unless `insecure_skip_verify` is `true`. Targets that the Collector finds by
annotation use the TLS settings in their annotations. Targets that the Collector finds by
label don't use these settings.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the Redis
server certificate. Don't set both `ca_file` and `ca_pem`. If neither is set, the Collector
uses the system certificate authority pool. When `ca_file` is set, the Collector uses only
this file unless `include_system_ca_certs_pool` is `true`.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the Redis server
certificate. Don't set both `ca_pem` and `ca_file`. When `ca_pem` is set, the Collector uses
only these certificates unless `include_system_ca_certs_pool` is `true`.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present to the Redis server. A Redis server
with TLS enabled requires a client certificate unless its `tls-auth-clients` setting is `no`
or `optional`. Set `key_file` or `key_pem` with this setting. Don't set both `cert_file` and
`cert_pem`.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present to the Redis server. Set `key_file` or
`key_pem` with this setting. Don't set both `cert_pem` and `cert_file`.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS 1.0 through 1.2 cipher suites that the Collector can use. The order of the list doesn't
matter, and TLS 1.3 cipher suites aren't configurable. If omitted, the Collector uses the
secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Key exchange mechanisms the Collector can use for TLS handshakes. The order of the list
doesn't matter. The Go TLS library applies its internal preference order to the enabled
mechanisms. Supported values are the elliptic curves `P256`, `P384`, `P521`, and `X25519`, and
`X25519MLKEM768`, a hybrid post-quantum key exchange. If omitted, the Collector uses the Go
TLS library defaults.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to a custom CA
configured with `ca_file` or `ca_pem`. If true, the Collector trusts both the custom CA and
the system pool. If false, the Collector trusts only the custom CA.
* **`tls.insecure`**
Type: `boolean`. Optional. Default: `true`.
Whether to connect to Redis without TLS. If true and neither `ca_file` nor `ca_pem` is set,
the Collector uses an unencrypted connection. If false, or if `ca_file` or `ca_pem` is set,
the Collector connects over TLS.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the Redis server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to machine-in-the-middle attacks. If
false, the Collector verifies the certificate. Applies only when TLS is on.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` or `cert_pem` for mutual
TLS authentication. Don't set both `key_file` and `key_pem`.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_file` or `cert_pem` for mutual TLS
authentication. Don't set both `key_pem` and `key_file`. The Collector masks this value in
configuration views, diagnostic output, and logs.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use: `1.0`, `1.1`, `1.2`, or `1.3`. The value
must be greater than or equal to `min_version`. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use: `1.0`, `1.1`, `1.2`, or `1.3`. The value
must be less than or equal to `max_version`. If omitted, the minimum version is TLS 1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files, as a Go duration string such as
`1m`. If omitted, the Collector doesn't reload file-backed certificate and key material.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the Redis server certificate instead of the endpoint hostname. Use
this setting when the certificate name differs from the endpoint hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key. The Collector masks this value in
configuration views, diagnostic output, and logs.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector uses
the trusted platform module at `tpm.path` with the key material from `key_file` or `key_pem`.
If false, the Collector uses the configured software key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module. The Collector masks this value in
configuration views, diagnostic output, and logs.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
# SNMP
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/snmp
Availability and performance metrics from SNMP network devices.
The SNMP integration requires CXDOT Collector 1.6.0 or greater.
[Simple Network Management Protocol (SNMP)](https://www.rfc-editor.org/rfc/rfc3411)
is a protocol for monitoring network devices. Use the SNMP integration with the
[CXDOT Collector](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector)
to collect availability and performance metrics from SNMP devices.
The SNMP integration supports SNMP v1, v2c, and v3.
The integration polls individual devices. A device profile selects the metrics to collect
from each device: the default `generic-device` profile works with any SNMP device, and
vendor profiles collect hardware metrics from specific devices. The `devices[].profile`
setting in Configuration reference lists every built-in profile. For a device that the
built-in profiles don't cover, write a custom device profile. The integration doesn't scan
network address ranges, receive traps, build network topology or device inventories,
collect network flow records, or run ping checks.
## Supported telemetry types
The SNMP integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The SNMP integration has the following prerequisites:
* Enable SNMP v1, v2c, or v3 on each device.
* Obtain a community string for SNMP v1 or v2c. For SNMP v3, obtain a user name and
the authentication and privacy credentials required by the selected security level.
* Allow the Collector to reach each device over User Datagram Protocol (UDP) on its
SNMP port, which is `161` by default.
## Configure
The SNMP integration is enabled by default. You can configure targets either by listing
static devices in your Helm values or by annotating SNMP agent pods in your Kubernetes
cluster. To configure the SNMP integration, follow these steps:
1. To poll specific network devices, configure static targets by adding a device list
to the `values.yaml` file for your CXDOT Collector Helm chart. Include the port in
every endpoint, such as `router.example.com:161` for the standard SNMP port. The
[cluster-tier Collector](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture)
polls static devices, so set `SNMP_COMMUNITY` in its environment through
`clusterCollector.extraEnv`. For example:
```yaml theme={null}
clusterCollector:
extraEnv:
- name: SNMP_COMMUNITY
valueFrom:
secretKeyRef:
name: snmp-credentials
key: community
collection:
cxdot:
integrations:
snmp:
devices:
- endpoint: router.example.com:161
version: v2c
community: "${env:SNMP_COMMUNITY}"
- endpoint: idrac.example.com:161
profile: idrac
version: v2c
community: "${env:IDRAC_SNMP_COMMUNITY}"
```
The `"${env:SNMP_COMMUNITY}"` value reads the community string from the
`SNMP_COMMUNITY` environment variable in the Collector environment, so the string
doesn't appear in `values.yaml`. In this example, `clusterCollector.extraEnv`
sets that variable from the `community` key of a Kubernetes Secret named
`snmp-credentials`. Create that Secret in the CXDOT Collector namespace before you
apply `values.yaml`, or use your deployment's secret management to set
`SNMP_COMMUNITY` and `IDRAC_SNMP_COMMUNITY` in the cluster-tier Collector
environment. For SNMP v3, provide `auth_password` and `privacy_password` the
same way.
Set `profile` for each device that needs a vendor profile. The integration polls
exactly the devices in this list and doesn't process annotations for this
integration instance.
2. Optional: To poll SNMP agents that run in pods, such as containerized network
functions, add a CXDOT integration annotation to the pod template. The annotation key
must end with the container name, and its value can reference the community string in
a Kubernetes Secret in the same namespace. For example, add the following annotation
to your workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/vrouter: |
schema_version: v1.14
snmp:
devices:
- endpoint: ${target.host}:161
version: v2c
community: ${k8s_secret:snmp-credentials/community}
spec:
containers:
- name: vrouter
image: registry.example.com/network/vrouter:1.0
ports:
- name: snmp
containerPort: 161
protocol: UDP
```
The Collector replaces `${target.host}` with the pod IP address and
`${k8s_secret:snmp-credentials/community}` with the `community` key of the
`snmp-credentials` Secret. Because port references resolve only to TCP ports, specify
the UDP port (`161`) directly in `endpoint`. A device without `profile` uses the
`generic-device` profile. To allow the Collector to read the Secret, add the pod's
namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for your
CXDOT Collector.
3. Optional: Poll a device with a custom device profile. Write the profile as Custom
device profiles describes, then store it in a ConfigMap in the namespace where your
CXDOT Collector runs. For example, create a ConfigMap from a profile file named
`hpe-ilo.yaml`:
```shell theme={null}
kubectl create configmap snmp-profiles --namespace=NAMESPACE --from-file=hpe-ilo.yaml
```
Replace `NAMESPACE` with the namespace of your CXDOT Collector.
4. Optional: Mount the custom device profiles and select them. The cluster-tier
Collector polls static devices, so mount the ConfigMap into it with the chart's
`clusterCollector.extraVolumes` and `clusterCollector.extraVolumeMounts` values. Set
`profile_paths` to the mount path, and set each device's `profile` to the name of its
custom profile. For example, add the following to the `values.yaml` file for your
CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
snmp:
profile_paths:
- /etc/cxdot-collector/snmp/profiles
devices:
- endpoint: ilo.example.com:161
profile: hpe-ilo
version: v2c
community: "${env:ILO_SNMP_COMMUNITY}"
clusterCollector:
extraVolumes:
- name: snmp-profiles
configMap:
name: snmp-profiles
extraVolumeMounts:
- name: snmp-profiles
mountPath: /etc/cxdot-collector/snmp/profiles
readOnly: true
```
The CXDOT Collector reads a custom profile when it starts polling a device. After you
change a profile, restart the cluster-tier Collector pods.
5. Optional: Configure a second integration instance to poll static targets and
annotated targets together. For example, add the following to the `values.yaml`
file for your CXDOT Collector Helm chart, and set `SNMP_COMMUNITY` in the
cluster-tier Collector environment as shown in the first step:
```yaml theme={null}
collection:
cxdot:
integrations:
snmp:
devices:
- endpoint: router.example.com:161
version: v2c
community: "${env:SNMP_COMMUNITY}"
snmp/discovered: {}
```
The bare `snmp` key defines the static target instance. The `snmp/discovered` key
defines a named instance that polls annotated targets.
The CXDOT Collector polls only the devices that you list or annotate. It doesn't scan
address ranges or discover other network devices. For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the SNMP integration, follow these steps:
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=snmp`
Confirm that one time series appears for each device, identified by the
`server.address` and `server.port` labels. A device that returns SNMP values reports
`1`, and any other device reports `0`.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
{"snmp.ifNumber", "cxdot.integration.name"="snmp"}
```
Confirm that the query reports the interface count of each device that reports `1`
in the previous step and uses the `generic-device` profile. For a device with another
profile, query one of that profile's metrics instead.
### Troubleshooting
* A device with a custom device profile reports `cxdot.integration.target.health` as
`1` but no other metrics: The CXDOT Collector couldn't load the profile, and its log
has a `failed to start receiver` error that names the profile file and the problem.
Fix the profile, then restart the cluster-tier Collector pods.
## Custom device profiles
A custom device profile is a YAML file that defines the metrics to collect from a device,
and the SNMP Object Identifier (OID) to read each value from. Name the file after the
profile it defines, such as `hpe-ilo.yaml` for a profile named `hpe-ilo`. For a static
device, a custom profile with the same name as a built-in profile replaces the built-in
profile. The CXDOT Collector rejects a profile that contains a field it doesn't recognize.
The following profile collects the thermal condition of a Hewlett Packard Enterprise
ProLiant server, and the power output and maximum power output of each of its power
supplies:
```yaml theme={null}
name: hpe-ilo
resource_attributes:
host.name:
scalar_oid: 1.3.6.1.2.1.1.5.0
missing_value: empty
device.manufacturer:
value: hpe
metrics:
snmp.hpe.thermal_condition:
description: Overall thermal condition of the server.
unit: "1"
gauge:
value_type: int
hw.power_supply.usage:
description: Current power output of the power supply.
unit: W
sum:
value_type: int
hw.power_supply.limit:
description: Maximum power output of the power supply.
unit: W
sum:
value_type: int
scalars:
- metric: snmp.hpe.thermal_condition
oid: 1.3.6.1.4.1.232.6.2.6.1.0
tables:
- name: cpqHeFltTolPowerSupplyTable
attributes:
hw.id:
indexed_value_prefix: power_supply
snmp.hpe.power_supply_chassis:
index_component: 1
snmp.hpe.power_supply_bay:
index_component: 2
columns:
- metric: hw.power_supply.usage
oid: 1.3.6.1.4.1.232.6.2.9.3.1.7
- metric: hw.power_supply.limit
oid: 1.3.6.1.4.1.232.6.2.9.3.1.8
static_attributes:
hw.limit_type: max
```
Name metrics and attributes after OpenTelemetry semantic conventions where they apply,
such as `hw.power_supply.usage` and `hw.id`, and otherwise under a vendor namespace, such
as `snmp.hpe.`. For a metric that OpenTelemetry defines, also use the type and unit it
defines. If you're moving from another SNMP agent, you can keep the names that agent used
so that existing dashboards and alerts keep working.
A profile contains these fields:
* `name`: Required. The name of the profile, which matches the filename without its
`.yaml` extension. A name contains lowercase letters and digits, separated by single
hyphens or underscores.
* `resource_attributes`: Attributes that every metric from the device carries, keyed by
attribute name. Each attribute sets a fixed `value`, or reads a `scalar_oid` and sets
`missing_value` for a device that doesn't report the OID. The `empty` value keeps the
attribute with an empty value, `omit` leaves the attribute out, and `error` drops the
device's data points. The CXDOT Collector adds `snmp.profile.name`, set to the
profile name, so a profile can't set it.
* `metrics`: Every metric the profile collects, keyed by metric name. Each metric has a
`description`, a `unit` in Unified Code for Units of Measure (UCUM) notation, such as
`By` or `W`, and one of `gauge` or `sum`. A gauge reports each value as the device
reports it. A sum reports a total. It sets `monotonic: true` for a running total that
never decreases, such as an SNMP counter, and leaves `monotonic` unset for a total that
can decrease, such as the power output that `hw.power_supply.usage` reports. Both set
`value_type` to `int` or `double`.
* `scalars`: Values that a device reports once, rather than once per table row. Each
scalar reads its `oid` into its `metric`.
* `tables`: Columns of an SNMP table, which report one value per table row. Each table
has a `name`, the `columns` to read, and the `attributes` that identify each row. Each
column reads its `oid` into its `metric`, and the metric's data point for each row
carries every attribute of the table. Instead of `oid`, a column can set
`constant_value` and `presence_oids`, which lists other columns by their OID. The
column then reports `constant_value` for every row that any of those columns reports,
such as `1` for each power supply that a table lists.
A table attribute reads one of the following values for each row:
* `oid`: The row's value in another column, from this table or from another table with
the same index.
* `index_component`: One dot-separated component of the row index, counting from `1`.
For a table indexed by chassis and bay, row `0.3` has component `1` equal to `0` and
component `2` equal to `3`.
* `indexed_value_prefix`: The row index, appended to the prefix this field sets.
An attribute can also set `value_map` to translate each value it reads, such as
`{"1": up, "2": down}`, and must then set `unknown_value` to `keep`, `omit`, or `error`
for a value the map doesn't list. The `error` value drops the row's data point.
An attribute that reads an `oid` can also set `format` to report an address that a
column stores as an `OCTET STRING`, such as a column of type `MacAddress` or `PhysAddress`,
or an `InetAddress` column whose rows are IPv4 or IPv6 addresses. The `mac_address`
format reports a colon-separated Media Access Control (MAC) address, such as
`d0:94:66:a1:b2:c3`, and `ip_address` reports an IPv4 or IPv6 address, such as
`10.0.0.1`. A `value_map` matches the formatted value. A row that reports any other type
has no value for the attribute. A column of type `IpAddress` already reports an address,
so leave `format` off its attribute.
When a row has no value for an attribute, the CXDOT Collector drops the row's data
point, unless the attribute sets `optional: true`, which leaves out only the attribute.
Every table needs at least one attribute that isn't optional, and together the attributes
that aren't optional must be unique for each row. One component of a row index can repeat
across rows, so read every component, or read the whole index with `indexed_value_prefix`,
as `hw.id` does in the example. Rows that share every attribute value produce duplicate
data points.
A scalar or column can set `static_attributes` to add fixed attributes to its data
points, such as `hw.limit_type: max` in the example. When several scalars or columns
collect the same metric, set different `static_attributes` on each one, such as
`direction: receive` and `direction: transmit`, so that their data points stay distinct.
## Configuration reference
Configure one SNMP integration instance with the following settings. In Helm values, place these
settings under `collection.cxdot.integrations.snmp`. In a Collector configuration file, place
them under `cxdot.integrations.snmp`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`devices`**
Type: `array of object`. Optional. Default: `[]`.
Network devices to poll. Each endpoint is `host:port`; include port 161 explicitly for the
standard SNMP UDP endpoint.
* **`devices[].auth_password`**
Type: `string`. Optional.
Authentication password for SNMP v3. Required when `security_level` is `auth_no_priv` or
`auth_priv`.
* **`devices[].auth_type`**
Type: `string`. Optional.
Authentication protocol for SNMP v3. Required when `security_level` is `auth_no_priv` or
`auth_priv`. Allowed values: `MD5`, `SHA`, `SHA224`, `SHA256`, `SHA384`, `SHA512`.
* **`devices[].community`**
Type: `string`. Optional.
Community string for SNMP v1 or v2c.
* **`devices[].context_name`**
Type: `string`. Optional.
SNMP context name for an SNMP v3 device.
* **`devices[].endpoint`**
Type: `string`. Required.
Device address as `host:port`, such as `router.example.com:161`. The port is required,
including the standard SNMP port `161`. The Collector polls the address over UDP.
* **`devices[].namespace`**
Type: `string`. Optional. Default: `default`. Minimum length: `1`.
Network Device Monitoring namespace of the device, the first half of its `device.id`
(`:`). Distinguishes devices that share an address in separate networks.
* **`devices[].privacy_password`**
Type: `string`. Optional.
Privacy password for private SNMP v3.
* **`devices[].privacy_type`**
Type: `string`. Optional.
Privacy protocol for SNMP v3. Required when `security_level` is `auth_priv`. Allowed values:
`DES`, `AES`, `AES192`, `AES192C`, `AES256`, `AES256C`.
* **`devices[].profile`**
Type: `string`. Optional. Default: `generic-device`.
Device profile that selects the metrics to collect from this device: the name of a custom
profile in `profile_paths`, or of a built-in profile. A name contains lowercase letters and
digits, separated by single hyphens or underscores. Built-in values:
* `apc-pdu`: APC rack power distribution units. Collects power distribution metrics, such as
load and status for phases, banks, and outlets, along with temperature and humidity sensor
readings.
* `cisco-asr`: Cisco ASR routers. Collects the standard network metrics of `generic-device`
and BGP peer statistics, along with CPU and memory usage and hardware health such as power
supply, fan, and temperature status.
* `cisco-catalyst`: Cisco Catalyst switches. Collects the standard network metrics of
`generic-device` and BGP peer statistics, along with CPU and memory usage, interface queue
drops, hardware health such as power supply, fan, and temperature status, and sensor
readings.
* `cisco-isr`: Cisco ISR routers. Collects the standard network metrics of `generic-device`
and BGP peer statistics, along with CPU and memory usage and hardware health such as power
supply, fan, and temperature status.
* `cisco-nexus`: Cisco Nexus switches. Collects the standard network metrics of
`generic-device` and BGP peer statistics, along with CPU and memory usage, hardware health
such as power supply, fan, and temperature status, and sensor readings.
* `generic-device`: Any SNMP device. Collects standard network metrics, such as interface
traffic and errors, along with IP, TCP, and UDP statistics.
* `idrac`: Dell PowerEdge servers with an integrated Dell Remote Access Controller. Collects
hardware health metrics, such as power supply, cooling, temperature, and disk status.
* **`devices[].security_level`**
Type: `string`. Optional.
Authentication and privacy level for SNMP v3. Required when `version` is `v3`. The
`auth_no_priv` level also requires `auth_type` and `auth_password`. The `auth_priv` level
requires those settings plus `privacy_type` and `privacy_password`. Allowed values:
`no_auth_no_priv`, `auth_no_priv`, `auth_priv`.
* **`devices[].user`**
Type: `string`. Optional.
User name for SNMP v3. Required when `version` is `v3`.
* **`devices[].version`**
Type: `string`. Required.
SNMP protocol version the Collector uses to poll the device. Allowed values: `v1`, `v2c`,
`v3`.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
Time between SNMP polls of each device in `devices`. Annotated devices take their polling
interval from their annotations instead.
* **`timeout`**
Type: `duration`. Optional. Default: `15s`.
Maximum time for one poll of a device in `devices`, including retried SNMP requests. The value
must not exceed `collection_interval`. When less than `request_timeout` remains before this
deadline, the Collector shortens the wait for the next request to fit the remaining time.
* **`request_timeout`**
Type: `duration`. Optional. Default: `2s`.
Time to wait for a response to one SNMP request from a device in `devices`. The Collector
retries a request that gets no response up to `retries` times, within the limit that `timeout`
sets. The Collector doesn't retry a request that reads more table columns at once than the
device has answered before. When such a request gets no response, the Collector reads those
columns again in smaller requests. Annotated devices take this value from their annotations
instead.
* **`retries`**
Type: `integer`. Optional. Default: `3`. Minimum: `0`.
Number of times to retry an SNMP request that timed out before abandoning it. The Collector
doesn't retry a request that reads more table columns at once than the device has answered
before, and reads those columns again in smaller requests instead.
* **`oid_batch_size`**
Type: `integer`. Optional. Default: `5`. Minimum: `1`. Maximum: `60`.
Maximum number of object identifiers in one SNMP request to a device in `devices`. A request
for table rows from an SNMP v2c or v3 device reads up to this many table columns at once. When
the device doesn't answer such a request within `request_timeout`, or answers only part of it,
the Collector reads the same columns again in smaller requests during the same poll. When the
device answers such a request with an error, the Collector reads each of those columns in
requests of its own. A poll reads table columns in more than one pass. When the device answers
a request at the current size and a pass finishes within `timeout`, later requests read one
more column, up to this value. Requests don't grow to a size that failed twice since the
Collector last cleared its failure counts, which it does every hour. A value of `1` reads each
table column in requests of its own, for a device that fails every request for several
columns. Annotated devices take this value from their annotations instead.
* **`bulk_max_repetitions`**
Type: `integer`. Optional. Default: `10`. Minimum: `1`. Maximum: `2147483647`.
Maximum number of rows of each table column that one SNMP request reads from an SNMP v2c or v3
device in `devices`. A higher value reads a table in fewer requests, and makes each response
larger and slower for the device to build. Lower it for a device that doesn't answer requests
for one column within `request_timeout`. Annotated devices take this value from their
annotations instead.
* **`profile_paths`**
Type: `array of string`. Optional. Default: `[]`.
Directories and files that contain custom device profiles. For a device whose `profile` is
``, the CXDOT Collector reads `.yaml` from the first of these paths that has it,
before the built-in profiles. A directory is searched for that file, a file is used only when
its name matches, and a path that doesn't exist is skipped.
# Apache Spark
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/spark
Apache Spark application metrics read from a driver's REST API, including executor memory and task throughput, garbage collection, shuffle volume, and persisted RDD storage.
The Apache Spark integration requires CXDOT Collector 1.4.0 or greater.
[Apache Spark](https://spark.apache.org/) is a unified engine for large-scale data
analytics. Use the Apache Spark CXDOT Collector integration to collect app, job,
stage, executor, storage, and streaming metrics from Spark drivers running in your
environment.
The Apache Spark CXDOT Collector integration supports Apache Spark 3.4.0 or greater.
## Supported telemetry types
The Apache Spark CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Apache Spark CXDOT Collector integration has the following prerequisites:
* Make the driver web interface for each Spark app reachable from the CXDOT
Collector. Point targets at app driver web interfaces, not Spark standalone
masters, Apache Hadoop Yet Another Resource Negotiator (YARN) ResourceManagers,
or Apache Mesos masters.
* To collect Structured Streaming query metrics, set
`spark.sql.streaming.metricsEnabled` to `true` for the app. Spark then
[reports each query's metrics](https://spark.apache.org/docs/latest/streaming/apis-on-dataframes-and-datasets.html#reporting-metrics-using-dropwizard)
through the metrics endpoint that the driver web interface serves at
`/metrics/json` by default. If your apps serve that endpoint at another path,
set `metrics_servlet_path` to match. Apps that use Spark Streaming report their
streaming statistics without any setting. To stop collecting both kinds of
streaming metrics, set `streaming_metrics` to `false`.
* To collect the peak memory of each driver's and executor's process tree, set
[`spark.executor.processTreeMetrics.enabled`](https://spark.apache.org/docs/latest/monitoring.html#executor-metrics)
to `true` for the app.
## Configure
The Apache Spark integration is enabled by default. You can configure targets either by
annotating driver pods in your Kubernetes cluster or by listing static endpoints in your
Helm values. To configure the integration, follow these steps:
1. To collect from Spark driver pods in Kubernetes, add a CXDOT integration annotation
to the pod template. The annotation key must end with the container name. For
example, add the following annotation to your Spark driver:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/spark: |
schema_version: v1.14
spark:
endpoints:
- endpoint: ${target.host}:${target.port.ui}
spec:
containers:
- name: spark
image: apache/spark:3.5.3
ports:
- name: ui
containerPort: 4040
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.ui}` with the container port named `ui`.
The Collector also discovers Spark driver pods labeled `spark-role=driver` that
expose port `4040`. A CXDOT integration annotation takes precedence over the label
for its container. To stop collecting from a container, set `spark: {enabled: false}`
in the annotation. Metrics from each discovered driver pod include that pod's
Kubernetes metadata. For more information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
2. Optional: To collect from Spark apps outside your Kubernetes cluster, configure
static driver targets. A non-empty `endpoints` list turns off discovery for that
integration instance, and the Collector collects only the listed targets. To
run discovery and static targets together, add a named integration instance. For
example, add the following to the `values.yaml` for the CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
spark: {}
spark/external:
endpoints:
- endpoint: "spark-driver.example.com:4040"
```
The empty `spark` entry keeps discovery active. `spark/external` is an
independent, named instance that collects from the listed driver.
To disable the default Spark integration instance, set `enabled` to `false`. For
example, add the following to the `values.yaml` for the CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
spark:
enabled: false
```
### Validate
To validate the Apache Spark CXDOT Collector integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=spark`. Confirm the metric reports `1` for each Spark
target. The `cxdot.integration.check` label has the value `spark`, and
`cxdot.integration.target` identifies the driver.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
count by ("server.address", "server.port", "spark.application.name") ({"spark.executor.task.assigned"})
```
Confirm the query returns a value for each active Spark app.
### Troubleshooting
* No app metrics appear for a standalone master, YARN ResourceManager, or
Apache Mesos master: Configure each app's driver web interface as a target.
The integration doesn't use cluster managers to discover apps.
## Configuration reference
Configure one Apache Spark integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.spark`. In a Collector configuration
file, place them under `cxdot.integrations.spark`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Spark integration instance. If true, the Collector runs the instance.
If false, the Collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Spark app driver web interface targets. When this list is empty or omitted, the integration
uses automatic target discovery. When the list contains targets, this integration instance
collects from exactly those targets and doesn't automatically discover targets. Configure a
second named instance to use both methods. Specify each target as `host:port` to use HTTP, or
as a full HTTP or HTTPS URL. The URL must identify the web interface root and must not include
a Spark REST API path. Configure app driver web interfaces only. The integration doesn't
discover apps through cluster managers.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Spark app driver web interface target as `host:port` or a full HTTP or HTTPS URL. For
`host:port`, the Collector uses HTTP.
* **`endpoints[].cluster_name`**
Type: `string`. Optional.
Name of the Spark cluster the driver belongs to, reported as the `spark.cluster.name`
attribute. When omitted, the attribute is not set.
* **`application_names`**
Type: `array of string`. Optional. Default: `[]`.
Spark app names to collect from each target. When the list is empty, the Collector collects
every app reported by the target.
* **`metrics_servlet_path`**
Type: `string`. Optional. Default: `/metrics/json`.
Path of the JSON metrics endpoint on each target's driver web interface, where Spark publishes
Structured Streaming query metrics. Change it only for apps that move the endpoint with the
`spark.metrics.conf.*.sink.servlet.path` Spark setting. When a target answers this path with
HTTP 404, the Collector collects no Structured Streaming metrics from it.
* **`streaming_metrics`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect Spark Streaming and Structured Streaming metrics. When `false`, the
Collector doesn't request either streaming endpoint, so a target whose JSON metrics endpoint
returns errors no longer reports failed collections.
* **`collection_interval`**
Type: `duration`. Optional. Default: `30s`.
How often the Collector collects metrics from each Spark target.
* **`timeout`**
Type: `duration`. Optional. Default: `30s`.
Maximum time allowed to collect metrics from one Spark target. The value must not exceed
`collection_interval`.
* **`tls`**
Type: `object`. Optional.
TLS certificate and client authentication settings for HTTPS connections to Spark targets.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to the CA cert. For a client this verifies the server certificate. For a server this
verifies client certificates. If empty uses system root CA. (optional)
* **`tls.ca_pem`**
Type: `string`. Optional.
In memory PEM encoded cert. (optional)
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the TLS cert to use for TLS required connections. (optional)
* **`tls.cert_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS cert to use for TLS required connections. (optional)
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a
safe default list is used. See
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go)
for a list of supported cipher suites.
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
contains the elliptic curves that will be used in an ECDHE handshake, in preference order
Defaults to empty list and "crypto/tls" defaults are used, internally.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
If true, load system CA certificates pool in addition to the certificates configured in this
struct.
* **`tls.insecure`**
Type: `boolean`. Optional.
In gRPC and HTTP when set to true, this is used to disable the client transport security. See
[https://godoc.org/google.golang.org/grpc#WithInsecure](https://godoc.org/google.golang.org/grpc#WithInsecure)
for gRPC. Please refer to
[https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for more
information. (optional, default false)
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
InsecureSkipVerify will enable TLS but not verify the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the TLS key to use for TLS required connections. (optional)
* **`tls.key_pem`**
Type: `string`. Optional.
In memory PEM encoded TLS key to use for TLS required connections. (optional)
* **`tls.max_version`**
Type: `string`. Optional.
MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls
for defaults. (optional)
* **`tls.min_version`**
Type: `string`. Optional.
MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used.
(optional)
* **`tls.reload_interval`**
Type: `duration`. Optional.
ReloadInterval specifies the duration after which the certificate will be reloaded If not set,
it will never be reloaded (optional)
* **`tls.server_name_override`**
Type: `string`. Optional.
ServerName requested by client for virtual hosting. This sets the ServerName in the TLSConfig.
Please refer to [https://godoc.org/crypto/tls#Config](https://godoc.org/crypto/tls#Config) for
more information. (optional)
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module configuration
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.
# Microsoft SQL Server
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/sqlserver
Microsoft SQL Server workload, memory, lock, transaction, database, file, and backup metrics.
The Microsoft SQL Server integration requires CXDOT Collector 1.13.0 or greater.
[Microsoft SQL Server](https://www.microsoft.com/en-us/sql-server) is a relational
database management system. Use the Microsoft SQL Server integration to collect
throughput, memory, lock, transaction log, and database file metrics from SQL
Server instances running in your environment.
The Microsoft SQL Server integration supports SQL Server 2017 or greater.
## Supported telemetry types
The Microsoft SQL Server integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Microsoft SQL Server integration has the following prerequisites:
* Find the TCP port of each SQL Server instance. The Collector connects to a host and
port, and doesn't resolve named instances through SQL Server Browser. A default
instance listens on port `1433`. A named instance often uses a dynamic port, so
[configure it to listen on a fixed port](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-server-to-listen-on-a-specific-tcp-port).
In SQL Server Configuration Manager, open the TCP/IP properties of the instance's
network configuration and enable the protocol if it's disabled. On the
**Protocol** tab, confirm that **Listen All** is **Yes** so that the **IPAll**
settings apply. Under **IPAll** on the **IP Addresses** tab, clear
**TCP Dynamic Ports**, set **TCP Port**, and restart the instance.
To find the port of an instance, connect to it over TCP as an administrator with a
SQL client, such as `sqlcmd -S tcp:\ -U -C`, and run
the following query. The `-C` option trusts the instance's certificate only for
this lookup. Current versions of `sqlcmd` otherwise reject the certificate that
SQL Server generates for itself.
```sql theme={null}
SELECT local_tcp_port FROM sys.dm_exec_connections WHERE session_id = @@SPID;
```
* Make that port reachable from the CXDOT Collector. On Windows, allow it inbound
through Windows Firewall. For example, run the following command in an elevated
PowerShell session on the SQL Server host:
```powershell theme={null}
New-NetFirewallRule -DisplayName 'SQL Server 1433' -Direction Inbound -Protocol TCP -LocalPort 1433 -Action Allow
```
* Enable SQL Server authentication on each instance. The Collector signs in with a
login name and password, so an instance that allows only Windows authentication
refuses the connection. To see which mode an instance uses, run the following
query, which returns `1` when the instance allows only Windows authentication:
```sql theme={null}
SELECT SERVERPROPERTY('IsIntegratedSecurityOnly');
```
To change the authentication mode, see
[change server authentication mode](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/change-server-authentication-mode).
The change takes effect only after you restart the instance, so plan it for a
maintenance window.
* Create a SQL Server login for the CXDOT Collector. On each SQL Server instance,
connect as a login that can create logins and database users and grant server and
database permissions, such as a member of the `sysadmin` fixed server role, and run
the following statements:
```sql theme={null}
USE master;
IF SUSER_ID('cxdot') IS NULL CREATE LOGIN cxdot WITH PASSWORD = '';
GRANT VIEW SERVER PERFORMANCE STATE TO cxdot;
GRANT VIEW ANY DEFINITION TO cxdot;
USE msdb;
IF DATABASE_PRINCIPAL_ID('cxdot') IS NULL CREATE USER cxdot FOR LOGIN cxdot;
GRANT SELECT ON dbo.backupset TO cxdot;
```
Replace `cxdot` with the login name and `` with a password for your
environment. The statements skip a login or user that already exists, so you can
run them again to add a grant. SQL Server 2019 and earlier don't have the
`VIEW SERVER PERFORMANCE STATE` permission. On those versions, grant
`VIEW SERVER STATE` instead. The `msdb` user lets the Collector read backup
history. SQL Server allows access to the backup history by default. The
`GRANT SELECT` on `dbo.backupset` preserves that access on an instance where the
default access has been removed.
Give the Collector a login of its own rather than one that another monitoring tool
also uses. The Collector signs in at every collection, so a wrong or rotated
password causes several failed sign-ins a minute on each instance. For a login
created with its password policy enforced (`CHECK_POLICY = ON`), those repeated
failures lock the login and prevent every tool that shares it from signing in.
Test the password with a SQL client before you configure it.
If you configure the integration to report files and index usage for a database
other than `master`, also create a user for the login in that database:
```sql theme={null}
USE ;
IF DATABASE_PRINCIPAL_ID('cxdot') IS NULL CREATE USER cxdot FOR LOGIN cxdot;
```
Replace `` with the configured database.
## Configure
The Microsoft SQL Server integration is enabled by default. It collects metrics only
from the SQL Server instances you identify, through annotations on their pods and
Services or through a list of static targets. Follow the instructions for your CXDOT
Collector deployment: the Helm chart on Kubernetes or direct installation on each
SQL Server host.
### Configure on Kubernetes
To configure the Microsoft SQL Server integration on Kubernetes, follow these steps:
1. To collect from SQL Server pods in Kubernetes, add a CXDOT integration annotation to
the pod template. The annotation key must end with the container name, and its value
can reference credentials stored in a Kubernetes Secret in the same namespace. For
example, add the following annotation to your SQL Server workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/mssql: |
schema_version: v1.14
sqlserver:
instances:
- endpoint: ${target.host}:${target.port.mssql}
username: cxdot
password: ${k8s_secret:sqlserver-credentials/password}
spec:
containers:
- name: mssql
image: mcr.microsoft.com/mssql/server:2022-latest
ports:
- name: mssql
containerPort: 1433
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.mssql}` with the container port named `mssql`, and
`${k8s_secret:sqlserver-credentials/password}` with the `password` key of the
`sqlserver-credentials` Secret. To allow the Collector to read the Secret, add the
pod's namespace to `apiServer.metadataServer.secretAllowlist` in the Helm values for
your CXDOT Collector.
The Collector verifies the server certificate for an annotated target as it does for
a static target. To accept a self-signed certificate generated by SQL Server, add
`tls: {insecure_skip_verify: true}` to the annotation, or configure a custom
certificate authority as the encryption step describes. If the annotation sets
`tls.ca_file`, you must also allow that path under
`collection.cxdot.integrations.discovery.kubernetes.annotation_restrictions.allowed_collector_file_paths`
in your Collector Helm values.
2. Optional: To collect from SQL Server instances running outside your Kubernetes
cluster, configure static targets instead of annotated targets. Supply the password
through your deployment's secret management and expose it on the cluster-tier
CXDOT Collector through `clusterCollector.extraEnv`. For example, add the
following to the Helm values file for your CXDOT Collector:
```yaml theme={null}
clusterCollector:
extraEnv:
- name: SQLSERVER_PASSWORD
valueFrom:
secretKeyRef:
name: sqlserver-credentials
key: password
collection:
cxdot:
integrations:
sqlserver:
instances:
- endpoint: mssql.example.com:1433
username: cxdot
password: "${env:SQLSERVER_PASSWORD}"
```
Every static target uses the same `username` and `password`. When you configure
static targets, this integration instance collects from exactly those targets
and stops collecting from annotated targets. The Collector sets `server.address` to
the exact host string in `endpoint`, including its case. Use the same spelling and
capitalization that your dashboards and monitors use in their filters, such as the
`host` value in a Datadog annotation.
Collect each SQL Server instance from exactly one Collector. One Collector can
list every instance on a host, or on several hosts. Two Collectors that collect
the same instance report it twice under the same `server.address`, so a query
that sums by `server.address` counts the instance twice. In an Always On availability
group, list each replica by its own host name rather than by the group's
listener, which follows the primary replica.
3. Optional: Configure encryption for static targets. By default, the Collector
encrypts each connection and verifies that a certificate authority it trusts
issued the server certificate for the host name in the endpoint. SQL Server
generates a certificate for itself when none is configured, and that certificate
can't pass verification. SQL Server 2017 and earlier generate a new one at every
start, and about half of them carry a negative serial number, which the Collector
accepts. Install a certificate issued for the server's host name
on each instance, or set `tls.insecure_skip_verify` to `true` to accept any
certificate. If the system that runs the Collector doesn't trust the certificate
authority that issued the server certificate, set `tls.ca_file` to a file that
holds the authority's certificate. Mount the file into the cluster Collector from
a Secret with `clusterCollector.extraVolumes` and
`clusterCollector.extraVolumeMounts`. For example:
```yaml theme={null}
collection:
cxdot:
integrations:
sqlserver:
instances:
- endpoint: mssql.example.com:1433
username: cxdot
password: "${env:SQLSERVER_PASSWORD}"
tls:
ca_file: /etc/sqlserver-ca/ca.crt
```
Every static target uses the same `tls` settings. The Collector accepts TLS 1.2
or later by default, so a server that can't negotiate TLS 1.2, such as one that
hasn't received the update that adds it, fails the handshake. Setting
`tls.min_version` to `"1.0"`, with `tls.insecure_skip_verify` set to `true` when
the server certificate can't be verified, might let the Collector connect to such
a server. The durable fix is to enable TLS 1.2 on the server. An endpoint can use
a host alias or an availability group listener name while the server certificate
names the host itself. For such a target, create a separate integration instance
and set `tls.server_name_override` to the name in the certificate. The separate
instance limits the override to targets whose certificates carry that name.
4. Optional: Collect from annotated targets and static targets at the same time by
adding a second instance of the integration. A key in the form
`sqlserver/` defines another instance with its own settings. For example,
the following Helm values keep annotated targets under `sqlserver` and collect
from static targets under `sqlserver/external`:
```yaml theme={null}
collection:
cxdot:
integrations:
sqlserver: {}
sqlserver/external:
instances:
- endpoint: mssql.example.com:1433
username: cxdot
password: "${env:SQLSERVER_PASSWORD}"
```
5. Optional: Report the files and index usage of a database other than `master` for
static targets. Regardless of this setting, the Collector reports server-wide
metrics and the state and backup count of every database. On a secondary replica
of an Always On availability group whose databases aren't readable, keep `master`.
The Collector switches to the configured database at every collection. If the
replica doesn't allow the Collector to read that database, the switch fails, the
file and index usage metrics are missing, and the Collector logs an error. For
example:
```yaml theme={null}
collection:
cxdot:
integrations:
sqlserver:
database: sales
```
6. Optional: Change how often the Collector reads backup counts and index usage from
static targets. Both reads run during the first collection and then every five
minutes by default, independently of `collection_interval`, because their cost
grows with the backup history and number of indexes. Between reads, the Collector
reports the most recent values at every collection. If a read fails, the Collector
retries it at the next interval. The `timeout` setting limits how long a collection
from one target can run. On an instance with a large `msdb` backup history, the
backup read can consume most of the timeout. Metrics that the Collector reads
afterward are then missing from that collection. On such an instance, raise
`timeout`, or raise `backup_collection_interval` so that the read runs less often.
For example:
```yaml theme={null}
collection:
cxdot:
integrations:
sqlserver:
backup_collection_interval: 15m
index_usage_collection_interval: 10m
```
7. Optional: Disable the integration. For example:
```yaml theme={null}
collection:
cxdot:
integrations:
sqlserver:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Configure on a host
To configure the Microsoft SQL Server integration on a host outside Kubernetes, such
as a Windows server that runs SQL Server, follow these steps:
1. Install the CXDOT Collector on each SQL Server host. For the operating system
versions that the Collector supports, see
[install the CXDOT Collector on Windows](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/windows)
or
[install the CXDOT Collector on Linux](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/linux).
2. List the local instance as a static target. Run the Collector in host mode. For
example, add the following to the Collector configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
sqlserver:
username: cxdot
password: "${env:SQLSERVER_PASSWORD}"
instances:
- endpoint: localhost:1433
```
The example reads the password from the Collector process's `SQLSERVER_PASSWORD`
environment variable. On a host, the integration collects only from the
instances in `instances`. The endpoint can name `localhost` or the host's own name.
The Collector reports the host from the endpoint as `server.address`. For
`localhost` and other loopback endpoints, it reports the host's name as
`server.address`. It also adds the host's name as `host.name` to every metric.
When the Collector runs as a Windows service, set `SQLSERVER_PASSWORD` as a
machine-scoped environment variable and restart the service. The service doesn't
inherit variables from an interactive session. For example, from an elevated
PowerShell session:
```powershell theme={null}
[Environment]::SetEnvironmentVariable('SQLSERVER_PASSWORD', '', 'Machine')
Restart-Service cxdot-collector
```
The Collector never signs in as the Windows account that runs it. It signs in
with the SQL Server login in `username`.
3. Optional: Configure encryption. As on Kubernetes, the Collector verifies the server
certificate by default, and the certificate that SQL Server generates for itself
can't pass verification. Install a certificate issued for the host's name, or set
`tls.insecure_skip_verify` to `true` to accept any certificate. When the endpoint
is `localhost` and the certificate names the host, set `tls.server_name_override`
to the name in the certificate. For example:
```yaml theme={null}
cxdot:
mode: host
integrations:
sqlserver:
username: cxdot
password: "${env:SQLSERVER_PASSWORD}"
instances:
- endpoint: localhost:1433
tls:
server_name_override: sql01.example.com
```
### Validate
To validate the Microsoft SQL Server integration, follow these steps:
1. In Live Telemetry Analyzer, filter for `__name__=cxdot.integration.target.health`
and `cxdot.integration.name=sqlserver`. Confirm that each target reports `1`.
Identify each target by its `server.address` and `server.port` attributes and, for
host deployments, by `host.name`. A target whose endpoint is `localhost` or
another loopback address reports the Collector host's name as `server.address`.
2. In Metrics Explorer, run the following query while the SQL Server instances
handle client requests:
```text theme={null}
sum by ("host.name", "server.address", "server.port") (rate({"sqlserver.batch.request.count"}[$__rate_interval]))
```
Confirm that the query returns a time series for each target.
3. Optional: Open the Overview dashboard that the integration provides, which shows
server health, throughput, memory, file I/O, buffer cache, database state, and
blocking. Confirm that its panels show data for your targets.
### Troubleshooting
* A target reports `0` for `cxdot.integration.target.health`: The Collector can't
connect and sign in to the instance. Confirm that the endpoint names the instance's
TCP port, that the instance allows SQL Server authentication, and that the login
name and password are correct. A named instance that listens on a dynamic port
isn't reachable at port `1433`.
* A static target reports `0` for `cxdot.integration.target.health` although its
endpoint and login are correct: The Collector rejects the server certificate. By
default, it verifies the certificate of every static target, and the certificate
that SQL Server generates for itself fails verification. Install a certificate
issued for the host name in the endpoint, set `tls.ca_file` to a file that contains
the certificate authority's certificate, or set `tls.insecure_skip_verify` to
`true`.
* A target reports `1` for `cxdot.integration.target.health` but few other metrics
arrive: The health metric confirms only that the Collector can sign in. Grant the
login `VIEW SERVER PERFORMANCE STATE`, or `VIEW SERVER STATE` on SQL Server 2019 and
earlier.
* File I/O metrics, such as `sqlserver.database.io` and `sqlserver.database.latency`,
are missing while other metrics arrive: Grant the login `VIEW ANY DEFINITION`.
Without that permission, SQL Server hides the files from the login without an
error, and the Collector reports no time series for them.
* `sqlserver.index.operation.count` is missing: The Collector reports index usage
only for user tables in the configured database. The configured database is
`master` unless you specify another, and `master` usually has no user tables.
Configure the database that holds your tables, and confirm that the login has a
user in that database and `VIEW ANY DEFINITION`, without which SQL Server hides the
indexes.
* `sqlserver.database.backup.count` is missing: Confirm that the login has a user in
`msdb` with `SELECT` permission on `dbo.backupset`. The Collector reads backup
counts on its first collection and then every five minutes by default, so a new
backup can take that long to appear in the count.
* `sqlserver.database.io_queue.time` is always `0`: SQL Server counts that time only
while Resource Governor limits the I/O of a resource pool. An instance without such
a limit reports `0`. An edition without Resource Governor also reports `0`,
including Express and Web editions and Standard editions earlier than SQL Server
2025\.
* `sqlserver.memory.grants.pending.count` is always `0`: The counter counts queries
waiting for workspace memory, so it stays `0` while the instance has enough
workspace memory, regardless of the edition.
* `sqlserver.replica.transaction_delay.time` is `0` on a replica: The primary replica
of an availability group reports the delay in committing to its secondary replicas.
A secondary replica and an instance outside an availability group report `0`.
## Configuration reference
Configure one Microsoft SQL Server integration instance with the following settings. In Helm
values, place these settings under `collection.cxdot.integrations.sqlserver`. In a Collector
configuration file, place them under `cxdot.integrations.sqlserver`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to run the SQL Server integration. If true, the Collector collects SQL Server metrics.
If false, the Collector doesn't run this integration.
* **`username`**
Type: `string`. Optional.
SQL Server login name that the Collector uses for every configured target. Required when
`instances` isn't empty. Targets found through annotations use the credentials in their
annotation instead.
* **`password`**
Type: `string`. Optional.
Password for `username`. Required when `instances` isn't empty. The Collector masks this value
in diagnostic output, logs, and errors.
* **`tls`**
Type: `object`. Optional.
Transport Layer Security (TLS) settings for connections to the configured targets. By default,
the Collector encrypts the whole connection and verifies that a trusted certificate authority
(CA) issued the server certificate for the target's host name. Set `ca_file` or `ca_pem` to
the CA that issued the server certificate when the system that runs the Collector doesn't
trust it, and set `server_name_override` when the certificate names a host other than the one
in the endpoint. The certificate that SQL Server generates for itself when none is configured
can't pass verification: install a certificate issued for the server's host name, or set
`insecure_skip_verify` to `true` to accept any certificate. Set `insecure` to `true` to
encrypt only the sign-in, the least that SQL Server accepts, without verifying the
certificate. Client certificates aren't supported. Targets found through annotations use the
encryption settings in their annotation's connection string instead.
* **`tls.insecure`**
Type: `boolean`. Optional. Default: `false`.
Whether to encrypt only the sign-in. If true, the Collector encrypts the sign-in, the least
that SQL Server accepts, without verifying the server certificate, and sends the rest of the
connection unencrypted unless the server requires encryption. If false, the Collector encrypts
the whole connection.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional. Default: `false`.
Whether to skip verification of the SQL Server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded file with the certificate authority (CA) certificate that issued the SQL
Server certificate. If omitted, the Collector verifies the certificate against the system
certificate authority pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded content of the certificate authority certificate that issued the SQL Server
certificate, as an alternative to `ca_file`.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional. Default: `false`.
Whether to trust the system certificate authority pool in addition to `ca_file` or `ca_pem`.
If true, the Collector trusts both sources. If false, the Collector trusts only the configured
certificate authority.
* **`tls.server_name_override`**
Type: `string`. Optional.
Host name that the SQL Server certificate must name, when it differs from the host in the
target's endpoint.
* **`tls.min_version`**
Type: `string`. Optional. Default: `1.2`.
Minimum TLS version that the Collector accepts. Allowed values: `1.0`, `1.1`, `1.2`, `1.3`.
* **`tls.max_version`**
Type: `string`. Optional. Default: `1.3`.
Maximum TLS version that the Collector accepts. Allowed values: `1.0`, `1.1`, `1.2`, `1.3`.
* **`tls.cipher_suites`**
Type: `array of string`. Optional. Default: `[]`.
TLS cipher suites that the Collector can use with TLS 1.2 and earlier, in preference order. An
empty list uses the secure defaults of the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`database`**
Type: `string`. Optional. Default: `master`.
Database whose files and index usage the Collector reports for every configured target.
Server-wide metrics and the state and backups of every database are reported whatever this is
set to. For a database other than `master`, create a user for the SQL Server login in that
database. Targets found through annotations use the database in their annotation instead.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the integration collects metrics from each SQL Server instance.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time allowed to collect metrics from a SQL Server instance during one interval. Set
this value no greater than `collection_interval` so one collection doesn't delay the next. A
value of `0s` removes the deadline, which lets an unresponsive target delay later collections
and Collector shutdown.
* **`backup_collection_interval`**
Type: `duration`. Optional. Default: `300s`.
How often the integration reads the backup history of each configured instance. The backup
history grows with every backup the server records, so it's read less often than the other
metrics. Between reads, the integration reports the most recent backup counts every
`collection_interval`. A value no longer than `collection_interval` reads it on every
collection. Targets found through annotations use the interval in their annotation, or 300
seconds.
* **`index_usage_collection_interval`**
Type: `duration`. Optional. Default: `300s`.
How often the integration reads the index usage of `database` on each configured instance,
which grows with the number of indexes. Between reads, the integration reports the most recent
counts every `collection_interval`. A value no longer than `collection_interval` reads it on
every collection. Targets found through annotations use the interval in their annotation, or
300 seconds.
* **`instances`**
Type: `array of object`. Optional. Default: `[]`.
SQL Server instances to monitor. Each `endpoint` uses `host:port` format, such as
`sqlserver.default.svc:1433`. When this list contains an instance, the integration monitors
only the listed instances and disables discovery through annotations for this integration
instance. When the list is empty, the integration monitors targets supplied through SQL Server
annotations, each with the credentials in its annotation.
* **`instances[].endpoint`**
Type: `string`. Required.
`host:port` of the target.
# TCP Check
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/tcp_check
Connectivity checks for TCP endpoints — whether a connection to each configured host and port can be established, how long the connect takes, and failed attempts by cause.
The TCP Check integration requires CXDOT Collector 1.4.0 or greater.
A TCP connection probe opens a
[Transmission Control Protocol (TCP)](https://www.rfc-editor.org/rfc/rfc9293)
connection to a host and port. Use the TCP Check CXDOT Collector integration to
monitor whether service ports, such as databases, caches, and message brokers,
accept connections and how long connections take to establish.
The TCP Check CXDOT Collector integration works with any software that accepts
TCP connections. For each target, the integration opens one connection, closes
it after the connection is established, and sends no payload.
## Supported telemetry types
The following table lists the telemetry types the TCP Check CXDOT Collector
integration supports:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The TCP Check CXDOT Collector integration has the following prerequisite:
* Ensure that the CXDOT Collector can reach each host and port that you want to
monitor.
## Configure
The TCP Check integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the integration, follow these steps:
1. To monitor a port that a pod listens on in Kubernetes, such as a message broker
listener, add a CXDOT integration annotation to the pod template. The annotation key
must end with the container name. For example, add the following annotation to your
workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/mosquitto: |
schema_version: v1.14
tcp_check:
instances:
- endpoint: ${target.host}:${target.port.mqtt}
spec:
containers:
- name: mosquitto
image: eclipse-mosquitto:2
ports:
- name: mqtt
containerPort: 1883
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.mqtt}` with the container port named `mqtt`.
2. Optional: To monitor hosts outside your Kubernetes cluster, such as a database,
configure static targets. For example, add the following to the `values.yaml` file
for the CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
tcp_check:
instances:
- endpoint: db.internal.example:5432
- endpoint: 10.0.0.2:6379
```
The integration instance checks only the listed targets and disables
autodiscovery. In cluster mode, the cluster-tier CXDOT Collector connects to
static targets. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
3. Optional: Configure separate integration instances to monitor both
annotated and static targets. For example, add the following to the
`values.yaml` file for the CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
tcp_check: {}
tcp_check/external:
instances:
- endpoint: db.internal.example:5432
```
The `tcp_check/external` key defines a named instance for the static targets.
Configuring a named instance suppresses the implicit default instance, so the
empty `tcp_check: {}` entry is required to keep autodiscovery running.
4. Optional: Disable the integration to stop monitoring annotated targets. For
example, add the following to the `values.yaml` file for the CXDOT Collector
Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
tcp_check:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the TCP Check CXDOT Collector integration, follow these steps:
1. Confirm target health in
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer)
or
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer):
* In Live Telemetry Analyzer, add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=tcp_check`
Confirm that one time series appears for each target you configured,
identified by the `cxdot.integration.target` attribute.
* In Metrics Explorer, run the following query:
```text theme={null}
{"cxdot.integration.target.health", "cxdot.integration.name"="tcp_check"}
```
Confirm that each reachable target reports `1` and each unreachable target
reports `0`.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
{"tcpcheck.duration", "cxdot.integration.name"="tcp_check"}
```
Confirm that the query returns the connection time in milliseconds for each
reachable target. For a hostname target, the time includes resolving the
name.
### Troubleshooting
* A target reports `0` for `cxdot.integration.target.health`: In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query to group recent failed checks by target and cause:
```text theme={null}
sum by ("server.address", "server.port", "error.code") (count_over_time({"tcpcheck.error", "cxdot.integration.name"="tcp_check"}[$__rate_interval]))
```
The `error.code` label identifies whether the connection was refused, timed
out, or found the network unreachable.
## Configuration reference
Configure one TCP Check integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.tcp_check`. In a Collector configuration
file, place them under `cxdot.integrations.tcp_check`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this TCP Check integration instance. If true, the Collector performs
connectivity tests. If false, the Collector doesn't run this integration instance.
* **`instances`**
Type: `array of object`. Optional. Default: `[]`.
Connectivity targets. Each `endpoint` uses `host:port` format, such as
`db.internal.example:5432`. The integration opens a connection to each target during every
interval and reports each target separately.
* **`instances[].endpoint`**
Type: `string`. Required.
Network address of the target in `host:port` format.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the integration opens a connection to each target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time allowed for a connection attempt and the complete connectivity test during one
interval. The value must be greater than `0s` and must not exceed `collection_interval`. A
target supplied through an annotation takes its timeout from the annotation's `timeout`.
# Temporal
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/temporal
Temporal request, workflow, task, and persistence metrics.
The Temporal integration requires CXDOT Collector 1.4.0 or greater.
[Temporal](https://temporal.io/) is a platform for running workflows and activities.
Use the Temporal CXDOT Collector integration with the CXDOT Collector to collect
request, workflow, task, and persistence metrics from Temporal servers running in
your environment.
## Supported telemetry types
The Temporal CXDOT Collector integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Temporal CXDOT Collector integration has the following prerequisites:
* Configure the Temporal frontend, history, matching, and worker server roles that
you want to monitor to expose a Prometheus metrics endpoint.
* Make each Prometheus metrics endpoint reachable from the collector.
## Configure
The Temporal integration is enabled by default. You can configure targets either by
annotating server pods in your Kubernetes cluster or by listing static endpoints in your
Helm values. To configure the integration, follow these steps:
1. To collect from Temporal server pods in Kubernetes, add a CXDOT integration
annotation to the pod template of each server role, such as the frontend. The
annotation key must end with the container name. For example, add the following
annotation to your Temporal frontend workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/temporal-frontend: |
schema_version: v1.14
temporal:
endpoints:
- endpoint: ${target.host}:${target.port.metrics}
spec:
containers:
- name: temporal-frontend
image: temporalio/server:1.28.0
ports:
- name: metrics
containerPort: 9090
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.metrics}` with the container port named `metrics`.
2. Optional: To collect from Temporal servers outside your Kubernetes cluster,
configure static targets. For example, add the following to the `values.yaml` for
your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
temporal:
endpoints:
- endpoint: temporal.example.com:9091
```
When you configure static targets, this integration instance collects from exactly
those targets and stops reading CXDOT integration annotations.
3. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the `values.yaml` for
your CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
temporal: {}
temporal/external:
endpoints:
- endpoint: temporal.example.com:9091
```
The `temporal/external` key defines a named instance for the static targets. The
bare `temporal` key continues to collect from annotated pods.
For more information about how the CXDOT Collector discovers targets, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Temporal CXDOT Collector integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `cxdot.integration.name=temporal`. Confirm that
`cxdot.integration.target.health` reports `1` for each scrape target you expect.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while Temporal processes workflow operations:
```text theme={null}
sum by ("url.full", "service_name") (rate({"temporal.server.service.requests"}[$__rate_interval]))
```
Confirm that the query returns the expected time series for each server role that
processes requests.
## Configuration reference
Configure one Temporal integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.temporal`. In a Collector configuration
file, place them under `cxdot.integrations.temporal`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Temporal integration instance. If true, the Collector collects Temporal
metrics. If false, the Collector doesn't run this integration instance.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Temporal server Prometheus endpoints to monitor. Specify a full HTTP or HTTPS URL, or use
`host:port` format to request the `/metrics` path over HTTP.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Temporal server Prometheus endpoint as a full HTTP or HTTPS URL or in `host:port` format. For
`host:port`, the Collector requests the `/metrics` path over HTTP.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the integration collects metrics from each Temporal endpoint.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time allowed to collect metrics from a Temporal endpoint during one interval. The
value must be greater than zero.
* **`max_samples`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`.
Maximum number of samples accepted from one metric collection. A value of `0`, the default,
means no limit. A collection that exceeds the limit fails and reports `up` as `0` instead of
returning an incomplete set of samples.
* **`follow_redirects`**
Type: `boolean`. Optional. Default: `true`.
Whether to follow HTTP redirects. If true, the Collector follows redirects. If false, a
redirect causes the metric collection to fail.
* **`metrics`**
Type: `object`. Optional.
Settings that control which Temporal metrics the integration collects and how it names them.
* **`metrics.include`**
Type: `array of string`. Optional. Default: `[]`.
Regular expressions for exposed metric names to collect in addition to the integration's
default metric set.
* **`metrics.exclude`**
Type: `array of string`. Optional. Default: `[]`.
Regular expressions for exposed metric names to drop. Exclusions are applied before metric
renaming and take precedence over `include`.
* **`metrics.rename`**
Type: `object`. Optional. Default: `{}`.
Mapping of exposed metric names to new metric names. These mappings take precedence over the
integration's default metric names.
* **`labels`**
Type: `object`. Optional.
Settings that drop metric samples based on their label values, and rename labels.
* **`labels.rename`**
Type: `object`. Optional. Default: `{}`.
Label renames, as `{old: new}`. A rename changes the label name without removing the label, so
distinct time series remain distinct. Renaming a label to a name the time series already has
overwrites that label's value. Temporal's own label names pass through unchanged unless
renamed here.
* **`labels.sample_drop_rules`**
Type: `object`. Optional. Default: `{}`.
Drops a whole sample when one of its labels matches. Each key is a label name. The value is a
list of regular expressions matched against the label's value. To drop every sample the label
appears on with a non-empty value, use `".+"`.
# Apache Tomcat
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/tomcat
Apache Tomcat application and Java Virtual Machine runtime metrics collected over JMX.
The Apache Tomcat integration requires CXDOT Collector 1.4.0 or greater.
[Apache Tomcat](https://tomcat.apache.org/) is an open source web server for Java apps.
Use the Apache Tomcat integration with the CXDOT Collector to collect Tomcat and Java
Virtual Machine (JVM) runtime metrics from apps running in your environment.
The Apache Tomcat integration supports Apache Tomcat 9.0 or greater.
## Supported telemetry types
The Apache Tomcat integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Apache Tomcat integration has the following prerequisites:
* Enable remote Java Management Extensions (JMX) monitoring over Remote Method
Invocation (RMI). Configure fixed RMI registry and server ports. For more
information, see
[Monitoring and Managing Tomcat](https://tomcat.apache.org/tomcat-9.0-doc/monitoring.html).
* Make the RMI registry and the RMI server address advertised in returned stubs
reachable from the CXDOT Collector. Set `java.rmi.server.hostname` on the Tomcat server,
or configure the integration's advertised host and port overrides when the
advertised address isn't reachable.
* Restrict JMX access to trusted clients and configure authentication and Transport
Layer Security (TLS) settings in the integration to match the Tomcat server. For more
information, see
[Tomcat security considerations](https://tomcat.apache.org/tomcat-9.0-doc/security-howto.html#JMX).
## Configure
The Apache Tomcat integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the integration, follow these steps:
1. To collect from Tomcat pods in Kubernetes, add a CXDOT integration annotation to the
pod template. The annotation key must end with the container name, and its value can
reference JMX credentials stored in a Kubernetes Secret in the same namespace. For
example, add the following annotation to your Tomcat workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/tomcat: |
schema_version: v1.14
tomcat:
endpoints:
- endpoint: ${target.host}:${target.port.jmx}
username: cxdot
password: ${k8s_secret:tomcat-jmx/password}
spec:
containers:
- name: tomcat
image: tomcat:10.1
ports:
- name: jmx
containerPort: 9012
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.jmx}` with the container port named `jmx`, and
`${k8s_secret:tomcat-jmx/password}` with the `password` key of the `tomcat-jmx`
Secret. To allow the Collector to read the Secret, add the pod's namespace to
`apiServer.metadataServer.secretAllowlist` in the Helm values for your CXDOT
Collector.
The Collector also discovers Tomcat pods that carry the
`app.kubernetes.io/name: tomcat` label and expose an RMI registry on port `9012`. A
CXDOT integration annotation takes precedence over the label for its container. To
stop collecting from a container, set `tomcat: {enabled: false}` in the annotation.
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
2. Optional: To collect from Tomcat servers outside your Kubernetes cluster, configure
static targets. For example, add the following to the
`values.yaml` for your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
tomcat:
endpoints:
- endpoint: tomcat.example.com:9012
```
When you configure static targets, this integration instance collects from exactly
those targets instead of discovered targets. In Kubernetes cluster mode, the elected
cluster Collector scrapes static targets. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
3. Optional: Configure a second integration instance to collect from both annotated
pods and static targets. For example, add the following to the `values.yaml` for
your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
tomcat: {}
tomcat/edge:
endpoints:
- endpoint: tomcat.example.com:9012
```
The `tomcat/edge` key defines a named instance for the static targets. The bare
`tomcat` key continues to discover targets.
4. Optional: Disable the integration. For example, add the following to the
`values.yaml` for your Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
tomcat:
enabled: false
```
### Validate
To validate the Apache Tomcat integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=tomcat`. Confirm that `cxdot.integration.target.health`
reports `1` for each target. The `cxdot.integration.target`, `server.address`, and
`server.port` attributes identify the target.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while the Tomcat servers process requests:
```text theme={null}
sum by ("server.address", "server.port") (rate({"tomcat.request.count"}[$__rate_interval]))
```
Confirm that the query returns the expected time series for each target.
For more information about CXDOT Collector integrations, see the
[integrations catalog](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector).
## Configuration reference
Configure one Apache Tomcat integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.tomcat`. In a Collector configuration
file, place them under `cxdot.integrations.tomcat`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Tomcat integration instance. If true, the CXDOT collector runs the
instance. If false, the CXDOT collector doesn't run it.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
Tomcat Java Management Extensions (JMX) targets. When this list is empty or omitted, the
integration uses automatic target discovery. When the list contains targets, this integration
instance collects from exactly those targets and doesn't automatically discover targets.
Configure a second named instance to use both methods. Each endpoint can be a `host:port`
Remote Method Invocation (RMI) registry address or a `service:jmx:rmi` URL.
* **`endpoints[].endpoint`**
Type: `string`. Required.
Tomcat JMX endpoint as either a `host:port` RMI registry address or a `service:jmx:rmi` URL.
* **`registry_tls`**
Type: `boolean`. Optional. Default: `false`.
Whether to use Transport Layer Security (TLS) for the RMI registry connection. If true, the
CXDOT collector uses TLS. If false, the CXDOT collector uses an unencrypted registry
connection.
* **`advertised_host_override`**
Type: `string`. Optional. Default: empty string.
Host the CXDOT collector uses for RMI server connections instead of the host advertised by
returned RMI stubs. When empty, the CXDOT collector uses the registry endpoint host.
* **`advertised_port_override`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`. Maximum: `65535`.
Port the CXDOT collector uses for RMI server connections instead of the port advertised by
returned RMI stubs. When set to `0`, the CXDOT collector uses the advertised port.
* **`username`**
Type: `string`. Optional.
Username for JMX authentication. Configure `username` and `password` together.
* **`password`**
Type: `string`. Optional.
Password for JMX authentication. Configure `username` and `password` together.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the CXDOT collector collects metrics from each Tomcat JMX endpoint.
* **`bean_detection_interval`**
Type: `duration`. Optional. Default: `10m`.
How often the CXDOT collector refreshes the set of available JMX beans.
* **`bean_limit`**
Type: `integer`. Optional. Default: `35000`. Minimum: `1`.
Maximum number of JMX bean matches collected from each endpoint. When the number of matches
exceeds this value, the integration drops beans according to the attribute mapping priority.
* **`target_system`**
Type: `string`. Optional. Default: `tomcat`.
Comma-delimited attribute mapping names to apply. The Tomcat mapping is enabled by default,
and the Java Virtual Machine (JVM) mapping is included automatically. Add `-jvm` to disable
JVM metrics when at least one other mapping is configured.
* **`attribute_mapping_paths`**
Type: `array of string`. Optional. Default: `[]`.
Directories and files containing custom JMX attribute mappings. The CXDOT collector searches
these paths before the embedded Tomcat and JVM mappings.
* **`tls`**
Type: `object`. Optional. Default: `{}`.
TLS certificate and client authentication settings for RMI registry and server connections.
* **`tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the JMX
server certificate. If omitted, the CXDOT collector uses the system certificate authority
pool.
* **`tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the JMX server
certificate.
* **`tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the JMX server requires mutual
TLS authentication.
* **`tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the JMX server requires mutual TLS
authentication.
* **`tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the CXDOT collector can use, in preference order. If omitted, the CXDOT
collector uses secure default cipher suites. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the CXDOT collector can use for an elliptic curve Diffie-Hellman
ephemeral handshake, in preference order. If omitted, the CXDOT collector uses its default
curves.
* **`tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the CXDOT collector trusts both sources. If false, the CXDOT
collector trusts only the configured certificate authorities.
* **`tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. This setting must be false. Use `registry_tls` to
control transport security for the RMI registry.
* **`tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the JMX server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the CXDOT collector verifies the certificate.
* **`tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the CXDOT collector can use. If omitted, the CXDOT collector uses
the highest TLS version it supports.
* **`tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the CXDOT collector can use. If omitted, the minimum version is
TLS 1.2.
* **`tls.reload_interval`**
Type: `duration`. Optional.
How often the CXDOT collector reloads certificate and key files. If omitted, the CXDOT
collector doesn't reload the files.
* **`tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the JMX certificate instead of the endpoint hostname. Use this
setting when the certificate name differs from the endpoint hostname.
* **`tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the CXDOT collector
loads the key from the configured device or socket. If false, the CXDOT collector uses the
configured key file or in-memory key.
* **`tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
# HashiCorp Vault
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/vault
Collects cluster health, request performance, token, and storage backend metrics from HashiCorp Vault.
The Vault integration requires CXDOT Collector 1.7.0 or greater.
[HashiCorp Vault](https://developer.hashicorp.com/vault) stores and controls access
to secrets. Use the Vault integration with the CXDOT Collector to collect health,
leadership, runtime, and request metrics from Vault servers running in your
environment.
The Vault integration supports Vault 1.18 or greater.
## Supported telemetry types
The Vault integration supports these telemetry types:
| Type | Supported |
| - | - |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Vault integration has the following prerequisites:
* Enable the Vault Prometheus telemetry endpoint. Make sure that
`prometheus_retention_time` is greater than `0`:
```hcl theme={null}
telemetry {
prometheus_retention_time = "30s"
}
```
* Make the Vault API root, such as `https://vault.example.com:8200/v1`, reachable
from the CXDOT Collector.
* Choose one authentication method for `/v1/sys/metrics`:
* Create a Vault token in the root namespace with `read` and `list` access to
`sys/metrics`. Supply the token directly or through a Collector-local file.
* Enable unauthenticated metrics access in the Vault TCP listener:
```hcl theme={null}
listener "tcp" {
telemetry {
unauthenticated_metrics_access = true
}
}
```
Configure the target with `no_token: true`. Unauthenticated metrics access is
also required to collect each standby node's own metrics.
For more information about the endpoint requirements, see
[Vault telemetry configuration](https://developer.hashicorp.com/vault/docs/configuration/telemetry).
## Configure
The Vault integration is enabled by default. You can configure targets either by
annotating pods and Services in your Kubernetes cluster or by listing static endpoints
in your Helm values. To configure the Vault integration, follow these steps:
1. To collect from Vault server pods in Kubernetes, add a CXDOT integration annotation
to the pod template. The annotation key must end with the container name, and its
value can reference a Vault token stored in a Kubernetes Secret in the same
namespace. For example, add the following annotation to your Vault StatefulSet:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/vault: |
schema_version: v1.14
vault:
instances:
- endpoint: http://${target.host}:${target.port.http}/v1
client_token: ${k8s_secret:vault-metrics/token}
spec:
containers:
- name: vault
image: hashicorp/vault:1.20
ports:
- name: http
containerPort: 8200
```
The Collector replaces `${target.host}` with the pod IP address,
`${target.port.http}` with the container port named `http`, and
`${k8s_secret:vault-metrics/token}` with the `token` key of the `vault-metrics`
Secret. To allow the Collector to read the Secret, add the pod's namespace to
`apiServer.metadataServer.secretAllowlist` in the Helm values for your CXDOT
Collector.
2. Optional: To collect from Vault servers outside your Kubernetes cluster, configure
static instances. For example, add the following to the Helm values file for your
CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
vault:
instances:
- endpoint: https://vault-auth.example.com:8200/v1
client_token: "${env:VAULT_TOKEN}"
- endpoint: https://vault-public.example.com:8200/v1
no_token: true
```
When you configure static instances, this integration instance collects from
exactly those targets instead of discovered targets. In cluster mode, the
cluster Collector that wins leader election scrapes static instances.
3. Optional: Configure a second integration instance to collect from both
annotated targets and static instances. For example, add the following to the
Helm values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
vault: {}
vault/external:
instances:
- endpoint: https://vault-auth.example.com:8200/v1
client_token: "${env:VAULT_TOKEN}"
- endpoint: https://vault-public.example.com:8200/v1
no_token: true
```
The `vault/external` key defines a named instance for the static targets. The
bare `vault` key continues to discover annotated pods and Services.
4. Optional: Disable the integration. For example, add the following to the Helm
values file for your CXDOT Collector:
```yaml theme={null}
collection:
cxdot:
integrations:
vault:
enabled: false
```
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
### Validate
To validate the Vault integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=vault`. Confirm that `cxdot.integration.target.health`
reports `1` for each reachable target. A value of `1` means that the Vault API
health and leadership requests succeeded. A value of `0` means that they failed.
The `cxdot.integration.target`, `server.address`, and `server.port` attributes
identify each target.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while Vault handles requests:
```text theme={null}
count by ("server.address", "server.port", "vault.cluster", "vault.version", "vault.is_leader") ({"vault.core.in_flight_requests", "cxdot.integration.name"="vault"})
```
Confirm that the query returns the expected time series for each target. The
`vault.cluster`, `vault.version`, and `vault.is_leader` attributes identify the
Vault cluster, version, and leadership state.
### Troubleshooting
* `cxdot.integration.target.health` reports `1`, but workload metrics don't appear:
Confirm that the token has `read` and `list` access to `sys/metrics`, or that the
target enables unauthenticated metrics access and uses `no_token: true`.
* A disaster recovery secondary reports API status metrics but no workload metrics:
Set `collect_secondary_dr: true` for that target. The integration omits workload
metrics from disaster recovery secondaries by default.
For more information about CXDOT Collector integrations, see the
[integrations catalog](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector).
## Configuration reference
Configure one Vault integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.vault`. In a Collector configuration file,
place them under `cxdot.integrations.vault`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this Vault integration instance. If true, the Collector collects metrics
from configured or discovered targets. If false, the Collector doesn't run this integration
instance.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector collects metrics from each Vault target.
* **`timeout`**
Type: `duration`. Optional. Default: `10s`.
Maximum time the Collector waits for a Vault target to respond during one collection. This
value must not exceed `collection_interval`. If the deadline expires, that collection fails.
* **`max_samples`**
Type: `integer`. Optional. Default: `0`. Minimum: `0`.
Maximum samples accepted from one metrics response. Zero disables the sample-count limit.
Decompressed responses larger than 16 MiB are always rejected.
* **`follow_redirects`**
Type: `boolean`. Optional. Default: `true`.
Whether to follow HTTP redirects. If true, the Collector follows redirects. If false, a
redirect causes the metric collection to fail.
* **`instances`**
Type: `array of object`. Optional. Default: `[]`.
Vault API targets. When this list isn't empty, the integration collects from exactly these
targets instead of discovered targets.
* **`instances[].endpoint`**
Type: `uri`. Required.
Base Vault API URL ending in /v1.
* **`instances[].client_token`**
Type: `string`. Optional.
Token with read and list access to the metrics endpoint.
* **`instances[].client_token_path`**
Type: `string`. Optional.
Collector-local path containing a Vault token.
* **`instances[].no_token`**
Type: `boolean`. Optional. Default: `false`.
Scrape metrics without a token when unauthenticated access is enabled.
* **`instances[].collect_secondary_dr`**
Type: `boolean`. Optional. Default: `false`.
Collect metrics when the target reports that it's a disaster-recovery secondary.
* **`instances[].tls`**
Type: `object`. Optional.
TLS settings for this target.
* **`instances[].tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the Vault
server certificate. If omitted, the Collector uses the system certificate authority pool.
* **`instances[].tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the Vault server
certificate.
* **`instances[].tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the Vault target requires
mutual TLS authentication.
* **`instances[].tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the Vault target requires mutual TLS
authentication.
* **`instances[].tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`instances[].tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`instances[].tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`instances[].tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. If true, the Collector uses an unencrypted connection.
If false, the Collector uses TLS.
* **`instances[].tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the Vault server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`instances[].tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`instances[].tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`instances[].tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`instances[].tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`instances[].tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`instances[].tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the Vault certificate instead of the endpoint hostname. Use this
setting when the certificate name differs from the endpoint hostname.
* **`instances[].tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`instances[].tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`instances[].tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`instances[].tls.tpm.owner_auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module owner.
* **`instances[].tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
# VMware vSphere
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/vsphere
Performance counters, inventory and events of vCenter Servers and standalone ESXi hosts — every host and virtual machine's CPU, memory, disk and network counters, guest and host properties, and vCenter events as logs.
The VMware vSphere integration requires CXDOT Collector 1.7.0 or greater.
[VMware vSphere](https://www.vmware.com/products/cloud-infrastructure/vsphere) is a
virtualization platform for managing ESXi hosts and virtual machines. Use the vSphere
integration with the CXDOT Collector to collect performance and inventory metrics from
vCenter Servers and standalone ESXi hosts, and event logs from vCenter Servers.
The vSphere integration supports vSphere 8.0.
## Supported telemetry types
The vSphere integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | Yes |
| Metrics | Yes |
| Traces | No |
| Events | No |
The integration converts vCenter events to log records. Standalone ESXi hosts provide
metrics only.
## Prerequisites
The vSphere integration has the following prerequisites:
* A vSphere account with the Read-only role assigned at the root of each inventory
you monitor. The role must propagate to the managed hosts and virtual machines.
* HTTPS access from the CXDOT Collector host to each vCenter Server or standalone
ESXi host. The default port is `443`.
* The root certificate authority certificate for each endpoint, unless you disable
certificate verification. System trust stores don't typically trust the certificates
included with vCenter Server and ESXi.
## Configure
To configure the vSphere integration, follow these steps:
The vSphere integration is enabled by default.
1. Make each vSphere password available as an environment variable to the CXDOT
Collector process. If you verify endpoint certificates, make each root certificate
available as a file.
2. Add your vCenter Servers to the CXDOT Collector configuration. For example:
```yaml theme={null}
cxdot:
mode: host
integrations:
vsphere:
vcenter:
instances:
- endpoint: vcsa.example.com
username: monitoring@vsphere.local
password: "${env:VSPHERE_PASSWORD}"
tls:
ca_file: /etc/cxdot/vsphere-ca/ca.crt
```
Each vCenter Server provides metrics for its managed hosts and virtual machines.
When you deploy the CXDOT Collector on a Kubernetes cluster, leader election
chooses one pod to poll each configured vCenter Server.
3. Optional: Attach vSphere tags to metrics for filtering and grouping. The Collector
adds tags from each virtual machine, host, cluster, datastore, and datacenter to
that object's metrics. For example:
```yaml theme={null}
cxdot:
mode: host
integrations:
vsphere:
vcenter:
collect_tags: true
```
Standalone ESXi hosts don't support tags.
4. Optional: Add standalone ESXi hosts under `esxi.instances`. A standalone host
runs without a vCenter Server, or no configured vCenter Server manages it.
For example:
```yaml theme={null}
cxdot:
mode: host
integrations:
vsphere:
esxi:
instances:
- endpoint: esx1.example.com
username: monitoring
password: "${env:ESXI_PASSWORD}"
tls:
ca_file: /etc/cxdot/vsphere-ca/ca.crt
```
Configuring both paths for the same host produces duplicate metrics.
5. Optional: Disable the integration. For example, add the following to your CXDOT
Collector configuration:
```yaml theme={null}
cxdot:
integrations:
vsphere:
enabled: false
```
### Validate
To validate the vSphere integration, follow these steps:
1. In [Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
filter for `__name__=cxdot.integration.target.health` and
`cxdot.integration.name=vsphere`. Confirm that `cxdot.integration.target.health`
reports `1` for each configured endpoint. The `cxdot.integration.target`,
`server.address`, and `server.port` attributes identify the endpoint.
2. In [Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query:
```text theme={null}
count by ("server.address", "vsphere.resource.type") ({"vcenter.cpu.usage.avg", "cxdot.integration.name"="vsphere"})
```
Confirm that the query returns `host` time series for each endpoint. Endpoints with
powered-on virtual machines also return `vm` time series.
3. In [Logs Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/query-logs),
filter for the `vsphere.event.type` attribute after a vCenter event occurs. Confirm that the
log record includes the vCenter Server's `server.address`.
### Troubleshooting
* A host or its virtual machines report duplicate metrics: Remove the host from
`esxi.instances` when a configured vCenter Server already manages it.
* A virtual machine has no performance time series: vSphere provides real-time
performance counters only for powered-on virtual machines. The integration skips
powered-off and suspended virtual machines and templates.
For more information about CXDOT Collector integrations, see the
[integrations catalog](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector).
## Configuration reference
Configure one VMware vSphere integration instance with the following settings. In Helm values,
place these settings under `collection.cxdot.integrations.vsphere`. In a Collector configuration
file, place them under `cxdot.integrations.vsphere`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this vSphere integration instance. If true, the Collector collects from its
configured vCenter Servers and ESXi hosts. If false, the Collector doesn't run the integration
instance.
* **`collection_interval`**
Type: `duration`. Optional. Default: `2m`.
How often the Collector reads performance counters. vSphere serves real-time counters as
20-second samples, and each collection returns the newest sample since the previous
collection. A collection that runs past this interval delays the next collection. Use an
interval closer to 20 seconds for a small inventory to retain more samples.
* **`timeout`**
Type: `duration`. Optional. Default: `10m`.
How long a collection or event poll can run before the Collector abandons it. This setting
guards against an unresponsive endpoint. Set a value long enough for a large inventory or slow
server to finish without overlapping the next collection.
* **`collect_property_metrics`**
Type: `boolean`. Optional. Default: `false`.
Whether to collect inventory property metrics. If true, the Collector collects virtual machine
uptime, configured CPU and memory, VMware Tools status, guest disks, network adapters and
routes, host connection, power, and maintenance state, and cluster high availability (HA) and
distributed resource scheduler (DRS) settings. Device properties produce one time series per
device and increase collection work for a large vCenter inventory. Cluster settings produce
four time series per cluster; `metric_filters` don't affect them, and `cluster` resource
filters drop them with the cluster. If false, the Collector doesn't collect these inventory
property metrics.
* **`inventory_refresh_interval`**
Type: `duration`. Optional. Default: `5m`.
How often the Collector refreshes hosts, virtual machines, placement, and properties in the
inventory. Performance counters use the cached inventory between refreshes. A new virtual
machine appears after the next refresh.
* **`max_query_metrics`**
Type: `integer`. Optional. Default: `500`. Minimum: `1`.
Maximum number of metric IDs in one performance query. The Collector splits larger collections
across multiple queries. Increase this value to make fewer, larger requests, or decrease it to
make more, smaller requests. A metric collected per instance through `per_instance_metrics`
counts as one ID here, but the server returns one series per device for it, so lower this
value when you enable per-instance collection on objects with many devices.
* **`concurrency`**
Type: `integer`. Optional. Default: `4`. Minimum: `1`. Maximum: `8`.
How many performance queries are in flight at once against one endpoint, from 1 to 8. Increase
this value to collect a large inventory faster, or decrease it to reduce load on a busy
server.
* **`metric_filters`**
Type: `object`. Optional.
Per resource type, which metrics to collect for its objects, as regular expressions over
metric names (`vcenter.cpu.usage.avg`, `vcenter.vm.cpu.usage`). A metric is collected when any
pattern matches anywhere in its name; anchor with `^` and `$` for an exact name. A resource
type with no patterns collects every metric. A pattern that doesn't match a metric selects
nothing. A pattern that does not compile, or a type other than `vm` and `host`, prevents the
Collector from starting.
* **`metric_filters.vm`**
Type: `array of string`. Optional. Default: `[]`.
Patterns for virtual machine series.
* **`metric_filters.host`**
Type: `array of string`. Optional. Default: `[]`.
Patterns for ESXi host series.
* **`per_instance_metrics`**
Type: `object`. Optional.
Per resource type, which metrics to also collect for each instance of the counter, including
every network interface card (NIC), logical unit number (LUN), datastore, vCPU, or virtual
disk of the object, as regular expressions over metric names matched the way `metric_filters`
are. By default every counter is one series per object, the aggregate over its instances; a
matching metric gains one series per instance beside it, told apart by the `object` attribute,
which is empty on the aggregate. The aggregate series stays when per-instance series are
added. Per-instance series multiply a metric's series count by the number of devices on each
object, and the server only returns instances for the counters it keeps per device; the rest
stay on the aggregate alone. A metric `metric_filters` drops for a type is not collected at
all, per instance or otherwise. Off for every metric by default; `host: [".*"]` asks for every
host counter per device.
* **`per_instance_metrics.vm`**
Type: `array of string`. Optional. Default: `[]`.
Patterns for virtual machine series.
* **`per_instance_metrics.host`**
Type: `array of string`. Optional. Default: `[]`.
Patterns for ESXi host series.
* **`vcenter`**
Type: `object`. Optional.
Settings for collecting from vCenter Servers.
* **`vcenter.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect from the configured vCenter Servers. If true, the Collector collects
metrics and logs from those servers. If false, the Collector doesn't collect from them.
* **`vcenter.instances`**
Type: `array of object`. Optional. Default: `[]`.
The vCenter Servers to monitor, each with its own endpoint and credentials. The Collector
doesn't discover vCenter Servers. List each server in this setting. An empty or omitted list
collects no vCenter data.
* **`vcenter.instances[].endpoint`**
Type: `string`. Required.
The server, as `host` or `host:port` (`vcsa.example.com`, `esx1.example.com:443`). The
connection is always HTTPS; the port defaults to 443.
* **`vcenter.instances[].password`**
Type: `string`. Required.
Password for `username`. The Collector masks this value in debug output, logs, and error
output.
* **`vcenter.instances[].resource_filters`**
Type: `array of object`. Optional. Default: `[]`.
Which of this endpoint's hosts, VMs, clusters, datastores, and datacenters to collect. Each
entry names a resource type, the property to match, whether it includes or excludes, and
regular expressions over that property. With no entry for a resource type, every object of
that type is collected. Otherwise an object matching any `exclude` entry is dropped, and when
`include` entries exist for its type it must match one of them; an object both included and
excluded is excluded. Patterns are anchored at the start of the property, so `web-` matches
`web-01` and not `old-web-01`. Each object is filtered on its own: excluding a cluster or
datacenter drops its own time series and leaves the hosts and VMs under it collected, still
labeled with its name. Resource filters don't affect event logs. Select events by
`vcenter.events.types` and `resource_types`.
* **`vcenter.instances[].resource_filters[].patterns`**
Type: `array of string`. Required. Minimum items: `1`.
Regular expressions (Go/RE2 syntax) over the property; one match is enough. Each is anchored
at the start of the value. A pattern that doesn't compile prevents the Collector from
starting.
* **`vcenter.instances[].resource_filters[].property`**
Type: `string`. Optional. Default: `name`.
What the patterns are matched against: the object's name in vCenter, the only supported
property. Allowed values: `name`.
* **`vcenter.instances[].resource_filters[].resource`**
Type: `string`. Required.
The resource type the filter applies to. Allowed values: `vm`, `host`, `cluster`, `datastore`,
`datacenter`.
* **`vcenter.instances[].resource_filters[].type`**
Type: `string`. Optional. Default: `include`.
Whether a match collects the object (`include`) or drops it (`exclude`). Allowed values:
`include`, `exclude`.
* **`vcenter.instances[].tags`**
Type: `array of string`. Optional. Default: `[]`.
Extra resource attributes in `key:value` format to add to every time series and event from
this endpoint, on top of the collector-wide `resource_attributes`: `product:billing` adds the
attribute `product` with the value `billing`. A value may itself contain colons; an entry
without a colon is ignored; a repeated key keeps its last value; a tag never replaces an
attribute the integration sets itself.
* **`vcenter.instances[].tls`**
Type: `object`. Optional.
TLS settings for the connection to this endpoint. vCenter and ESXi typically use certificates
signed by the VMware Certificate Authority. Set `ca_file` to that authority's root
certificate, or set `insecure_skip_verify` to `true` to disable certificate verification. By
default, the Collector verifies the server certificate against the system certificate
authorities.
* **`vcenter.instances[].tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the vSphere
server certificate. If omitted, the Collector uses the system certificate authority pool.
* **`vcenter.instances[].tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the vSphere server
certificate.
* **`vcenter.instances[].tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the vSphere endpoint requires
mutual TLS authentication.
* **`vcenter.instances[].tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the vSphere endpoint requires mutual
TLS authentication.
* **`vcenter.instances[].tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`vcenter.instances[].tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`vcenter.instances[].tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`vcenter.instances[].tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. If true, the Collector uses an unencrypted connection.
If false, the Collector uses TLS.
* **`vcenter.instances[].tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the vSphere server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`vcenter.instances[].tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`vcenter.instances[].tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`vcenter.instances[].tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`vcenter.instances[].tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`vcenter.instances[].tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`vcenter.instances[].tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the vSphere certificate instead of the endpoint hostname. Use this
setting when the certificate name differs from the endpoint hostname.
* **`vcenter.instances[].tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`vcenter.instances[].tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`vcenter.instances[].tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`vcenter.instances[].tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`vcenter.instances[].tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
* **`vcenter.instances[].username`**
Type: `string`. Required.
vSphere user for connecting to this endpoint. A read-only role on the vCenter Server or ESXi
host is sufficient.
* **`vcenter.collection_level`**
Type: `integer`. Optional. Default: `1`. Minimum: `1`. Maximum: `4`.
vSphere statistics collection level whose counters are read, 1 to 4. Level 1 is the set every
vCenter exposes without configuration; each higher level adds counters and multiplies the
query volume across the inventory.
* **`vcenter.collect_tags`**
Type: `boolean`. Optional. Default: `false`.
Whether to attach vSphere tags to metrics. If true, the Collector reads the tags assigned to
each virtual machine, host, cluster, datastore, and datacenter and adds them to that object's
metrics. Each tag category becomes an attribute key. A category that allows one tag per object
sets a string value. A category that allows several sets a sorted list of tag names, such as
`["daily","offsite"]`. Some backends store a list as one string, so filter on a tag in such a
category with a regular expression match rather than an equality match. A tag doesn't replace
the object's name or placement attributes, but it takes precedence over an instance's `tags`
entry with the same key. Datadog keeps both values when keys collide, but the Collector keeps
only the vSphere tag, so rename the instance's `tags` entry if a monitor filters on its value.
The Collector drops a tag whose attribute key, including `tags_prefix`, starts with
`vcenter.`, `vsphere.`, `cxdot.`, or `server.`. A tag change can take up to five minutes to
appear, or `inventory_refresh_interval` if that's longer, plus one `collection_interval`. The
account for each instance needs read access to tags, which the vCenter Read-only role grants.
If the Collector can't read tags, metrics retain the tags from the last successful refresh. If
false, the Collector doesn't read tags.
* **`vcenter.tags_prefix`**
Type: `string`. Optional. Default: empty string.
Text the Collector adds before each tag category name to form the attribute key. For example,
`vsphere_` turns the category `owner` into the attribute key `vsphere_owner`. A prefix keeps a
category from colliding with an attribute set elsewhere in the pipeline. The prefix can't
start with a reserved prefix listed under `collect_tags`, such as `vsphere.`. Applies only
when `collect_tags` is true.
* **`vcenter.events`**
Type: `object`. Optional.
Settings for converting vCenter events to log records. The Collector reads events from each
`vcenter.instances` endpoint every `collection_interval`. Standalone ESXi hosts don't provide
event history.
* **`vcenter.events.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect vCenter events as logs. If true, the Collector collects the selected
events. If false, the Collector doesn't collect vCenter events.
* **`vcenter.events.types`**
Type: `array of string`. Optional. Default:
`["AlarmStatusChangedEvent","TaskEvent","VmBeingHotMigratedEvent","VmMessageEvent","VmMigratedEvent","VmPoweredOnEvent","VmPoweredOffEvent","VmReconfiguredEvent","VmSuspendedEvent"]`.
Event classes to collect, as vSphere names them without the `vim.event.` prefix
(`VmPoweredOnEvent`). The default is the receiver's built-in set: alarm status changes, tasks,
and VM power, migration, message, reconfiguration and suspend events. An empty list collects
the same set.
* **`vcenter.events.resource_types`**
Type: `array of string`. Optional. Default: `["vm","host"]`.
Inventory object types whose events are collected, for the event classes that name the object
they are about: alarms, tasks, scheduled tasks, permission and custom field changes. Omitted,
VMs and hosts, the objects the metrics cover, so a datastore alarm or a cluster task is not
collected unless its type is listed. An empty list collects none of those classes. Classes
that name no object, such as user sessions, are unaffected either way.
* **`vcenter.events.excluded_messages`**
Type: `object`. Optional. Default: `{}`.
Per event class, regular expressions that drop an event whose formatted message matches. Added
to the built-in exclusions of routine task events and gray alarm transitions. A pattern that
doesn't compile prevents the Collector from starting.
* **`esxi`**
Type: `object`. Optional.
Settings for collecting directly from standalone ESXi hosts.
* **`esxi.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to collect from the configured standalone ESXi hosts. If true, the Collector collects
metrics from those hosts. If false, the Collector doesn't collect from them.
* **`esxi.instances`**
Type: `array of object`. Optional. Default: `[]`.
ESXi hosts to monitor directly, each with its own endpoint and credentials. A standalone host
typically has a local account. Use this setting for hosts not managed by a listed vCenter
Server. Listing a host both ways collects duplicate metrics. An empty or omitted list collects
no standalone ESXi data.
* **`esxi.instances[].endpoint`**
Type: `string`. Required.
The server, as `host` or `host:port` (`vcsa.example.com`, `esx1.example.com:443`). The
connection is always HTTPS; the port defaults to 443.
* **`esxi.instances[].password`**
Type: `string`. Required.
Password for `username`. The Collector masks this value in debug output, logs, and error
output.
* **`esxi.instances[].resource_filters`**
Type: `array of object`. Optional. Default: `[]`.
Which of this endpoint's hosts, VMs, clusters, datastores, and datacenters to collect. Each
entry names a resource type, the property to match, whether it includes or excludes, and
regular expressions over that property. With no entry for a resource type, every object of
that type is collected. Otherwise an object matching any `exclude` entry is dropped, and when
`include` entries exist for its type it must match one of them; an object both included and
excluded is excluded. Patterns are anchored at the start of the property, so `web-` matches
`web-01` and not `old-web-01`. Each object is filtered on its own: excluding a cluster or
datacenter drops its own time series and leaves the hosts and VMs under it collected, still
labeled with its name. Resource filters don't affect event logs. Select events by
`vcenter.events.types` and `resource_types`.
* **`esxi.instances[].resource_filters[].patterns`**
Type: `array of string`. Required. Minimum items: `1`.
Regular expressions (Go/RE2 syntax) over the property; one match is enough. Each is anchored
at the start of the value. A pattern that doesn't compile prevents the Collector from
starting.
* **`esxi.instances[].resource_filters[].property`**
Type: `string`. Optional. Default: `name`.
What the patterns are matched against: the object's name in vCenter, the only supported
property. Allowed values: `name`.
* **`esxi.instances[].resource_filters[].resource`**
Type: `string`. Required.
The resource type the filter applies to. Allowed values: `vm`, `host`, `cluster`, `datastore`,
`datacenter`.
* **`esxi.instances[].resource_filters[].type`**
Type: `string`. Optional. Default: `include`.
Whether a match collects the object (`include`) or drops it (`exclude`). Allowed values:
`include`, `exclude`.
* **`esxi.instances[].tags`**
Type: `array of string`. Optional. Default: `[]`.
Extra resource attributes in `key:value` format to add to every time series and event from
this endpoint, on top of the collector-wide `resource_attributes`: `product:billing` adds the
attribute `product` with the value `billing`. A value may itself contain colons; an entry
without a colon is ignored; a repeated key keeps its last value; a tag never replaces an
attribute the integration sets itself.
* **`esxi.instances[].tls`**
Type: `object`. Optional.
TLS settings for the connection to this endpoint. vCenter and ESXi typically use certificates
signed by the VMware Certificate Authority. Set `ca_file` to that authority's root
certificate, or set `insecure_skip_verify` to `true` to disable certificate verification. By
default, the Collector verifies the server certificate against the system certificate
authorities.
* **`esxi.instances[].tls.ca_file`**
Type: `string`. Optional.
Path to a PEM-encoded certificate authority (CA) certificate file used to verify the vSphere
server certificate. If omitted, the Collector uses the system certificate authority pool.
* **`esxi.instances[].tls.ca_pem`**
Type: `string`. Optional.
PEM-encoded certificate authority certificate content used to verify the vSphere server
certificate.
* **`esxi.instances[].tls.cert_file`**
Type: `string`. Optional.
Path to the PEM-encoded client certificate file to present when the vSphere endpoint requires
mutual TLS authentication.
* **`esxi.instances[].tls.cert_pem`**
Type: `string`. Optional.
PEM-encoded client certificate content to present when the vSphere endpoint requires mutual
TLS authentication.
* **`esxi.instances[].tls.cipher_suites`**
Type: `array of string`. Optional.
TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector
uses the secure defaults from the Go TLS library. For supported names, see
[https://go.dev/src/crypto/tls/cipher\_suites.go](https://go.dev/src/crypto/tls/cipher_suites.go).
* **`esxi.instances[].tls.curve_preferences`**
Type: `array of string`. Optional.
Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral
handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults.
* **`esxi.instances[].tls.include_system_ca_certs_pool`**
Type: `boolean`. Optional.
Whether to add certificates from the system certificate authority pool to the configured
certificate authorities. If true, the Collector trusts both sources. If false, the Collector
trusts only the configured certificate authorities.
* **`esxi.instances[].tls.insecure`**
Type: `boolean`. Optional.
Whether to disable transport security. If true, the Collector uses an unencrypted connection.
If false, the Collector uses TLS.
* **`esxi.instances[].tls.insecure_skip_verify`**
Type: `boolean`. Optional.
Whether to skip verification of the vSphere server certificate. If true, the connection is
encrypted but isn't authenticated and is vulnerable to man-in-the-middle attacks. If false,
the Collector verifies the certificate.
* **`esxi.instances[].tls.key_file`**
Type: `string`. Optional.
Path to the PEM-encoded client private key file used with `cert_file` for mutual TLS
authentication.
* **`esxi.instances[].tls.key_pem`**
Type: `string`. Optional.
PEM-encoded client private key content used with `cert_pem` for mutual TLS authentication.
* **`esxi.instances[].tls.max_version`**
Type: `string`. Optional.
Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the maximum
version supported by the Go TLS library.
* **`esxi.instances[].tls.min_version`**
Type: `string`. Optional.
Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS
1.2.
* **`esxi.instances[].tls.reload_interval`**
Type: `duration`. Optional.
How often the Collector reloads certificate and key files. If omitted, the Collector doesn't
reload the files.
* **`esxi.instances[].tls.server_name_override`**
Type: `string`. Optional.
Server name to verify in the vSphere certificate instead of the endpoint hostname. Use this
setting when the certificate name differs from the endpoint hostname.
* **`esxi.instances[].tls.tpm`**
Type: `object`. Optional.
Trusted platform module settings for the TLS private key.
* **`esxi.instances[].tls.tpm.auth`**
Type: `string`. Optional.
Authorization value for the trusted platform module key.
* **`esxi.instances[].tls.tpm.enabled`**
Type: `boolean`. Optional.
Whether to use a trusted platform module for the TLS private key. If true, the Collector loads
the key from the configured device or socket. If false, the Collector uses the configured key
file or in-memory key.
* **`esxi.instances[].tls.tpm.owner_auth`**
Type: `string`. Optional.
Owner authorization value for the trusted platform module.
* **`esxi.instances[].tls.tpm.path`**
Type: `string`. Optional.
Path to the trusted platform module device or Unix domain socket, such as `/dev/tpm0` or
`/dev/tpmrm0`.
* **`esxi.instances[].username`**
Type: `string`. Required.
vSphere user for connecting to this endpoint. A read-only role on the vCenter Server or ESXi
host is sufficient.
# Windows
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/windows
Windows Event Log records, service-state metrics, and user-selected performance counters for Windows hosts, with per-channel, Service Control Manager, and per-counter-object target health.
The Windows integration requires CXDOT Collector 1.3.0 or greater.
[Windows Server](https://www.microsoft.com/en-us/windows-server) is Microsoft's
server operating system. Use the Windows integration to collect Windows Event Log
records, Windows service states, and selected performance counters from Windows
hosts.
The Windows integration supports Windows Server 2019 or greater.
## Supported telemetry types
The Windows integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | Yes |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The Windows integration has the following prerequisites:
* Run the Collector directly on each Windows host with `mode: host`.
* To collect the Security channel from a Collector that runs under an account other
than Local System, add that account to the Event Log Readers group.
* To use checkpoint storage, create the directory and restrict permissions to the
service account before enabling the store.
## Configure
The Windows integration runs by default on Windows hosts. It collects Critical,
Error, and Warning records from the System and Application channels and the states
of a default set of Windows services. Performance counter collection is off by
default.
To configure the Windows integration, follow these steps:
1. Run the Collector in host mode and export Event Log records to your tenant. The
default configuration requires no `windows` block. When the Collector runs as a
Windows service, set a machine-scoped `CHRONOSPHERE_API_TOKEN` environment variable
to your API token. The service doesn't inherit variables from an interactive
session, regardless of how you register it. For example, from an elevated
PowerShell session:
```powershell theme={null}
[Environment]::SetEnvironmentVariable('CHRONOSPHERE_API_TOKEN', '', 'Machine')
Restart-Service cxdot-collector
```
Add the following to the Collector configuration file:
```yaml theme={null}
cxdot:
mode: host
egress:
tenant:
org_name: MY_ORG
api_token: ${env:CHRONOSPHERE_API_TOKEN}
signals:
logs:
enabled: true
```
2. Optional: Select the Event Log channels to collect. The `channels` list replaces
the default System and Application list, so include those channels to continue
collecting them. For example, to add Security to the default channels, add the
following to the Collector configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
windows:
event_logs:
channels:
- channel: System
- channel: Application
query: >-
*[System[(Level=1 or Level=2 or
Level=3)]]
- channel: Security
```
Set a channel's `query` to a structured XML query to replace its default severity
filter. The Application entry in the preceding example shows the query syntax
while retaining the default severity filter. To reduce collection volume, use a
query instead of filtering records after the Collector reads them.
3. Optional: Select the services to monitor. Use exact Service Control Manager
service names, including capitalization. Run `Get-Service` in PowerShell to find
the service names on the host. For example, add the following to the Collector
configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
windows:
services:
include:
- EventLog
- W32Time
- MyCustomService
```
Set `include` to `[all]` to monitor every installed service. This setting creates
one time series per service, which can result in hundreds of time series per
host. Per-user services can increase that number.
4. Optional: Configure Windows performance counters. Performance counter collection
uses the Windows Performance Data Helper (PDH) and the English object and counter
names shown in Performance Monitor. For example, add the following to the Collector
configuration file:
```yaml theme={null}
cxdot:
mode: host
integrations:
windows:
performance_counters:
enabled: true
perfcounters:
- object: Memory
counters:
- name: Committed Bytes
metric: windows.memory.committed
metrics:
windows.memory.committed:
description: Committed virtual memory.
unit: By
gauge: {}
```
Use `_Total` for a bounded aggregate when an object has multiple instances.
The `*` instance selector creates one time series for every matching instance
and omits the `_Total` instance. To keep `_Total` as its own time series
with an `instance` attribute, list it with `*`, as in
`instances: ["*", "_Total"]`.
5. Optional: Disable the integration, or one of its capabilities, to stop collecting
from a host. For example, add the following to the Collector configuration file to
stop collecting Windows service states while continuing to collect Event Log records:
```yaml theme={null}
cxdot:
mode: host
integrations:
windows:
services:
enabled: false
```
Set `enabled: false` directly under `windows` to disable the whole integration.
6. Optional: Keep the read position across restarts. Checkpoint storage resumes
each channel where it stopped when the Collector restarts. A crash can replay or
lose up to one read batch. Create the directory and restrict permissions before
enabling the store:
```powershell theme={null}
mkdir C:\ProgramData\cxdot-collector
icacls C:\ProgramData\cxdot-collector /inheritance:r /grant "SYSTEM:(OI)(CI)F" "Administrators:(OI)(CI)F"
```
If the Collector runs as an account other than Local System, grant that account
Modify permission:
```powershell theme={null}
icacls C:\ProgramData\cxdot-collector /grant ":(OI)(CI)M"
```
Add the following to the Collector configuration file:
```yaml theme={null}
cxdot:
mode: host
storage:
checkpoints:
enabled: true
directory: C:\ProgramData\cxdot-collector
```
A bookmark is never deleted, so a channel or query that
returns after an absence resumes from its old bookmark and can collect
everything the channel retained since. A change to a channel's query, or to
which integrations run on the host, starts that channel from the end once, on
the restart that applies the change. Reordering or adding channels doesn't.
A configuration shared between Linux and Windows hosts needs a per-host
`directory` value, because the path is used as written on both.
### Validate
To validate the Windows integration, follow these steps:
1. In Live Telemetry Analyzer, filter for
`__name__=cxdot.integration.target.health cxdot.integration.name=windows`.
Confirm that each configured target reports `1`. Use the
`cxdot.integration.check` and `cxdot.integration.target` attributes to identify
the capability and target for each result.
2. In Metrics Explorer, run the following query:
```text theme={null}
{"windows.service.status", "name"=~"EventLog|eventlog"}
```
Confirm that the query returns a time series for the Windows Event Log service.
A value of `4` means the service is running. The query matches both
`EventLog` and `eventlog` because some tenants store label values in
lowercase.
3. On the Windows host, from an elevated command prompt, write a test Warning to the
Application log:
```bat theme={null}
eventcreate /L APPLICATION /T WARNING /ID 1 /SO cxdot-test /D "Windows integration test"
```
In Logs Explorer, filter for
`["cxdot.integration.name"] = "windows" AND "Windows integration test"`. Confirm that
the record appears with its channel, event ID, message, and provider.
4. Optional: If you configured performance counters, query one of the metric names
you defined. For the preceding example, run the following query in Metrics
Explorer:
```text theme={null}
{"windows.memory.committed"}
```
Confirm that the query returns a value from each configured Windows host.
### Troubleshooting
* The Collector Windows service doesn't start, and the System log shows only service
error 7023 or error 1064: When the Service Control Manager runs the Collector, the
Collector writes its logs, including the startup error, to the Application log. The
event source is the registered service name, such as `cxdot-collector`. Nothing
registers that event source, so Event Viewer might wrap each entry in a message that
says the description for the event ID from that source can't be found. The message
text from the Collector follows that wrapper. To write the logs to a file
instead, set `service.telemetry.logs.output_paths` in the Collector configuration
file. For example:
```yaml theme={null}
service:
telemetry:
logs:
output_paths: ["C:\\ProgramData\\cxdot-collector\\collector.log"]
```
Setting a file replaces the Event Log output for the service. Setting `stdout` or
`stderr` doesn't.
* The Collector service doesn't start after a host reboot or crash, and the log shows
`bind: Only one usage of each socket address (protocol/network address/port) is
normally permitted` for a `debug.sock` path: An unclean exit left the debug socket
file of the `cxdotdebug` extension behind. Collector versions 1.1.0 through 1.14.0
don't remove the file and fail every later start. Versions after 1.14.0 remove a
leftover socket file that nothing is serving at startup. On an affected version,
delete the file at the `cxdot.debug.socket_path` path and start the service. The
default path is `/var/run/cxdot-collector/debug.sock`, which on Windows resolves on
the system drive, such as `C:\var\run\cxdot-collector\debug.sock`. Upgrade the
Collector to resolve the problem permanently.
* The Collector service doesn't retry after it fails to start: By default, the Service
Control Manager applies a service's recovery actions only when the service crashes,
not when it fails to start. From an elevated command prompt, set the restart actions
and enable them for failures that aren't crashes:
```bat theme={null}
sc.exe failure cxdot-collector reset= 86400 actions= restart/5000/restart/5000/restart/60000
sc.exe failureflag cxdot-collector 1
```
Replace `cxdot-collector` with the registered service name if it differs. The service
restarts after 5 seconds, then 5 seconds, then 60 seconds, and the failure count
resets after a day without failures. The `failureflag` setting makes the recovery
actions apply to a start that exits with an error.
* A channel reports health `0`: Confirm the channel name and structured XML query in
Event Viewer. Confirm that the Windows account running the Collector can read the
channel. The Security channel requires membership in the Event Log Readers group.
* A channel reports health `1`, but no records appear: Unless checkpoint storage is
enabled, the integration collects only records written after the Collector starts.
Without a custom query, it collects only Critical, Error, and Warning records. Also
confirm that a logs exporter is configured. If you use tenant egress, enable
`cxdot.egress.tenant.signals.logs.enabled: true`.
* No records from the Collector service appear in exported Event Log records: The
integration always excludes the Collector service's own event provider from every
channel, so the Collector doesn't ingest its own error logs. The provider name
matches the registered Windows service name. The default exclusion is
`cxdot-collector`, which applies when the service is registered under that name.
* Events written while the Collector was stopped are missing: Enable checkpoint
storage. Without checkpoint storage, Event Log channels start from the end on each
restart, which means records written while the Collector was down are skipped.
* Old events flood in after a channel or checkpoint storage is added back: Bookmarks are
never deleted. Stop the Collector, delete the channel's bookmark file from the
checkpoint directory, and start the Collector. Each channel's bookmark filename ends
with `channel-`, the first 16 characters of the lowercased channel name with
punctuation replaced by `-`, another `-`, and the first 16 hexadecimal characters of
the Secure Hash Algorithm (SHA)-256 hash of the lowercased channel name. For
example, the `Application` channel's filename ends with
`channel-application-1fe289205936c3fd`.
* A channel reports health `1`, but no records appear after enabling checkpoint
storage: The Collector couldn't open its store at start. Check the Collector log for
`failed to start receiver` with the directory path, confirm the service account has
write permission, and restart.
* Checkpoint storage fails to start, or bookmarks land in an unexpected directory, on a
Windows host that shares its configuration with Linux hosts: `directory` is used as
written on both operating systems. A Linux path such as `/var/lib/cxdot-collector`
fails startup with `directory must exist` when `create_directory` is false, and is
created as `C:\var\lib\cxdot-collector` on the drive the Collector runs from when
it's true. Give each operating system its own `directory` value.
* A configured service has no status time series: Confirm that `services.include`
contains the exact Service Control Manager service name with matching
capitalization. A name that doesn't match an installed service produces no time
series.
* A stopped service has healthy Service Control Manager target health: Target health
reports whether the Collector can query the Service Control Manager. The
`windows.service.status` metric reports the state of each service.
* A performance counter object reports health `0`: Confirm the English object, counter,
and instance names in Performance Monitor. Also confirm that each counter's `metric`
value matches a key under `metrics`. If the counter was unavailable when the Collector
started, restart the Collector after the counter becomes available.
* A performance counter object reports health `1`, but a wildcard emits no time
series: The counter exists, but the object currently has no instances that match
`*`. Configure a named instance or wait for a matching instance to exist.
* The `_Total` time series is missing from wildcard collection: The `*` selector
alone omits `_Total`. List both in the object's `instances`, as in
`instances: ["*", "_Total"]`, to keep `_Total` with its `instance` attribute.
## Move the debug socket
> Requires CXDOT Collector v1.16.0 or later.
The Collector serves its debug views, which the `cxdot-admin` tool reads, on a socket
file at the `cxdot.debug.socket_path` path. The default path,
`/var/run/cxdot-collector/debug.sock`, resolves on the system drive, such as
`C:\var\run\cxdot-collector\debug.sock`. Anyone who can reach the socket can read
every debug view. To put the socket in a directory that only the Collector and
administrators can access, follow these steps:
1. From an elevated command prompt, create the directory and restrict its permissions:
```powershell theme={null}
mkdir C:\ProgramData\cxdot-collector
icacls C:\ProgramData\cxdot-collector /inheritance:r /grant "SYSTEM:(OI)(CI)F" "Administrators:(OI)(CI)F"
```
Skip this step if you already created the directory to
[enable checkpoint storage](#enable-checkpoint-storage). If
the Collector runs as an account other than Local System, grant that account
Modify permission on the directory.
2. Add the following to the Collector configuration file:
```yaml theme={null}
cxdot:
schema_version: v1.16
debug:
socket_path: C:\ProgramData\cxdot-collector\debug.sock
```
A drive-letter path requires `schema_version: v1.16` or later. At an earlier
`schema_version`, the path must start with `/`, such as
`/ProgramData/cxdot-collector/debug.sock`, which resolves on the system drive.
3. Restart the Collector.
4. From an elevated command prompt, pass the same path to `cxdot-admin` with
`--socket`, or set the `CXDOT_DEBUG_SOCKET` environment variable to it. The
permissions from step 1 require elevation. For example:
```powershell theme={null}
cxdot-admin debug --socket C:\ProgramData\cxdot-collector\debug.sock get
```
Without either, `cxdot-admin` reads the default path.
## Enable checkpoint storage
> Requires CXDOT Collector v1.6.0+otel-0.158.0 or later.
The CXDOT Collector can use checkpoint storage for Windows Event Log channels
collected by the Windows integration. If checkpoint storage is enabled, the Collector
saves its log read positions for each channel to disk, and will resume from those
saved positions if the Collector restarts. This lets the Collector retrieve logs
written by Windows Event Log while the Collector was stopped. If checkpoint storage
is disabled, the Collector starts reading logs from the end of each channel after a
restart, and won't collect any logs written while it was stopped.
Checkpoint storage is disabled by default. To enable it, follow these steps:
1. Create a directory where the Collector can save checkpoint files. The Collector
must have write permissions for this directory, and Palo Alto Networks
recommends restricting access to this directory so that other users or processes
can't write to it.
2. Add the following values to your CXDOT Collector configuration file:
```yaml theme={null}
cxdot:
storage:
checkpoints:
enabled: true
directory: PATH
```
Replace *`PATH`* with the absolute path to the directory that you created in
the previous step.
3. Optional: Add `fsync: true` to your CXDOT Collector configuration file:
```yaml theme={null}
cxdot:
storage:
checkpoints:
fsync: true
```
This setting is disabled by default. If `fsync` is enabled, the Collector saves
its log read positions to disk immediately, which reduces the chance of losing
the latest checkpoint during an restart, but increases the number of writes to
disk. If `fsync` is disabled, the operation system controls when to write
checkpoints to disk.
4. Restart the CXDOT Collector.
5. Confirm that the directory you created contains a checkpoint file. Checkpoint
filenames begin with `receiver_`.
### Delete checkpoint files
The CXDOT Collector doesn't delete checkpoint files. Outdated checkpoint files can
create unnecessary backlogs in certain scenarios, so Palo Alto Networks recommends
deleting any files in the checkpoint directory if you're re-enabling checkpoint
storage after an extended period of time. Additionally, if you remove a Windows Event
Log channel, Palo Alto Networks recommends deleting its associated checkpoint file
before restoring that channel.
To delete checkpoint files, follow these steps:
1. Stop the Collector. Never delete checkpoint files while the Collector is running.
2. Delete the files in the Collector's checkpoint directory. If you plan to continue
using checkpoint storage, don't delete the directory itself.
To delete the checkpoint file for a specific Windows Event Log channel, determine
which file is associated with that channel. The name of each checkpoint file
ends with a hexadecimal string derived from the name of its associated channel.
For example, a channel named `Application` will have a checkpoint file whose filename
ends in `e7ad522ea327e5ba`.
Use the following PowerShell command to calculate the hexadecimal string for a
specified channel name:
```shell theme={null}
-join ([Security.Cryptography.SHA256]::Create().ComputeHash([Text.Encoding]::UTF8.GetBytes("CHANNEL")) | Select-Object -First 8 | ForEach-Object { $_.ToString("x2") })
```
Replace *`CHANNEL`* with the name of your channel.
3. Start the Collector.
### Troubleshoot checkpoint storage
Use the following information to troubleshoot issues with checkpoint storage.
* The Collector doesn't start, and returns the message `directory must exist`: The path in
`directory` doesn't exist, or isn't a directory. Correct the path or create the
directory. On Linux, setting `create_directory` to `true` also resolves this
issue.
* The Collector starts and reports healthy, but log records stop arriving after you
enable checkpoint storage: The Collector can't write to the directory. The
Collector validates only that the directory exists, so it starts normally, but each
log receiver fails when it opens its checkpoint file. Check the Collector log for an
error that includes the checkpoint directory path. Grant the Collector write
permission on the directory and then restart the Collector.
* Records written while the Collector was stopped are missing: Confirm that
`enabled` is `true`, that the Collector runs with `mode: host` on Linux or Windows,
and that the Collector version supports checkpoint storage on that operating
system. The first start after you enable checkpoint storage doesn't collect earlier
records.
* Old records arrive after you enable checkpoint storage again or add a Windows
channel back: The Collector resumed from a stale read position. Stop the Collector,
delete the affected bookmark files from the checkpoint directory, and start the
Collector.
## Configuration reference
Configure one Windows integration instance with the following settings. In a Collector
configuration file, place them under `cxdot.integrations.windows`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`collection_interval`**
Type: `duration`. Optional. Default: `60s`.
How often the Collector reads service states and performance counters, and how often it checks
target health. Event Log channels are polled on `event_logs.poll_interval` instead.
* **`timeout`**
Type: `duration`. Optional. Default: `60s`.
Time limit for each service-state or performance-counter collection and each target health
evaluation. Windows Event Log and Performance Data Helper (PDH) calls can't be interrupted
after they begin, so a call already in progress can outlive this timeout. A performance
counter health evaluation stops before starting its next counter after the timeout.
* **`event_logs`**
Type: `object`. Optional.
Settings for collecting Windows Event Log records as log telemetry.
* **`event_logs.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`event_logs.channels`**
Type: `array of object`. Optional. Default:
`[{"channel":"System"},{"channel":"Application"}]`. Minimum items: `1`.
Event Log channels to collect, one collection stream per entry. The default collects the
System and Application channels, filtered to Critical, Error, and Warning events. Security is
deliberately not a default: its volume can be far higher, especially with logon and logoff
auditing enabled, and reading it might require the account that runs the Collector to be a
member of the Event Log Readers group. Add it here explicitly to collect it.
* **`event_logs.channels[].channel`**
Type: `string`. Required. Minimum length: `1`.
Channel name as shown in Event Viewer, for example, System, Application, Security, or a
provider channel such as Microsoft-Windows-Sysmon/Operational.
* **`event_logs.channels[].query`**
Type: `string`. Optional. Minimum length: `1`.
Structured XML event query, in the format that Event Viewer produces in the XML tab of Filter
Current Log. The query replaces the default severity filter for this channel and names its own
channel path, so it must repeat the channel. For example,
`* `
collects every System event. When unset, the channel collects Critical, Error, and Warning
events.
* **`event_logs.channels[].exclude_providers`**
Type: `array of string`. Optional. Default: `[]`.
Event providers to drop after reading, for a provider that's noisy or can't render. Prefer
narrowing `query`, because provider exclusion still pays the cost of reading each event. The
cxdot-collector service provider is always excluded to prevent the Collector from ingesting
its own error logs.
* **`event_logs.poll_interval`**
Type: `duration`. Optional. Default: `1s`.
How often each channel is polled for new records. Polling reads only records written since the
previous poll, so a longer interval batches reads rather than dropping events.
* **`event_logs.max_reads`**
Type: `integer`. Optional. Default: `100`. Minimum: `1`. Maximum: `1000`.
Maximum records read into memory in one batch. Each poll continues reading batches until no
records remain, so this setting doesn't cap the number of records collected per poll.
* **`services`**
Type: `object`. Optional.
Settings for collecting Windows service states, one `windows.service.status` time series per
service.
* **`services.enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`services.include`**
Type: `array of string`. Optional. Default:
`["CryptSvc","Dhcp","Dnscache","EventLog","LanmanServer","LanmanWorkstation","RpcSs","Schedule","WinRM"]`.
Minimum items: `1`.
Exact service names (the SCM name, for example, EventLog, not the display name) whose state to
collect, one `windows.service.status` time series for each service. The default is a curated
set of common core Windows services. The singleton list `[all]` collects every installed
service, one time series per service, typically a few hundred on a server, and more where
per-user services add session-suffixed instances (Remote Desktop and Desktop Experience
hosts). The `all` marker can't be combined with service names. Matching is exact and
case-sensitive against the name the Service Control Manager reports. A name that isn't
installed, or differs in case, produces no time series and no error.
* **`services.exclude`**
Type: `array of string`. Optional. Default: `[]`.
Exact service names to drop from collection, applied after `include`. Combine it with
`include: [all]` to trim the collect-everything set.
* **`performance_counters`**
Type: `object`. Optional.
Settings for reading Windows performance counters as metrics. Off by default: define the
counters to read and the metrics they map to, then enable it.
* **`performance_counters.enabled`**
Type: `boolean`. Optional. Default: `false`.
Whether to enable this configuration block. If true, the Collector runs the integration or
capability. If false, the Collector doesn't run it.
* **`performance_counters.perfcounters`**
Type: `array of object`. Optional. Minimum items: `1`.
The performance counter objects to read, each with its counters and, for multi-instance
objects, the instances to read. Every counter reads through the Performance Data Helper (PDH)
library, so names are the English names shown in Performance Monitor, for example, object
`Processor`, counter `% Processor Time`, instance `_Total`. Prefer the `_Total` instance for a
bounded host aggregate. `*` reads every instance and produces one time series per instance, so
for objects such as Process or Thread it multiplies time series by the number of instances.
`*` alone omits `_Total`, because the per-instance time series already sum to it. To keep
`_Total` alongside every other instance, list both, as in `instances: ["*", "_Total"]`. Every
counter must set `metric` to the name of an entry under `metrics`, which chooses the metric's
name, unit, and type. Data points read through a wildcard or a named instance carry an
`instance` attribute, including `_Total` when you list it with `*`; a lone `_Total` reads as
the object's aggregate without one.
* **`performance_counters.perfcounters[].aggregation_name`**
Type: `string`. Optional.
Name of the instance that aggregates all other instances of this object, for objects whose
aggregate isn't called `_Total`, such as `_Global_`. The Collector omits this instance when
it's read with other instances, and clears its `instance` attribute when it's read alone. To
keep it alongside `*`, set this field and list the same name in `instances`, for example,
`instances: ["*", "_Global_"]`.
* **`performance_counters.perfcounters[].counters`**
Type: `array of object`. Required. Minimum items: `1`.
The counters to read from this object. Each entry names a counter and the metric it maps to.
* **`performance_counters.perfcounters[].counters[].attributes`**
Type: `object`. Optional.
Static attributes attached to every data point this counter emits, as `name: value` pairs. Use
them to tell apart counters that map to the same metric.
* **`performance_counters.perfcounters[].counters[].metric`**
Type: `string`. Required. Minimum length: `1`.
Name of the metric that this counter's values are emitted as. Must name an entry under
`performance_counters.metrics`, which defines the metric's description, unit, and type.
* **`performance_counters.perfcounters[].counters[].name`**
Type: `string`. Required. Minimum length: `1`.
Counter name within the object, by its English name as shown in Performance Monitor, for
example, `% Processor Time`.
* **`performance_counters.perfcounters[].counters[].recreate_query`**
Type: `boolean`. Optional.
Whether to rebuild the counter query on every read. If true, the Collector recreates the query
at each collection, which picks up instances that appear after startup at the cost of
reopening the counter. If false, the Collector reuses the query opened at startup.
* **`performance_counters.perfcounters[].instances`**
Type: `array of string`. Optional.
For a multi-instance object, the instances to read: named instances, `_Total` for the
aggregate, or `*` for one time series per instance. `*` alone omits `_Total`. To keep `_Total`
as its own time series with an `instance` attribute, list it with `*`: `["*", "_Total"]`. Omit
for a single-instance object.
* **`performance_counters.perfcounters[].object`**
Type: `string`. Required. Minimum length: `1`.
Performance object to read, by its English name as shown in Performance Monitor, for example,
`Processor` or `LogicalDisk`.
* **`performance_counters.metrics`**
Type: `object`. Optional.
The metrics that counters can map to, keyed by metric name, each with a description, a unit
(default `1`), and either `gauge: {}` or
`sum: {aggregation: cumulative\|delta, monotonic: bool}`. Required when the capability is
enabled, because every counter's `metric` must name a key defined here. That link isn't
checked when the Collector validates its configuration: a counter that names an undefined
metric stops performance counter collection at startup with a logged error, and every object's
target health reads `0`.
# ZooKeeper
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/zookeeper
ZooKeeper connection, request, latency, and data tree metrics.
The ZooKeeper integration requires CXDOT Collector 1.7.0 or greater.
[Apache ZooKeeper](https://zookeeper.apache.org/) is a distributed coordination
service for maintaining configuration, naming, and synchronization data. Use the
ZooKeeper integration to collect connection, request, latency, and data tree metrics
from ZooKeeper servers running in your environment.
The ZooKeeper integration supports ZooKeeper 3.7 or greater.
## Supported telemetry types
The ZooKeeper integration supports these telemetry types:
| Type | Supported |
| :-: | :-: |
| Logs | No |
| Metrics | Yes |
| Traces | No |
| Events | No |
## Prerequisites
The ZooKeeper integration has the following prerequisites:
* Enable the `mntr`, `stat`, and `ruok` four-letter commands. For more information,
see [ZooKeeper four-letter commands](https://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_4lw).
For example, add the following setting to `zoo.cfg`:
```text theme={null}
4lw.commands.whitelist=mntr,stat,ruok
```
To confirm that ZooKeeper accepts the commands, run the following commands from a
host that can reach the server:
```shell theme={null}
printf 'mntr\n' | nc
printf 'stat\n' | nc
printf 'ruok\n' | nc
```
Confirm that the `mntr` response includes `zk_version` and `zk_server_state`, the
`stat` response includes the server mode, and the `ruok` response is `imok`.
* Make the ZooKeeper client port, typically `2181`, reachable from the CXDOT
Collector.
## Configure
The ZooKeeper integration is enabled by default. You can configure targets either by
annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm
values. To configure the ZooKeeper integration, follow these steps:
1. To collect from ZooKeeper pods in Kubernetes, add a CXDOT integration annotation to
the pod template. The annotation key must end with the container name. For example,
add the following annotation to your ZooKeeper workload:
```yaml theme={null}
spec:
template:
metadata:
annotations:
integrations.cxdot.paloaltonetworks.com/zookeeper: |
schema_version: v1.14
zookeeper:
endpoints:
- endpoint: ${target.host}:${target.port.client}
spec:
containers:
- name: zookeeper
image: zookeeper:3.9
ports:
- name: client
containerPort: 2181
```
The Collector replaces `${target.host}` with the pod IP address and
`${target.port.client}` with the container port named `client`.
The Collector also discovers ZooKeeper pods that carry the
`app.kubernetes.io/name: zookeeper` label and listen on port `2181`. A CXDOT
integration annotation takes precedence over the label for its container. To stop
collecting from a container, set `zookeeper: {enabled: false}` in the annotation.
Metrics from each discovered pod include that pod's Kubernetes metadata. For more
information, see
[autodiscovery](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/discover/kubernetes).
2. Optional: To collect from ZooKeeper servers outside your Kubernetes cluster,
configure static targets. For example, add the following to the `values.yaml` file
for the CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
zookeeper:
endpoints:
- endpoint: zookeeper.example.com:2181
```
This integration instance collects from exactly the listed targets and disables
discovery. In a Kubernetes deployment, the cluster-tier CXDOT Collector
collects static targets through one elected replica. For more information, see
[architecture](https://docs-xcor.paloaltonetworks.com/ingest/xcor/collector/install/kubernetes/architecture).
3. Optional: Configure separate integration instances to collect from both annotated
pods and static targets. For example, add the following to the `values.yaml` file for
the CXDOT Collector Helm chart:
```yaml theme={null}
collection:
cxdot:
integrations:
zookeeper: {}
zookeeper/external:
endpoints:
- endpoint: zookeeper.example.com:2181
```
The `zookeeper/external` key defines a named instance for the static targets.
Configuring a named instance suppresses the implicit default instance, so the empty
`zookeeper: {}` entry is required to keep discovering pods.
4. Optional: Disable the integration to stop collecting from discovered targets. For
example, add the following to the `values.yaml` file for the CXDOT Collector Helm
chart:
```yaml theme={null}
collection:
cxdot:
integrations:
zookeeper:
enabled: false
```
### Validate
To validate the ZooKeeper integration, follow these steps:
1. In the
[Live Telemetry Analyzer](https://docs-xcor.paloaltonetworks.com/investigate/analyze/telemetry-analyzer),
add the following filters:
* `__name__=cxdot.integration.target.health`
* `cxdot.integration.name=zookeeper`
Confirm that each target reports `1`, identified by its `server.address` and
`server.port` attributes.
2. In
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer),
run the following query while ZooKeeper clients create or delete data tree nodes:
```text theme={null}
sum by ("server.address", "server.port") ({"zookeeper.znode.count", "cxdot.integration.name"="zookeeper"})
```
Confirm that the query returns the expected data tree node count for each target.
## Configuration reference
Configure one ZooKeeper integration instance with the following settings. In Helm values, place
these settings under `collection.cxdot.integrations.zookeeper`. In a Collector configuration
file, place them under `cxdot.integrations.zookeeper`.
### Optional settings
* **`enabled`**
Type: `boolean`. Optional. Default: `true`.
Whether to run the ZooKeeper integration. If true, the Collector collects ZooKeeper metrics.
If false, the Collector doesn't run this integration.
* **`endpoints`**
Type: `array of object`. Optional. Default: `[]`.
ZooKeeper targets, specified as `host:port`. When this list is empty or omitted, the
integration uses automatic target discovery. When the list contains targets, this integration
instance collects from exactly those targets and doesn't use automatic target discovery.
Configure a second named instance to use both methods.
* **`endpoints[].endpoint`**
Type: `string`. Required.
`host:port` of the target.
* **`collection_interval`**
Type: `duration`. Optional. Default: `15s`.
How often the Collector requests metrics from each ZooKeeper target.
* **`timeout`**
Type: `duration`. Optional. Default: `15s`.
Maximum time the Collector waits for a ZooKeeper target to complete one collection, including
the connection attempt. This value must be greater than `0s` and must not exceed
`collection_interval`. If the deadline expires, that collection fails.
# Server integrations
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/server
Ingest metrics directly from cloud providers into Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR can ingest metrics directly from cloud providers.
Browse the full catalog and configure these integrations in the
[Integrations Hub](/integrate/integrations-hub).
> [card] [Amazon Web Services](/ingest/xcor/integrations/server/aws)
>
> Amazon CloudWatch metrics and AWS logs, delivered over Amazon Data Firehose from the AWS accounts and regions you choose.
> [card] [Cloudflare](/ingest/xcor/integrations/server/cloudflare)
>
> Cloudflare zone analytics from the GraphQL Analytics API: HTTP request, bandwidth, threat, security event, and DNS query metrics per zone.
> [card] [Google Cloud](/ingest/xcor/integrations/server/gcp)
>
> Cloud Monitoring metrics from the Google Cloud projects you choose, and Google Cloud logs sent through a Dataflow job.
> [card] [Microsoft Azure](/ingest/xcor/integrations/server/azure)
>
> Azure Monitor platform metrics for GA-supported resource types, plus derived inventory metrics for virtual networks and Service Bus.
For integrations that use the CXDOT Collector to send telemetry data to
Cortex XCOR, see [CXDOT Collector integrations](/ingest/xcor/integrations/collector).
# Amazon Web Services
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/server/aws
Send AWS metrics and logs to Palo Alto Networks Cortex XCOR.
[Amazon Web Services](https://aws.amazon.com/) (AWS) is Amazon's public cloud platform. Use the
AWS integration to send Amazon CloudWatch metrics and AWS logs from your AWS accounts to Palo Alto
Networks Cortex XCOR. CloudWatch Metric Streams send the metrics, and CloudWatch Logs
subscriptions send the logs, through Amazon Data Firehose.
## Supported telemetry types
The Amazon Web Services integration supports these telemetry types:
> [card] [Metrics](/ingest/xcor/integrations/server/aws/metrics)
>
> Learn how to send AWS CloudWatch metrics to Palo Alto Networks Cortex XCOR.
> [card] [Logs](/ingest/xcor/integrations/server/aws/logs)
>
> Learn how to send AWS logs to Palo Alto Networks Cortex XCOR.
# Ingest AWS logs
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/server/aws/logs
Learn how to send AWS logs to Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR receives Amazon Web Services (AWS) logs through
[Amazon Data Firehose](https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html).
In each AWS account and region, a Firehose stream sends logs to the AWS logs ingest
endpoint in your Cortex XCOR tenant. CloudWatch Logs reach the stream through a
subscription, and some AWS services send their logs to the stream directly.
## What it collects
* CloudWatch Logs: Logs that AWS services and your applications write to CloudWatch
log groups. Use an account-level subscription policy to cover every log group in a
region, including new ones, or add a subscription filter to each log group.
Subscriptions cover only log groups in the Standard log class. CloudTrail can also
send its events to a log group.
* Logs sent straight to Firehose: Services such as Virtual Private Cloud (VPC)
Flow Logs and Web Application Firewall (WAF) can deliver logs to a Firehose stream
without a log group.
* Not collected: Logs that AWS writes only to Amazon S3, such as Classic Load
Balancer access logs.
## How it works
The following diagram shows how AWS log sources reach Cortex XCOR and where Firehose
stores eligible failed deliveries.
```mermaid actions={false} theme={null}
graph LR
accTitle: AWS log delivery
accDescr: CloudWatch Logs, VPC Flow Logs, and AWS WAF send logs through Amazon Data Firehose to the Cortex XCOR AWS logs ingest endpoint. Eligible failed deliveries go to Amazon S3.
subgraph AWS-account
subgraph Region
lg[CloudWatch
log groups]
vl[VPC Flow Logs,
WAF]
adf[Amazon Data
Firehose]
s3[S3 bucket for eligible
failed data]
lg -- subscription --> adf
vl --> adf
adf -. retryable failures .-> s3
end
end
subgraph op[Cortex XCOR]
subgraph Tenant
ep[AWS logs
ingest endpoint]
end
end
adf --> ep
classDef greenFill stroke:#60E684,fill:#2FBF71,stroke-width:2px,color:#FFFFFF
class ep,op greenFill;
classDef blueFill fill:#000243,stroke-width:2px,color:#FFFFFF
class lg,vl,adf,s3,AWS-account blueFill;
classDef orange stroke-width:2px,color:#FFFFFF,stroke:#FF9D1C
class lg,vl,adf,s3,AWS-account orange
```
## Before you begin
* AWS permissions: The identity that runs the setup needs the permissions listed
in [Required permissions](#required-permissions).
* A Cortex XCOR API token: Create or use an API token for a restricted service
account with write-only permission. For more information, see
[Create a restricted service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account).
- Your organization name: The `` segment in
`https://.chronosphere.io`.
* Existing subscriptions: An account can have one account-level subscription policy
in each region, and each log group allows five subscription filters of its own,
which the account-level policy doesn't count against. If another tool already
uses the account-level policy, subscribe log groups individually. To inspect the
account policies, run:
```shell theme={null}
aws logs describe-account-policies --policy-type SUBSCRIPTION_FILTER_POLICY --region
```
### Required permissions
To run the setup using the
[AWS provider for Terraform](https://registry.terraform.io/providers/hashicorp/aws/latest/docs)
or CloudFormation in one account, the identity that runs it needs the following
permissions. These permissions allow the identity to create and remove the setup
resources. StackSets and the console need additional permissions.
* Amazon Data Firehose
* Actions: `CreateDeliveryStream`, `DeleteDeliveryStream`,
`DescribeDeliveryStream`, `UpdateDestination`, `ListTagsForDeliveryStream`,
`TagDeliveryStream`, `UntagDeliveryStream`
* Resource: The stream
* Amazon S3
* Actions: `CreateBucket`, `DeleteBucket`, `PutLifecycleConfiguration`,
`PutBucketTagging`, `ListBucket`, `Get*`, and `DeleteObject` to empty the bucket
when you remove it
* Resources: The failed-data bucket and its objects
* CloudWatch Logs
* Actions: `CreateLogGroup`, `DeleteLogGroup`, `PutRetentionPolicy`,
`CreateLogStream`, `DeleteLogStream`, `DescribeLogGroups`,
`DescribeLogStreams`, `ListTagsForResource`, `TagResource`, `PutAccountPolicy`,
`DeleteAccountPolicy`, `DescribeAccountPolicies`, `PutSubscriptionFilter`,
`DeleteSubscriptionFilter`, `DescribeSubscriptionFilters`
* Resource: All resources, because account policies have no resource ARN
* IAM
* Actions: `CreateRole`, `DeleteRole`, `GetRole`, `PutRolePolicy`,
`GetRolePolicy`, `DeleteRolePolicy`, `ListRolePolicies`,
`ListAttachedRolePolicies`, `ListInstanceProfilesForRole`, `PassRole`
* Resources: The two roles the setup creates
* AWS Secrets Manager
* Actions: `CreateSecret`, `DeleteSecret`, `DescribeSecret`, `UpdateSecret`,
`GetSecretValue`, `TagResource`, `UntagResource`
* Resource: The token secret
* CloudFormation, for the CloudFormation tab only
* Actions: `CreateChangeSet`, `DescribeChangeSet`, `ExecuteChangeSet`,
`DeleteChangeSet`, `DescribeStacks`, `DescribeStackEvents`, `DeleteStack`,
`GetTemplateSummary`
* Resource: The stack
The setup creates two roles:
* Firehose role: Trusted by Firehose in your account. It can write to the
failed-data bucket, read the token secret, and write the stream's error log.
* Subscription role: Trusted by CloudWatch Logs in your account. It can put
records into the stream.
If the token secret uses a customer managed AWS Key Management Service key, add
`kms:Decrypt` permission on the key to the Firehose role, and grant the role access
in the key policy.
The setup has no access to your existing buckets or other resources, and it doesn't
send logs written before it's in place.
## Firehose settings
Use these settings regardless of how you create the stream:
Firehose bills each CloudWatch Logs record at its compressed size, rounded up to
5 KB. Log groups that send few events per batch cost more per log. Additional AWS
data transfer charges can apply. Firehose sends a failed batch again on each retry,
so data transfer can grow while deliveries fail.
* Source: `Direct PUT`.
* Destination: `HTTP Endpoint`.
* HTTP endpoint URL:
`https://.chronosphere.io/api/v1/data/logs/ingest/integrations/aws`.
* Authentication: An AWS Secrets Manager secret containing
`{"api_key":""}`. Firehose picks up a rotated token within about
10 minutes. Using the API token as the endpoint access key also works, but stores
it in the stream settings.
* Content encoding: `GZIP` for smaller requests and lower data transfer costs.
* Retry duration: `7200` seconds, the longest Firehose allows. Records that still
fail go to the S3 bucket.
* Buffer size: `1` MiB. Keep this value at 4 MiB or less. Firehose treats the size
as a hint and encodes each record in a text representation larger than the source
record. Cortex XCOR rejects requests over 16 MiB with a `413`, and Firehose drops a
batch that gets a `413` without retrying it or backing it up.
* Buffer interval: `60` seconds.
* Decompression and message extraction: Off. Cortex XCOR decodes CloudWatch Logs
records. Message extraction removes the log group and log stream used to identify
the service.
* Source record backup in Amazon S3: `Failed data only`.
* Backup bucket lifecycle: Expire objects after `14` days. Cortex XCOR drops
retried logs more than 24 hours old.
* Parameters: None. For the exception for VPC Flow Logs in a custom format, see
[Send logs straight to Firehose](#send-logs-straight-to-firehose).
## Set up log delivery
Set up delivery in each account and region you want logs from.
The Integrations Hub has no configuration form for AWS logs. Configure delivery
in AWS by using one of the following methods.
> [tab] Terraform
>
> 1. Store your API token in AWS Secrets Manager in the region you're setting up. Note
> the secret's ARN.
>
> Read the token without echoing it, so it stays out of your shell history. Run the
> `read` command on its own:
>
> ```shell theme={null}
> printf 'API token: '; read -rs API_TOKEN; echo
> ```
>
> Then create the secret:
>
> ```shell theme={null}
> if [ -n "$API_TOKEN" ]; then
> printf '{"api_key":"%s"}' "$API_TOKEN" |
> aws secretsmanager create-secret --region \
> --name cortex-xcor/aws-logs-api-token \
> --secret-string file:///dev/stdin
> else
> echo 'API_TOKEN is empty: run the read command first'
> fi
> unset API_TOKEN
> ```
>
> 2. The configuration was tested with version 6 of the `aws` provider. The
> configuration also requires the `time` provider. Set the region on the `aws`
> provider:
>
> ```terraform theme={null}
> terraform {
> required_providers {
> aws = { source = "hashicorp/aws", version = ">= 6.0" }
> time = { source = "hashicorp/time" }
> }
> }
>
> provider "aws" {
> region = ""
> }
> ```
>
> 3. Set values for these variables, and apply the configuration in each account and
> region. It creates the Firehose stream, S3 bucket for failed data with a lifecycle
> rule, and IAM roles. Unless you turn it off, it also creates an account-level
> subscription policy that sends every log group in the region except the stream's
> own error logs.
>
> ```terraform expandable Terraform example icon="square-terminal" theme={null}
> # Variables
>
> variable "xcor_org_name" {
> type = string
> description = "The name of your Cortex XCOR organization, which is the subdomain name before .chronosphere.io."
> }
>
> variable "api_token_secret_arn" {
> type = string
> description = "The ARN of the Secrets Manager secret holding {\"api_key\":\"\"}, in the stream's region."
> }
>
> variable "stream_name" {
> type = string
> description = "The name of the Firehose stream."
> default = "cortex-xcor-logs"
> }
>
> variable "create_account_policy" {
> type = bool
> description = "Set to false if this account and region already has an account-level subscription policy."
> default = true
> }
>
> variable "failed_data_expiration_days" {
> type = number
> description = "Days to keep records Firehose couldn't deliver."
> default = 14
> }
>
> locals {
> tags = {
> "cortex-xcor:template" = "aws-logs-firehose"
> "cortex-xcor:template-version" = "1.0.0"
> }
> }
>
> data "aws_caller_identity" "current" {}
>
> # S3 bucket and log group for failed deliveries
>
> resource "aws_s3_bucket" "failed_data" {
> bucket_prefix = "cortex-xcor-logs-failed-"
> tags = local.tags
> }
>
> resource "aws_s3_bucket_lifecycle_configuration" "failed_data" {
> bucket = aws_s3_bucket.failed_data.id
> rule {
> id = "expire-failed-data"
> status = "Enabled"
> filter {}
> expiration {
> days = var.failed_data_expiration_days
> }
> }
> }
>
> resource "aws_cloudwatch_log_group" "firehose" {
> name = "/aws/kinesisfirehose/${var.stream_name}"
> retention_in_days = 14
> }
>
> resource "aws_cloudwatch_log_stream" "firehose" {
> name = "DestinationDelivery"
> log_group_name = aws_cloudwatch_log_group.firehose.name
> }
>
> # Firehose stream
>
> data "aws_iam_policy_document" "firehose_trust" {
> statement {
> actions = ["sts:AssumeRole"]
> principals {
> type = "Service"
> identifiers = ["firehose.amazonaws.com"]
> }
> condition {
> test = "StringEquals"
> variable = "aws:SourceAccount"
> values = [data.aws_caller_identity.current.account_id]
> }
> }
> }
>
> data "aws_iam_policy_document" "firehose_access" {
> statement {
> actions = [
> "s3:AbortMultipartUpload",
> "s3:GetBucketLocation",
> "s3:GetObject",
> "s3:ListBucket",
> "s3:ListBucketMultipartUploads",
> "s3:PutObject",
> ]
> resources = [aws_s3_bucket.failed_data.arn, "${aws_s3_bucket.failed_data.arn}/*"]
> }
> statement {
> actions = ["secretsmanager:GetSecretValue"]
> resources = [var.api_token_secret_arn]
> }
> statement {
> actions = ["logs:PutLogEvents"]
> resources = ["${aws_cloudwatch_log_group.firehose.arn}:*"]
> }
> }
>
> resource "aws_iam_role" "firehose" {
> name_prefix = "cortex-xcor-logs-firehose-"
> assume_role_policy = data.aws_iam_policy_document.firehose_trust.json
> }
>
> resource "aws_iam_role_policy" "firehose" {
> role = aws_iam_role.firehose.id
> policy = data.aws_iam_policy_document.firehose_access.json
> }
>
> resource "aws_kinesis_firehose_delivery_stream" "logs" {
> name = var.stream_name
> destination = "http_endpoint"
> tags = local.tags
>
> http_endpoint_configuration {
> name = "Cortex XCOR"
> url = "https://${var.xcor_org_name}.chronosphere.io/api/v1/data/logs/ingest/integrations/aws"
> buffering_size = 1 # MiB
> buffering_interval = 60 # seconds
> retry_duration = 7200 # seconds
> role_arn = aws_iam_role.firehose.arn
> s3_backup_mode = "FailedDataOnly"
>
> secrets_manager_configuration {
> enabled = true
> secret_arn = var.api_token_secret_arn
> role_arn = aws_iam_role.firehose.arn
> }
>
> s3_configuration {
> role_arn = aws_iam_role.firehose.arn
> bucket_arn = aws_s3_bucket.failed_data.arn
> buffering_size = 10 # MiB
> buffering_interval = 300 # seconds
> compression_format = "GZIP"
> }
>
> request_configuration {
> content_encoding = "GZIP"
> }
>
> cloudwatch_logging_options {
> enabled = true
> log_group_name = aws_cloudwatch_log_group.firehose.name
> log_stream_name = aws_cloudwatch_log_stream.firehose.name
> }
> }
> }
>
> # CloudWatch Logs subscription
>
> data "aws_iam_policy_document" "subscription_trust" {
> statement {
> actions = ["sts:AssumeRole"]
> principals {
> type = "Service"
> identifiers = ["logs.amazonaws.com"]
> }
> condition {
> test = "StringLike"
> variable = "aws:SourceArn"
> values = ["arn:aws:logs:*:${data.aws_caller_identity.current.account_id}:*"]
> }
> }
> }
>
> data "aws_iam_policy_document" "subscription_access" {
> statement {
> actions = ["firehose:PutRecord", "firehose:PutRecordBatch"]
> resources = [aws_kinesis_firehose_delivery_stream.logs.arn]
> }
> }
>
> resource "aws_iam_role" "subscription" {
> name_prefix = "cortex-xcor-logs-subscription-"
> assume_role_policy = data.aws_iam_policy_document.subscription_trust.json
> }
>
> resource "aws_iam_role_policy" "subscription" {
> role = aws_iam_role.subscription.id
> policy = data.aws_iam_policy_document.subscription_access.json
> }
>
> # CloudWatch Logs sends a test record when the policy is created, and a new
> # role's permissions can take a few seconds to take effect.
> resource "time_sleep" "subscription_role" {
> depends_on = [aws_iam_role_policy.subscription]
> create_duration = "30s"
> }
>
> resource "aws_cloudwatch_log_account_policy" "logs" {
> count = var.create_account_policy ? 1 : 0
> depends_on = [time_sleep.subscription_role]
>
> policy_name = "cortex-xcor-logs"
> policy_type = "SUBSCRIPTION_FILTER_POLICY"
> scope = "ALL"
> # The stream's own error logs are excluded, or they'd loop back into it.
> selection_criteria = "LogGroupName NOT IN [\"${aws_cloudwatch_log_group.firehose.name}\"]"
> policy_document = jsonencode({
> DestinationArn = aws_kinesis_firehose_delivery_stream.logs.arn
> RoleArn = aws_iam_role.subscription.arn
> FilterPattern = ""
> })
> }
>
> # Used to subscribe log groups individually
>
> output "stream_arn" {
> value = aws_kinesis_firehose_delivery_stream.logs.arn
> }
>
> output "subscription_role_arn" {
> value = aws_iam_role.subscription.arn
> }
> ```
>
> 4. If you set `create_account_policy = false`, follow
> [Subscribe individual log groups](#subscribe-individual-log-groups) with the
> `stream_arn` and `subscription_role_arn` outputs.
> [tab] AWS Management Console
>
> 1. In [AWS Secrets Manager](https://console.aws.amazon.com/secretsmanager/), store a
> secret of type **Other type of secret** with the key `api_key` and your API token
> as the value. Name it `cortex-xcor/aws-logs-api-token`.
> 2. Open the
> [Amazon Data Firehose console](https://console.aws.amazon.com/firehose/) and select
> **Create Firehose stream**.
> 3. Set the following options:
> * **Source:** `Direct PUT`
> * **Destination:** `HTTP Endpoint`
> * **Firehose stream name:** `cortex-xcor-logs`
> * **Transform records:** If the console offers **Decompress source records from
> Amazon CloudWatch Logs**, leave decompression and message extraction off.
> * **Destination settings:**
> * **HTTP endpoint name:** `Cortex XCOR`
> * **HTTP endpoint URL:**
> `https://.chronosphere.io/api/v1/data/logs/ingest/integrations/aws`.
> Replace `` with your organization name.
> * **Authentication:** `Use AWS Secrets Manager`, and select the secret you created.
> * **Content encoding:** `GZIP`
> * **Retry duration:** `7200 seconds`
> * Expand **Buffer hints**.
> * **Buffer size:** `1 MiB`
> * **Buffer interval:** `60 seconds`
> * **Backup settings:**
> * **Source record backup in Amazon S3:** `Failed data only`
> * **S3 backup bucket:** Create a bucket for this stream with default settings. In
> the bucket's **Management** tab, add a lifecycle rule that expires objects
> after 14 days. Don't add that rule to a bucket that holds other data.
> * Expand **Buffer hints, compression and encryption**, and set
> **Compression for data records** to `GZIP`.
> * **Advanced settings:** Under **Service access**, let the console create an IAM
> role. Confirm that the role allows `secretsmanager:GetSecretValue` on the secret.
> 4. Select **Create Firehose stream**.
> 5. In the [IAM console](https://console.aws.amazon.com/iam/), create a role that
> CloudWatch Logs can assume. Set the trusted entity to `logs.amazonaws.com`, with
> the condition that `aws:SourceArn` is like
> `arn:aws:logs:::*`. Grant the role `firehose:PutRecord` and
> `firehose:PutRecordBatch` on the stream.
> 6. Use the AWS Command Line Interface to subscribe log groups with an
> account-level subscription policy. Exclude the stream's own error log group to
> prevent its logs from looping back into the stream:
>
> ```shell theme={null}
> aws logs put-account-policy --region \
> --policy-name cortex-xcor-logs \
> --policy-type SUBSCRIPTION_FILTER_POLICY \
> --scope ALL \
> --selection-criteria 'LogGroupName NOT IN ["/aws/kinesisfirehose/cortex-xcor-logs"]' \
> --policy-document '{"DestinationArn":"","RoleArn":"","FilterPattern":""}'
> ```
>
> If the account already has an account-level subscription policy, subscribe log
> groups individually.
> [tab] CloudFormation
>
> 1. Store your API token in AWS Secrets Manager in the region you're setting up. Note
> the secret's ARN.
>
> Read the token without echoing it, so it stays out of your shell history. Run the
> `read` command on its own:
>
> ```shell theme={null}
> printf 'API token: '; read -rs API_TOKEN; echo
> ```
>
> Then create the secret:
>
> ```shell theme={null}
> if [ -n "$API_TOKEN" ]; then
> printf '{"api_key":"%s"}' "$API_TOKEN" |
> aws secretsmanager create-secret --region \
> --name cortex-xcor/aws-logs-api-token \
> --secret-string file:///dev/stdin
> else
> echo 'API_TOKEN is empty: run the read command first'
> fi
> unset API_TOKEN
> ```
>
> 2. Save this template as `cortex-xcor-aws-logs.yaml`. It creates the Firehose stream,
> S3 bucket for failed data with a lifecycle rule, and IAM roles. Unless you turn it
> off, it also creates an account-level subscription policy that sends every log
> group in the region except the stream's own error logs.
>
> ```yaml expandable CloudFormation template icon="file-code" theme={null}
> AWSTemplateFormatVersion: "2010-09-09"
> Description: Sends CloudWatch Logs in this account and region to Cortex XCOR through Amazon Data Firehose. Template version 1.1.0.
>
> Parameters:
> OrgName:
> Type: String
> Description: Your Cortex XCOR organization name, the subdomain before .chronosphere.io.
> ApiTokenSecretArn:
> Type: String
> Default: ""
> Description: ARN of the Secrets Manager secret holding {"api_key":""}, in this stack's region. Leave empty to set ApiToken instead.
> ApiToken:
> Type: String
> Default: ""
> NoEcho: true
> Description: The API token, for a stack that creates its own secret, such as a StackSet instance. Leave empty to set ApiTokenSecretArn instead.
> StreamName:
> Type: String
> Default: cortex-xcor-logs
> CreateAccountPolicy:
> Type: String
> Default: "true"
> AllowedValues: ["true", "false"]
> Description: Set to false if this account and region already has an account-level subscription policy.
> FailedDataExpirationDays:
> Type: Number
> Default: 14
> MinValue: 1
> Description: Days to keep records Firehose couldn't deliver.
>
> Rules:
> OneTokenSource:
> Assertions:
> - Assert: !Or [!Not [!Equals [!Ref ApiTokenSecretArn, ""]], !Not [!Equals [!Ref ApiToken, ""]]]
> AssertDescription: Set ApiTokenSecretArn or ApiToken.
> - Assert: !Or [!Equals [!Ref ApiTokenSecretArn, ""], !Equals [!Ref ApiToken, ""]]
> AssertDescription: Set only one of ApiTokenSecretArn and ApiToken.
>
> Conditions:
> CreatePolicy: !Equals [!Ref CreateAccountPolicy, "true"]
> CreateSecret: !Equals [!Ref ApiTokenSecretArn, ""]
>
> Resources:
> ApiTokenSecret:
> Type: AWS::SecretsManager::Secret
> Condition: CreateSecret
> Properties:
> Description: Cortex XCOR API token for the AWS logs Firehose stream
> SecretString: !Sub '{"api_key":"${ApiToken}"}'
>
> FailedDataBucket:
> Type: AWS::S3::Bucket
> DeletionPolicy: RetainExceptOnCreate
> UpdateReplacePolicy: Retain
> Properties:
> LifecycleConfiguration:
> Rules:
> - Id: expire-failed-data
> Status: Enabled
> ExpirationInDays: !Ref FailedDataExpirationDays
> Tags:
> - { Key: "cortex-xcor:template", Value: aws-logs-firehose }
> - { Key: "cortex-xcor:template-version", Value: "1.1.0" }
>
> FirehoseLogGroup:
> Type: AWS::Logs::LogGroup
> Properties:
> LogGroupName: !Sub /aws/kinesisfirehose/${StreamName}
> RetentionInDays: 14
>
> FirehoseLogStream:
> Type: AWS::Logs::LogStream
> Properties:
> LogGroupName: !Ref FirehoseLogGroup
> LogStreamName: DestinationDelivery
>
> FirehoseRole:
> Type: AWS::IAM::Role
> Properties:
> AssumeRolePolicyDocument:
> Version: "2012-10-17"
> Statement:
> - Effect: Allow
> Principal: { Service: firehose.amazonaws.com }
> Action: sts:AssumeRole
> Condition:
> StringEquals:
> aws:SourceAccount: !Ref AWS::AccountId
> Policies:
> - PolicyName: delivery
> PolicyDocument:
> Version: "2012-10-17"
> Statement:
> - Effect: Allow
> Action: [s3:AbortMultipartUpload, s3:GetBucketLocation, s3:GetObject, s3:ListBucket, s3:ListBucketMultipartUploads, s3:PutObject]
> Resource: [!GetAtt FailedDataBucket.Arn, !Sub "${FailedDataBucket.Arn}/*"]
> - Effect: Allow
> Action: secretsmanager:GetSecretValue
> Resource: !If [CreateSecret, !Ref ApiTokenSecret, !Ref ApiTokenSecretArn]
> - Effect: Allow
> Action: logs:PutLogEvents
> Resource: !GetAtt FirehoseLogGroup.Arn
>
> DeliveryStream:
> Type: AWS::KinesisFirehose::DeliveryStream
> Properties:
> DeliveryStreamName: !Ref StreamName
> DeliveryStreamType: DirectPut
> Tags:
> - { Key: "cortex-xcor:template", Value: aws-logs-firehose }
> - { Key: "cortex-xcor:template-version", Value: "1.1.0" }
> HttpEndpointDestinationConfiguration:
> EndpointConfiguration:
> Name: Cortex XCOR
> Url: !Sub https://${OrgName}.chronosphere.io/api/v1/data/logs/ingest/integrations/aws
> SecretsManagerConfiguration:
> Enabled: true
> SecretARN: !If [CreateSecret, !Ref ApiTokenSecret, !Ref ApiTokenSecretArn]
> RoleARN: !GetAtt FirehoseRole.Arn
> RequestConfiguration:
> ContentEncoding: GZIP
> BufferingHints:
> SizeInMBs: 1
> IntervalInSeconds: 60
> RetryOptions:
> DurationInSeconds: 7200
> RoleARN: !GetAtt FirehoseRole.Arn
> S3BackupMode: FailedDataOnly
> S3Configuration:
> BucketARN: !GetAtt FailedDataBucket.Arn
> RoleARN: !GetAtt FirehoseRole.Arn
> CompressionFormat: GZIP
> BufferingHints:
> SizeInMBs: 10
> IntervalInSeconds: 300
> CloudWatchLoggingOptions:
> Enabled: true
> LogGroupName: !Ref FirehoseLogGroup
> LogStreamName: !Ref FirehoseLogStream
>
> SubscriptionRole:
> Type: AWS::IAM::Role
> Properties:
> AssumeRolePolicyDocument:
> Version: "2012-10-17"
> Statement:
> - Effect: Allow
> Principal: { Service: logs.amazonaws.com }
> Action: sts:AssumeRole
> Condition:
> StringLike: { "aws:SourceArn": !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:*" }
> Policies:
> - PolicyName: put-to-firehose
> PolicyDocument:
> Version: "2012-10-17"
> Statement:
> - Effect: Allow
> Action: [firehose:PutRecord, firehose:PutRecordBatch]
> Resource: !GetAtt DeliveryStream.Arn
>
> AccountPolicy:
> Type: AWS::Logs::AccountPolicy
> Condition: CreatePolicy
> Properties:
> PolicyName: cortex-xcor-logs
> PolicyType: SUBSCRIPTION_FILTER_POLICY
> Scope: ALL
> # The stream's own error logs are excluded, or they'd loop back into it.
> SelectionCriteria: !Sub 'LogGroupName NOT IN ["/aws/kinesisfirehose/${StreamName}"]'
> PolicyDocument: !Sub '{"DestinationArn":"${DeliveryStream.Arn}","RoleArn":"${SubscriptionRole.Arn}","FilterPattern":""}'
>
> Outputs:
> DeliveryStreamArn:
> Value: !GetAtt DeliveryStream.Arn
> SubscriptionRoleArn:
> Value: !GetAtt SubscriptionRole.Arn
> ```
>
> 3. Deploy the stack:
>
> ```shell theme={null}
> aws cloudformation deploy --region \
> --template-file cortex-xcor-aws-logs.yaml \
> --stack-name cortex-xcor-aws-logs \
> --capabilities CAPABILITY_IAM \
> --parameter-overrides OrgName= ApiTokenSecretArn=
> ```
>
> `deploy` keeps a parameter's previous value when you leave it out. To switch an
> existing stack between `ApiToken` and `ApiTokenSecretArn`, pass the one you stop
> using as empty, such as `ApiToken=""`.
>
> 4. If you set `CreateAccountPolicy=false`, follow
> [Subscribe individual log groups](#subscribe-individual-log-groups) with the
> `DeliveryStreamArn` and `SubscriptionRoleArn` stack outputs.
### Set up many accounts and regions
Set up one stream in each account and region you want logs from. Each stream reports
its own deliveries, so a problem appears in the account and region it affects.
To deploy to many accounts in an organization in AWS Organizations, run the
CloudFormation template as a StackSet with service-managed permissions. Pass the API
token as `ApiToken` instead of `ApiTokenSecretArn`. Each stack instance then creates
its own secret, so accounts added later through automatic deployment need no extra setup,
unless they already have an account-level subscription policy. CloudFormation shows
`ApiToken` as `****`, but keeps it as a StackSet parameter. If the token should live
only in Secrets Manager, set up each account with `ApiTokenSecretArn` instead.
A StackSet exists only in the region where you create it. Choose one region to
administer it from, and pass that region as `--region ` on every
StackSet command, including later rotations and removal. With a delegated
administrator, pick one of the
[regions AWS supports for delegated administrators](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html).
Before you start,
[enable all features](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
in AWS Organizations and
[activate trusted access](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-activate-trusted-access.html)
for StackSets from the organization's management account:
```shell theme={null}
aws cloudformation activate-organizations-access
```
If a target account already has the single-account setup from this page in a target
region, remove it first, as described in [Remove log delivery](#remove-log-delivery).
The StackSet's stacks use the same stream and log group names, so their instances fail
there. The management account isn't targeted, so keep its setup.
To administer the StackSet from a
[delegated administrator](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html)
account instead, register that account from the management account:
```shell theme={null}
aws organizations register-delegated-administrator \
--service-principal member.org.stacksets.cloudformation.amazonaws.com \
--account-id
```
From a delegated administrator, add `--call-as DELEGATED_ADMIN` to every StackSet
command on this page: `create-stack-set`, `create-stack-instances`,
`update-stack-instances`, `update-stack-set`, `describe-stack-set-operation`,
`list-stack-instances`, `delete-stack-instances`, and `delete-stack-set`. The
delegated administrator also needs `organizations:ListDelegatedAdministrators`.
The following commands read the API token with `read -rs`. This command works in `bash`
and `zsh` and doesn't show the token as you paste it. Run the `read` command on its
own, before the commands that use the token.
1. Read the API token:
```shell theme={null}
printf 'API token: '; read -rs API_TOKEN; echo
```
2. Write the parameters to a file only you can read, so the token stays out of your
shell history:
```shell theme={null}
rm -f stackset-params.json
if [ -n "$API_TOKEN" ]; then
(umask 077 && cat > stackset-params.json) <"},
{"ParameterKey": "ApiToken", "ParameterValue": "$API_TOKEN"}
]
EOF
else
echo 'API_TOKEN is empty: run the read command first'
fi
unset API_TOKEN
```
3. Create the StackSet from the template in the CloudFormation tab, saved as
`cortex-xcor-aws-logs.yaml`, and then delete the parameters file:
```shell theme={null}
if [ -f stackset-params.json ]; then
aws cloudformation create-stack-set --region \
--stack-set-name cortex-xcor-aws-logs \
--template-body file://cortex-xcor-aws-logs.yaml \
--permission-model SERVICE_MANAGED \
--auto-deployment Enabled=true,RetainStacksOnAccountRemoval=false \
--capabilities CAPABILITY_IAM \
--parameters file://stackset-params.json
rm -f stackset-params.json
else
echo 'stackset-params.json is missing: run the previous step first'
fi
```
With automatic deployment, an account that joins a target organizational unit gets
a stack, and an account that leaves has its stack deleted. The deleted stack's
failed-data bucket is kept.
4. Deploy the StackSet to your organizational units and regions. `` can be the
organization's root ID (`r-...`) to cover every account.
```shell theme={null}
OP_ID=$(aws cloudformation create-stack-instances --region \
--stack-set-name cortex-xcor-aws-logs \
--deployment-targets OrganizationalUnitIds= \
--regions \
--operation-preferences RegionConcurrencyType=PARALLEL,MaxConcurrentPercentage=100,FailureTolerancePercentage=100 \
--query OperationId --output text)
```
These preferences deploy to every account and region at once and keep going past
accounts that fail. Without them, CloudFormation deploys to one account at a time
and stops at the first failure, which also skips every later region. The
preferences don't apply to automatic deployments.
5. Wait for the operation to finish, and then list the stack instances that failed.
With these preferences, the operation reports `SUCCEEDED` even when some instances
failed.
```shell theme={null}
while :; do
STATUS=$(aws cloudformation describe-stack-set-operation --region \
--stack-set-name cortex-xcor-aws-logs --operation-id "$OP_ID" \
--query StackSetOperation.Status --output text)
case "$STATUS" in RUNNING|QUEUED|STOPPING) sleep 30 ;; *) break ;; esac
done
echo "Operation $STATUS"
aws cloudformation list-stack-instances --region \
--stack-set-name cortex-xcor-aws-logs \
--filters Name=DETAILED_STATUS,Values=FAILED
```
A stack instance fails if its account already has an account-level subscription policy
in that region, because an account can have only one in each region. For each of those,
override `CreateAccountPolicy` to `false`, wait for the operation with the
commands in step 5, and then subscribe log groups individually in that account with
the `DeliveryStreamArn` and `SubscriptionRoleArn` outputs of its stack:
```shell theme={null}
OP_ID=$(aws cloudformation update-stack-instances --region \
--stack-set-name cortex-xcor-aws-logs \
--deployment-targets Accounts= \
--regions \
--parameter-overrides ParameterKey=CreateAccountPolicy,ParameterValue=false \
--operation-preferences RegionConcurrencyType=PARALLEL,MaxConcurrentPercentage=100,FailureTolerancePercentage=100 \
--query OperationId --output text)
```
Target accounts rather than an organizational unit, because an override set on an
organizational unit doesn't apply to accounts that join that unit later. Fix failed
instances promptly. Every later update to the StackSet retries creating them, which
makes the update much slower.
A StackSet with service-managed permissions doesn't deploy to the management account.
To collect that account's logs, set it up on its own as described earlier on this
page.
To rotate the token, read the new token on its own:
```shell theme={null}
printf 'API token: '; read -rs API_TOKEN; echo
```
Then update the StackSet's `ApiToken` parameter, keeping the other parameters:
```shell theme={null}
rm -f stackset-params.json
if [ -n "$API_TOKEN" ]; then
(umask 077 && cat > stackset-params.json) < \
--stack-set-name cortex-xcor-aws-logs \
--use-previous-template \
--capabilities CAPABILITY_IAM \
--operation-preferences RegionConcurrencyType=PARALLEL,MaxConcurrentPercentage=100,FailureTolerancePercentage=100 \
--parameters file://stackset-params.json \
--query OperationId --output text)
rm -f stackset-params.json
else
echo 'API_TOKEN is empty: run the read command first'
fi
unset API_TOKEN
```
Wait for the operation and list failed instances with the commands in step 5. If any
instance is listed, fix its cause and run the update again to retry the instances that
didn't update. If CloudFormation reports that another operation is in
progress, such as an automatic deployment, wait for it to finish and run the update
again.
If the management account's own setup uses the same token, update its secret in each
region where you set it up. Read the new token again:
```shell theme={null}
printf 'API token: '; read -rs API_TOKEN; echo
```
Then update each region:
```shell theme={null}
if [ -n "$API_TOKEN" ]; then
for region in ; do
printf '{"api_key":"%s"}' "$API_TOKEN" |
aws secretsmanager put-secret-value --region "$region" \
--secret-id cortex-xcor/aws-logs-api-token \
--secret-string file:///dev/stdin
done
else
echo 'API_TOKEN is empty: run the read command first'
fi
unset API_TOKEN
```
Each Firehose stream starts using the new token within 10 minutes of its secret
changing. Don't revoke the old token until every stack and the management account's
secret have updated, and 10 more minutes have passed.
This page doesn't cover sending logs from many accounts to one stream.
### Subscribe individual log groups
To send only some log groups, or when another tool holds the account-level policy,
add a subscription filter to each log group:
```shell theme={null}
aws logs put-subscription-filter --region \
--log-group-name \
--filter-name cortex-xcor-logs \
--filter-pattern "" \
--destination-arn \
--role-arn
```
Don't include these log groups in the account-level policy, or their logs arrive
twice.
### Send logs straight to Firehose
Some services deliver logs to a Firehose stream without a log group. Give each
service its own stream, created in the console with the same settings under a unique
name. By default, both the Terraform configuration, which uses the
[AWS provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs),
and the CloudFormation configuration create the account subscription policy, so
don't run them again for these streams. The account-level policy sends each
additional stream's error log group, `/aws/kinesisfirehose/`, to the
stream targeted by the policy unless you add the error log group to the policy
exclusion.
Cortex XCOR recognizes these logs on its own:
* AWS WAF: By the stream name, which AWS requires to start with
`aws-waf-logs-`, and by the log format.
* Amazon API Gateway: REST API access logs, identified by a stream name that starts
with `amazon-apigateway-`.
* VPC Flow Logs: By the default log format. For a custom format, add the stream
parameter `xcor_integration` with the value `aws_vpc`.
For other logs sent straight to Firehose, set the `xcor_integration` parameter to a
recognized AWS integration ID, such as `aws_cloudtrail`, `aws_eks`, `aws_lambda`, or
`aws_rds`. Cortex XCOR ignores unknown values. Logs it can't otherwise recognize are
stored with the label `aws_other`.
## Validate log ingestion
After setup, allow at least one minute for the configured Firehose buffer interval
before validating ingestion.
1. In the Amazon Data Firehose console, open the stream. **HTTP endpoint delivery
success** should report 100%, and **Records delivered to HTTP endpoint** should be
non-zero. A successful delivery means Cortex XCOR accepted the request. It doesn't
confirm that every log in the request passed ingestion validation.
2. In the navigation menu, select
**Explorers > [Logs Explorer](/investigate/querying/query-logs)**
and run:
```text theme={null}
["xcor.integration.name"] = "aws" | summarize count() by xcor_integration
```
Each AWS service sending logs appears as a row.
For more about queries, see
[Search and filter log data](/investigate/querying/query-logs).
## Log labels and fields
Every log gets two integration labels:
* `xcor.integration.name`: always `aws`, the integration's catalog ID.
* `xcor_integration`: the AWS service that wrote the log, such as `aws_lambda`,
`aws_rds`, `aws_eks`, `aws_vpc`, or `aws_cloudtrail`. Cortex XCOR determines the
service from the log group name, log stream name, log format, or a stream parameter.
Logs it can't attribute to an AWS service get `aws_other` and are stored like any
other log.
Keep the default AWS log group names. The exception is Amazon ECS: Cortex XCOR
recognizes ECS logs only in log groups under `/aws/ecs/` or `/aws/vendedlogs/ecs/`, so
the `/ecs/` group that the ECS console creates gets
`aws_other`. Cortex XCOR can still recognize some services from custom log group names
by using the log stream name or format. Other logs get `aws_other`.
Every log also carries these fields, set from the delivery rather than the log
message:
| Field | Value |
| :- | :- |
| `aws.account_id` | The account that owns the log group, or the Firehose stream's account for direct delivery |
| `aws.region` | The log group's region, when available, or the Firehose stream's region |
| `aws.firehose.arn`, `aws.firehose.stream`, `aws.firehose.request_id` | The stream and request |
| `aws.firehose.attributes.` | Each parameter you set on the stream |
Logs delivered through a CloudWatch Logs subscription also carry these fields:
| Field | Value |
| :- | :- |
| `aws.log_group`, `aws.log_stream` | Where CloudWatch Logs stored the log |
| `aws.subscription_filters`, `aws.event_id` | From the CloudWatch Logs subscription |
| `aws.timestamp` | When CloudWatch Logs stored the event |
For an organization trail, `aws.account_id` is the management account.
CloudTrail's `recipientAccountId` field identifies the account for each event, and
its `awsRegion` field identifies the event's region.
Cortex XCOR parses a JSON log message into fields and stores any other message in
`message`. For the following fields, values from the log message take precedence over
values that Cortex XCOR sets:
* Time: The log's `timestamp` field, then CloudTrail's `eventTime`, then the time
CloudWatch Logs stored the event. A log sent straight to Firehose without a time
gets the time Cortex XCOR receives it.
* Service: The `service` field is the `xcor_integration` value without `aws_`, such
as `cloudtrail`, `eks`, or `rds`. Lambda logs get the function name. Logs labeled
`aws_other` get the log group, or `aws_other` when there's no log group.
* Message: For CloudTrail, `message` is the event name, such as `AssumeRole`.
* Severity: CloudTrail events with an `errorCode` get `ERROR`, except
`Client.DryRunOperation`, which means a dry run would have succeeded. Other
CloudTrail events get `INFO`, and other logs without a severity get your
organization's default.
## Troubleshooting
Firehose records delivery errors in the log group `/aws/kinesisfirehose/`.
* `401` errors, or a `content-type: application/json` error whose raw response starts
with `401`: The token isn't an API token for a restricted service account with
write-only permission in this organization. After a token change, Firehose can keep
using the old token for up to 10 minutes.
* Secrets Manager errors: The secret must be JSON with the key `api_key`, and the
stream role needs `secretsmanager:GetSecretValue` on the secret. If the secret uses
a customer managed AWS Key Management Service key, the role also needs
`kms:Decrypt` on the key and access through the key policy.
* `404` errors, or a `content-type: application/json` error whose raw response starts
with `404`: The endpoint URL is incorrect. It must end in
`/api/v1/data/logs/ingest/integrations/aws`.
* Logs labeled `aws_other`: The log group has a custom name or is the ECS console's
`/ecs/` group, or the logs came straight from a service that Cortex XCOR couldn't
identify from the stream name or log format. Keep the default AWS log group names.
For a stream that carries only one service's logs, set the stream parameter
`xcor_integration` to a recognized AWS integration ID. For example, use `aws_vpc` for
a stream that carries only VPC Flow Logs in a custom format.
* Delivery succeeds but some logs are missing: Cortex XCOR drops individual logs
larger than 1 MiB, more than 24 hours old, or more than 24 hours in the future
without rejecting the Firehose request. CloudWatch Logs can deliver older events,
such as after a long outage. Cortex XCOR also skips corrupt compressed records and
records that make the request's decompressed contents exceed 256 MiB.
* Duplicate logs: After an error, Firehose sends the entire batch again, so some
records can arrive twice.
Records that still fail after the retry window go to the S3 bucket. Cortex XCOR
doesn't read the bucket, so those records aren't ingested unless they're sent again
within 24 hours of their timestamps.
## Remove log delivery
Until you remove it, the account-level policy keeps sending every log group in the
region to the stream, and Firehose continues billing for it.
* For Terraform, run `terraform destroy`.
* For CloudFormation, note the failed-data bucket's name, and then delete the stack:
```shell theme={null}
aws cloudformation describe-stack-resource --region \
--stack-name cortex-xcor-aws-logs --logical-resource-id FailedDataBucket \
--query StackResourceDetail.PhysicalResourceId --output text
aws cloudformation delete-stack --region --stack-name cortex-xcor-aws-logs
```
Starting with template version 1.1.0, deleting the stack keeps the failed-data
bucket, so leftover records can't make the delete fail. Its records still expire,
and you can delete it with `aws s3 rb s3:// --force` when you no longer need
them, where `` is the name the first command printed. If you passed
`ApiToken`, deleting the stack also deletes its secret immediately, without a
recovery window.
* For a StackSet, delete the stack instances from the organizational units and
regions you deployed to:
```shell theme={null}
OP_ID=$(aws cloudformation delete-stack-instances --region \
--stack-set-name cortex-xcor-aws-logs \
--deployment-targets OrganizationalUnitIds= \
--regions \
--operation-preferences RegionConcurrencyType=PARALLEL,MaxConcurrentPercentage=100,FailureTolerancePercentage=100 \
--no-retain-stacks \
--query OperationId --output text)
```
Wait for the operation with the commands in step 5 of
[Set up many accounts and regions](#set-up-many-accounts-and-regions), and then delete
the StackSet. Each account keeps its failed-data bucket.
```shell theme={null}
aws cloudformation delete-stack-set --region --stack-set-name cortex-xcor-aws-logs
```
* In the console, delete the account-level policy, then the Firehose stream,
subscription role, failed-data bucket, and the stream's error log group, which the
console creates:
```shell theme={null}
aws logs delete-account-policy --region \
--policy-name cortex-xcor-logs --policy-type SUBSCRIPTION_FILTER_POLICY
aws logs delete-log-group --region \
--log-group-name /aws/kinesisfirehose/cortex-xcor-logs
```
* For individual subscriptions, remove each subscription with:
```shell theme={null}
aws logs delete-subscription-filter --region \
--log-group-name --filter-name cortex-xcor-logs
```
If you use Terraform, delete resources manually, or delete a stack created from a
template earlier than version 1.1.0, empty the failed-data bucket first. Otherwise,
the bucket deletion fails. If you created the token secret yourself and passed
`ApiTokenSecretArn`, delete it too, because the setup doesn't own it. By default,
Secrets Manager schedules deletion with a 30-day recovery window. During that window,
another setup attempt with the same secret name fails. The
`--force-delete-without-recovery` option skips the recovery window. Deletion is
asynchronous, so wait and retry if the name remains unavailable:
```shell theme={null}
aws secretsmanager delete-secret --region --secret-id cortex-xcor/aws-logs-api-token \
--force-delete-without-recovery
```
# Ingest AWS CloudWatch metrics
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/server/aws/metrics
Learn how to send AWS CloudWatch metrics to Palo Alto Networks Cortex XCOR.
Palo Alto Networks Cortex XCOR receives Amazon CloudWatch metrics through
[CloudWatch Metrics Streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Metric-Streams.html).
Configure Amazon Web Services (AWS) to continuously stream metrics to Cortex XCOR
through the AWS Management Console or
[Terraform](/tooling/infrastructure/terraform).
## Before you begin
Some AWS services publish metrics at intervals longer than the two-hour ingestion age
limit in Cortex XCOR. For example, Amazon S3 daily storage metrics can have timestamps
older than two hours when CloudWatch delivers them. Before streaming a metric, verify
that its publishing interval is shorter than the ingestion age limit.
Cortex XCOR can read S3 daily storage metrics from CloudWatch instead: see
[S3 daily storage metrics](#s3-daily-storage-metrics).
### Control metric volume
CloudWatch Metric Streams generate metrics that consume Standard Metrics License
capacity. Before configuring ingestion, optionally create a
[drop rule](/control/shaping/shape-metrics/rules/drop-rules)
for unwanted metrics.
The following
[Chronoctl](/tooling/chronoctl) YAML resource
definition creates a drop rule that drops all metrics from CloudWatch Metric Streams
except the `AWS/CloudWatch/MetricStreams` and `AWS/Firehose` namespaces required by
the validation dashboards.
```yaml Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: DropRule
spec:
slug: drop-cloudwatch-metric-stream-metrics
name: Drop CloudWatch Metric Stream metrics
mode: ENABLED
filters:
- name: aws_exporter_arn
value_glob: arn:aws:cloudwatch:*
- name: Namespace!
value_glob: '{AWS/CloudWatch/MetricStreams,AWS/Firehose}'
```
Modify the rule to allow more metrics from other AWS namespaces. This example also
allows metrics from the AWS ECS namespace.
```yaml Chronoctl example icon="square-terminal" theme={null}
api_version: v1/config
kind: DropRule
spec:
slug: drop-cloudwatch-metric-stream-metrics
name: Drop CloudWatch Metric Stream metrics
mode: ENABLED
filters:
- name: aws_exporter_arn
value_glob: arn:aws:cloudwatch:*
- name: Namespace!
value_glob: '{AWS/CloudWatch/MetricStreams,AWS/Firehose,AWS/ECS}'
```
To reduce the AWS cost of streaming unwanted metrics, configure CloudWatch Metric
Streams to include or exclude specific namespaces:
1. In the AWS Management Console, go to **Streams**.
2. Edit the Metric Stream.
3. Under **Metrics to be streamed**, include or exclude namespaces.
## Configure CloudWatch Metric Streams
In each AWS account and region you want to collect metrics from, a CloudWatch Metric
Stream sends data to Amazon Data Firehose. The Firehose stream forwards the data to
the CloudWatch ingest endpoint in your Cortex XCOR tenant.
Cortex XCOR processes the metrics and makes them available for queries, monitors,
and dashboards.
```mermaid actions={false} theme={null}
graph LR
accTitle: AWS CloudWatch metrics delivery
accDescr: CloudWatch Metric Streams in AWS regions send metrics through Amazon Data Firehose to the Cortex XCOR CloudWatch ingest API.
subgraph AWS-account
subgraph US-EAST-2
cms1[CloudWatch
Metrics Stream]
adf1[AWS Data
Firehose]
end
subgraph US-WEST-2
cms2[CloudWatch
Metrics Stream]
adf2[AWS Data
Firehose]
end
cms1 --> adf1
cms2 --> adf2
end
subgraph op[Cortex XCOR]
subgraph Tenant
adf3[AWS Data
Firehose
ingest API]
ccp[Cortex XCOR Control
Plane]
end
end
adf3 --> ccp
adf1 & adf2 --> adf3
classDef greenFill stroke:#60E684,fill:#2FBF71,stroke-width:2px,color:#FFFFFF
class adf3,ccp greenFill;
classDef greenFillDark stroke:#60E684,fill:#2FBF71,stroke-width:2px,color:#FFFFFF
class op greenFillDark;
classDef blueFill fill:#000243,stroke-width:2px,color:#FFFFFF
class adf1,adf2,cms1,cms2,AWS-account blueFill;
classDef orange stroke-width:2px,color:#FFFFFF,stroke:#FF9D1C
class adf1,adf2,cms1,cms2,AWS-account orange
```
### CloudWatch roles and permissions
To use CloudWatch Metric Streams in Cortex XCOR, you must configure a
CloudWatch Metric Stream in each AWS account and region. The account you use to set
up the CloudWatch Metric Stream must either have the `CloudWatchFullAccess` policy
and `iam:PassRole` permission, or it must have the following list of permissions:
* `iam:PassRole`
* `cloudwatch:PutMetricStream`
* `cloudwatch:DeleteMetricStream`
* `cloudwatch:GetMetricStream`
* `cloudwatch:ListMetricStreams`
* `cloudwatch:StartMetricStreams`
* `cloudwatch:StopMetricStreams`
* `iam:CreateRole`
* `iam:PutRolePolicy`
### Cortex XCOR authentication
Create or use an API token for a Cortex XCOR restricted service account with
write-only permission. For more information, see
[Create a restricted service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account).
You must also provide your Cortex XCOR organization name. This is the ``
segment in `https://.chronosphere.io`.
### AWS resources and IAM roles
The setup creates the following resources and Identity and Access Management (IAM)
roles:
#### AWS resources
* Amazon S3 bucket: Stores eligible failed deliveries from Amazon Data Firehose.
* CloudWatch log group: Stores logs from the Firehose stream.
* Amazon Data Firehose stream: Sends metrics to Cortex XCOR through an HTTP
endpoint and stores eligible failed deliveries in the S3 bucket.
* IAM role for Amazon Data Firehose: Grants the Firehose stream these permissions
to access the S3 bucket and CloudWatch Logs:
* `s3:AbortMultipartUpload`
* `s3:GetBucketLocation`
* `s3:GetObject`
* `s3:ListBucket`
* `s3:ListBucketMultipartUploads`
* `s3:PutObject`
* `logs:PutLogEvents`
#### IAM roles
The setup also creates an IAM role with these permissions so CloudWatch Metric Streams
can publish data to the Firehose stream:
* `firehose:PutRecord`
* `firehose:PutRecordBatch`
### Apply the configuration
Choose the Terraform or AWS Management Console setup.
> [tab] Terraform
>
> 1. Set values for the following
> [Terraform](/tooling/infrastructure/terraform)
> variables, and then apply the configuration.
>
> ```terraform expandable Terraform example icon="square-terminal" theme={null}
> # Variables
>
> variable "chronosphere_org_name" {
> type = string
> description = "The name of your Cortex XCOR organization, which is the subdomain name before .chronosphere.io."
> }
>
> variable "chronosphere_api_token" {
> type = string
> sensitive = true
> description = "The API token for a Cortex XCOR Restricted Service Account with write-only permission."
> }
>
> variable "failed_data_bucket_name" {
> type = string
> description = "The name of the S3 bucket to create to store data that couldn't be delivered to Cortex XCOR. If not specified, a random name will be generated."
> default = ""
> }
>
> variable "common_resource_attributes" {
> type = map(string)
> description = "Key-value pairs to apply as OpenTelemetry Resource Attributes on all metrics in this stream."
> default = {}
> }
>
> # IAM Policy Documents
>
> data "aws_iam_policy_document" "kinesis-firehose-stream-role-trust-policy" {
> statement {
> sid = "AllowRoleAssumptionByKinesisFirehose"
> effect = "Allow"
> actions = ["sts:AssumeRole"]
>
> principals {
> type = "Service"
> identifiers = ["firehose.amazonaws.com"]
> }
> }
> }
>
> data "aws_iam_policy_document" "kinesis-firehose-stream-role-s3-policy" {
> statement {
> sid = "AllowFirehoseS3Access"
> effect = "Allow"
> actions = [
> "s3:AbortMultipartUpload",
> "s3:GetBucketLocation",
> "s3:GetObject",
> "s3:ListBucket",
> "s3:ListBucketMultipartUploads",
> "s3:PutObject"
> ]
>
> resources = [
> aws_s3_bucket.kinesis-firehose-stream-failed-data.arn,
> "${aws_s3_bucket.kinesis-firehose-stream-failed-data.arn}/*"
> ]
> }
>
> statement {
> sid = "AllowFirehoseCloudWatchLogs"
> effect = "Allow"
> actions = ["logs:PutLogEvents"]
> resources = ["${aws_cloudwatch_log_group.kinesis-firehose-stream.arn}:*"]
> }
> }
>
> data "aws_iam_policy_document" "cloudwatch-metric-stream-role-trust-policy" {
> statement {
> sid = "AllowRoleAssumptionByCloudWatchMetricStream"
> effect = "Allow"
> actions = ["sts:AssumeRole"]
>
> principals {
> type = "Service"
> identifiers = ["streams.metrics.cloudwatch.amazonaws.com"]
> }
> }
> }
>
> data "aws_iam_policy_document" "cloudwatch-metric-stream-role-firehose-policy" {
> statement {
> sid = "AllowCloudWatchFirehoseAccess"
> effect = "Allow"
> actions = [
> "firehose:PutRecord",
> "firehose:PutRecordBatch"
> ]
>
> resources = [
> aws_kinesis_firehose_delivery_stream.kinesis-firehose-stream.arn
> ]
> }
> }
>
> # S3
>
> resource "random_id" "default_bucket_name_suffix" {
> byte_length = 8
> }
>
> resource "aws_s3_bucket" "kinesis-firehose-stream-failed-data" {
> bucket = var.failed_data_bucket_name != "" ? var.failed_data_bucket_name : "chronosphere-cw-stream-failed-data-${random_id.default_bucket_name_suffix.hex}"
> }
>
> resource "aws_s3_bucket_public_access_block" "kinesis-firehose-stream-failed-data" {
> bucket = aws_s3_bucket.kinesis-firehose-stream-failed-data.id
> block_public_acls = true
> block_public_policy = true
> ignore_public_acls = true
> restrict_public_buckets = true
> }
>
> resource "aws_s3_bucket_server_side_encryption_configuration" "kinesis-firehose-stream-failed-data" {
> bucket = aws_s3_bucket.kinesis-firehose-stream-failed-data.id
>
> rule {
> apply_server_side_encryption_by_default {
> sse_algorithm = "AES256"
> }
>
> bucket_key_enabled = false
> }
> }
>
> resource "aws_s3_bucket_lifecycle_configuration" "kinesis-firehose-stream-failed-data" {
> bucket = aws_s3_bucket.kinesis-firehose-stream-failed-data.id
>
> rule {
> id = "Cleanup"
>
> expiration {
> days = 90
> }
>
> status = "Enabled"
> }
> }
>
> # CloudWatch Logs
>
> resource "aws_cloudwatch_log_group" "kinesis-firehose-stream" {
> name = "/aws/kinesisfirehose/chronosphere-cloudwatch-firehose"
> retention_in_days = 14
> }
>
> resource "aws_cloudwatch_log_stream" "kinesis-firehose-stream" {
> name = "HttpEndpointDelivery"
> log_group_name = aws_cloudwatch_log_group.kinesis-firehose-stream.name
> }
>
> # Kinesis Firehose Delivery Stream
>
> resource "aws_iam_role" "kinesis-firehose-stream-role" {
> name = "cloudwatch-firehose-stream-role"
> assume_role_policy = data.aws_iam_policy_document.kinesis-firehose-stream-role-trust-policy.json
>
> tags = {
> Name = "cloudwatch-firehose-stream-role"
> }
> }
>
> resource "aws_iam_role_policy" "kinesis-firehose-stream-role-s3-policy" {
> name = "KinesisFirehose-S3Access"
> role = aws_iam_role.kinesis-firehose-stream-role.id
> policy = data.aws_iam_policy_document.kinesis-firehose-stream-role-s3-policy.json
> }
>
> resource "aws_kinesis_firehose_delivery_stream" "kinesis-firehose-stream" {
> name = "chronosphere-cloudwatch-firehose"
> destination = "http_endpoint"
>
> http_endpoint_configuration {
> name = "chronosphere-http-endpoint"
> url = "https://${var.chronosphere_org_name}.chronosphere.io/data/metrics/api/v1/cloudwatch/firehose"
> access_key = var.chronosphere_api_token
> buffering_size = 1 # MiB
> buffering_interval = 60 # seconds
> role_arn = aws_iam_role.kinesis-firehose-stream-role.arn
> s3_backup_mode = "FailedDataOnly"
> retry_duration = 300 # seconds
>
> s3_configuration {
> role_arn = aws_iam_role.kinesis-firehose-stream-role.arn
> bucket_arn = aws_s3_bucket.kinesis-firehose-stream-failed-data.arn
> buffering_size = 10 # MiB
> buffering_interval = 300 # seconds
> compression_format = "GZIP"
> }
>
> request_configuration {
> content_encoding = "GZIP"
>
> dynamic "common_attributes" {
> for_each = var.common_resource_attributes
> iterator = attribute
> content {
> name = attribute.key
> value = attribute.value
> }
> }
> }
>
> cloudwatch_logging_options {
> enabled = true
> log_group_name = aws_cloudwatch_log_group.kinesis-firehose-stream.name
> log_stream_name = aws_cloudwatch_log_stream.kinesis-firehose-stream.name
> }
> }
>
> server_side_encryption {
> enabled = true
> }
> }
>
> # CloudWatch Metric Stream
>
> resource "aws_iam_role" "cloudwatch-metric-stream-role" {
> name = "cloudwatch-metric-stream-role"
> assume_role_policy = data.aws_iam_policy_document.cloudwatch-metric-stream-role-trust-policy.json
>
> tags = {
> Name = "cloudwatch-metric-stream-role"
> }
> }
>
> resource "aws_iam_role_policy" "cloudwatch-metric-stream-role-firehose-policy" {
> name = "MetricStreams-FirehosePutRecords"
> role = aws_iam_role.cloudwatch-metric-stream-role.id
> policy = data.aws_iam_policy_document.cloudwatch-metric-stream-role-firehose-policy.json
> }
>
> resource "aws_cloudwatch_metric_stream" "cloudwatch-metric-stream" {
> name = "chronosphere-cloudwatch-metric-stream"
> role_arn = aws_iam_role.cloudwatch-metric-stream-role.arn
> firehose_arn = aws_kinesis_firehose_delivery_stream.kinesis-firehose-stream.arn
> output_format = "opentelemetry1.0"
> }
> ```
> [tab] AWS Management Console
>
> To configure CloudWatch Metric Streams using the AWS Management Console:
>
> 1. Open the [CloudWatch console](https://console.aws.amazon.com/cloudwatch/).
> 2. In the navigation pane, go to **Metrics > Streams**.
> 3. Select **Create metric stream**.
> 4. Select **Custom setup with Firehose**.
> 5. To create an Amazon Data Firehose stream, select **Set up an Amazon Data Firehose stream**
> under **Select your Amazon Data Firehose stream**.
> 6. In **Create Firehose Stream**, set the following options:
> * **Set source:** `Direct PUT`
> * **Destination:** `HTTP Endpoint`
> * **Firehose stream name:** `chronosphere-cloudwatch-firehose`
> * **Destination settings:**
> * **HTTP endpoint name:** `Cortex XCOR CloudWatch Endpoint`
> * **HTTP endpoint URL:** `https://.chronosphere.io/data/metrics/api/v1/cloudwatch/firehose`.
> Replace `` with your Cortex XCOR organization name.
> * **Authentication:** `Use access key`
> * **Access key:** Enter your Cortex XCOR Restricted Service Account's
> API token.
> * **Content encoding:** `GZIP`
> * **Retry duration:** `300 seconds`
> * Expand **Buffering Hints**.
> * **Buffer size:** `1 MiB`
> * **Buffer interval:** `60 seconds`
> * **Backup settings:**
> * **Source record backup in Amazon S3:** `Failed data only`
> * **S3 backup bucket:** Select a bucket, or create a new bucket. If you create
> a new bucket, provide a unique name and leave all default settings.
> * Expand **Buffer hints, compression and encryption**.
> * **Buffer size:** `10 MiB`
> * **Buffer interval:** `300 seconds`
> * **Compression for data records:** `GZIP`
> 7. Select **Create Firehose stream**.
> 8. Return to **Create a metric stream**.
> 9. In **Select your Amazon Data Firehose stream**, select `chronosphere-cloudwatch-firehose`.
> This is the Amazon Data Firehose stream you created previously.
> 10. Expand **Change output format** and verify that the output format is
> `OpenTelemetry 1.0`.
> 11. Under **Metrics to be streamed**, select **All metrics** to stream all CloudWatch
> metrics, or **Select metrics** to define which metrics to include or exclude in
> the metrics stream.
> 12. Set the **Custom metric stream name** to `chronosphere-cloudwatch-metric-stream`.
> 13. Select **Create metric stream**.
## Validate CloudWatch Metric Stream ingestion
After setup, wait for data to arrive in Cortex XCOR. Validate ingestion with the
operational dashboards in Cortex XCOR and the AWS Management Console.
> [!NOTE]
>
> The included dashboards query the default CloudWatch metric names. For tenants
> configured for Datadog-compatible naming, validate the `snake_case` metric names in
> Metrics Explorer.
The integration also includes a Metrics Overview dashboard that shows CloudWatch Metric Streams
delivery volume and publish errors by account, region, and stream. It's available from the
Amazon Web Services integration in the Integrations Hub.
### Validate the CloudWatch Metrics Ingestion & Health dashboard
The CloudWatch Metrics Ingestion & Health dashboard displays operational information
about the health of your CloudWatch Metrics Streams integration with Cortex XCOR.
The CloudWatch Metric Streams and Data Firehose panel groups rely on
CloudWatch metrics sent from those services to Cortex XCOR. To populate
these charts, include metrics from the `AWS/Firehose` and
`AWS/CloudWatch/MetricStreams` namespaces in your CloudWatch Metrics Streams
configuration.
1. In Cortex XCOR, go to **Dashboards**.
2. In the search bar, enter **CloudWatch**, and then select the
**CloudWatch Metrics Ingestion & Health** dashboard.
The metrics ingestion panel group displays information about the CloudWatch
metrics Cortex XCOR received.
3. Use the **Data Firehose records received by Amazon Resource Name** chart to
confirm that the ingestion API received Data Firehose records.
4. Use the **CloudWatch metric updates received** chart to confirm the number of
CloudWatch metric updates Cortex XCOR extracts from the Data Firehose
records.
5. Confirm that the **Transformed metrics** chart shows no **Rejected Data Points**.
6. Use the **Unique time series by AWS metric namespace** chart to confirm that
metrics from the AWS namespaces you want are in the stream that Cortex XCOR received.
### Validate the Metric Stream dashboard
In the AWS Management Console, use the **Metric Updates** chart for specific
metrics to validate that metrics are streaming.
1. In the AWS Management Console, go to
**CloudWatch > Metric Streams**.
2. Select `chronosphere-cloudwatch-metric-stream` to view the status and operational
statistics.
3. Verify that the **Status** is `Running`.
4. Verify how many updates have been sent in the **Metric Updates** chart. If the
stream is working, the chart should report a non-zero number of updates.
5. Verify whether any errors were reported in the **Errors** chart. The value should
be 0.
### Validate the Amazon Data Firehose status
In the AWS Management Console, use the Firehose charts to validate that metrics are
streaming.
1. In the AWS Management Console, go to
**Amazon Data Firehose > Firehose Streams**.
2. Select `chronosphere-cloudwatch-firehose` to view status and operational statistics
for the Amazon Data Firehose.
3. The **Incoming bytes**, **Incoming put requests**, and **Incoming records** charts
should all report non-zero values.
4. The **HTTP endpoint delivery success** chart should report 100%.
5. The **Records delivered to HTTP endpoint** chart should report a non-zero value.
### Query metrics about AWS CloudWatch Metric Streams
Query metrics about AWS CloudWatch Metric Streams in Cortex XCOR. These metrics won't
appear in the Cortex XCOR Metrics Explorer
if you've defined a drop rule to drop all AWS metrics. Modify the rule to allow some
metrics, such as all metrics from the `AWS/CloudWatch/MetricStreams` namespace. For
examples, see [Control metric volume](#control-metric-volume).
1. In Cortex XCOR, go to
** Explorers > Metrics Explorer**.
2. In the query box, enter `aws_cloudwatch_metricstreams` to view a list of AWS
metrics received from the CloudWatch Metric Stream.
3. Select the metric you want to query to add it to the query prompt.
Write a query around the selected metric. For default metric naming, run this query
to report the rate of CloudWatch metric updates:
```text theme={null}
rate(aws_cloudwatch_metricstreams_MetricUpdate_sum[5m])
```
For Datadog-compatible metric naming, run:
```text theme={null}
rate(aws_cloudwatch_metricstreams_metric_update_sum[5m])
```
## Metric semantics
### Metric naming conventions
Metric names of ingested CloudWatch metrics in Cortex XCOR follow the
prefix naming pattern:
```text theme={null}
__
```
* ``: The namespace is lowercased, and Cortex XCOR replaces
all forward slash (`/`) and period (`.`) characters in the CloudWatch namespace
with underscores (`_`).
All AWS service namespaces follow the naming convention `AWS/`, where
`` is replaced with the service name. In Cortex XCOR,
the ingested metrics therefore begin with `aws_`. For a list of AWS
services and their respective namespaces, see
[AWS services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html).
If you create custom metrics, the namespace you set for the metric becomes the
metric name prefix in Cortex XCOR.
* ``: By default, Cortex XCOR preserves the CloudWatch metric name's
case. Tenants configured for Datadog-compatible naming receive the metric name in
`snake_case`.
* ``: Cortex XCOR appends the CloudWatch statistic's name
(`count`, `sum`, `maximum`, `minimum`, `average`). If you define additional statistics
for a metric, Cortex XCOR appends the corresponding CloudWatch metric
statistic name (`pXX`).
For examples, see [Example metric names](#example-metric-names).
### Metric labeling conventions
Cortex XCOR adds CloudWatch metric dimensions as labels to the time series
following the pattern `dimension_`. For examples, see
[Example metric names](#example-metric-names).
### Stream resource attributes
CloudWatch Metric Streams include OpenTelemetry Protocol (OTLP) resource attributes,
which Cortex XCOR merges into the time series. Cortex XCOR
replaces periods (`.`) with underscores (`_`) in attribute key names.
Amazon Data Firehose includes the following resource attributes in every post:
* `aws_exporter_arn`: The Amazon Resource Name (ARN) of the CloudWatch Metric Stream,
which uniquely identifies the metric writer instance.
* `cloud_account_id`: The AWS account associated with the CloudWatch Metric Stream,
such as `123456789012`.
* `cloud_provider`: The value is always `aws`.
* `cloud_region`: The AWS region of the Amazon Data Firehose sending the stream,
such as `us-east-2`.
For examples, see [Example metric names](#example-metric-names).
#### Add custom resource attributes using stream parameters
Define custom key-value pairs as parameters for Amazon Data Firehose to include in
each HTTP request. Cortex XCOR treats all additional parameters
as resource attributes and merges them into the time series.
> [!NOTE]
>
> Your custom parameters take precedence over the default CloudWatch metrics resource
> attributes. Avoid parameter names that conflict with default CloudWatch attribute
> names.
Configure additional parameters through Terraform or the AWS Management Console.
> [tab] Terraform
>
> To configure parameters using Terraform:
>
> 1. Edit the Terraform module.
> 2. In the `aws_kinesis_firehose_delivery_stream` resource definition, modify the
> `request_configuration` block to define additional `common_attributes`. The
> AWS Management Console names this setting **Parameters**, while the API name is
> `common_attributes`.
>
> The following example configures the `content_encoding` parameter as `GZIP` and
> defines two `common_attributes`, `testname` and `testname2`:
>
> ```terraform Terraform example icon="square-terminal" theme={null}
> request_configuration {
> content_encoding = "GZIP"
>
> common_attributes {
> name = "testname"
> value = "testvalue"
> }
>
> common_attributes {
> name = "testname2"
> value = "testvalue2"
> }
> }
> ```
> [tab] AWS Management Console
>
> To configure parameters using the AWS Management Console:
>
> 1. Navigate to the Amazon Data Firehose service.
> 2. Select the stream sending CloudWatch metrics
> (`chronosphere-cloudwatch-firehose`).
> 3. Select the **Configuration** tab in the Firehose stream details view.
> 4. In the **Destination settings** panel, select **Add parameters**.
> 5. In the **Edit destination settings** view, select **Add parameter**.
> 6. Enter the key and value. To add more parameters, select **Add parameter**.
> 7. Select **Save changes**.
### Example metric names
Given a CloudWatch metric with the following attributes:
* The namespace `AWS/EBS` (AWS Service)
* The metric name `VolumeReadBytes`
* The dimension `VolumeId`
* The custom Firehose destination parameter `environment`
* The CloudWatch metric resource attributes `aws_exporter_arn`, `cloud_account_id`,
`cloud_provider`, and `cloud_region`
Cortex XCOR creates metrics with these names and labels:
```text theme={null}
aws_ebs_VolumeReadBytes_count{dimension_VolumeId="xyz", aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
aws_ebs_VolumeReadBytes_sum{dimension_VolumeId="xyz", aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
aws_ebs_VolumeReadBytes_maximum{dimension_VolumeId="xyz", aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
aws_ebs_VolumeReadBytes_minimum{dimension_VolumeId="xyz", aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
aws_ebs_VolumeReadBytes_average{dimension_VolumeId="xyz", aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
```
Given a CloudWatch metric with the following attributes:
* The namespace `Buildkite` (custom metrics)
* The metric name `RunningJobsCount`
* The custom Firehose destination parameter `environment`
* No dimension
* CloudWatch resource metric attributes `aws_exporter_arn`, `cloud_account_id`,
`cloud_provider`, and `cloud_region`
Cortex XCOR creates metrics with these names and labels:
```text theme={null}
buildkite_RunningJobsCount_count{aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
buildkite_RunningJobsCount_sum{aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
buildkite_RunningJobsCount_maximum{aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
buildkite_RunningJobsCount_minimum{aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
buildkite_RunningJobsCount_average{aws_exporter_arn="abc123", cloud_account_id="123456789012", cloud_provider="aws", cloud_region="us-east-2", environment="staging"}
```
## S3 daily storage metrics
Amazon S3 publishes its daily storage metrics, `BucketSizeBytes` and
`NumberOfObjects`, to CloudWatch once a day, and they don't arrive in Cortex
XCOR through CloudWatch Metric Streams. Cortex XCOR can read them from
CloudWatch in your AWS accounts instead, with the same AWS read role it uses to
read your resource tags.
> [!NOTE]
>
> Cortex XCOR Support turns on these reads for your tenant. To request them, contact
> [Cortex XCOR Support](/support).
When Cortex XCOR Support turns on these reads, it also excludes both metrics
from the aggregation recommendations for your tenant, because their values
arrive after the window aggregation uses.
### Prerequisites for S3 daily storage metrics
Cortex XCOR reads the AWS accounts and regions where it reads your AWS resource
tags directly from AWS. Each account needs the Cortex XCOR AWS read role at
template version 1.1.0 or later, which grants the read-only
`cloudwatch:ListMetrics` and `cloudwatch:GetMetricData` actions these reads use.
* AWS bills `GetMetricData` requests to your account per metric requested. Cortex
XCOR requests each bucket's metrics once or twice a day.
* S3 publishes a bucket's storage metrics only in the bucket's own region. Cortex
XCOR reads no buckets in a region it doesn't read your resource tags in.
### S3 daily storage metric names
| Metric | Value | Unit |
| - | - | - |
| `aws_s3_bucket_size_bytes_average` | The data a bucket stores in one storage class, from `BucketSizeBytes` with the `Average` statistic. | Bytes |
| `aws_s3_number_of_objects_average` | The objects a bucket stores in every storage class, from `NumberOfObjects` with the `Average` statistic. | Count |
Each time series has these labels:
* `bucketname`: The bucket's name.
* `storagetype`: The storage class, such as `StandardStorage` or
`GlacierStorage`. For `aws_s3_number_of_objects_average`, it's always
`AllStorageTypes`.
* `Namespace` (always `AWS/S3`), `cloud_provider` (always `aws`),
`cloud_account_id` and `cloud_region`.
* `aws_account_alias`: The alias Cortex XCOR Support set for the account, or
else its AWS account alias. It's absent if the account has neither, or if the
account's read role isn't allowed `iam:ListAccountAliases`, which read role
template 1.2.0 grants.
* The bucket's resource tags, where Cortex XCOR reads them.
These time series don't have `dimension_*` labels or the stream resource
attributes that streamed metrics have.
### S3 daily storage timestamps
Cortex XCOR writes each UTC day's value with a timestamp one hour after the day
ends. For example, the value for November 16 has the timestamp November 17,
01:00 UTC. CloudWatch timestamps the same value at the start of its day, so
the CloudWatch console shows it a day earlier than Cortex XCOR does.
Cortex XCOR reads each day once or twice between about 01:05 and 03:00 UTC the
next day. After Cortex XCOR Support turns on these reads, the first value
arrives between about 01:05 and 02:05 UTC the next day, for the day that was in
progress when they were turned on. If they're turned on before about 03:00 UTC,
Cortex XCOR might also write the value for the day before. It doesn't write
values for earlier days.
If AWS publishes a day's value later than about 01:55 UTC the next day, the
day might be missing. If AWS changes a day's value after that, Cortex XCOR keeps
the value it read.
### Query S3 daily storage metrics
Each value has one data point a day, so queries need a lookback of more than a
day:
* To show each day's value at the end of its day in a time series panel, and to
line it up with other metrics, add `offset -1h` to the selector:
```text theme={null}
sum by (bucketname) (aws_s3_bucket_size_bytes_average{storagetype="StandardStorage"} offset -1h)
```
* To show the latest value in a stat panel, a table, or a monitor, use
`last_over_time` over 27 hours, with no offset. A day's value can arrive up
to about two hours after its timestamp, so a window of one day returns no
data each day from 01:00 UTC until that day's value arrives. An instant query
without `last_over_time` returns no data for most of each day.
```text theme={null}
sum by (bucketname) (last_over_time(aws_s3_bucket_size_bytes_average{storagetype="StandardStorage"}[27h]))
```
### Validate S3 daily storage ingestion
After 03:10 UTC on the day after Cortex XCOR Support turns on these reads, run
this query. It returns the number of buckets with a value in the last 27 hours:
```text theme={null}
count(last_over_time(aws_s3_number_of_objects_average[27h]))
```
## Monitor drop rules
To view the number of data points per second that Cortex XCOR drops with the example
CloudWatch Metric Streams drop rule, use the following PromQL query:
```text theme={null}
sum by (policy_name) (rate(chrono_policies_count{dropped="yes", policy_name="Drop CloudWatch Metric Stream metrics"}[5m]))
```
# Microsoft Azure
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/server/azure
Learn how to ingest Azure metrics into Palo Alto Networks Cortex XCOR.
> [!NOTE]
>
> This feature isn't available to all Palo Alto Networks Cortex XCOR users and
> might not be visible in your app. For information about enabling this feature in your
> environment, contact [Cortex XCOR Support](/support).
[Microsoft Azure](https://azure.microsoft.com/) is a public cloud platform. Use the
Microsoft Azure integration to collect
[Azure Monitor platform metrics](https://learn.microsoft.com/en-us/azure/azure-monitor/metrics/data-platform-metrics)
with Palo Alto Networks Cortex XCOR.
## Supported telemetry types
The Microsoft Azure integration supports these telemetry types:
| Logs | Metrics | Traces | Events |
| :-: | :-: | :-: | :-: |
| No | Yes | No | No |
## Create the Azure principal
Configure Azure to let Cortex XCOR collect metrics:
1. Create a dedicated Azure managed identity. Assign the built-in
[`Reader`](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/general#reader)
role for every subscription you want to collect. As a best practice, use the
identity only for Cortex XCOR to isolate its Azure API quota usage from other
workloads.
2. Retrieve the `credential_issuer` and `credential_subject` for your tenant.
Cortex XCOR displays both values in two places:
* In the Integrations Hub, select **Azure**. The **Your federated credential
values** panel on the **Overview** tab lists them as **Issuer** and **Subject**.
* Click your [profile icon](/navigate#your-account)
from the menu bar and select **My Account**. The values are displayed next to
**Azure Federated Credential Issuer** and **Azure Federated Credential Subject**.
If neither place displays the values, contact
[Cortex XCOR Support](/support) to obtain them.
3. Copy the `credential_issuer` and `credential_subject` values exactly into a
federated identity credential on the managed identity.
4. When creating the Azure principal, grant it access to subscriptions using one of
the following options:
* Management group-based: Grant access at the
[Azure Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview)
level. The integration collects subscriptions in each management group that the
managed identity can access. Changes to management group membership change the
subscriptions visible to the integration. You can grant the same managed identity
access to multiple management groups.
* Subscription-based: Grant access to individual subscriptions. Update the role
assignments when you add or remove subscriptions. The integration doesn't collect
subscriptions that the managed identity can't access.
5. Record the `azure_tenant_id` and `identity_client_id` Terraform outputs shown in the
following examples. Use these values to configure the integration in Cortex XCOR.
### Terraform examples
The following examples show how you can integrate Azure using one of the previously
mentioned methods:
> [tab] Management group
>
> The following Terraform code provides an example of how to create an Azure principal
> and grant it access to the subscriptions within a management group.
>
> ```terraform expandable Terraform example icon="square-terminal" theme={null}
> ################################################################################
> ## Azure Provider
>
> terraform {
> required_providers {
> azurerm = {
> source = "hashicorp/azurerm"
> version = "~> 4.0"
> }
> }
> }
>
> provider "azurerm" {
> subscription_id = var.subscription_id
> features {}
> }
>
> ################################################################################
> ## Terraform Variables
>
> variable "subscription_id" {
> type = string
> description = "Azure subscription ID in which to create resources"
> }
>
> variable "location" {
> type = string
> description = "Location in which to create resources"
> default = "eastus"
> }
>
> variable "resource_group_name" {
> type = string
> description = "Name of the existing resource group to create resources in"
> }
>
> variable "management_group_id" {
> type = string
> description = "Management group to be integrated with Cortex XCOR"
> default = "production-group"
> }
>
> variable "principal_name" {
> type = string
> description = "Name of the Azure principal managed identity"
> default = "cortex-xcor-integration"
> }
>
> variable "credential_issuer" {
> type = string
> description = "Federated identity credential issuer provided by Cortex XCOR"
> }
>
> variable "credential_subject" {
> type = string
> description = "Federated identity credential subject provided by Cortex XCOR"
> }
>
> ################################################################################
> ## Azure Resources
>
> data "azurerm_management_group" "this" {
> name = var.management_group_id
> }
>
> resource "azurerm_user_assigned_identity" "chronosphere" {
> name = var.principal_name
> location = var.location
> resource_group_name = var.resource_group_name
> }
>
> # Assign the principal the Reader role on all subscriptions in the management group.
> resource "azurerm_role_assignment" "chronosphere" {
> principal_id = azurerm_user_assigned_identity.chronosphere.principal_id
> scope = data.azurerm_management_group.this.id
> role_definition_name = "Reader"
> }
>
> resource "azurerm_federated_identity_credential" "chronosphere" {
> name = var.principal_name
> issuer = var.credential_issuer
> subject = var.credential_subject
> resource_group_name = var.resource_group_name
> parent_id = azurerm_user_assigned_identity.chronosphere.id
> audience = ["api://AzureADTokenExchange"]
> }
>
> ################################################################################
> ## Terraform Outputs
>
> output "azure_tenant_id" {
> value = azurerm_user_assigned_identity.chronosphere.tenant_id
> }
>
> output "identity_client_id" {
> value = azurerm_user_assigned_identity.chronosphere.client_id
> }
> ```
> [tab] Individual subscription
>
> The following Terraform code provides an example of how to create an Azure principal
> and grant it access to individual subscriptions. In this example, read access is
> granted to all accessible subscriptions.
>
> ```terraform expandable Terraform example icon="square-terminal" theme={null}
> ################################################################################
> ## Azure Provider
>
> terraform {
> required_providers {
> azurerm = {
> source = "hashicorp/azurerm"
> version = "~> 4.0"
> }
> }
> }
>
> provider "azurerm" {
> subscription_id = var.subscription_id
> features {}
> }
>
> ################################################################################
> ## Terraform Variables
>
> variable "subscription_id" {
> type = string
> description = "Azure subscription ID in which to create resources"
> }
>
> variable "location" {
> type = string
> description = "Location in which to create resources"
> default = "eastus"
> }
>
> variable "resource_group_name" {
> type = string
> description = "Name of the existing resource group to create resources in"
> }
>
> variable "principal_name" {
> type = string
> description = "Name of the Azure principal managed identity"
> default = "cortex-xcor-integration"
> }
>
> variable "credential_issuer" {
> type = string
> description = "Federated identity credential issuer provided by Cortex XCOR"
> }
>
> variable "credential_subject" {
> type = string
> description = "Federated identity credential subject provided by Cortex XCOR"
> }
>
> ################################################################################
> ## Azure Resources
>
> data "azurerm_subscriptions" "all" {}
>
> resource "azurerm_user_assigned_identity" "chronosphere" {
> name = var.principal_name
> location = var.location
> resource_group_name = var.resource_group_name
> }
>
> # Assign the principal the Reader role on each subscription.
> resource "azurerm_role_assignment" "chronosphere" {
> for_each = toset(data.azurerm_subscriptions.all.subscriptions[*].id)
> principal_id = azurerm_user_assigned_identity.chronosphere.principal_id
> scope = each.key
> role_definition_name = "Reader"
> }
>
> resource "azurerm_federated_identity_credential" "chronosphere" {
> name = var.principal_name
> issuer = var.credential_issuer
> subject = var.credential_subject
> resource_group_name = var.resource_group_name
> parent_id = azurerm_user_assigned_identity.chronosphere.id
> audience = ["api://AzureADTokenExchange"]
> }
>
> ################################################################################
> ## Terraform Outputs
>
> output "azure_tenant_id" {
> value = azurerm_user_assigned_identity.chronosphere.tenant_id
> }
>
> output "identity_client_id" {
> value = azurerm_user_assigned_identity.chronosphere.client_id
> }
> ```
## Set up Cortex XCOR to receive Azure data
After configuring Azure to enable access to metrics, you must configure
Cortex XCOR to receive and process those metrics.
To access the Cortex XCOR API directly, see the
[Cortex XCOR API for Azure metrics](/tooling/api-info/definition/operations/ListAzureMetricsIntegrations).
### View Azure metrics integrations
To list or view Azure metrics integrations, use one of the following options:
> [tab] Web
>
> In the Cortex XCOR [Integrations Hub](/integrate/integrations-hub),
> select **Microsoft Azure**, then select **Configurations**. Select a configuration to
> view its details.
> [tab] Chronoctl
>
> To list your Azure metrics integrations using [Chronoctl](/tooling/chronoctl),
> use this command:
>
> ```shell theme={null}
> chronoctl azure-metrics-integrations list
> ```
>
> To view an Azure metrics integration, use this command:
>
> ```shell theme={null}
> chronoctl azure-metrics-integrations read SLUG
> ```
>
> Replace *`SLUG`* with the unique identifier of the Azure metrics integration.
> [tab] API
>
> To list Azure metrics integrations with the Cortex XCOR API, use the
> [`ListAzureMetricsIntegrations`](/tooling/api-info/definition/operations/ListAzureMetricsIntegrations)
> endpoint.
>
> To view a single Azure metrics integration with the Cortex XCOR API, use
> the [`ReadAzureMetricsIntegration`](/tooling/api-info/definition/operations/ReadAzureMetricsIntegration)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR 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 or update an Azure metrics integration
Create or update an Azure metrics integration using the Integrations Hub, Chronoctl,
Terraform, or the Cortex XCOR API. The Integrations Hub requires the Editor or
SysAdmin role. Chronoctl, Terraform, and the API require the
[SysAdmin](/administer/accounts-teams/teams#add-a-role-to-a-team)
role.
> [tab] Web
>
> In the Cortex XCOR [Integrations Hub](/integrate/integrations-hub),
> select **Microsoft Azure**, then select **Configurations**. Add a configuration or
> select an existing configuration to edit. Enter the managed identity's tenant ID and
> client ID, configure the metrics to collect, and save the configuration.
> [tab] Chronoctl
>
> To create an Azure metrics integration using
> [Chronoctl](/tooling/chronoctl), use this command:
>
> ```shell theme={null}
> chronoctl azure-metrics-integrations create --filename FILENAME
> ```
>
> Replace *`FILENAME`* with the name of your Chronoctl configuration file.
>
> To update an Azure metrics integration, use this command:
>
> ```shell theme={null}
> chronoctl azure-metrics-integrations update --filename FILENAME
> ```
>
> Replace *`FILENAME`* with the name of your Chronoctl configuration file.
>
> The input file uses the following structure:
>
> ```yaml expandable Chronoctl example icon="square-terminal" theme={null}
> api_version: v1/config
> kind: AzureMetricsIntegration
> spec:
> name: NAME
> slug: SLUG
> principal:
> tenant_id: TENANT_ID
> client_id: CLIENT_ID
> scrape_config:
> resource_types:
> - name: RESOURCE_TYPE_NAME
> metric_names:
> - METRIC_NAME
> locations:
> - LOCATION
> subscription_ids:
> - SUBSCRIPTION_ID
> usage_metrics_enabled: USAGE_METRICS_ENABLED
> count_metrics_enabled: COUNT_METRICS_ENABLED
> propagate_tags: PROPAGATE_TAGS
> ```
> [tab] Terraform
>
> To create an Azure integration with
> [Terraform](/tooling/infrastructure/terraform), use the
> `chronosphere_azure_metrics_integration` resource:
>
> ```terraform expandable Terraform example icon="square-terminal" theme={null}
> resource "chronosphere_azure_metrics_integration" "chronosphere_azure_metrics" {
> name = "Azure Metrics"
> slug = "azure-metrics"
> principal {
> tenant_id = TENANT_ID
> client_id = CLIENT_ID
> }
> scrape_config {
> resource_type {
> name = RESOURCE_TYPE_NAME
> metric_names = [METRIC_NAME]
> }
>
> locations = [LOCATION]
> subscription_ids = [SUBSCRIPTION_ID]
> }
>
> usage_metrics_enabled = USAGE_METRICS_ENABLED
> count_metrics_enabled = COUNT_METRICS_ENABLED
> propagate_tags = PROPAGATE_TAGS
> }
> ```
> [tab] API
>
> To create Azure integrations with the Cortex XCOR API, use the
> [`CreateAzureMetricsIntegration`](/tooling/api-info/definition/operations/CreateAzureMetricsIntegration)
> endpoint.
>
> To update a single Azure integration with the Cortex XCOR API, use
> the [`UpdateAzureMetricsIntegration`](/tooling/api-info/definition/operations/UpdateAzureMetricsIntegration)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
Replace the following:
* *`NAME`*: (string) The name of the Azure integration.
* *`SLUG`*: (string) The unique identifier of the Azure integration.
* *`TENANT_ID`*: (UUID) The ID of the Azure tenant that hosts the managed identity principal.
* *`CLIENT_ID`*: (UUID) The OAuth 2.0 client ID of the managed identity principal.
* *`RESOURCE_TYPE_NAME`*: (string) Name of an Azure resource type.
* *`METRIC_NAME`*: (string) Name of a metric for the resource type. Leave the metric
list empty to retrieve all metrics.
* *`LOCATION`*: (string) Azure location to collect. Leave the locations list empty to
retrieve all locations.
* *`SUBSCRIPTION_ID`*: (string) Azure subscription to collect. Leave the subscription
list empty to retrieve all subscriptions.
* *`USAGE_METRICS_ENABLED`*: (Boolean) Enables collection of Azure usage metrics under
this principal (`Microsoft.Compute`, `Microsoft.Network`, `Microsoft.Storage`).
* *`COUNT_METRICS_ENABLED`*: (Boolean) Enables Azure count metrics for the configured
resources.
* *`PROPAGATE_TAGS`*: (Boolean) Specifies whether Azure resource, group, and
subscription tags should be propagated as metric labels.
### Delete an Azure integration
Delete an Azure integration using one of the following methods:
> [tab] Web
>
> In the Cortex XCOR [Integrations Hub](/integrate/integrations-hub),
> select **Microsoft Azure**, then select **Configurations**. Open the configuration and
> delete it. This action requires the Editor or SysAdmin role.
> [tab] Chronoctl
>
> Your account must have [SysAdmin](/administer/accounts-teams/teams#add-a-role-to-a-team)
> permissions to complete this action.
>
> To delete an Azure integration using
> [Chronoctl](/tooling/chronoctl), use this command:
>
> ```shell theme={null}
> chronoctl azure-metrics-integrations delete SLUG
> ```
>
> Replace *`SLUG`* with the unique identifier of the Azure metrics integration.
> [tab] API
>
> To complete this action with the Cortex XCOR API, use the
> [`DeleteAzureMetricsIntegration`](/tooling/api-info/definition/operations/DeleteAzureMetricsIntegration)
> endpoint.
>
> Because the Cortex XCOR 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](/tooling/api-info#create-an-api-token).
>
> ```shell /"TOKEN"/ /INSTANCE/ /METHOD/ /ENDPOINT_PATH/ theme={null}
> 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 Cortex XCOR instance.
> * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
> * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
## Validate metrics ingestion
After you save the integration, allow time for Azure to publish metrics and for Cortex
XCOR to collect them. In
[Metrics Explorer](/investigate/querying/metrics/explorer),
run:
```text theme={null}
count_over_time({__name__=~"azure_.+"}[30m])
```
A result means that Cortex XCOR received an Azure metric sample in the last 30
minutes. If the query returns no results, confirm that the managed identity can read
the configured subscriptions and that the selected resource types and metrics exist
in those subscriptions.
## Metric information
Cortex XCOR ingests a wide range of Azure metrics. See the
[list of available Azure metrics](/ingest/xcor/integrations/server/azure/azure-metrics).
### Metrics availability
By default, Cortex XCOR waits two minutes before collecting the newest Azure metric
points and uses a minimum two-minute collection interval. A metric's
[Azure time grain](https://learn.microsoft.com/en-us/azure/azure-monitor/metrics/metrics-aggregation-explained#granularity)
or a resource-specific collection setting can increase that interval. Some resources
use collection delays of up to 10 minutes. Additional delay depends on when Azure
publishes each metric.
If a monitor evaluates before its Azure data arrives, use the PromQL
[`offset` modifier](https://prometheus.io/docs/prometheus/latest/querying/basics/#offset-modifier)
to [add offsets to your monitors](/investigate/alerts/troubleshooting#add-offsets-to-your-query).
Points that arrive outside an aggregation rule's late-data buffer can be omitted from
the aggregated metric even when the raw metric point is available.
### Metric semantics
By default, metric names start with `azure_`. The configured metric-name prefix can
change this prefix. Metric names end in `_avg`, `_min`, `_max`, `_count`, or `_total`
to identify the Azure aggregation.
Cortex XCOR converts Azure's **Average**, **Minimum**, and **Maximum** aggregations to
gauges. It converts **Count** and **Total** aggregations to delta counters: each point
represents the value during Azure's aggregation interval, not a cumulative value.
**Total** points can be negative. To total **Count** or **Total** values across a query
window, use `sum_over_time()` instead of `rate()` or `increase()`.
### Metric labels
Standard Azure resource metrics include the `subscription_id`, `resource_group`,
`resource_type`, `resource_name`, and `location` labels. Usage and metadata-derived
metrics can have different label sets. Azure metric dimensions are also converted to
labels.
To add tenant-level custom labels to Azure metrics, contact
[Cortex XCOR Support](/support). These labels are
configured for your deployment rather than on an individual Azure integration. If a
custom label has the same normalized name as an existing metric label, the custom
label value overwrites the existing value.
When **Propagate tags** is enabled, Azure subscription, resource-group, and resource
tags are normalized and added as labels. Resource tags take precedence over
resource-group tags, which take precedence over subscription tags. Propagated tags
also overwrite existing metric and custom labels with the same normalized name. For
example, a propagated Azure tag that normalizes to `location` overwrites the metric's
existing `location` label.
### Find Azure metrics in Metrics Explorer
Use [Metrics Explorer](/investigate/querying/metrics/explorer)
to find and review the status of your ingested metrics.
* By default, Azure metrics start with the prefix `azure_`. Search for the configured
prefix to display Azure metrics in the platform.
* Search supports substrings. For example, if the original Azure metric name
contains a substring like `storageAccounts`, searching for the substring returns
the Azure metric, along with other metrics containing the substring.
## Troubleshooting
The following table lists common problems and how to resolve them:
| Symptom | Resolution |
| - | - |
| The configuration reports that the tenant ID isn't valid. | Copy the directory (tenant) ID from the Azure portal and confirm that the complete value is present. |
| No subscriptions can be read. | Assign the managed identity the `Reader` role on each subscription you want to collect. |
| A configured subscription isn't visible to the integration. | Check the subscription ID for a typo and confirm that the managed identity has the `Reader` role on that subscription. |
| Cortex XCOR can't reach Azure to list subscriptions. | Wait for Azure to respond. Collection resumes automatically. |
| Resource discovery doesn't finish. | Some metrics might be missing for that collection cycle. Cortex XCOR retries discovery automatically. |
## Limitations
* The integration collects Azure Monitor platform metrics. It doesn't collect Azure
logs or traces.
* The integration can collect only subscriptions and resources visible to the managed
identity.
* Propagated Azure tags can overwrite another label after label-name normalization.
# Azure metrics available in Palo Alto Networks Cortex XCOR
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/server/azure/azure-metrics
Reference the Azure metrics that Palo Alto Networks Cortex XCOR ingests.
Palo Alto Networks Cortex XCOR ingests the following metrics for Azure. If there are
additional metrics you want to ingest, contact [Cortex XCOR Support](/support).
By default, all metrics are scraped. Users can customize the allowed metrics by
customizing
[the scrape configuration](/tooling/api-info/definition/operations/CreateAzureMetricsIntegration).
For specific information about each metric, see Microsoft's documentation for
[Supported metrics with AzureMonitor](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/metrics-index).
## microsoft.analysisservices/servers
* `CleanerCurrentPrice`
* `CleanerMemoryNonshrinkable`
* `CleanerMemoryShrinkable`
* `CommandPoolBusyThreads`
* `CommandPoolIdleThreads`
* `CommandPoolJobQueueLength`
* `CurrentConnections`
* `CurrentUserSessions`
* `LongParsingBusyThreads`
* `LongParsingIdleThreads`
* `LongParsingJobQueueLength`
* `MemoryLimitHard`
* `MemoryLimitHigh`
* `MemoryLimitLow`
* `MemoryLimitVertiPaq`
* `MemoryUsage`
* `ProcessingPoolBusyIOJobThreads`
* `ProcessingPoolBusyNonIOThreads`
* `ProcessingPoolIOJobQueueLength`
* `ProcessingPoolIdleIOJobThreads`
* `ProcessingPoolIdleNonIOThreads`
* `ProcessingPoolJobQueueLength`
* `QueryPoolBusyThreads`
* `QueryPoolIdleThreads`
* `QueryPoolJobQueueLength`
* `Quota`
* `QuotaBlocked`
* `RowsConvertedPerSec`
* `RowsReadPerSec`
* `RowsWrittenPerSec`
* `ShortParsingBusyThreads`
* `ShortParsingIdleThreads`
* `ShortParsingJobQueueLength`
* `SuccessfullConnectionsPerSec`
* `TotalConnectionFailures`
* `TotalConnectionRequests`
* `VertiPaqNonpaged`
* `VertiPaqPaged`
* `mashup_engine_memory_metric`
* `mashup_engine_private_bytes_metric`
* `mashup_engine_qpu_metric`
* `mashup_engine_virtual_bytes_metric`
* `memory_metric`
* `memory_thrashing_metric`
* `private_bytes_metric`
* `qpu_metric`
* `virtual_bytes_metric`
## microsoft.apimanagement/service
* `BackendDuration`
* `Capacity`
* `ConnectionAttempts`
* `CpuPercent_Gateway`
* `Duration`
* `EventHubDroppedEvents`
* `EventHubRejectedEvents`
* `EventHubSuccessfulEvents`
* `EventHubThrottledEvents`
* `EventHubTimedoutEvents`
* `EventHubTotalBytesSent`
* `EventHubTotalEvents`
* `EventHubTotalFailedEvents`
* `FailedRequests`
* `MemoryPercent_Gateway`
* `NetworkConnectivity`
* `OtherRequests`
* `Requests`
* `SuccessfulRequests`
* `TotalRequests`
* `UnauthorizedRequests`
* `WebSocketMessages`
## microsoft.app/containerapps
* `CoresQuotaUsed`
* `CpuPercentage`
* `GpuUtilizationPercentage`
* `JvmBufferCount`
* `JvmBufferMemoryLimit`
* `JvmBufferMemoryUsage`
* `JvmGcCount`
* `JvmGcDuration`
* `JvmMemoryCommitted`
* `JvmMemoryLimit`
* `JvmMemoryTotalCommitted`
* `JvmMemoryTotalLimit`
* `JvmMemoryTotalUsed`
* `JvmMemoryUsed`
* `JvmThreadCount`
* `MemoryPercentage`
* `Replicas`
* `Requests`
* `ResiliencyConnectTimeouts`
* `ResiliencyEjectedHosts`
* `ResiliencyEjectionsAborted`
* `ResiliencyRequestRetries`
* `ResiliencyRequestTimeouts`
* `ResiliencyRequestsPendingConnectionPool`
* `ResponseTime`
* `RestartCount`
* `RxBytes`
* `TotalCoresQuotaUsed`
* `TxBytes`
* `UsageNanoCores`
* `WorkingSetBytes`
## microsoft.appconfiguration/configurationstores
* `DailyStorageUsage`
* `HttpIncomingRequestCount`
* `HttpIncomingRequestDuration`
* `ReplicationLatency`
* `RequestQuotaUsage`
* `SnapshotStorageSize`
* `ThrottledHttpRequestCount`
## microsoft.automation/automationaccounts
* `HybridWorkerPing`
* `TotalJob`
* `TotalUpdateDeploymentMachineRuns`
* `TotalUpdateDeploymentRuns`
## microsoft.batch/batchaccounts
* `CoreCount`
* `CreatingNodeCount`
* `IdleNodeCount`
* `JobDeleteCompleteEvent`
* `JobDeleteStartEvent`
* `JobDisableCompleteEvent`
* `JobDisableStartEvent`
* `JobStartEvent`
* `JobTerminateCompleteEvent`
* `JobTerminateStartEvent`
* `LeavingPoolNodeCount`
* `LowPriorityCoreCount`
* `OfflineNodeCount`
* `PoolCreateEvent`
* `PoolDeleteCompleteEvent`
* `PoolDeleteStartEvent`
* `PoolResizeCompleteEvent`
* `PoolResizeStartEvent`
* `PreemptedNodeCount`
* `RebootingNodeCount`
* `ReimagingNodeCount`
* `RunningNodeCount`
* `StartTaskFailedNodeCount`
* `StartingNodeCount`
* `TaskCompleteEvent`
* `TaskFailEvent`
* `TaskStartEvent`
* `TotalLowPriorityNodeCount`
* `TotalNodeCount`
* `UnusableNodeCount`
* `WaitingForStartTaskNodeCount`
## microsoft.cache/redis
* `ConnectedClientsUsingAADToken`
* `GeoReplicationConnectivityLag`
* `GeoReplicationDataSyncOffset`
* `GeoReplicationFullSyncEventFinished`
* `GeoReplicationFullSyncEventStarted`
* `GeoReplicationHealthy`
* `LatencyP99`
* `allConnectionsClosedPerSecond`
* `allConnectionsCreatedPerSecond`
* `allcacheRead`
* `allcacheWrite`
* `allcachehits`
* `allcachemisses`
* `allconnectedclients`
* `allevictedkeys`
* `allexpiredkeys`
* `allgetcommands`
* `alloperationsPerSecond`
* `allpercentprocessortime`
* `allserverLoad`
* `allsetcommands`
* `alltotalcommandsprocessed`
* `alltotalkeys`
* `allusedmemory`
* `allusedmemoryRss`
* `allusedmemorypercentage`
* `cacheLatency`
* `cacheRead`
* `cacheRead0`
* `cacheRead1`
* `cacheRead2`
* `cacheRead3`
* `cacheRead4`
* `cacheRead5`
* `cacheRead6`
* `cacheRead7`
* `cacheRead8`
* `cacheRead9`
* `cacheWrite`
* `cacheWrite0`
* `cacheWrite1`
* `cacheWrite2`
* `cacheWrite3`
* `cacheWrite4`
* `cacheWrite5`
* `cacheWrite6`
* `cacheWrite7`
* `cacheWrite8`
* `cacheWrite9`
* `cachehits`
* `cachehits0`
* `cachehits1`
* `cachehits2`
* `cachehits3`
* `cachehits4`
* `cachehits5`
* `cachehits6`
* `cachehits7`
* `cachehits8`
* `cachehits9`
* `cachemisses`
* `cachemisses0`
* `cachemisses1`
* `cachemisses2`
* `cachemisses3`
* `cachemisses4`
* `cachemisses5`
* `cachemisses6`
* `cachemisses7`
* `cachemisses8`
* `cachemisses9`
* `cachemissrate`
* `connectedclients`
* `connectedclients0`
* `connectedclients1`
* `connectedclients2`
* `connectedclients3`
* `connectedclients4`
* `connectedclients5`
* `connectedclients6`
* `connectedclients7`
* `connectedclients8`
* `connectedclients9`
* `errors`
* `evictedkeys`
* `evictedkeys0`
* `evictedkeys1`
* `evictedkeys2`
* `evictedkeys3`
* `evictedkeys4`
* `evictedkeys5`
* `evictedkeys6`
* `evictedkeys7`
* `evictedkeys8`
* `evictedkeys9`
* `expiredkeys`
* `expiredkeys0`
* `expiredkeys1`
* `expiredkeys2`
* `expiredkeys3`
* `expiredkeys4`
* `expiredkeys5`
* `expiredkeys6`
* `expiredkeys7`
* `expiredkeys8`
* `expiredkeys9`
* `getcommands`
* `getcommands0`
* `getcommands1`
* `getcommands2`
* `getcommands3`
* `getcommands4`
* `getcommands5`
* `getcommands6`
* `getcommands7`
* `getcommands8`
* `getcommands9`
* `operationsPerSecond`
* `operationsPerSecond0`
* `operationsPerSecond1`
* `operationsPerSecond2`
* `operationsPerSecond3`
* `operationsPerSecond4`
* `operationsPerSecond5`
* `operationsPerSecond6`
* `operationsPerSecond7`
* `operationsPerSecond8`
* `operationsPerSecond9`
* `percentProcessorTime`
* `percentProcessorTime0`
* `percentProcessorTime1`
* `percentProcessorTime2`
* `percentProcessorTime3`
* `percentProcessorTime4`
* `percentProcessorTime5`
* `percentProcessorTime6`
* `percentProcessorTime7`
* `percentProcessorTime8`
* `percentProcessorTime9`
* `serverLoad`
* `serverLoad0`
* `serverLoad1`
* `serverLoad2`
* `serverLoad3`
* `serverLoad4`
* `serverLoad5`
* `serverLoad6`
* `serverLoad7`
* `serverLoad8`
* `serverLoad9`
* `setcommands`
* `setcommands0`
* `setcommands1`
* `setcommands2`
* `setcommands3`
* `setcommands4`
* `setcommands5`
* `setcommands6`
* `setcommands7`
* `setcommands8`
* `setcommands9`
* `totalcommandsprocessed`
* `totalcommandsprocessed0`
* `totalcommandsprocessed1`
* `totalcommandsprocessed2`
* `totalcommandsprocessed3`
* `totalcommandsprocessed4`
* `totalcommandsprocessed5`
* `totalcommandsprocessed6`
* `totalcommandsprocessed7`
* `totalcommandsprocessed8`
* `totalcommandsprocessed9`
* `totalkeys`
* `totalkeys0`
* `totalkeys1`
* `totalkeys2`
* `totalkeys3`
* `totalkeys4`
* `totalkeys5`
* `totalkeys6`
* `totalkeys7`
* `totalkeys8`
* `totalkeys9`
* `usedmemory`
* `usedmemory0`
* `usedmemory1`
* `usedmemory2`
* `usedmemory3`
* `usedmemory4`
* `usedmemory5`
* `usedmemory6`
* `usedmemory7`
* `usedmemory8`
* `usedmemory9`
* `usedmemoryRss`
* `usedmemoryRss0`
* `usedmemoryRss1`
* `usedmemoryRss2`
* `usedmemoryRss3`
* `usedmemoryRss4`
* `usedmemoryRss5`
* `usedmemoryRss6`
* `usedmemoryRss7`
* `usedmemoryRss8`
* `usedmemoryRss9`
* `usedmemorypercentage`
## microsoft.cache/redisenterprise
* `cacheLatency`
* `cacheRead`
* `cacheWrite`
* `cachehits`
* `cachemisses`
* `connectedclients`
* `evictedkeys`
* `expiredkeys`
* `geoReplicationHealthy`
* `getcommands`
* `operationsPerSecond`
* `percentProcessorTime`
* `serverLoad`
* `setcommands`
* `totalcommandsprocessed`
* `totalkeys`
* `usedmemory`
* `usedmemorypercentage`
## microsoft.cdn/profiles
* `ActiveWebSocketConnections`
* `AverageWebSocketConnectionDuration`
* `ByteHitRatio`
* `OriginHealthPercentage`
* `OriginLatency`
* `OriginRequestCount`
* `OriginShieldOriginRequestCount`
* `OriginShieldRateLimitRequestCount`
* `OriginShieldRequestCount`
* `OriginShieldRequestSize`
* `Percentage4XX`
* `Percentage5XX`
* `RequestCount`
* `RequestSize`
* `ResponseSize`
* `TotalLatency`
* `WebApplicationFirewallCaptchaRequestCount`
* `WebApplicationFirewallJsRequestCount`
* `WebApplicationFirewallRequestCount`
* `WebSocketConnections`
## microsoft.cognitiveservices/accounts
* `ActionFeatureIdOccurrences`
* `ActionFeaturesPerEvent`
* `ActionIdOccurrences`
* `ActionNamespacesPerEvent`
* `ActionsPerEvent`
* `ActiveTokens`
* `AnnotatedPages`
* `AudioCompletionTokens`
* `AudioInputTokens`
* `AudioOutputTokens`
* `AudioPromptTokens`
* `AudioSecondsBatchTranscribed`
* `AudioSecondsBatchWhisperTranscribed`
* `AudioSecondsFastTranscribed`
* `AudioSecondsFastWhisperTranscribed`
* `AudioSecondsTranscribed`
* `AudioSecondsTranslated`
* `AvatarModelHostingSeconds`
* `AvatarModelTrainingSeconds`
* `AzureOpenAIAvailabilityRate`
* `AzureOpenAIContextTokensCacheMatchRate`
* `AzureOpenAINormalizedTBTInMS`
* `AzureOpenAINormalizedTTFTInMS`
* `AzureOpenAIProvisionedManagedUtilization`
* `AzureOpenAIProvisionedManagedUtilizationV2`
* `AzureOpenAIRequests`
* `AzureOpenAITTLTInMS`
* `AzureOpenAITimeToResponse`
* `AzureOpenAITokenPerSecond`
* `BaselineEstimatorOverallReward`
* `BaselineEstimatorSlotReward`
* `BaselineRandomEstimatorOverallReward`
* `BaselineRandomEstimatorSlotReward`
* `BaselineRandomEventCount`
* `BaselineRandomReward`
* `BlockedCalls`
* `CarnegieInferenceCount`
* `CharactersTrained`
* `CharactersTranslated`
* `ClientErrors`
* `ComputerVisionTransactions`
* `ContentSafetyImageAnalyzeRequestCount`
* `ContentSafetyTextAnalyzeRequestCount`
* `ContextFeatureIdOccurrences`
* `ContextFeaturesPerEvent`
* `ContextNamespacesPerEvent`
* `CustomVisionTrainingTime`
* `CustomVisionTransactions`
* `DataIn`
* `DataOut`
* `DocumentCharactersTranslated`
* `DocumentCustomCharactersTranslated`
* `FaceImagesTrained`
* `FaceTransactions`
* `FacesStored`
* `FeatureCardinality_Action`
* `FeatureCardinality_Context`
* `FeatureCardinality_Slot`
* `FineTunedTrainingHours`
* `GeneratedImages`
* `GeneratedTokens`
* `ImagesStored`
* `InputTokens`
* `JobDuration`
* `LUISSpeechRequests`
* `LUISTextRequests`
* `Latency`
* `LearnedEvents`
* `MatchedRewards`
* `ModelAvailabilityRate`
* `ModelRequests`
* `NonActivatedEvents`
* `NormalizedTimeBetweenTokens`
* `NormalizedTimeToFirstToken`
* `NumberOfSlots`
* `NumberofSpeakerProfiles`
* `ObservedRewards`
* `OneDocumentCharactersTranslated`
* `OneDocumentCustomCharactersTranslated`
* `OnlineEstimatorOverallReward`
* `OnlineEstimatorSlotReward`
* `OnlineEventCount`
* `OnlineReward`
* `OutputTokens`
* `ProcessedCharacters`
* `ProcessedHealthTextRecords`
* `ProcessedImages`
* `ProcessedPages`
* `ProcessedPromptTokens`
* `ProcessedTextRecords`
* `ProvisionedUtilization`
* `QuestionAnsweringTextRecords`
* `RAIAbusiveUsersCount`
* `RAIHarmfulRequests`
* `RAIRejectedRequests`
* `RAISystemEvent`
* `RAITotalRequests`
* `Ratelimit`
* `RealtimeUsageTime`
* `Reward`
* `ServerErrors`
* `SlotFeatureIdOccurrences`
* `SlotFeaturesPerEvent`
* `SlotIdOccurrences`
* `SlotNamespacesPerEvent`
* `SlotReward`
* `SpeakerRecognitionTransactions`
* `SpeechModelHostingHours`
* `SpeechSessionDuration`
* `SuccessRate`
* `SuccessfulCalls`
* `SynthesizedCharacters`
* `TextCharactersTranslated`
* `TextCustomCharactersTranslated`
* `TextTrainedCharacters`
* `TimeToLastByte`
* `TimeToResponse`
* `TokenTransaction`
* `TokensPerSecond`
* `TotalCalls`
* `TotalErrors`
* `TotalEvents`
* `TotalPages`
* `TotalTokenCalls`
* `TotalTokens`
* `TotalTransactions`
* `TranslatorProAppSeconds`
* `UserBaselineEventCount`
* `UserBaselineReward`
* `VideoSecondsSynthesized`
* `VoiceLiveAudioInputTokens`
* `VoiceLiveAudioOutputTokens`
* `VoiceLiveCachedAudioInputTokens`
* `VoiceLiveCachedTextInputTokens`
* `VoiceLiveTextInputTokens`
* `VoiceLiveTextOutputTokens`
* `VoiceModelHostingHours`
* `VoiceModelTrainingMinutes`
* `cacheReadInputTokens`
* `ephemeral1hInputTokens`
* `ephemeral5mInputTokens`
## microsoft.compute/virtualmachines
* `Available Memory Bytes`
* `Available Memory Percentage`
* `CPU Credits Consumed`
* `CPU Credits Remaining`
* `Data Disk Bandwidth Consumed Percentage`
* `Data Disk IOPS Consumed Percentage`
* `Data Disk Latency`
* `Data Disk Max Burst Bandwidth`
* `Data Disk Max Burst IOPS`
* `Data Disk Queue Depth`
* `Data Disk Read Bytes/sec`
* `Data Disk Read Operations/Sec`
* `Data Disk Target Bandwidth`
* `Data Disk Target IOPS`
* `Data Disk Used Burst BPS Credits Percentage`
* `Data Disk Used Burst IO Credits Percentage`
* `Data Disk Write Bytes/sec`
* `Data Disk Write Operations/Sec`
* `Disk Read Bytes`
* `Disk Read Operations/Sec`
* `Disk Write Bytes`
* `Disk Write Operations/Sec`
* `Inbound Flows`
* `Inbound Flows Maximum Creation Rate`
* `Network In`
* `Network In Total`
* `Network Out`
* `Network Out Total`
* `OS Disk Bandwidth Consumed Percentage`
* `OS Disk IOPS Consumed Percentage`
* `OS Disk Latency`
* `OS Disk Max Burst Bandwidth`
* `OS Disk Max Burst IOPS`
* `OS Disk Queue Depth`
* `OS Disk Read Bytes/sec`
* `OS Disk Read Operations/Sec`
* `OS Disk Target Bandwidth`
* `OS Disk Target IOPS`
* `OS Disk Used Burst BPS Credits Percentage`
* `OS Disk Used Burst IO Credits Percentage`
* `OS Disk Write Bytes/sec`
* `OS Disk Write Operations/Sec`
* `Outbound Flows`
* `Outbound Flows Maximum Creation Rate`
* `Percentage CPU`
* `Premium Data Disk Cache Read Hit`
* `Premium Data Disk Cache Read Miss`
* `Premium OS Disk Cache Read Hit`
* `Premium OS Disk Cache Read Miss`
* `Temp Disk Latency`
* `Temp Disk Queue Depth`
* `Temp Disk Read Bytes/sec`
* `Temp Disk Read Operations/Sec`
* `Temp Disk Write Bytes/sec`
* `Temp Disk Write Operations/Sec`
* `VM Cached Bandwidth Consumed Percentage`
* `VM Cached IOPS Consumed Percentage`
* `VM Local Used Burst BPS Credits Percentage`
* `VM Local Used Burst IO Credits Percentage`
* `VM Remote Used Burst BPS Credits Percentage`
* `VM Remote Used Burst IO Credits Percentage`
* `VM Uncached Bandwidth Consumed Percentage`
* `VM Uncached IOPS Consumed Percentage`
* `VmAvailabilityMetric`
## microsoft.compute/virtualmachinescalesets
* `Available Memory Bytes`
* `Available Memory Percentage`
* `CPU Credits Consumed`
* `CPU Credits Remaining`
* `Data Disk Bandwidth Consumed Percentage`
* `Data Disk IOPS Consumed Percentage`
* `Data Disk Latency`
* `Data Disk Max Burst Bandwidth`
* `Data Disk Max Burst IOPS`
* `Data Disk Queue Depth`
* `Data Disk Read Bytes/sec`
* `Data Disk Read Operations/Sec`
* `Data Disk Target Bandwidth`
* `Data Disk Target IOPS`
* `Data Disk Used Burst BPS Credits Percentage`
* `Data Disk Used Burst IO Credits Percentage`
* `Data Disk Write Bytes/sec`
* `Data Disk Write Operations/Sec`
* `Disk Read Bytes`
* `Disk Read Operations/Sec`
* `Disk Write Bytes`
* `Disk Write Operations/Sec`
* `Inbound Flows`
* `Inbound Flows Maximum Creation Rate`
* `Network In`
* `Network In Total`
* `Network Out`
* `Network Out Total`
* `OS Disk Bandwidth Consumed Percentage`
* `OS Disk IOPS Consumed Percentage`
* `OS Disk Latency`
* `OS Disk Max Burst Bandwidth`
* `OS Disk Max Burst IOPS`
* `OS Disk Queue Depth`
* `OS Disk Read Bytes/sec`
* `OS Disk Read Operations/Sec`
* `OS Disk Target Bandwidth`
* `OS Disk Target IOPS`
* `OS Disk Used Burst BPS Credits Percentage`
* `OS Disk Used Burst IO Credits Percentage`
* `OS Disk Write Bytes/sec`
* `OS Disk Write Operations/Sec`
* `Outbound Flows`
* `Outbound Flows Maximum Creation Rate`
* `Percentage CPU`
* `Premium Data Disk Cache Read Hit`
* `Premium Data Disk Cache Read Miss`
* `Premium OS Disk Cache Read Hit`
* `Premium OS Disk Cache Read Miss`
* `Temp Disk Latency`
* `Temp Disk Queue Depth`
* `Temp Disk Read Bytes/sec`
* `Temp Disk Read Operations/Sec`
* `Temp Disk Write Bytes/sec`
* `Temp Disk Write Operations/Sec`
* `VM Cached Bandwidth Consumed Percentage`
* `VM Cached IOPS Consumed Percentage`
* `VM Local Used Burst BPS Credits Percentage`
* `VM Local Used Burst IO Credits Percentage`
* `VM Remote Used Burst BPS Credits Percentage`
* `VM Remote Used Burst IO Credits Percentage`
* `VM Uncached Bandwidth Consumed Percentage`
* `VM Uncached IOPS Consumed Percentage`
* `VmAvailabilityMetric`
## microsoft.compute/virtualmachinescalesets/virtualmachines
* `Available Memory Bytes`
* `Available Memory Percentage`
* `CPU Credits Consumed`
* `CPU Credits Remaining`
* `Data Disk Bandwidth Consumed Percentage`
* `Data Disk IOPS Consumed Percentage`
* `Data Disk Latency`
* `Data Disk Max Burst Bandwidth`
* `Data Disk Max Burst IOPS`
* `Data Disk Queue Depth`
* `Data Disk Read Bytes/sec`
* `Data Disk Read Operations/Sec`
* `Data Disk Target Bandwidth`
* `Data Disk Target IOPS`
* `Data Disk Used Burst BPS Credits Percentage`
* `Data Disk Used Burst IO Credits Percentage`
* `Data Disk Write Bytes/sec`
* `Data Disk Write Operations/Sec`
* `Disk Read Bytes`
* `Disk Read Operations/Sec`
* `Disk Write Bytes`
* `Disk Write Operations/Sec`
* `Inbound Flows`
* `Inbound Flows Maximum Creation Rate`
* `Network In`
* `Network In Total`
* `Network Out`
* `Network Out Total`
* `OS Disk Bandwidth Consumed Percentage`
* `OS Disk IOPS Consumed Percentage`
* `OS Disk Latency`
* `OS Disk Max Burst Bandwidth`
* `OS Disk Max Burst IOPS`
* `OS Disk Queue Depth`
* `OS Disk Read Bytes/sec`
* `OS Disk Read Operations/Sec`
* `OS Disk Target Bandwidth`
* `OS Disk Target IOPS`
* `OS Disk Used Burst BPS Credits Percentage`
* `OS Disk Used Burst IO Credits Percentage`
* `OS Disk Write Bytes/sec`
* `OS Disk Write Operations/Sec`
* `Outbound Flows`
* `Outbound Flows Maximum Creation Rate`
* `Percentage CPU`
* `Premium Data Disk Cache Read Hit`
* `Premium Data Disk Cache Read Miss`
* `Premium OS Disk Cache Read Hit`
* `Premium OS Disk Cache Read Miss`
* `Temp Disk Latency`
* `Temp Disk Queue Depth`
* `Temp Disk Read Bytes/sec`
* `Temp Disk Read Operations/Sec`
* `Temp Disk Write Bytes/sec`
* `Temp Disk Write Operations/Sec`
* `VM Cached Bandwidth Consumed Percentage`
* `VM Cached IOPS Consumed Percentage`
* `VM Local Used Burst BPS Credits Percentage`
* `VM Local Used Burst IO Credits Percentage`
* `VM Remote Used Burst BPS Credits Percentage`
* `VM Remote Used Burst IO Credits Percentage`
* `VM Uncached Bandwidth Consumed Percentage`
* `VM Uncached IOPS Consumed Percentage`
* `VmAvailabilityMetric`
## microsoft.containerinstance/containergroups
* `CpuUsage`
* `MemoryUsage`
* `NetworkBytesReceivedPerSecond`
* `NetworkBytesTransmittedPerSecond`
## microsoft.containerregistry/registries
* `AgentPoolCPUTime`
* `DataTransfer`
* `RunDuration`
* `StorageUsed`
* `SuccessfulPullCount`
* `SuccessfulPushCount`
* `TotalPullCount`
* `TotalPushCount`
* `Transactions`
## microsoft.containerservice/managedclusters
* `apiserver_cpu_usage_percentage`
* `apiserver_current_inflight_requests`
* `apiserver_memory_usage_percentage`
* `cluster_autoscaler_cluster_safe_to_autoscale`
* `cluster_autoscaler_scale_down_in_cooldown`
* `cluster_autoscaler_unneeded_nodes_count`
* `cluster_autoscaler_unschedulable_pods_count`
* `etcd_cpu_usage_percentage`
* `etcd_database_usage_percentage`
* `etcd_memory_usage_percentage`
* `kube_node_status_allocatable_cpu_cores`
* `kube_node_status_allocatable_memory_bytes`
* `kube_node_status_condition`
* `node_cpu_usage_millicores`
* `node_cpu_usage_percentage`
* `node_disk_usage_bytes`
* `node_disk_usage_percentage`
* `node_memory_rss_bytes`
* `node_memory_rss_percentage`
* `node_memory_working_set_bytes`
* `node_memory_working_set_percentage`
* `node_network_in_bytes`
* `node_network_out_bytes`
## microsoft.datafactory/factories
* `ActivityCancelledRuns`
* `ActivityFailedRuns`
* `ActivitySucceededRuns`
* `AirflowIntegrationRuntimeCeleryTaskTimeoutError`
* `AirflowIntegrationRuntimeCollectDBDags`
* `AirflowIntegrationRuntimeCpuPercentage`
* `AirflowIntegrationRuntimeCpuUsage`
* `AirflowIntegrationRuntimeDAGFileRefreshError`
* `AirflowIntegrationRuntimeDAGProcessingImportErrors`
* `AirflowIntegrationRuntimeDAGProcessingLastDuration`
* `AirflowIntegrationRuntimeDAGProcessingLastRunSecondsAgo`
* `AirflowIntegrationRuntimeDAGProcessingManagerStalls`
* `AirflowIntegrationRuntimeDAGProcessingProcesses`
* `AirflowIntegrationRuntimeDAGProcessingProcessorTimeouts`
* `AirflowIntegrationRuntimeDAGProcessingTotalParseTime`
* `AirflowIntegrationRuntimeDAGRunDependencyCheck`
* `AirflowIntegrationRuntimeDAGRunDurationFailed`
* `AirflowIntegrationRuntimeDAGRunDurationSuccess`
* `AirflowIntegrationRuntimeDAGRunFirstTaskSchedulingDelay`
* `AirflowIntegrationRuntimeDAGRunScheduleDelay`
* `AirflowIntegrationRuntimeDagBagSize`
* `AirflowIntegrationRuntimeDagCallbackExceptions`
* `AirflowIntegrationRuntimeExecutorOpenSlots`
* `AirflowIntegrationRuntimeExecutorQueuedTasks`
* `AirflowIntegrationRuntimeExecutorRunningTasks`
* `AirflowIntegrationRuntimeJobEnd`
* `AirflowIntegrationRuntimeJobHeartbeatFailure`
* `AirflowIntegrationRuntimeJobStart`
* `AirflowIntegrationRuntimeMemoryPercentage`
* `AirflowIntegrationRuntimeMemoryUsage`
* `AirflowIntegrationRuntimeNodeCount`
* `AirflowIntegrationRuntimeOperatorFailures`
* `AirflowIntegrationRuntimeOperatorSuccesses`
* `AirflowIntegrationRuntimePoolOpenSlots`
* `AirflowIntegrationRuntimePoolQueuedSlots`
* `AirflowIntegrationRuntimePoolRunningSlots`
* `AirflowIntegrationRuntimePoolStarvingTasks`
* `AirflowIntegrationRuntimeSchedulerCriticalSectionBusy`
* `AirflowIntegrationRuntimeSchedulerCriticalSectionDuration`
* `AirflowIntegrationRuntimeSchedulerFailedSLAEmailAttempts`
* `AirflowIntegrationRuntimeSchedulerHeartbeat`
* `AirflowIntegrationRuntimeSchedulerOrphanedTasksAdopted`
* `AirflowIntegrationRuntimeSchedulerOrphanedTasksCleared`
* `AirflowIntegrationRuntimeSchedulerTasksExecutable`
* `AirflowIntegrationRuntimeSchedulerTasksKilledExternally`
* `AirflowIntegrationRuntimeSchedulerTasksRunning`
* `AirflowIntegrationRuntimeSchedulerTasksStarving`
* `AirflowIntegrationRuntimeStartedTaskInstances`
* `AirflowIntegrationRuntimeTaskInstanceCreatedUsingOperator`
* `AirflowIntegrationRuntimeTaskInstanceDuration`
* `AirflowIntegrationRuntimeTaskInstanceFailures`
* `AirflowIntegrationRuntimeTaskInstanceFinished`
* `AirflowIntegrationRuntimeTaskInstancePreviouslySucceeded`
* `AirflowIntegrationRuntimeTaskInstanceSuccesses`
* `AirflowIntegrationRuntimeTaskRemovedFromDAG`
* `AirflowIntegrationRuntimeTaskRestoredToDAG`
* `AirflowIntegrationRuntimeTriggersBlockedMainThread`
* `AirflowIntegrationRuntimeTriggersFailed`
* `AirflowIntegrationRuntimeTriggersRunning`
* `AirflowIntegrationRuntimeTriggersSucceeded`
* `AirflowIntegrationRuntimeZombiesKilled`
* `FactorySizeInGbUnits`
* `IntegrationRuntimeAvailableMemory`
* `IntegrationRuntimeAvailableNodeNumber`
* `IntegrationRuntimeAverageTaskPickupDelay`
* `IntegrationRuntimeCpuPercentage`
* `IntegrationRuntimeQueueLength`
* `MVNetIRCopyAvailableCapacityPCT`
* `MVNetIRCopyCapacityUtilization`
* `MVNetIRCopyWaitingQueueLength`
* `MVNetIRExternalAvailableCapacityPCT`
* `MVNetIRExternalCapacityUtilization`
* `MVNetIRExternalWaitingQueueLength`
* `MVNetIRPipelineAvailableCapacityPCT`
* `MVNetIRPipelineCapacityUtilization`
* `MVNetIRPipelineWaitingQueueLength`
* `MaxAllowedFactorySizeInGbUnits`
* `MaxAllowedResourceCount`
* `PipelineCancelledRuns`
* `PipelineElapsedTimeRuns`
* `PipelineFailedRuns`
* `PipelineSucceededRuns`
* `ResourceCount`
* `SSISIntegrationRuntimeStartCancel`
* `SSISIntegrationRuntimeStartFailed`
* `SSISIntegrationRuntimeStartSucceeded`
* `SSISIntegrationRuntimeStopStuck`
* `SSISIntegrationRuntimeStopSucceeded`
* `SSISPackageExecutionCancel`
* `SSISPackageExecutionFailed`
* `SSISPackageExecutionSucceeded`
* `TriggerCancelledRuns`
* `TriggerFailedRuns`
* `TriggerSucceededRuns`
## microsoft.datalakeanalytics/accounts
* `JobAUEndedCancelled`
* `JobAUEndedFailure`
* `JobAUEndedSuccess`
* `JobEndedCancelled`
* `JobEndedFailure`
* `JobEndedSuccess`
* `JobStage`
## microsoft.datalakestore/accounts
* `DataRead`
* `DataWritten`
* `ReadRequests`
* `TotalStorage`
* `WriteRequests`
## microsoft.dataprotection/backupvaults
* `BackupHealthEvent`
* `RestoreHealthEvent`
## microsoft.dbformariadb/servers
* `active_connections`
* `backup_storage_used`
* `connections_failed`
* `cpu_percent`
* `io_consumption_percent`
* `memory_percent`
* `network_bytes_egress`
* `network_bytes_ingress`
* `seconds_behind_master`
* `serverlog_storage_limit`
* `serverlog_storage_percent`
* `serverlog_storage_usage`
* `storage_limit`
* `storage_percent`
* `storage_used`
## microsoft.dbformysql/flexibleservers
* `Com_alter_table`
* `Com_create_db`
* `Com_create_table`
* `Com_delete`
* `Com_drop_db`
* `Com_drop_table`
* `Com_insert`
* `Com_select`
* `Com_update`
* `HA_IO_status`
* `HA_SQL_status`
* `HA_replication_lag`
* `Innodb_buffer_pool_pages_data`
* `Innodb_buffer_pool_pages_dirty`
* `Innodb_buffer_pool_pages_flushed`
* `Innodb_buffer_pool_pages_free`
* `Innodb_buffer_pool_read_requests`
* `Innodb_buffer_pool_reads`
* `Innodb_data_writes`
* `Innodb_row_lock_time`
* `Innodb_row_lock_waits`
* `Queries`
* `Replica_IO_Running`
* `Replica_SQL_Running`
* `Slow_queries`
* `Sort_merge_passes`
* `Threads_running`
* `Uptime`
* `aborted_connections`
* `active_connections`
* `active_transactions`
* `backup_storage_used`
* `binlog_storage_used`
* `cpu_credits_consumed`
* `cpu_credits_remaining`
* `cpu_percent`
* `data_storage_used`
* `ibdata1_storage_used`
* `io_consumption_percent`
* `lock_deadlocks`
* `lock_timeouts`
* `memory_percent`
* `network_bytes_egress`
* `network_bytes_ingress`
* `others_storage_used`
* `replication_lag`
* `serverlog_storage_limit`
* `serverlog_storage_percent`
* `serverlog_storage_usage`
* `storage_io_count`
* `storage_limit`
* `storage_percent`
* `storage_used`
* `total_connections`
* `trx_rseg_history_len`
## microsoft.dbformysql/servers
* `active_connections`
* `backup_storage_used`
* `connections_failed`
* `cpu_percent`
* `io_consumption_percent`
* `memory_percent`
* `network_bytes_egress`
* `network_bytes_ingress`
* `seconds_behind_master`
* `serverlog_storage_limit`
* `serverlog_storage_percent`
* `serverlog_storage_usage`
* `storage_limit`
* `storage_percent`
* `storage_used`
## microsoft.dbforpostgresql/flexibleservers
* `active_connections`
* `analyze_count_user_tables`
* `autoanalyze_count_user_tables`
* `autovacuum_count_user_tables`
* `backup_storage_used`
* `blks_hit`
* `blks_read`
* `bloat_percent`
* `client_connections_active`
* `client_connections_waiting`
* `connections_failed`
* `connections_succeeded`
* `cpu_credits_consumed`
* `cpu_credits_remaining`
* `cpu_percent`
* `database_size_bytes`
* `deadlocks`
* `disk_bandwidth_consumed_percentage`
* `disk_iops_consumed_percentage`
* `disk_queue_depth`
* `iops`
* `is_db_alive`
* `logical_replication_delay_in_bytes`
* `longest_query_time_sec`
* `longest_transaction_time_sec`
* `max_connections`
* `maximum_used_transactionIDs`
* `memory_percent`
* `n_dead_tup_user_tables`
* `n_live_tup_user_tables`
* `n_mod_since_analyze_user_tables`
* `network_bytes_egress`
* `network_bytes_ingress`
* `num_pools`
* `numbackends`
* `oldest_backend_time_sec`
* `oldest_backend_xmin`
* `oldest_backend_xmin_age`
* `physical_replication_delay_in_bytes`
* `physical_replication_delay_in_seconds`
* `postmaster_process_cpu_usage_percent`
* `read_iops`
* `read_throughput`
* `server_connections_active`
* `server_connections_idle`
* `sessions_by_state`
* `sessions_by_wait_event_type`
* `storage_free`
* `storage_percent`
* `storage_used`
* `tables_analyzed_user_tables`
* `tables_autoanalyzed_user_tables`
* `tables_autovacuumed_user_tables`
* `tables_counter_user_tables`
* `tables_vacuumed_user_tables`
* `tcp_connection_backlog`
* `temp_bytes`
* `temp_files`
* `total_pooled_connections`
* `tps`
* `tup_deleted`
* `tup_fetched`
* `tup_inserted`
* `tup_returned`
* `tup_updated`
* `txlogs_storage_used`
* `vacuum_count_user_tables`
* `write_iops`
* `write_throughput`
* `xact_commit`
* `xact_rollback`
* `xact_total`
## microsoft.dbforpostgresql/servergroupsv2
* `active_connections`
* `apps_reserved_memory_percent`
* `cpu_credits_consumed`
* `cpu_credits_remaining`
* `cpu_percent`
* `iops`
* `memory_percent`
* `network_bytes_egress`
* `network_bytes_ingress`
* `replication_lag`
* `storage_percent`
* `storage_used`
* `vm_cached_bandwidth_percent`
* `vm_cached_iops_percent`
* `vm_uncached_bandwidth_percent`
* `vm_uncached_iops_percent`
## microsoft.dbforpostgresql/servers
* `active_connections`
* `backup_storage_used`
* `connections_failed`
* `cpu_percent`
* `io_consumption_percent`
* `memory_percent`
* `network_bytes_egress`
* `network_bytes_ingress`
* `pg_replica_log_delay_in_bytes`
* `pg_replica_log_delay_in_seconds`
* `serverlog_storage_limit`
* `serverlog_storage_percent`
* `serverlog_storage_usage`
* `storage_limit`
* `storage_percent`
* `storage_used`
## microsoft.dbforpostgresql/serversv2
* `active_connections`
* `cpu_percent`
* `iops`
* `memory_percent`
* `network_bytes_egress`
* `network_bytes_ingress`
* `storage_percent`
* `storage_used`
## microsoft.devices/iothubs
* `C2DMessagesExpired`
* `EventGridDeliveries`
* `EventGridLatency`
* `RoutingDataSizeInBytesDelivered`
* `RoutingDeliveries`
* `RoutingDeliveryLatency`
* `c2d.commands.egress.abandon.success`
* `c2d.commands.egress.complete.success`
* `c2d.commands.egress.reject.success`
* `c2d.methods.failure`
* `c2d.methods.requestSize`
* `c2d.methods.responseSize`
* `c2d.methods.success`
* `c2d.twin.read.failure`
* `c2d.twin.read.size`
* `c2d.twin.read.success`
* `c2d.twin.update.failure`
* `c2d.twin.update.size`
* `c2d.twin.update.success`
* `configurations`
* `connect.success`
* `connectedDeviceCount`
* `d2c.endpoints.egress.builtIn.events`
* `d2c.endpoints.egress.eventHubs`
* `d2c.endpoints.egress.serviceBusQueues`
* `d2c.endpoints.egress.serviceBusTopics`
* `d2c.endpoints.egress.storage`
* `d2c.endpoints.egress.storage.blobs`
* `d2c.endpoints.egress.storage.bytes`
* `d2c.endpoints.latency.builtIn.events`
* `d2c.endpoints.latency.eventHubs`
* `d2c.endpoints.latency.serviceBusQueues`
* `d2c.endpoints.latency.serviceBusTopics`
* `d2c.endpoints.latency.storage`
* `d2c.telemetry.egress.dropped`
* `d2c.telemetry.egress.fallback`
* `d2c.telemetry.egress.invalid`
* `d2c.telemetry.egress.orphaned`
* `d2c.telemetry.egress.success`
* `d2c.telemetry.ingress.allProtocol`
* `d2c.telemetry.ingress.sendThrottle`
* `d2c.telemetry.ingress.success`
* `d2c.twin.read.failure`
* `d2c.twin.read.size`
* `d2c.twin.read.success`
* `d2c.twin.update.failure`
* `d2c.twin.update.size`
* `d2c.twin.update.success`
* `dailyMessageQuotaUsed`
* `deviceDataUsage`
* `deviceDataUsageV2`
* `devices.connectedDevices.allProtocol`
* `devices.totalDevices`
* `jobs.cancelJob.failure`
* `jobs.cancelJob.success`
* `jobs.completed`
* `jobs.createDirectMethodJob.failure`
* `jobs.createDirectMethodJob.success`
* `jobs.createTwinUpdateJob.failure`
* `jobs.createTwinUpdateJob.success`
* `jobs.failed`
* `jobs.listJobs.failure`
* `jobs.listJobs.success`
* `jobs.queryJobs.failure`
* `jobs.queryJobs.success`
* `totalDeviceCount`
* `twinQueries.failure`
* `twinQueries.resultSize`
* `twinQueries.success`
## microsoft.devices/provisioningservices
* `AttestationAttempts`
* `DeviceAssignments`
* `RegistrationAttempts`
## microsoft.documentdb/cassandraclusters
* `cassandra_cache_capacity`
* `cassandra_cache_entries`
* `cassandra_cache_hit_rate`
* `cassandra_cache_hits`
* `cassandra_cache_miss_latency_histogram`
* `cassandra_cache_miss_latency_p99`
* `cassandra_cache_requests`
* `cassandra_cache_size`
* `cassandra_client_auth_failure`
* `cassandra_client_auth_failure2`
* `cassandra_client_auth_failure3`
* `cassandra_client_auth_success`
* `cassandra_client_connected_native_clients`
* `cassandra_client_request_condition_not_met`
* `cassandra_client_request_contention_histogram`
* `cassandra_client_request_contention_histogram_p99`
* `cassandra_client_request_failures`
* `cassandra_client_request_failures2`
* `cassandra_client_request_failures3`
* `cassandra_client_request_latency_histogram`
* `cassandra_client_request_latency_max`
* `cassandra_client_request_latency_p99`
* `cassandra_client_request_timeouts`
* `cassandra_client_request_timeouts2`
* `cassandra_client_request_timeouts3`
* `cassandra_client_request_unfinished_commit`
* `cassandra_commit_log_waiting_on_commit_latency_histogram`
* `cassandra_cql_prepared_statements_executed`
* `cassandra_cql_regular_statements_executed`
* `cassandra_dropped_message_count`
* `cassandra_dropped_message_cross_node_latency`
* `cassandra_dropped_message_cross_node_latency_p99`
* `cassandra_dropped_message_internal_latency`
* `cassandra_dropped_message_rate`
* `cassandra_hints_failed_rate`
* `cassandra_hints_succeeded_rate`
* `cassandra_hints_timed_out_rate`
* `cassandra_jvm_gc_count`
* `cassandra_jvm_gc_time`
* `cassandra_storage_total_hints_counter_total`
* `cassandra_storage_total_hints_in_progress_counter_total`
* `cassandra_table_all_memtables_live_data_size`
* `cassandra_table_all_memtables_off_heap_size`
* `cassandra_table_bloom_filter_disk_space_used`
* `cassandra_table_bloom_filter_false_positives`
* `cassandra_table_bloom_filter_false_ratio`
* `cassandra_table_bloom_filter_off_heap_memory_used`
* `cassandra_table_bytes_flushed`
* `cassandra_table_cas_commit`
* `cassandra_table_cas_commit_p99`
* `cassandra_table_cas_prepare`
* `cassandra_table_cas_prepare_p99`
* `cassandra_table_cas_propose`
* `cassandra_table_cas_propose_p99`
* `cassandra_table_col_update_time_delta_histogram`
* `cassandra_table_col_update_time_delta_histogram_p99`
* `cassandra_table_compaction_bytes_written`
* `cassandra_table_compression_metadata_off_heap_memory_used`
* `cassandra_table_compression_ratio`
* `cassandra_table_coordinator_read_latency`
* `cassandra_table_coordinator_read_latency_p99`
* `cassandra_table_coordinator_scan_latency`
* `cassandra_table_coordinator_scan_latency_p99`
* `cassandra_table_dropped_mutations`
* `cassandra_table_dropped_mutations2`
* `cassandra_table_dropped_mutations3`
* `cassandra_table_estimated_column_count_histogram`
* `cassandra_table_estimated_column_count_histogram_p99`
* `cassandra_table_estimated_partition_count`
* `cassandra_table_estimated_partition_size_histogram`
* `cassandra_table_estimated_partition_size_histogram_p99`
* `cassandra_table_index_summary_off_heap_memory_used`
* `cassandra_table_key_cache_hit_rate`
* `cassandra_table_live_disk_space_used`
* `cassandra_table_live_scanned_histogram`
* `cassandra_table_live_scanned_histogram_p99`
* `cassandra_table_live_sstable_count`
* `cassandra_table_max_partition_size`
* `cassandra_table_mean_partition_size`
* `cassandra_table_memtable_columns_count`
* `cassandra_table_memtable_off_heap_size`
* `cassandra_table_memtable_on_heap_size`
* `cassandra_table_memtable_switch_count`
* `cassandra_table_min_partition_size`
* `cassandra_table_pending_compactions`
* `cassandra_table_pending_compactions2`
* `cassandra_table_pending_compactions3`
* `cassandra_table_pending_flushes`
* `cassandra_table_pending_flushes2`
* `cassandra_table_pending_flushes3`
* `cassandra_table_percent_repaired`
* `cassandra_table_range_latency`
* `cassandra_table_range_latency_p99`
* `cassandra_table_read_latency`
* `cassandra_table_read_latency_p99`
* `cassandra_table_row_cache_hit`
* `cassandra_table_row_cache_hit_out_of_range`
* `cassandra_table_row_cache_miss`
* `cassandra_table_speculative_retries`
* `cassandra_table_sstables_per_read_histogram`
* `cassandra_table_sstables_per_read_histogram_p99`
* `cassandra_table_tombstone_scanned_histogram`
* `cassandra_table_tombstone_scanned_histogram_p99`
* `cassandra_table_total_disk_space_used`
* `cassandra_table_total_disk_space_used2`
* `cassandra_table_total_disk_space_used3`
* `cassandra_table_view_lock_acquire_time`
* `cassandra_table_view_lock_acquire_time_p99`
* `cassandra_table_view_read_time`
* `cassandra_table_view_read_time_p99`
* `cassandra_table_waiting_on_free_memtable_space`
* `cassandra_table_waiting_on_free_memtable_space_p99`
* `cassandra_table_write_latency`
* `cassandra_table_write_latency_p99`
* `cassandra_thread_pools_active_tasks`
* `cassandra_thread_pools_currently_blocked_tasks`
* `cassandra_thread_pools_currently_blocked_tasks2`
* `cassandra_thread_pools_currently_blocked_tasks3`
* `cassandra_thread_pools_max_pool_size`
* `cassandra_thread_pools_pending_tasks`
* `cassandra_thread_pools_total_blocked_tasks`
* `cpu`
* `disk_utilization`
* `diskio_merged_reads`
* `diskio_merged_writes`
* `diskio_read_bytes`
* `diskio_read_time`
* `diskio_reads`
* `diskio_write_bytes`
* `diskio_write_time`
* `diskio_writes`
* `ethtool_rx_bytes`
* `ethtool_rx_packets`
* `ethtool_tx_bytes`
* `ethtool_tx_packets`
* `iops`
* `percent_mem`
* `raid_array_degraded`
* `raid_array_rebuild`
* `total_cpu`
## microsoft.documentdb/databaseaccounts
* `AddRegion`
* `AutoscaleMaxThroughput`
* `AutoscaledRU`
* `AvailableStorage`
* `BackupModeUpdate`
* `BackupPolicyIntervalUpdate`
* `BackupPolicyRedundancyUpdate`
* `BackupPolicyRetentionUpdate`
* `BackupPolicyUpdate`
* `CassandraConnectionClosures`
* `CassandraConnectorAvgReplicationLatency`
* `CassandraConnectorReplicationHealthStatus`
* `CassandraKeyspaceCreate`
* `CassandraKeyspaceDelete`
* `CassandraKeyspaceThroughputUpdate`
* `CassandraKeyspaceUpdate`
* `CassandraRequestCharges`
* `CassandraRequests`
* `CassandraTableCreate`
* `CassandraTableDelete`
* `CassandraTableThroughputUpdate`
* `CassandraTableUpdate`
* `ContinuousTierUpdate`
* `CreateAccount`
* `DataUsage`
* `DedicatedGatewayAverageCPUUsage`
* `DedicatedGatewayAverageMemoryUsage`
* `DedicatedGatewayCPUUsage`
* `DedicatedGatewayMaximumCPUUsage`
* `DedicatedGatewayMemoryUsage`
* `DedicatedGatewayRequests`
* `DeleteAccount`
* `DocumentCount`
* `DocumentQuota`
* `GlobalSecondaryIndexCatchupGapInMinutes`
* `GlobalSecondaryIndexPropagationLatencyInSeconds`
* `GremlinDatabaseCreate`
* `GremlinDatabaseDelete`
* `GremlinDatabaseThroughputUpdate`
* `GremlinDatabaseUpdate`
* `GremlinGraphCreate`
* `GremlinGraphDelete`
* `GremlinGraphThroughputUpdate`
* `GremlinGraphUpdate`
* `GremlinRequestCharges`
* `GremlinRequests`
* `IndexUsage`
* `IntegratedCacheEvictedEntriesSize`
* `IntegratedCacheItemExpirationCount`
* `IntegratedCacheItemHitRate`
* `IntegratedCacheQueryExpirationCount`
* `IntegratedCacheQueryHitRate`
* `MaterializedViewCatchupGapInMinutes`
* `MaterializedViewsBuilderAverageCPUUsage`
* `MaterializedViewsBuilderAverageMemoryUsage`
* `MaterializedViewsBuilderMaximumCPUUsage`
* `MetadataRequests`
* `MongoCollectionCreate`
* `MongoCollectionDelete`
* `MongoCollectionThroughputUpdate`
* `MongoCollectionUpdate`
* `MongoDBDatabaseCreate`
* `MongoDBDatabaseUpdate`
* `MongoDatabaseDelete`
* `MongoDatabaseThroughputUpdate`
* `MongoRequestCharge`
* `MongoRequests`
* `NormalizedRUConsumption`
* `OfflineRegion`
* `OnlineRegion`
* `PhysicalPartitionCount`
* `PhysicalPartitionSizeInfo`
* `PhysicalPartitionThroughputInfo`
* `ProvisionedThroughput`
* `RegionFailover`
* `RemoveRegion`
* `ReplicationLatency`
* `ServerSideLatency`
* `ServerSideLatencyDirect`
* `ServerSideLatencyGateway`
* `ServiceAvailability`
* `SqlContainerCreate`
* `SqlContainerDelete`
* `SqlContainerThroughputUpdate`
* `SqlContainerUpdate`
* `SqlDatabaseCreate`
* `SqlDatabaseDelete`
* `SqlDatabaseThroughputUpdate`
* `SqlDatabaseUpdate`
* `TableTableCreate`
* `TableTableDelete`
* `TableTableThroughputUpdate`
* `TableTableUpdate`
* `TotalRequestUnits`
* `TotalRequestUnitsPreview`
* `TotalRequests`
* `TotalRequestsPreview`
* `UpdateAccountKeys`
* `UpdateAccountNetworkSettings`
* `UpdateAccountReplicationSettings`
* `UpdateDiagnosticsSettings`
## microsoft.eventgrid/domains
* `AdvancedFilterEvaluationCount`
* `DeadLetteredCount`
* `DeliveryAttemptFailCount`
* `DeliverySuccessCount`
* `DestinationProcessingDurationInMs`
* `DroppedEventCount`
* `MatchedEventCount`
* `PublishFailCount`
* `PublishSuccessCount`
* `PublishSuccessLatencyInMs`
## microsoft.eventgrid/eventsubscriptions
* `DeadLetteredCount`
* `DeliveryAttemptFailCount`
* `DeliverySuccessCount`
* `DestinationProcessingDurationInMs`
* `DroppedEventCount`
* `MatchedEventCount`
## microsoft.eventgrid/extensiontopics
* `PublishFailCount`
* `PublishSuccessCount`
* `PublishSuccessLatencyInMs`
* `UnmatchedEventCount`
## microsoft.eventgrid/partnernamespaces
* `PublishFailCount`
* `PublishSuccessCount`
* `PublishSuccessLatencyInMs`
* `UnmatchedEventCount`
## microsoft.eventgrid/partnertopics
* `AdvancedFilterEvaluationCount`
* `DeadLetteredCount`
* `DeliveryAttemptFailCount`
* `DeliverySuccessCount`
* `DestinationProcessingDurationInMs`
* `DroppedEventCount`
* `MatchedEventCount`
* `PublishSuccessCount`
* `UnmatchedEventCount`
## microsoft.eventgrid/systemtopics
* `AdvancedFilterEvaluationCount`
* `DeadLetteredCount`
* `DeliveryAttemptFailCount`
* `DeliverySuccessCount`
* `DestinationProcessingDurationInMs`
* `DroppedEventCount`
* `MatchedEventCount`
* `PublishFailCount`
* `PublishSuccessCount`
* `PublishSuccessLatencyInMs`
* `ServerDeliverySuccessRate`
* `UnmatchedEventCount`
## microsoft.eventgrid/topics
* `AdvancedFilterEvaluationCount`
* `DeadLetteredCount`
* `DeliveryAttemptFailCount`
* `DeliverySuccessCount`
* `DestinationProcessingDurationInMs`
* `DroppedEventCount`
* `MatchedEventCount`
* `PublishFailCount`
* `PublishSuccessCount`
* `PublishSuccessLatencyInMs`
* `UnmatchedEventCount`
## microsoft.eventhub/clusters
* `ActiveConnections`
* `AvailableMemory`
* `CPU`
* `CaptureBacklog`
* `CapturedBytes`
* `CapturedMessages`
* `ClusterUtilization`
* `ConnectionsClosed`
* `ConnectionsOpened`
* `IncomingBytes`
* `IncomingMessages`
* `IncomingRequests`
* `OutgoingBytes`
* `OutgoingMessages`
* `QuotaExceededErrors`
* `ServerErrors`
* `Size`
* `SuccessfulRequests`
* `ThrottledRequests`
* `UserErrors`
## microsoft.eventhub/namespaces
* `ActiveConnections`
* `CaptureBacklog`
* `CapturedBytes`
* `CapturedMessages`
* `ConnectionsClosed`
* `ConnectionsOpened`
* `EHABL`
* `EHAMBS`
* `EHAMSGS`
* `EHINBYTES`
* `EHINMBS`
* `EHINMSGS`
* `EHOUTBYTES`
* `EHOUTMBS`
* `EHOUTMSGS`
* `FAILREQ`
* `INMSGS`
* `INREQS`
* `INTERR`
* `IncomingBytes`
* `IncomingMessages`
* `IncomingRequests`
* `MISCERR`
* `NamespaceCpuUsage`
* `NamespaceMemoryUsage`
* `OUTMSGS`
* `OutgoingBytes`
* `OutgoingMessages`
* `QuotaExceededErrors`
* `ReplicationLagCount`
* `ReplicationLagDuration`
* `SUCCREQ`
* `SVRBSY`
* `ServerErrors`
* `Size`
* `SuccessfulRequests`
* `ThrottledRequests`
* `UserErrors`
## microsoft.hdinsight/clusters
* `CategorizedGatewayRequests`
* `GatewayRequests`
* `KafkaRestProxy.ConsumerRequest.m1_delta`
* `KafkaRestProxy.ConsumerRequestFail.m1_delta`
* `KafkaRestProxy.ConsumerRequestTime.p95`
* `KafkaRestProxy.ConsumerRequestWaitingInQueueTime.p95`
* `KafkaRestProxy.MessagesIn.m1_delta`
* `KafkaRestProxy.MessagesOut.m1_delta`
* `KafkaRestProxy.OpenConnections`
* `KafkaRestProxy.ProducerRequest.m1_delta`
* `KafkaRestProxy.ProducerRequestFail.m1_delta`
* `KafkaRestProxy.ProducerRequestTime.p95`
* `KafkaRestProxy.ProducerRequestWaitingInQueueTime.p95`
* `NumActiveWorkers`
* `PendingCPU`
* `PendingMemory`
## microsoft.insights/datacollectionrules
* `ApiCallReceived_Count`
* `BytesReceived_Count`
* `MetricIngestionRequest_Count`
* `RowsDropped_Count`
* `RowsReceived_Count`
* `TransformationErrors_Count`
* `TransformationRuntime_DurationMs`
## microsoft.keyvault/managedhsms
* `Availability`
* `ServiceApiHit`
* `ServiceApiLatency`
## microsoft.keyvault/vaults
* `Availability`
* `SaturationShoebox`
* `ServiceApiHit`
* `ServiceApiLatency`
* `ServiceApiResult`
## microsoft.kusto/clusters
* `BatchBlobCount`
* `BatchDuration`
* `BatchSize`
* `BatchesProcessed`
* `BlobsDropped`
* `BlobsProcessed`
* `BlobsReceived`
* `CPU`
* `CacheUtilization`
* `CacheUtilizationFactor`
* `ContinuousExportMaxLatenessMinutes`
* `ContinuousExportNumOfRecordsExported`
* `ContinuousExportPendingCount`
* `ContinuousExportResult`
* `DiscoveryLatency`
* `EventsDropped`
* `EventsProcessed`
* `EventsReceived`
* `ExportUtilization`
* `FollowerLatency`
* `IngestionLatencyInSeconds`
* `IngestionResult`
* `IngestionUtilization`
* `IngestionVolumeInMB`
* `InstanceCount`
* `KeepAlive`
* `MaterializedViewAgeMinutes`
* `MaterializedViewAgeSeconds`
* `MaterializedViewDataLoss`
* `MaterializedViewExtentsRebuild`
* `MaterializedViewHealth`
* `MaterializedViewRecordsInDelta`
* `MaterializedViewResult`
* `PartitioningPercentage`
* `PartitioningPercentageHot`
* `ProcessedPartitionedRecords`
* `QueryDuration`
* `QueryResult`
* `QueueLength`
* `QueueOldestMessage`
* `ReceivedDataSizeBytes`
* `StageLatency`
* `StreamingIngestDataRate`
* `StreamingIngestDuration`
* `StreamingIngestResults`
* `StreamingIngestUtilization`
* `TotalNumberOfConcurrentQueries`
* `TotalNumberOfExtents`
* `TotalNumberOfThrottledCommands`
* `TotalNumberOfThrottledQueries`
* `WeakConsistencyLatency`
## microsoft.logic/workflows
* `ActionLatency`
* `ActionSuccessLatency`
* `ActionThrottledEvents`
* `ActionsCompleted`
* `ActionsFailed`
* `ActionsSkipped`
* `ActionsStarted`
* `ActionsSucceeded`
* `AgentLoopExecution`
* `BillableActionExecutions`
* `BillableTriggerExecutions`
* `BillingUsageNativeOperation`
* `BillingUsageStandardConnector`
* `BillingUsageStorageConsumption`
* `CompletionTokenOverflowUsage`
* `PromptTokenOverflowUsage`
* `RunFailurePercentage`
* `RunLatency`
* `RunStartThrottledEvents`
* `RunSuccessLatency`
* `RunThrottledEvents`
* `RunsCancelled`
* `RunsCompleted`
* `RunsFailed`
* `RunsStarted`
* `RunsSucceeded`
* `TotalBillableExecutions`
* `TriggerFireLatency`
* `TriggerLatency`
* `TriggerSuccessLatency`
* `TriggerThrottledEvents`
* `TriggersCompleted`
* `TriggersFailed`
* `TriggersFired`
* `TriggersSkipped`
* `TriggersStarted`
* `TriggersSucceeded`
## microsoft.machinelearningservices/workspaces
* `Active Cores`
* `Active Nodes`
* `Agents`
* `Cancel Requested Runs`
* `Cancelled Runs`
* `Completed Runs`
* `CpuCapacityMillicores`
* `CpuMemoryCapacityMegabytes`
* `CpuMemoryUtilizationMegabytes`
* `CpuMemoryUtilizationPercentage`
* `CpuUtilization`
* `CpuUtilizationMillicores`
* `CpuUtilizationPercentage`
* `DiskAvailMegabytes`
* `DiskReadMegabytes`
* `DiskUsedMegabytes`
* `DiskWriteMegabytes`
* `Errors`
* `Failed Runs`
* `Finalizing Runs`
* `GpuCapacityMilliGPUs`
* `GpuEnergyJoules`
* `GpuMemoryCapacityMegabytes`
* `GpuMemoryUtilization`
* `GpuMemoryUtilizationMegabytes`
* `GpuMemoryUtilizationPercentage`
* `GpuUtilization`
* `GpuUtilizationMilliGPUs`
* `GpuUtilizationPercentage`
* `IBReceiveMegabytes`
* `IBTransmitMegabytes`
* `Idle Cores`
* `Idle Nodes`
* `IndexedFiles`
* `Leaving Cores`
* `Leaving Nodes`
* `Messages`
* `Model Deploy Failed`
* `Model Deploy Started`
* `Model Deploy Succeeded`
* `Model Register Failed`
* `Model Register Succeeded`
* `NetworkInputMegabytes`
* `NetworkOutputMegabytes`
* `Not Responding Runs`
* `Not Started Runs`
* `Preempted Cores`
* `Preempted Nodes`
* `Preparing Runs`
* `Provisioning Runs`
* `Queued Runs`
* `Quota Utilization Percentage`
* `Runs`
* `Started Runs`
* `Starting Runs`
* `StorageAPIFailureCount`
* `StorageAPISuccessCount`
* `Threads`
* `Tokens`
* `ToolCalls`
* `Total Cores`
* `Total Nodes`
* `Unusable Cores`
* `Unusable Nodes`
* `Warnings`
## microsoft.monitor/accounts
* `ActiveTimeSeries`
* `ActiveTimeSeriesLimit`
* `ActiveTimeSeriesPercentUtilization`
* `EventsDropped`
* `EventsPerMinuteIngested`
* `EventsPerMinuteIngestedLimit`
* `EventsPerMinuteIngestedPercentUtilization`
* `TimeSeriesSamplesDropped`
## microsoft.network/applicationgateways
* `ApplicationGatewayTotalTime`
* `AvgRequestCountPerHealthyHost`
* `AzWAFCaptchaChallengeRequestCount`
* `AzWAFJSChallengeRequestCount`
* `AzwafBotProtection`
* `AzwafCustomRule`
* `AzwafPenaltyBoxHits`
* `AzwafPenaltyBoxSize`
* `AzwafSecRule`
* `AzwafTotalRequests`
* `BackendConnectTime`
* `BackendFirstByteResponseTime`
* `BackendLastByteResponseTime`
* `BackendResponseStatus`
* `BlockedCount`
* `BytesReceived`
* `BytesSent`
* `CapacityUnits`
* `ClientRtt`
* `ComputeUnits`
* `CpuUtilization`
* `CurrentConnections`
* `EstimatedBilledCapacityUnits`
* `FailedRequests`
* `FixedBillableCapacityUnits`
* `HealthyHostCount`
* `MatchedCount`
* `NewConnectionsPerSecond`
* `ResponseStatus`
* `Throughput`
* `TlsProtocol`
* `TotalRequests`
* `UnhealthyHostCount`
* `WebSocketActiveConnections`
* `WebsocketSpecificCloseStatusCode`
## microsoft.network/azurefirewalls
* `ApplicationRuleHit`
* `DataProcessed`
* `FirewallHealth`
* `FirewallLatencyPng`
* `NetworkRuleHit`
* `ObservedCapacity`
* `SNATPortUtilization`
* `Throughput`
## microsoft.network/expressroutecircuits
* `ArpAvailability`
* `BgpAvailability`
* `BitsInPerSecond`
* `BitsOutPerSecond`
* `EgressBandwidthUtilization`
* `FastPathRoutesCountForCircuit`
* `GlobalReachBitsInPerSecond`
* `GlobalReachBitsOutPerSecond`
* `IngressBandwidthUtilization`
* `QosDropBitsInPerSecond`
* `QosDropBitsOutPerSecond`
## microsoft.network/expressroutecircuits/peerings
* `BitsInPerSecond`
* `BitsOutPerSecond`
## microsoft.network/expressroutegateways
* `ErGatewayConnectionBitsInPerSecond`
* `ErGatewayConnectionBitsOutPerSecond`
* `ExpressRouteGatewayActiveFlows`
* `ExpressRouteGatewayBitsPerSecond`
* `ExpressRouteGatewayCountOfRoutesAdvertisedToPeer`
* `ExpressRouteGatewayCountOfRoutesLearnedFromPeer`
* `ExpressRouteGatewayCpuUtilization`
* `ExpressRouteGatewayFrequencyOfRoutesChanged`
* `ExpressRouteGatewayMaxFlowsCreationRate`
* `ExpressRouteGatewayNumberOfVmInVnet`
* `ExpressRouteGatewayPacketsPerSecond`
## microsoft.network/expressrouteports
* `AdminState`
* `FastPathRoutesCountForDirectPort`
* `LineProtocol`
* `PortBitsInPerSecond`
* `PortBitsOutPerSecond`
* `RxLightLevel`
* `TxLightLevel`
## microsoft.network/frontdoors
* `BackendHealthPercentage`
* `BackendRequestCount`
* `BackendRequestLatency`
* `BillableResponseSize`
* `RequestCount`
* `RequestSize`
* `ResponseSize`
* `TotalLatency`
* `WebApplicationFirewallRequestCount`
## microsoft.network/loadbalancers
* `AllocatedSnatPorts`
* `ByteCount`
* `DipAvailability`
* `GlobalBackendAvailability`
* `PacketCount`
* `SYNCount`
* `SnatConnectionCount`
* `UsedSnatPorts`
* `VipAvailability`
## microsoft.network/natgateways
* `ByteCount`
* `DatapathAvailability`
* `PacketCount`
* `PacketDropCount`
* `SNATConnectionCount`
* `TotalConnectionCount`
## microsoft.network/networkinterfaces
* `BytesReceivedRate`
* `BytesSentRate`
* `PacketsReceivedRate`
* `PacketsSentRate`
## microsoft.network/p2svpngateways
* `P2SBandwidth`
* `P2SConnectionCount`
* `UserVpnRouteCount`
## microsoft.network/privateendpoints
* `PEBytesIn`
* `PEBytesOut`
## microsoft.network/privatelinkservices
* `PLSBytesIn`
* `PLSBytesOut`
* `PLSNatPortsUsage`
## microsoft.network/publicipaddresses
* `ByteCount`
* `BytesDroppedDDoS`
* `BytesForwardedDDoS`
* `BytesInDDoS`
* `DDoSTriggerSYNPackets`
* `DDoSTriggerTCPPackets`
* `DDoSTriggerUDPPackets`
* `IfUnderDDoSAttack`
* `OtherBytesInDDoS`
* `OtherPacketsInDDoS`
* `PacketCount`
* `PacketsDroppedDDoS`
* `PacketsForwardedDDoS`
* `PacketsInDDoS`
* `SYNPacketsInDDoS`
* `SynCount`
* `TCPBytesDroppedDDoS`
* `TCPBytesForwardedDDoS`
* `TCPBytesInDDoS`
* `TCPPacketsDroppedDDoS`
* `TCPPacketsForwardedDDoS`
* `TCPPacketsInDDoS`
* `UDPBytesDroppedDDoS`
* `UDPBytesForwardedDDoS`
* `UDPBytesInDDoS`
* `UDPPacketsDroppedDDoS`
* `UDPPacketsForwardedDDoS`
* `UDPPacketsInDDoS`
* `VipAvailability`
## microsoft.network/virtualhubs
* `BgpPeerStatus`
* `CountOfRoutesAdvertisedToPeer`
* `CountOfRoutesLearnedFromPeer`
* `RoutingInfrastructureUnits`
* `SpokeVMUtilization`
* `VirtualHubDataProcessed`
## microsoft.network/virtualnetworkappliances
* `BytesReceived`
* `BytesSent`
* `CreationRateMaxTotalFlowsIn`
* `CreationRateMaxTotalFlowsOut`
* `CurrentTotalFlowsIn`
* `CurrentTotalFlowsOut`
* `PacketsReceived`
* `PacketsSent`
## microsoft.network/virtualnetworkgateways
* `AverageBandwidth`
* `BgpPeerStatus`
* `BgpRoutesAdvertised`
* `BgpRoutesLearned`
* `ExpressRouteGatewayActiveFlows`
* `ExpressRouteGatewayBitsPerSecond`
* `ExpressRouteGatewayCountOfRoutesAdvertisedToPeer`
* `ExpressRouteGatewayCountOfRoutesLearnedFromPeer`
* `ExpressRouteGatewayCpuUtilization`
* `ExpressRouteGatewayFrequencyOfRoutesChanged`
* `ExpressRouteGatewayMaxFlowsCreationRate`
* `ExpressRouteGatewayNumberOfVmInVnet`
* `ExpressRouteGatewayPacketsPerSecond`
* `InboundFlowsCount`
* `MmsaCount`
* `OutboundFlowsCount`
* `P2SBandwidth`
* `P2SConnectionCount`
* `QmsaCount`
* `ScalableExpressRouteGatewayActiveFlows`
* `ScalableExpressRouteGatewayBitsPerSecond`
* `ScalableExpressRouteGatewayCountOfRoutesAdvertisedToPeer`
* `ScalableExpressRouteGatewayCountOfRoutesLearnedFromPeer`
* `ScalableExpressRouteGatewayCpuUtilization`
* `ScalableExpressRouteGatewayFrequencyOfRoutesChanged`
* `ScalableExpressRouteGatewayMaxFlowsCreationRate`
* `ScalableExpressRouteGatewayNumberOfVmInVnet`
* `ScalableExpressRouteGatewayPacketsPerSecond`
* `ScalableExpressRouteGatewayScaleUnit`
* `TunnelAverageBandwidth`
* `TunnelEgressBytes`
* `TunnelEgressPacketDropCount`
* `TunnelEgressPacketDropTSMismatch`
* `TunnelEgressPackets`
* `TunnelIngressBytes`
* `TunnelIngressPacketDropCount`
* `TunnelIngressPacketDropTSMismatch`
* `TunnelIngressPackets`
* `TunnelNatAllocations`
* `TunnelNatFlowCount`
* `TunnelNatPacketDrop`
* `TunnelNatedBytes`
* `TunnelNatedPackets`
* `TunnelPeakPackets`
* `TunnelReverseNatedBytes`
* `TunnelReverseNatedPackets`
* `TunnelTotalFlowCount`
* `UserVpnRouteCount`
* `VnetAddressPrefixCount`
## microsoft.network/virtualnetworks
* `BytesDroppedDDoS`
* `BytesForwardedDDoS`
* `BytesInDDoS`
* `DDoSTriggerSYNPackets`
* `DDoSTriggerTCPPackets`
* `DDoSTriggerUDPPackets`
* `IfUnderDDoSAttack`
* `PacketsDroppedDDoS`
* `PacketsForwardedDDoS`
* `PacketsInDDoS`
* `PingMeshAverageRoundtripMs`
* `PingMeshProbesFailedPercent`
* `TCPBytesDroppedDDoS`
* `TCPBytesForwardedDDoS`
* `TCPBytesInDDoS`
* `TCPPacketsDroppedDDoS`
* `TCPPacketsForwardedDDoS`
* `TCPPacketsInDDoS`
* `UDPBytesDroppedDDoS`
* `UDPBytesForwardedDDoS`
* `UDPBytesInDDoS`
* `UDPPacketsDroppedDDoS`
* `UDPPacketsForwardedDDoS`
* `UDPPacketsInDDoS`
## microsoft.network/vpngateways
* `AverageBandwidth`
* `BgpPeerStatus`
* `BgpRoutesAdvertised`
* `BgpRoutesLearned`
* `InboundFlowsCount`
* `MmsaCount`
* `OutboundFlowsCount`
* `QmsaCount`
* `TunnelAverageBandwidth`
* `TunnelEgressBytes`
* `TunnelEgressPacketDropCount`
* `TunnelEgressPacketDropTSMismatch`
* `TunnelEgressPackets`
* `TunnelIngressBytes`
* `TunnelIngressPacketDropCount`
* `TunnelIngressPacketDropTSMismatch`
* `TunnelIngressPackets`
* `TunnelNatAllocations`
* `TunnelNatFlowCount`
* `TunnelNatPacketDrop`
* `TunnelNatedBytes`
* `TunnelNatedPackets`
* `TunnelPeakPackets`
* `TunnelReverseNatedBytes`
* `TunnelReverseNatedPackets`
* `TunnelTotalFlowCount`
* `VnetAddressPrefixCount`
## microsoft.notificationhubs/namespaces/notificationhubs
* `incoming`
* `incoming.all.failedrequests`
* `incoming.all.requests`
* `incoming.scheduled`
* `incoming.scheduled.cancel`
* `installation.all`
* `installation.delete`
* `installation.get`
* `installation.patch`
* `installation.upsert`
* `notificationhub.pushes`
* `outgoing.allpns.badorexpiredchannel`
* `outgoing.allpns.channelerror`
* `outgoing.allpns.invalidpayload`
* `outgoing.allpns.pnserror`
* `outgoing.allpns.success`
* `outgoing.apns.badchannel`
* `outgoing.apns.expiredchannel`
* `outgoing.apns.invalidcredentials`
* `outgoing.apns.invalidnotificationsize`
* `outgoing.apns.pnserror`
* `outgoing.apns.success`
* `outgoing.fcmv1.badchannel`
* `outgoing.fcmv1.invalidcredentials`
* `outgoing.fcmv1.invalidnotificationformat`
* `outgoing.fcmv1.invalidnotificationsize`
* `outgoing.fcmv1.pnserror`
* `outgoing.fcmv1.success`
* `outgoing.fcmv1.throttled`
* `outgoing.fcmv1.wrongchannel`
* `outgoing.gcm.authenticationerror`
* `outgoing.gcm.badchannel`
* `outgoing.gcm.expiredchannel`
* `outgoing.gcm.invalidcredentials`
* `outgoing.gcm.invalidnotificationformat`
* `outgoing.gcm.invalidnotificationsize`
* `outgoing.gcm.pnserror`
* `outgoing.gcm.success`
* `outgoing.gcm.throttled`
* `outgoing.gcm.wrongchannel`
* `outgoing.mpns.authenticationerror`
* `outgoing.mpns.badchannel`
* `outgoing.mpns.channeldisconnected`
* `outgoing.mpns.dropped`
* `outgoing.mpns.invalidcredentials`
* `outgoing.mpns.invalidnotificationformat`
* `outgoing.mpns.pnserror`
* `outgoing.mpns.success`
* `outgoing.mpns.throttled`
* `outgoing.wns.authenticationerror`
* `outgoing.wns.badchannel`
* `outgoing.wns.channeldisconnected`
* `outgoing.wns.channelthrottled`
* `outgoing.wns.dropped`
* `outgoing.wns.expiredchannel`
* `outgoing.wns.invalidcredentials`
* `outgoing.wns.invalidnotificationformat`
* `outgoing.wns.invalidnotificationsize`
* `outgoing.wns.invalidtoken`
* `outgoing.wns.pnserror`
* `outgoing.wns.success`
* `outgoing.wns.throttled`
* `outgoing.wns.tokenproviderunreachable`
* `outgoing.wns.wrongtoken`
* `registration.all`
* `registration.create`
* `registration.delete`
* `registration.get`
* `registration.update`
* `scheduled.pending`
## microsoft.powerbidedicated/capacities
* `cpu_metric`
* `overload_metric`
## microsoft.recoveryservices/vaults
* `BackupHealthEvent`
* `RestoreHealthEvent`
## microsoft.relay/namespaces
* `ActiveConnections`
* `ActiveListeners`
* `BytesTransferred`
* `ListenerConnections-ClientError`
* `ListenerConnections-ServerError`
* `ListenerConnections-Success`
* `ListenerConnections-TotalRequests`
* `ListenerDisconnects`
* `SenderConnections-ClientError`
* `SenderConnections-ServerError`
* `SenderConnections-Success`
* `SenderConnections-TotalRequests`
* `SenderDisconnects`
## microsoft.search/searchservices
* `DocumentsProcessedCount`
* `SearchLatency`
* `SearchQueriesPerSecond`
* `SkillExecutionCount`
* `ThrottledSearchQueriesPercentage`
## microsoft.servicebus/namespaces
* `AbandonMessage`
* `ActiveConnections`
* `ActiveMessages`
* `CPUXNS`
* `CompleteMessage`
* `ConnectionsClosed`
* `ConnectionsOpened`
* `DeadletteredMessages`
* `IncomingBytes`
* `IncomingMessages`
* `IncomingRequests`
* `Messages`
* `NamespaceCpuUsage`
* `NamespaceMemoryUsage`
* `OutgoingBytes`
* `OutgoingMessages`
* `PendingCheckpointOperationCount`
* `ReplicationLagCount`
* `ReplicationLagDuration`
* `ScheduledMessages`
* `ServerErrors`
* `ServerSendLatency`
* `Size`
* `SuccessfulRequests`
* `ThrottledRequests`
* `UserErrors`
* `WSXNS`
## microsoft.servicenetworking/trafficcontrollers
* `AzwafCustomRule`
* `AzwafSecRule`
* `AzwafTotalRequests`
* `BackendConnectionTimeouts`
* `BackendHTTPResponseStatus`
* `BackendHealthyTargets`
* `ClientConnectionIdleTimeouts`
* `ConnectionTimeouts`
* `CurrentConnectionUpgrades`
* `CurrentConnections`
* `HTTPResponseStatus`
* `NewConnectionUpgrades`
* `NewConnections`
* `TotalRequests`
## microsoft.signalrservice/signalr
* `ConnectionCloseCount`
* `ConnectionCount`
* `ConnectionOpenCount`
* `ConnectionQuotaUtilization`
* `InboundTraffic`
* `MessageCount`
* `OutboundTraffic`
* `ServerConnectionLatency`
* `ServerLoad`
* `SystemErrors`
* `UserErrors`
## microsoft.signalrservice/signalr/replicas
* `ConnectionCloseCount`
* `ConnectionCount`
* `ConnectionOpenCount`
* `ConnectionQuotaUtilization`
* `InboundTraffic`
* `MessageCount`
* `OutboundTraffic`
* `ServerConnectionLatency`
* `ServerLoad`
* `SystemErrors`
* `UserErrors`
## microsoft.signalrservice/webpubsub
* `ClientRequestStatus`
* `ConnectionCloseCount`
* `ConnectionOpenCount`
* `ConnectionQuotaUtilization`
* `InboundTraffic`
* `OutboundTraffic`
* `RestApiResponseTimeCount`
* `ServerLoad`
* `TotalConnectionCount`
## microsoft.signalrservice/webpubsub/replicas
* `ClientRequestStatus`
* `ConnectionCloseCount`
* `ConnectionOpenCount`
* `ConnectionQuotaUtilization`
* `InboundTraffic`
* `OutboundTraffic`
* `RestApiResponseTimeCount`
* `ServerLoad`
* `TotalConnectionCount`
## microsoft.sql/managedinstances
* `avg_cpu_percent`
* `io_bytes_read`
* `io_bytes_written`
* `io_requests`
* `reserved_storage_mb`
* `storage_space_used_mb`
* `virtual_core_count`
## microsoft.sql/servers/databases
* `active_queries`
* `allocated_data_storage`
* `app_cpu_billed`
* `app_cpu_billed_ha_replicas`
* `app_cpu_percent`
* `app_memory_percent`
* `availability`
* `base_blob_size_bytes`
* `blocked_by_firewall`
* `cache_hit_percent`
* `cache_used_percent`
* `connection_failed`
* `connection_failed_user_error`
* `connection_successful`
* `cpu_limit`
* `cpu_percent`
* `cpu_used`
* `deadlock`
* `diff_backup_size_bytes`
* `dtu_consumption_percent`
* `dtu_limit`
* `dtu_used`
* `dwu_consumption_percent`
* `dwu_limit`
* `dwu_used`
* `free_amount_consumed`
* `free_amount_remaining`
* `full_backup_size_bytes`
* `ledger_digest_upload_failed`
* `ledger_digest_upload_success`
* `local_tempdb_usage_percent`
* `log_backup_size_bytes`
* `log_write_percent`
* `memory_usage_percent`
* `physical_data_read_percent`
* `queued_queries`
* `replication_lag_seconds`
* `sessions_count`
* `sessions_percent`
* `snapshot_backup_size_bytes`
* `sql_instance_cpu_percent`
* `sql_instance_memory_percent`
* `sqlserver_process_core_percent`
* `sqlserver_process_memory_percent`
* `storage`
* `storage_percent`
* `tempdb_data_size`
* `tempdb_log_size`
* `tempdb_log_used_percent`
* `wlg_active_queries`
* `wlg_active_queries_timeouts`
* `wlg_allocation_relative_to_system_percent`
* `wlg_allocation_relative_to_wlg_effective_cap_percent`
* `wlg_effective_cap_resource_percent`
* `wlg_effective_min_resource_percent`
* `wlg_queued_queries`
* `workers_percent`
* `xtp_storage_percent`
## microsoft.sql/servers/elasticpools
* `allocated_data_storage`
* `allocated_data_storage_percent`
* `app_cpu_billed`
* `app_cpu_percent`
* `app_memory_percent`
* `cpu_limit`
* `cpu_percent`
* `cpu_used`
* `dtu_consumption_percent`
* `eDTU_limit`
* `eDTU_used`
* `log_write_percent`
* `physical_data_read_percent`
* `sessions_count`
* `sessions_percent`
* `sql_instance_cpu_percent`
* `sql_instance_memory_percent`
* `sqlserver_process_core_percent`
* `sqlserver_process_memory_percent`
* `storage_limit`
* `storage_percent`
* `storage_used`
* `tempdb_data_size`
* `tempdb_log_size`
* `tempdb_log_used_percent`
* `workers_percent`
* `xtp_storage_percent`
## microsoft.storage/storageaccounts
* `Availability`
* `Egress`
* `Egress-Priority`
* `Ingress`
* `Ingress-Priority`
* `ReplicationLagSeconds`
* `SuccessE2ELatency`
* `SuccessServerLatency`
* `Transactions`
* `Transactions-Priority`
* `UsedCapacity`
## microsoft.storage/storageaccounts/blobservices
* `Availability`
* `BlobCapacity`
* `BlobCount`
* `BlobProvisionedSize`
* `ContainerCount`
* `Egress`
* `IndexCapacity`
* `Ingress`
* `SuccessE2ELatency`
* `SuccessServerLatency`
* `Transactions`
## microsoft.storage/storageaccounts/fileservices
* `Availability`
* `Egress`
* `FileCapacity`
* `FileCount`
* `FileShareAvailableBurstCredits`
* `FileShareCapacityQuota`
* `FileShareCount`
* `FileShareMaxUsedBandwidthMiBps`
* `FileShareMaxUsedIOPS`
* `FileSharePaidBurstingBandwidth`
* `FileSharePaidBurstingIOS`
* `FileShareProvisionedBandwidthMiBps`
* `FileShareProvisionedIOPS`
* `FileShareSnapshotCount`
* `FileShareSnapshotSize`
* `Ingress`
* `PercentFileShareUtilization`
* `SuccessE2ELatency`
* `SuccessServerLatency`
* `Transactions`
## microsoft.storage/storageaccounts/queueservices
* `Availability`
* `Egress`
* `Ingress`
* `QueueCapacity`
* `QueueCount`
* `QueueMessageCount`
* `SuccessE2ELatency`
* `SuccessServerLatency`
* `Transactions`
## microsoft.storage/storageaccounts/tableservices
* `Availability`
* `Egress`
* `Ingress`
* `SuccessE2ELatency`
* `SuccessServerLatency`
* `TableCapacity`
* `TableCount`
* `TableEntityCount`
* `Transactions`
## microsoft.streamanalytics/streamingjobs
* `AMLCalloutFailedRequests`
* `AMLCalloutInputEvents`
* `AMLCalloutRequests`
* `ConversionErrors`
* `DeserializationError`
* `DroppedOrAdjustedEvents`
* `EarlyInputEvents`
* `Errors`
* `InputEventBytes`
* `InputEvents`
* `InputEventsSourcesBacklogged`
* `InputEventsSourcesPerSecond`
* `LateInputEvents`
* `OutputEvents`
* `OutputWatermarkDelaySeconds`
* `ProcessCPUUsagePercentage`
* `ResourceUtilization`
## microsoft.synapse/workspaces
* `BuiltinSqlPoolDataProcessedBytes`
* `BuiltinSqlPoolLoginAttempts`
* `BuiltinSqlPoolRequestsEnded`
* `IntegrationActivityRunsEnded`
* `IntegrationLinkConnectionEvents`
* `IntegrationLinkProcessedChangedRows`
* `IntegrationLinkProcessedDataVolume`
* `IntegrationLinkProcessingLatencyInSeconds`
* `IntegrationLinkTableEvents`
* `IntegrationPipelineRunsEnded`
* `IntegrationTriggerRunsEnded`
* `SQLStreamingBackloggedInputEventSources`
* `SQLStreamingConversionErrors`
* `SQLStreamingDeserializationError`
* `SQLStreamingEarlyInputEvents`
* `SQLStreamingInputEventBytes`
* `SQLStreamingInputEvents`
* `SQLStreamingInputEventsSourcesPerSecond`
* `SQLStreamingLateInputEvents`
* `SQLStreamingOutOfOrderEvents`
* `SQLStreamingOutputEvents`
* `SQLStreamingOutputWatermarkDelaySeconds`
* `SQLStreamingResourceUtilization`
* `SQLStreamingRuntimeErrors`
## microsoft.synapse/workspaces/bigdatapools
* `BigDataPoolAllocatedCores`
* `BigDataPoolAllocatedMemory`
* `BigDataPoolApplicationsActive`
* `BigDataPoolApplicationsEnded`
## microsoft.synapse/workspaces/scopepools
* `ScopePoolJobPNMetric`
* `ScopePoolJobQueuedDurationMetric`
* `ScopePoolJobRunningDurationMetric`
## microsoft.synapse/workspaces/sqlpools
* `ActiveQueries`
* `AdaptiveCacheHitPercent`
* `AdaptiveCacheUsedPercent`
* `CPUPercent`
* `Connections`
* `ConnectionsBlockedByFirewall`
* `DWULimit`
* `DWUUsed`
* `DWUUsedPercent`
* `LocalTempDBUsedPercent`
* `MemoryUsedPercent`
* `QueuedQueries`
* `WLGActiveQueries`
* `WLGActiveQueriesTimeouts`
* `WLGAllocationByEffectiveCapResourcePercent`
* `WLGAllocationBySystemPercent`
* `WLGEffectiveCapResourcePercent`
* `WLGEffectiveMinResourcePercent`
* `WLGQueuedQueries`
## microsoft.web/hostingenvironments
* `CpuPercentage`
* `DiskQueueLength`
* `MemoryPercentage`
* `TotalFrontEnds`
## microsoft.web/hostingenvironments/multirolepools
* `ActiveRequests`
* `AverageResponseTime`
* `BytesReceived`
* `BytesSent`
* `CpuPercentage`
* `DiskQueueLength`
* `Http101`
* `Http2xx`
* `Http3xx`
* `Http401`
* `Http403`
* `Http404`
* `Http406`
* `Http4xx`
* `Http5xx`
* `HttpQueueLength`
* `HttpResponseTime`
* `LargeAppServicePlanInstances`
* `MediumAppServicePlanInstances`
* `MemoryPercentage`
* `Requests`
* `SmallAppServicePlanInstances`
* `TotalFrontEnds`
## microsoft.web/hostingenvironments/workerpools
* `CpuPercentage`
* `MemoryPercentage`
* `WorkersAvailable`
* `WorkersTotal`
* `WorkersUsed`
## microsoft.web/serverfarms
* `BytesReceived`
* `BytesSent`
* `CpuPercentage`
* `DiskQueueLength`
* `HttpQueueLength`
* `MemoryPercentage`
* `SocketInboundAll`
* `SocketLoopback`
* `SocketOutboundAll`
* `SocketOutboundEstablished`
* `SocketOutboundTimeWait`
* `TcpCloseWait`
* `TcpClosing`
* `TcpEstablished`
* `TcpFinWait1`
* `TcpFinWait2`
* `TcpLastAck`
* `TcpSynReceived`
* `TcpSynSent`
* `TcpTimeWait`
## microsoft.web/sites
* `AlwaysReadyFunctionExecutionCount`
* `AlwaysReadyFunctionExecutionUnits`
* `AlwaysReadyUnits`
* `AppConnections`
* `AverageMemoryWorkingSet`
* `AverageResponseTime`
* `BytesReceived`
* `BytesSent`
* `CpuPercentage`
* `CpuTime`
* `CurrentAssemblies`
* `FileSystemUsage`
* `FunctionExecutionCount`
* `FunctionExecutionUnits`
* `Gen0Collections`
* `Gen1Collections`
* `Gen2Collections`
* `Handles`
* `HealthCheckStatus`
* `Http101`
* `Http2xx`
* `Http3xx`
* `Http401`
* `Http403`
* `Http404`
* `Http406`
* `Http4xx`
* `Http5xx`
* `HttpResponseTime`
* `InstanceCount`
* `IoOtherBytesPerSecond`
* `IoOtherOperationsPerSecond`
* `IoReadBytesPerSecond`
* `IoReadOperationsPerSecond`
* `IoWriteBytesPerSecond`
* `IoWriteOperationsPerSecond`
* `MemoryWorkingSet`
* `OnDemandFunctionExecutionCount`
* `OnDemandFunctionExecutionUnits`
* `PrivateBytes`
* `Requests`
* `RequestsInApplicationQueue`
* `Threads`
* `TotalAppDomains`
* `TotalAppDomainsUnloaded`
* `WorkflowActionsCompleted`
* `WorkflowActionsFailureRate`
* `WorkflowAppJobPullRate`
* `WorkflowJobExecutionDelay`
* `WorkflowJobExecutionDuration`
* `WorkflowRunsCompleted`
* `WorkflowRunsDispatched`
* `WorkflowRunsFailureRate`
* `WorkflowRunsStarted`
* `WorkflowTriggersCompleted`
* `WorkflowTriggersFailureRate`
## microsoft.web/sites/slots
* `AppConnections`
* `AverageMemoryWorkingSet`
* `AverageResponseTime`
* `BytesReceived`
* `BytesSent`
* `CpuTime`
* `CurrentAssemblies`
* `FileSystemUsage`
* `FunctionExecutionCount`
* `FunctionExecutionUnits`
* `Gen0Collections`
* `Gen1Collections`
* `Gen2Collections`
* `Handles`
* `HealthCheckStatus`
* `Http101`
* `Http2xx`
* `Http3xx`
* `Http401`
* `Http403`
* `Http404`
* `Http406`
* `Http4xx`
* `Http5xx`
* `HttpResponseTime`
* `IoOtherBytesPerSecond`
* `IoOtherOperationsPerSecond`
* `IoReadBytesPerSecond`
* `IoReadOperationsPerSecond`
* `IoWriteBytesPerSecond`
* `IoWriteOperationsPerSecond`
* `MemoryWorkingSet`
* `PrivateBytes`
* `Requests`
* `RequestsInApplicationQueue`
* `Threads`
* `TotalAppDomains`
* `TotalAppDomainsUnloaded`
# Cloudflare
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/server/cloudflare
Cloudflare zone analytics from the GraphQL Analytics API: HTTP request, bandwidth, threat, security event, and DNS query metrics per zone.
The Cloudflare integration connects Palo Alto Networks Cortex XCOR with
[Cloudflare](https://www.cloudflare.com/) zone analytics. Cortex XCOR polls the
Cloudflare GraphQL Analytics API and ingests HTTP request, bandwidth, threat, security event, and
DNS query metrics for each zone your API token can access.
This integration collects Cloudflare metrics. To ingest Cloudflare logs with Palo Alto Networks
Telemetry Pipeline, see the
[Cloudflare LogPush source plugin](/ingest/pipeline/plugins/source-plugins/cloudflare).
## Supported telemetry types
The Cloudflare integration supports these telemetry types:
| Logs | Metrics | Traces | Events |
| :-: | :-: | :-: | :-: |
| No | Yes | No | No |
## Compatibility
The Cloudflare integration works with:
* The Cloudflare GraphQL Analytics API, using the zone-scoped `httpRequests1mGroups`,
`httpRequestsAdaptiveGroups`, `firewallEventsAdaptiveGroups`, and `dnsAnalyticsAdaptiveGroups`
datasets.
* Any zone whose plan grants GraphQL Analytics access. Which datasets a zone exposes depends on its
plan and settings, so not every zone produces every metric: HTTP metrics require both HTTP
datasets, security event metrics require both HTTP datasets and the firewall events dataset, and
DNS metrics require the DNS dataset.
* Every zone the API token can access, across all the accounts it covers, or only the zones listed
in the configuration. Every series carries the zone and account it belongs to.
## Prerequisites
The Cloudflare integration requires:
* A Cloudflare account with GraphQL Analytics access on the zones you want to collect.
* A Cloudflare API token scoped to the zones you want to collect, or to all zones. User API tokens
(`cfut_` prefix), account API tokens (`cfat_` prefix), and older unprefixed tokens all work. The
token must include both of
these zone permissions:
* **Zone** > **Zone** > **Read** (to list zones)
* **Zone** > **Analytics** > **Read** (to query GraphQL Analytics)
The token is stored write-only through the Integrations Hub **Configurations** tab: it can be
replaced, but never read back.
## Configure the integration
1. In Cloudflare, create a custom API token under **My Profile** > **API Tokens**. For each
permission, set the scope to **Zone**, then add:
* **Zone** > **Zone** > **Read**
* **Zone** > **Analytics** > **Read**
Apply both permissions to the zones you want to collect, or to **All zones**.
2. In Cortex XCOR, open the Integrations Hub and select **Cloudflare**.
3. On the **Configurations** tab, add or edit a configuration and enter the API token.
4. Optional: under **Collection**, add the zone names to collect in **Zones**, for example
`example.com`. Leave **Zones** empty to collect every zone the token can access.
5. Save the configuration.
### Token validation
When you save, Cortex XCOR verifies that the token authenticates. An invalid or revoked
token returns `cloudflare token is not valid`, and an expired or disabled token returns a message
saying the token is not active. If Cloudflare is briefly unavailable, save fails as temporarily
unavailable. Try again. Save doesn't verify that the token has **Zone** read
or **Analytics** read permissions. A configuration can save successfully and still collect no data
if permissions are insufficient. The configuration's status then reports a problem with the token's
permissions once collection runs.
## Validate metrics ingestion
1. Allow up to about 15 minutes after saving for the first metrics to appear. Cortex XCOR syncs
zone metadata about every five minutes before collection starts. After that, the newest samples
stay about ten minutes behind real time. See Limitations below.
2. In [Metrics Explorer](/investigate/querying/metrics/explorer),
query one metric over a range, substituting one of your zones. The newest point is
about ten minutes old, so a query evaluated only at the current time returns nothing.
```text theme={null}
sum(sum_over_time(cloudflare_http_requests_total{zone_name=""}[30m]))
```
A result means data is flowing.
3. Confirm the set of collected zones:
```text theme={null}
count by (zone_name) (count_over_time(cloudflare_http_requests_total[30m]))
```
## Dashboards
The integration includes an **Overview** dashboard that summarizes zone traffic, security, caching,
and DNS. Open it from the **Assets** tab on the Cloudflare integration page in the Integrations
Hub. For more about bundled dashboards, see
[Use bundled assets](/integrate/integrations-hub#use-bundled-assets).
## Metric semantics
Ingested metric names use the `cloudflare_` prefix followed by the metric suffix (for example,
`cloudflare_http_requests_total`). Search for the prefix `cloudflare_` in Metrics Explorer to browse
ingested series.
HTTP and DNS counts are stored as delta counters, one sample per one-minute GraphQL bucket. Security
event counts are delta counters too, with one sample per label combination for each one-minute
collection window. Query them with `sum_over_time()` for totals and `sum_per_second()` for rates.
`increase()` and `rate()` need two samples in the window, so they return nothing for a quiet zone
with a single bucket. For more, see
[Querying delta temporality metrics](/investigate/querying/metrics/delta-queries).
The exception is `cloudflare_http_uniques_total`: each sample is a per-minute unique-visitor count,
so summing it over a longer window overcounts visitors who return. Averaged and percentile metrics
are point-in-time gauges.
Every series includes `zone_id`, `zone_name`, `account_id`, and `account_name` labels that identify
the zone and account it belongs to. Additional labels depend on the metric, such as `country`,
`status_code`, or `query_type`. Security event counts carry `action`, `firewall_source`, `rule_id`,
and `host`. The `firewall_source` label holds the Cloudflare `source` field.
For the full metric catalog (names, types, units, and descriptions), open the **Metrics** tab on the
Cloudflare integration page in the Integrations Hub.
## Troubleshooting
The status of a configuration on the **Configurations** tab comes from listing the zones the token
can read and from collecting their analytics. When it reports a problem you can fix, it says what
kind of change the token, the account, or the configuration needs. For this integration, each kind
of status points at the setting in this table. The wording of the status can differ from the first
column. A status that says data is late or missing is a Cloudflare incident, a rate limit, or a
problem on the Cortex XCOR side. There is nothing to change in the configuration.
| When the status says that | Look at |
| - | - |
| The credentials aren't valid. | The token expired, was deleted, or was rolled in Cloudflare. Create a token with the permissions listed in the prerequisites and save it in the configuration. |
| A permission is missing. | The token lists no zones, the token lacks **Zone** > **Analytics** > **Read** on a zone it lists, or the account member who created the token left the account. Grant **Zone** > **Zone** > **Read** on the zones you want to collect, edit the token's permissions and zone resources, or create an account-owned token with the permissions listed in the prerequisites. |
| The configuration's details don't match the account. | The token lists zones, but none of them is in the configuration's **Zones** list. Check the zone names, or grant **Zone** > **Zone** > **Read** on the listed zones. |
| The credentials were rejected. | Cloudflare refused the token without saying whether it's invalid or lacks a permission. Check that the token is active, that it isn't restricted to client IP addresses, that the account allows API access, and that it grants both permissions listed in the prerequisites. |
| The plan doesn't include this data. | None of the zones the configuration collects has a plan that exposes the datasets that HTTP or DNS metrics require, so no metrics arrive. The status also appears when a zone's plan no longer exposes a dataset the integration collects. Until the next zone metadata sync excludes the dataset for that zone, collection of it stops for the zones in the same batch. Upgrade the plan of the zones you want to collect. |
| A usage limit was reached. | Cloudflare reported that an account's or a zone's GraphQL Analytics API rate limit is exhausted. That limit is shared with your own dashboards and scripts. Reduce other usage, or ask your Cloudflare account team for a higher limit. |
The following table lists other common problems and how to resolve them:
| Symptom | Resolution |
| - | - |
| Save fails with `cloudflare token is not valid` | The token is missing, revoked, or otherwise rejected during authentication. Create a new token in Cloudflare and save again. |
| Save succeeds but no metrics appear | Confirm the token includes **Zone** > **Zone** > **Read** and **Zone** > **Analytics** > **Read** on the zones you expect. Save only checks authentication, not Analytics access. A token without **Zone** > **Zone** > **Read** lists no zones, and the configuration's status says a permission is missing. |
| No metrics yet after saving | Wait up to about 15 minutes for the first samples. Zone metadata sync runs on a five-minute cadence, and ingested points also trail real time by about ten minutes. |
| A zone never appears in queries | Confirm the token scopes that zone, the zone is in the configuration's **Zones** list if the list isn't empty, the zone's plan exposes the GraphQL datasets, and the zone had HTTP or DNS activity in the collection window. Zones without traffic produce no samples rather than zeros. |
| Security event metrics are missing for a zone | Security event counts need the zone's plan to expose the firewall events dataset, and the zone must also collect HTTP metrics. If Cloudflare fails the security event query for a collection window, security event samples for that window are missing, possibly for several zones at once, and HTTP and DNS metrics still arrive. |
## Limitations
* The integration collects metrics only. It doesn't collect logs, traces, or events.
* The **Zones** list narrows what the API token can access. It can't add zones the token can't
access, and listed zones the token can't access aren't collected. Zone names match regardless of
case. Configurations that use the same API token together collect every zone any of them lists,
and every zone the token can access if any of them leaves **Zones** empty.
* Ingested samples trail real time by about ten minutes because of the ingest delay applied during
collection.
* Security event counts are estimates from Cloudflare's
[adaptive sampling](https://developers.cloudflare.com/analytics/graphql-api/sampling/). Each zone
keeps at most 10,000 combinations of action, source, rule, and host per minute, and the least
frequent combinations are dropped when a zone exceeds that.
# Google Cloud
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/server/gcp
Send Google Cloud metrics and logs to Palo Alto Networks Cortex XCOR.
[Google Cloud](https://cloud.google.com/) is Google's public cloud platform. Use the Google
Cloud integration to send Cloud Monitoring metrics and Google Cloud logs from your Google Cloud
projects to Palo Alto Networks Cortex XCOR. Cortex XCOR reads the metrics from the projects you
choose, by impersonating a service account you create. A Dataflow job that runs in your project
sends the logs, reading them from Pub/Sub subscriptions, typically fed by a Cloud Logging sink.
## Supported telemetry types
The Google Cloud integration supports these telemetry types:
> [card] [Metrics](/ingest/xcor/integrations/server/gcp/metrics)
>
> Learn how to ingest Google Cloud metrics into Palo Alto Networks Cortex XCOR.
> [card] [Logs](/ingest/xcor/integrations/server/gcp/logs)
>
> Learn how to send Google Cloud logs to Palo Alto Networks Cortex XCOR with a Dataflow job.
# Ingest Google Cloud logs
Source: https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/server/gcp/logs
Learn how to send Google Cloud logs to Palo Alto Networks Cortex XCOR with a Dataflow job.
The Google Cloud integration sends [Google Cloud](https://cloud.google.com/) logs to Palo Alto
Networks Cortex XCOR. A streaming Dataflow job that runs in your
Google Cloud project reads log messages from a Pub/Sub subscription and sends them to the
Cortex XCOR logs ingest API. A typical input is logs routed from Cloud Logging to
Pub/Sub by a log sink, but the job accepts any Pub/Sub topic that carries JSON messages.
The job runs entirely in your project, under identities you create. No step grants Palo Alto
Networks access to your project.
This job replaces [Route logs from Google Cloud Platform](/ingest/logs/gcp-logs),
where Cortex XCOR Support pulls logs from a subscription you create. That setup is supported only
for tenants already running it. Set up new log collection with the Dataflow job on this page.
## Compatibility
Log collection works with:
* The `pubsub-to-chronosphere` Dataflow Flex Template, version `1.0.1`.
* Pub/Sub subscriptions whose messages are JSON objects. Cloud Logging `LogEntry` messages get
built-in normalization. Other JSON objects pass through as received. The template adds
`_ingest_source`, `project_id`, and `subscription_id` to every log, replacing any fields
with the same names. When the template can look up the subscription's topic, it adds `topic`
in the same way.
* One or more subscriptions for each job. A subscription can attach to a topic in another
Google Cloud project.
### How logs are labeled
Every log gets two labels:
* `xcor.integration.name`: always `gcp`, the integration's catalog ID.
* `xcor_integration`: the Google Cloud service that wrote the log, such as `gcp_gke`,
`gcp_cloud_run`, `gcp_cloud_sql`, or `gcp_compute_engine`. Cortex XCOR derives this label from
the log's monitored resource type and log name. Audit logs that aren't associated with a
single service get `gcp_audit_logs`. Logs that Cortex XCOR can't attribute get `gcp_other`
and are stored like any other log.
For the following fields, values from the log take precedence over values that Cortex XCOR
sets, and your organization's log normalization settings take precedence over both:
* Service: The `service` field is the `xcor_integration` value without `gcp_`, such as `gke`,
`cloud_run`, or `cloud_sql`. Logs labeled `gcp_other` get their monitored resource type, such
as `global`. Workload names, such as a container or Cloud Run service name, stay in the
`resource.labels` fields.
* Severity: Cloud Logging severities map to `DEBUG`, `INFO` (`INFO` and `NOTICE`), `WARN`,
`ERROR`, and `FATAL` (`CRITICAL`, `ALERT`, and `EMERGENCY`). `DEFAULT` means the log has no
severity. An audit log without a severity gets `ERROR` when `protoPayload.status.code` is
non-zero, and `INFO` otherwise. Other logs without a severity get your organization's default.
## Prerequisites
Log collection requires:
* A Cortex XCOR tenant with logging enabled. Contact Cortex XCOR Support if you're
unsure whether logging is enabled.
* A Google Cloud project to run the job in, where you can enable APIs and create the resources
in the setup steps.
* The `gcloud` command-line tool, authenticated against that project.
* A project Owner to grant roles to the job's service account, or the other identities that
[Create the worker service account](#create-the-worker-service-account) lists. The Editor role
can't grant roles. If the deploying identity isn't an Editor, only the Owner can let it launch
jobs as that service account.
### Required permissions
The identity that deploys the job can be a person or an automation account. It needs either the
`roles/editor` role on the project plus the following two roles, or the full list of roles after
them. The Editor role can't create log sinks or change a topic's Identity and Access Management
(IAM) policy.
| Role | Scope | Purpose |
| - | - | - |
| `roles/logging.configWriter` | Project | Create the log sink. |
| `roles/pubsub.admin` | Project | Let the sink's writer identity publish to the export topic. `roles/pubsub.editor` can't grant this. |
If the deploying identity isn't an Editor, it needs the following roles instead:
| Role | Scope | Purpose |
| - | - | - |
| `roles/serviceusage.serviceUsageAdmin` | Project | Enable the required APIs. |
| `roles/iam.serviceAccountCreator` | Project | Create the worker service account. |
| `roles/logging.configWriter` | Project | Create the log sink. |
| `roles/pubsub.admin` | Project | Create topics and subscriptions, and let the sink's writer identity publish to the export topic. `roles/pubsub.editor` can't grant this. |
| `roles/storage.admin` | Project | Create the staging bucket and upload staging files. If the bucket already exists, `roles/storage.objectAdmin` on the bucket is enough. |
| `roles/secretmanager.admin` | Project | Create the secret and add the token. |
| `roles/dataflow.developer` | Project | Create, drain, and cancel jobs. |
| `roles/compute.viewer` | Project | View machine types and quotas when launching jobs. |
| `roles/logging.viewer` | Project | Read the job's worker logs, which the [Troubleshooting](#troubleshooting) rows quote. |
| `roles/iam.serviceAccountUser` | The worker service account | Launch jobs that run as the worker service account. `roles/iam.serviceAccountCreator` can't grant this, so the project Owner grants it in [Create the worker service account](#create-the-worker-service-account). |
The worker service account, created during setup, needs the roles listed in
[Create the worker service account](#create-the-worker-service-account). No step requires
organization-level roles.
## Configure the integration
The Integrations Hub has no configuration form for logs. You deploy the job in
Google Cloud, and it sends logs to your tenant. The setup creates the following pipeline in
your project:
```mermaid actions={false} theme={null}
graph LR
accTitle: Google Cloud log delivery
accDescr: Cloud Logging routes logs through Pub/Sub to a Dataflow job. The job parses, normalizes, batches, compresses, and sends logs to Cortex XCOR. Failed events go to a dead-letter topic.
logging[Cloud Logging] -- sink --> topic[Pub/Sub topic]
topic --> subscriptions[Pub/Sub subscriptions]
subscriptions --> job[Dataflow job]
job -- accepted logs --> xcor[Cortex XCOR]
job -- failed events --> deadLetter[Dead-letter topic]
```
Complete the following steps in order. Skip any step whose resource already exists. To create
the same resources with Terraform instead, see [Set up with Terraform](#set-up-with-terraform).
### Set up the project
Set these shell variables, which the later commands use:
```shell theme={null}
PROJECT= # Google Cloud project the job runs in
REGION= # for example, us-central1
TENANT= # your tenant is https://.chronosphere.io
```
Enable the required APIs:
```shell theme={null}
gcloud services enable dataflow.googleapis.com pubsub.googleapis.com \
secretmanager.googleapis.com storage.googleapis.com compute.googleapis.com \
--project=$PROJECT
```
### Store an API token in Secret Manager
1. In Cortex XCOR, create a restricted service account with **Write-only** access
and no label restrictions. The write-only restriction covers logs ingest too, though the
option's description in Cortex XCOR mentions only metric data. For the procedure, see
[Create a restricted service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account).
2. Copy the account's token, which Cortex XCOR shows only once.
3. Store the token in Secret Manager, replacing ``:
```shell theme={null}
printf '%s' "" | gcloud secrets create cortex-xcor-api-token \
--data-file=- --replication-policy=automatic --project=$PROJECT
```
If your organization policy rejects automatic replication, use
`--replication-policy=user-managed --locations=$REGION` instead.
Each worker reads the token from Secret Manager at startup, so the token never appears in the
job's parameters or pipeline graph.
### Create the worker service account
The job's virtual machines run as a dedicated service account. Create it:
```shell theme={null}
SA=cortex-xcor-dataflow@$PROJECT.iam.gserviceaccount.com
gcloud iam service-accounts create cortex-xcor-dataflow --project=$PROJECT
```
A project Owner must grant the service account its roles. A project IAM administrator
(`roles/resourcemanager.projectIamAdmin`) can run the loop instead, but not the secret binding,
which needs the Owner or an identity with `roles/secretmanager.admin`:
```shell theme={null}
for ROLE in roles/dataflow.worker roles/pubsub.subscriber roles/pubsub.viewer \
roles/pubsub.publisher roles/storage.objectAdmin roles/artifactregistry.reader \
roles/monitoring.metricWriter; do
gcloud projects add-iam-policy-binding $PROJECT \
--member="serviceAccount:$SA" --role="$ROLE" --condition=None
done
gcloud secrets add-iam-policy-binding cortex-xcor-api-token --project=$PROJECT \
--member="serviceAccount:$SA" --role=roles/secretmanager.secretAccessor --condition=None
```
If the deploying identity isn't an Editor, the Owner must also let it launch jobs as the service
account. Replace `` with the identity, such as `user:alice@example.com`:
```shell theme={null}
gcloud iam service-accounts add-iam-policy-binding $SA --project=$PROJECT \
--member="" --role=roles/iam.serviceAccountUser --condition=None
```
The following table lists why the job needs each role:
| Role | Purpose |
| - | - |
| `roles/dataflow.worker` | Run the launcher and worker virtual machines. |
| `roles/pubsub.subscriber` | Pull and acknowledge messages from the input subscriptions. |
| `roles/pubsub.viewer` | Look up each subscription's topic at launch, which the job adds to every log as the `topic` field. |
| `roles/pubsub.publisher` | Publish failed messages to the dead-letter topic. Omit this role if you don't use a dead-letter topic. |
| `roles/storage.objectAdmin` | Read and write staging and temporary files. |
| `roles/artifactregistry.reader` | Pull the template's container image. |
| `roles/monitoring.metricWriter` | Write the job's worker metrics to Cloud Monitoring. Without it, each worker start logs a denied `monitoring.metricDescriptors.create` call. |
| `roles/secretmanager.secretAccessor` on the token secret only | Read the API token at worker startup. |
The `--condition=None` flag keeps the commands non-interactive in projects that have
conditional IAM bindings. If you created the service account moments earlier, the first binding
can fail with `service account does not exist` for up to a minute while IAM propagates the
account. Run the command again.
### Export logs to Pub/Sub
Create a topic, a log sink that routes Cloud Logging logs to it, and a subscription for the
job:
```shell theme={null}
gcloud pubsub topics create logs-export --project=$PROJECT
# The sink filter controls which logs leave your project and get ingested.
gcloud logging sinks create cortex-xcor-logs \
pubsub.googleapis.com/projects/$PROJECT/topics/logs-export \
--log-filter='(severity>=INFO OR severity=DEFAULT) AND NOT (resource.type="dataflow_step" AND resource.labels.job_name="cortex-xcor-logs")' \
--project=$PROJECT
# Let the sink's writer identity publish to the topic.
WRITER=$(gcloud logging sinks describe cortex-xcor-logs --project=$PROJECT --format='value(writerIdentity)')
gcloud pubsub topics add-iam-policy-binding logs-export --project=$PROJECT \
--member="$WRITER" --role=roles/pubsub.publisher
gcloud pubsub subscriptions create logs-export-cortex-xcor --topic=logs-export \
--project=$PROJECT --ack-deadline=120 --message-retention-duration=23h
```
Everything the sink exports is sent and ingested, so filter with the sink's `--log-filter`:
* The filter keeps logs with no severity, which Cloud Logging stores as `DEFAULT` and
`severity>=INFO` alone would drop.
* It leaves out the job's own worker logs, which would otherwise flow back into the job's input
and be ingested. The `job_name` in the filter must match the name you launch the job with.
* Because it keeps `DEFAULT`, the filter also exports the Kubernetes API audit logs (`k8s.io`)
from Google Kubernetes Engine (GKE) clusters, which carry no severity. These are Admin Activity
audit logs, and lease updates can make up most of their volume. To leave out the lease updates,
add `AND NOT protoPayload.methodName="io.k8s.coordination.v1.leases.update"` to the filter. To
leave out all of them, add `AND NOT protoPayload.serviceName="k8s.io"`, which also drops the
record of changes such as creates, deletes, and permission changes.
* If you enable Data Access audit logs for Pub/Sub, update the sink filter to exclude audit logs
for the export topic.
Use one sink per project for this integration. Each sink exports its own copy of every log it
matches, so a log that two sinks match is ingested twice. This includes folder-level and
organization-level sinks that route the project's logs. If another sink already exports these
logs to a job like this one, don't add a second. If the project runs more than one such job, give
each job a different source: every subscription on a topic receives every message, so two jobs
reading the same topic ingest it twice. Exclude each job's worker logs in the one sink's filter
with a clause of its own, such as
`AND NOT (resource.type="dataflow_step" AND resource.labels.job_name="")`.
A new sink can take a few minutes to start exporting. Logs written before then aren't exported.
Keep subscription retention under 24 hours. Cortex XCOR discards logs with timestamps more than
24 hours in the past, so an older backlog can't be delivered.
To ship other JSON messages, such as app events published directly to Pub/Sub, point the job at
a subscription on that topic instead.
If a source topic lives in a different project, create the subscription in the job's project
and reference the topic as `projects//topics/`. The identity that creates
the subscription needs `roles/pubsub.subscriber` on the source topic. The worker service
account needs no grants in the source project.
### Create the staging bucket and dead-letter topic
```shell theme={null}
gcloud storage buckets create gs://$PROJECT-cortex-xcor-dataflow \
--project=$PROJECT --location=$REGION --uniform-bucket-level-access
gcloud pubsub topics create cortex-xcor-dead-letter --project=$PROJECT
gcloud pubsub subscriptions create cortex-xcor-dead-letter-monitor \
--topic=cortex-xcor-dead-letter --project=$PROJECT
```
Create the dead-letter topic in every production deployment. Without it, the job drops messages
that aren't JSON objects and events that Cortex XCOR permanently rejects. The job
counts dropped events, but can't recover them.
### Launch the job
The template spec for version `1.0.1` is
`gs://chronosphere-release/dataflow-templates/pubsub-to-chronosphere/1.0.1/spec.json`. Its
container image is `us-docker.pkg.dev/chronosphereio/release/pubsub-to-chronosphere:1.0.1`.
```shell theme={null}
SPEC=gs://chronosphere-release/dataflow-templates/pubsub-to-chronosphere/1.0.1/spec.json
gcloud dataflow flex-template run cortex-xcor-logs \
--project=$PROJECT --region=$REGION \
--template-file-gcs-location=$SPEC \
--service-account-email=$SA \
--staging-location=gs://$PROJECT-cortex-xcor-dataflow/staging \
--temp-location=gs://$PROJECT-cortex-xcor-dataflow/temp \
--enable-streaming-engine --max-workers=2 \
--parameters=inputSubscription=projects/$PROJECT/subscriptions/logs-export-cortex-xcor \
--parameters=chronosphereUrl=https://$TENANT.chronosphere.io/api/v1/data/logs/ingest/integrations/gcp \
--parameters=chronosphereApiTokenSecretId=projects/$PROJECT/secrets/cortex-xcor-api-token/versions/latest \
--parameters=deadLetterTopic=projects/$PROJECT/topics/cortex-xcor-dead-letter
```
The command returns as soon as Dataflow accepts the job, even if the job then fails to start.
Confirm that it started:
```shell theme={null}
gcloud dataflow jobs list --project=$PROJECT --region=$REGION \
--filter="name=cortex-xcor-logs" --limit=1 \
--format="value(id,state)"
```
The command usually shows the newest job with that name. Its state should reach `Running` within
a few minutes. If it shows `Failed`, open the job's logs on the Dataflow **Jobs** page. A message
such as `Failed to start the launcher VM` followed by `Operation denied by org policy` means an
organization policy blocked the virtual machine. Add the settings in
[Locked-down environments](#locked-down-environments) and launch again.
To choose `--max-workers`, see [Sizing](#sizing). For the other template parameters, see
[Parameters reference](#parameters-reference).
To read several subscriptions with one job, separate them with commas. Because the comma
collides with the `gcloud` parameter syntax, use the alternate-delimiter form and quote the
whole flag:
```shell theme={null}
--parameters="^;^inputSubscription=projects/$PROJECT/subscriptions/sub-a,projects/$PROJECT/subscriptions/sub-b"
```
### Set up with Terraform
Terraform can create everything after the API token. Complete
[Set up the project](#set-up-the-project) and
[Store an API token in Secret Manager](#store-an-api-token-in-secret-manager) first, so the
token stays in Secret Manager and out of Terraform state.
The configuration creates its own log sink, so first read the one-sink-per-project guidance in
[Export logs to Pub/Sub](#export-logs-to-pubsub). It also grants the worker service account its
roles, so apply it as a project Owner, or as an identity that holds
`roles/resourcemanager.projectIamAdmin` and `roles/secretmanager.admin` along with the roles in
[Required permissions](#required-permissions).
An identity that has neither the Owner nor the Editor role also needs
`roles/iam.serviceAccountUser` on the worker service account before Terraform creates the job.
The account doesn't exist until Terraform creates it, and only the Owner can grant that role on
it, so apply in two passes. Run `terraform apply -target=google_service_account.worker` to create
only the account. Have the Owner run the `roles/iam.serviceAccountUser` command in
[Create the worker service account](#create-the-worker-service-account), with `SA` set to the
account's email, `cortex-xcor-dataflow@.iam.gserviceaccount.com` for the default
`name`. Then run `terraform apply` again. Alternatively, the Owner can grant
`roles/iam.serviceAccountUser` on the project before the apply, which lets the identity act as
every service account in the project.
1. The configuration needs the `google` and `google-beta` providers because the Dataflow flex
template job resource is available only in `google-beta`. The configuration was tested with
version 8 of both providers. Set the project and region on each:
```terraform theme={null}
terraform {
required_providers {
google = { source = "hashicorp/google", version = ">= 6.0" }
google-beta = { source = "hashicorp/google-beta", version = ">= 6.0" }
}
}
provider "google" {
project = ""
region = ""
}
provider "google-beta" {
project = ""
region = ""
}
```
2. Set values for these variables, and apply the configuration. In a project that blocks
external IP addresses, also set `subnetwork` and `private_ips`, as in
[Locked-down environments](#locked-down-environments).
```terraform expandable Terraform example icon="square-terminal" theme={null}
# Variables
variable "project_id" {
type = string
description = "The Google Cloud project the job runs in."
}
variable "region" {
type = string
description = "The region the job runs in, for example us-central1."
}
variable "xcor_org_name" {
type = string
description = "The name of your Cortex XCOR organization, which is the subdomain name before .chronosphere.io."
}
variable "api_token_secret_id" {
type = string
description = "The ID of the Secret Manager secret in this project that holds the API token."
}
variable "name" {
type = string
default = "cortex-xcor"
description = "Prefix for the resources this configuration creates. The job is named -logs."
}
variable "max_workers" {
type = number
default = 2
}
variable "subnetwork" {
type = string
default = null
description = "Subnetwork for the job's virtual machines, as regions//subnetworks/ or a full URL for Shared VPC. Empty uses the default network."
}
variable "private_ips" {
type = bool
default = false
description = "Run the virtual machines without external IP addresses. The subnetwork then needs Private Google Access and egress to .chronosphere.io, such as Cloud NAT."
}
locals {
job_name = "${var.name}-logs"
bucket = "${var.project_id}-${var.name}-dataflow"
spec = "gs://chronosphere-release/dataflow-templates/pubsub-to-chronosphere/1.0.1/spec.json"
}
# Worker service account
resource "google_service_account" "worker" {
account_id = "${var.name}-dataflow"
display_name = "Cortex XCOR logs Dataflow worker"
}
resource "google_project_iam_member" "worker" {
for_each = toset([
"roles/dataflow.worker",
"roles/pubsub.subscriber",
"roles/pubsub.viewer",
"roles/pubsub.publisher",
"roles/storage.objectAdmin",
"roles/artifactregistry.reader",
"roles/monitoring.metricWriter",
])
project = var.project_id
role = each.value
member = "serviceAccount:${google_service_account.worker.email}"
}
resource "google_secret_manager_secret_iam_member" "worker" {
secret_id = var.api_token_secret_id
role = "roles/secretmanager.secretAccessor"
member = "serviceAccount:${google_service_account.worker.email}"
}
# Logs export
resource "google_pubsub_topic" "export" {
name = "${var.name}-logs-export"
}
resource "google_logging_project_sink" "export" {
name = local.job_name
destination = "pubsub.googleapis.com/${google_pubsub_topic.export.id}"
# Keeps logs with no severity, and leaves out the job's own worker logs. To leave out GKE's
# lease updates, append AND NOT protoPayload.methodName=\"io.k8s.coordination.v1.leases.update\"
# to the string; to leave out all of GKE's Kubernetes API audit logs, append
# AND NOT protoPayload.serviceName=\"k8s.io\".
filter = "(severity>=INFO OR severity=DEFAULT) AND NOT (resource.type=\"dataflow_step\" AND resource.labels.job_name=\"${local.job_name}\")"
unique_writer_identity = true
}
resource "google_pubsub_topic_iam_member" "sink_writer" {
topic = google_pubsub_topic.export.id
role = "roles/pubsub.publisher"
member = google_logging_project_sink.export.writer_identity
}
resource "google_pubsub_subscription" "export" {
name = "${var.name}-logs-export"
topic = google_pubsub_topic.export.id
ack_deadline_seconds = 120
message_retention_duration = "82800s"
}
# Staging bucket and dead-letter topic
resource "google_storage_bucket" "staging" {
name = local.bucket
location = var.region
uniform_bucket_level_access = true
force_destroy = true
}
resource "google_pubsub_topic" "dead_letter" {
name = "${var.name}-dead-letter"
}
resource "google_pubsub_subscription" "dead_letter" {
name = "${var.name}-dead-letter-monitor"
topic = google_pubsub_topic.dead_letter.id
}
# Dataflow job
# The flex template job resource is only in the google-beta provider.
resource "google_dataflow_flex_template_job" "logs" {
provider = google-beta
name = local.job_name
region = var.region
container_spec_gcs_path = local.spec
service_account_email = google_service_account.worker.email
staging_location = "gs://${local.bucket}/staging"
temp_location = "gs://${local.bucket}/temp"
enable_streaming_engine = true
max_workers = var.max_workers
subnetwork = var.subnetwork
ip_configuration = var.private_ips ? "WORKER_IP_PRIVATE" : null
on_delete = "drain"
parameters = {
inputSubscription = google_pubsub_subscription.export.id
chronosphereUrl = "https://${var.xcor_org_name}.chronosphere.io/api/v1/data/logs/ingest/integrations/gcp"
chronosphereApiTokenSecretId = "projects/${var.project_id}/secrets/${var.api_token_secret_id}/versions/latest"
deadLetterTopic = google_pubsub_topic.dead_letter.id
}
depends_on = [google_project_iam_member.worker, google_secret_manager_secret_iam_member.worker, google_storage_bucket.staging]
}
```
The sink filter names the job, so changing `name` updates both. Destroying the configuration
drains the job before deleting it.
### Locked-down environments
Common organization policies need these additional launch settings:
* No external IP addresses, enforced by `constraints/compute.vmExternalIpAccess` or
`constraints/compute.managed.vmExternalIpAccess`: Add
`--disable-public-ips` and run on a subnet with Private Google Access enabled. The subnet
also needs the following:
* If your Virtual Private Cloud (VPC) network uses custom private DNS zones for Google APIs,
such as `private.googleapis.com` or `restricted.googleapis.com` setups, the zones must
cover `pkg.dev` for the template image and `gcr.io` for a logging agent that the Dataflow
launcher pulls. For the options, see
[Private Google Access domain options](https://cloud.google.com/vpc/docs/configure-private-google-access#domain-options).
Older setups that predate Artifact Registry often cover `gcr.io` but miss `pkg.dev`.
* The job sends data to `.chronosphere.io` on port 443. Private Google Access doesn't
cover this external traffic. Provide Cloud Network Address Translation (Cloud NAT) or
equivalent egress to that host.
The job runs continuously, so the egress path must stay up.
* No default VPC network: Add `--network`, `--subnetwork`, or both. For Shared VPC, use the
full subnetwork URL,
`https://www.googleapis.com/compute/v1/projects//regions//subnetworks/`,
and grant the deploying identity `roles/compute.networkUser` on the subnet.
* Firewall rules keyed on network tags: Dataflow virtual machines carry only the default
`dataflow` network tag. Add tags at launch with
`--additional-experiments=use_network_tags=;` for worker virtual machines and
`--additional-experiments=use_network_tags_for_flex_templates=` for the launcher virtual
machine. You can't add tags after the job starts.
* Mandatory virtual machine labels: Add
`--additional-user-labels==,=`.
* VPC Service Controls: Confirm that the perimeter's egress policy allows the job to reach the
ingest endpoint, and that cross-project subscriptions stay inside the perimeter.
## Validate log ingestion
1. Allow several minutes for Dataflow to start the job's virtual machines. After the job is
running, a message usually reaches Cortex XCOR within seconds of arriving in
Pub/Sub. The job sends a partial batch after the batch timeout, 5 seconds by default.
2. In the Google Cloud console, open the job on the Dataflow **Jobs** page and review the
custom counters for its steps. The `valid_messages`, `batches_sent`, and `events_sent`
counters should increase, and `invalid_messages` and `batches_failed` should stay at 0. The
`events_sent` counter includes logs that Cortex XCOR accepted and then discarded,
so confirm arrival in the next step.
3. In the navigation menu, select
**Explorers > Logs Explorer**, and run this query:
```text theme={null}
["xcor.integration.name"] = "gcp" | summarize count() by xcor_integration
```
Each Google Cloud service sending logs appears as a row. Each log also carries
`project_id` and `subscription_id` fields that identify the subscription it came through,
and a `topic` field when the job could look up the subscription's topic. `project_id` is the
subscription's project, not the project that wrote the log. For more about queries, see
[Search and filter log data](/investigate/querying/query-logs).
To send a test message that exercises normalization, publish a `LogEntry`-shaped message to the
input topic:
```shell theme={null}
gcloud pubsub topics publish logs-export --project=$PROJECT \
--message='{"severity":"ERROR","textPayload":"Cortex XCOR test message","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"}'
```
The log appears with `message` set to the `textPayload` value.
## Sizing
With Streaming Engine enabled, as in the launch command, horizontal autoscaling is on by
default, and you can change the minimum and maximum workers with an in-flight update. Always
set `--max-workers`, because it caps the job's cost. To estimate it:
1. Average events per second = logs per day ÷ 86,400.
2. Peak events per second ≈ 2 × average. Adjust for your burst profile.
3. Virtual CPUs needed = peak events per second ÷ 2,000, rounded up. The estimate is
conservative for logs of about 1 KB.
4. `--max-workers` = virtual CPUs needed ÷ 4, rounded up, for the default `n1-standard-4`
workers.
For reference, one `n1-standard-4` worker sustained about 150 million logs per day at under
half its CPU.
The job batches by event count, not size. A batch holds up to `batchSize` events, with a default
of 500. A Cloud Logging entry can be up to 256 KiB, so a batch of large entries can pass the
16 MiB limit on one ingest request. The job then splits the batch in half and retries, so nothing
is lost. Each oversized batch costs extra requests. If your entries are large, lower `batchSize`,
for example to 100.
## Monitoring
You run the job, so you own detecting its failures. If you collect
[Google Cloud metrics](/ingest/xcor/integrations/server/gcp/metrics)
too, add the `pubsub.googleapis.com/subscription` and `dataflow.googleapis.com/job` metric type
prefixes so Cortex XCOR ingests pipeline health metrics into the same tenant as the logs. Alert
on these conditions:
* The subscription's `oldest_unacked_message_age` approaches the retention window. Messages
older than the retention window are lost.
* The subscription's `num_undelivered_messages` grows steadily.
* The Dataflow job's `system_lag` rises, or the job leaves the running state.
* The dead-letter subscription holds any messages.
The job also reports these custom counters for each step in the Dataflow console:
`valid_messages`, `invalid_messages`, `empty_messages`, `batches_sent`, `batches_failed`,
`batches_bisected`, `events_sent`, `events_dead_lettered`, `retries_performed`,
`udf_transformed`, `udf_filtered`, `udf_errors`, and `udf_invalid_output`. It also reports the
`batch_size` and `request_duration_ms` distributions.
## Parameters reference
The following table lists the template parameters:
| Parameter | Required | Default | Description |
| - | - | - | - |
| `inputSubscription` | Yes | None | Subscriptions to read, in the form `projects//subscriptions/`. Separate several with commas. |
| `chronosphereUrl` | Yes | None | The logs ingest endpoint, `https://.chronosphere.io/api/v1/data/logs/ingest/integrations/gcp`. |
| `chronosphereApiTokenSecretId` | One of the two token parameters | None | Secret Manager resource ID of the API token, in the form `projects//secrets//versions/`. Takes precedence over `chronosphereApiToken`. |
| `chronosphereApiToken` | One of the two token parameters | None | Plaintext API token. Don't use it in production, because the token is visible in the job parameters in the Dataflow console. |
| `enableDefaultNormalization` | No | `true` | Built-in `LogEntry` normalization, described after this table. |
| `defaultLabels` | No | None | Comma-separated `key=value` fields added to every log, such as `env=prod,team=payments`. A label overwrites a same-named field in the log, so avoid keys your logs already use. |
| `batchSize` | No | `500` | Events per HTTP request. |
| `batchTimeoutSeconds` | No | `5` | Maximum seconds to buffer a partial batch before sending it. |
| `deadLetterTopic` | No | None | Topic for messages that fail parsing, invalid function output, and permanently rejected events, in the form `projects//topics/`. If unset, the job drops them. |
| `javascriptTextTransformGcsPath` | No | None | Cloud Storage path of a JavaScript user-defined function file, such as `gs://