> ## Documentation Index
> Fetch the complete documentation index at: https://docs-xcor.paloaltonetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Service pages

> Learn about the different components of service pages and how to view data related to your services.

A *service page* uses consistent metric tagging to automatically produce queries for
common compute and RPC metrics values, generate data visualization panels based on
those interactive queries, and lists the status of related monitors.

On the [Services](https://docs-xcor.paloaltonetworks.com/observe/services) page in Palo Alto Networks Cortex XCOR, click any
service's **Name** to see that service's detail page.

> [!NOTE]
>
> Service pages are part of the [Services](https://docs-xcor.paloaltonetworks.com/observe/services) feature and might not be
> available in your app. For information about enabling this feature in your
> environment, contact [Cortex XCOR Support](https://docs-xcor.paloaltonetworks.com/support.md).

## Edit service information

To edit basic information about a service, use one of the following methods.

> [tab] Web
>
> 1. In the **Service information** section, click **Edit**.
> 2. Make any needed changes to the following values:
>    * **Name:** Change the service name. This value defaults to the name discovered
>      by Cortex XCOR.
>    * **Parent team:** Set a [team](https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/teams.md) to
>      own the service.
>    * **Select a notification policy:** Choose an optional
>      [notification policy](https://docs-xcor.paloaltonetworks.com/investigate/alerts/notifications/policies.md).
>    * **Description:** Add a description of your service to help others understand
>      the service's purpose.
> 3. Click **Save**.

> [tab] API
>
> To edit the attributes that appear on a service's detail page, use the
> [`CreateServiceAttribute`](https://docs-xcor.paloaltonetworks.com/tooling/api-info/definition/operations/CreateServiceAttribute)
> method in the Cortex XCOR API, which lets you specify custom attributes for a
> given service. After you've created these service attributes, you can use the
> [`UpdateServiceAttribute`](https://docs-xcor.paloaltonetworks.com/tooling/api-info/definition/operations/UpdateServiceAttribute)
> method to change them.
>
> 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](https://docs-xcor.paloaltonetworks.com/tooling/api-info.md#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 require more customization than a Cortex XCOR-provided service page provides,
you can [create your own presentations](https://docs-xcor.paloaltonetworks.com/administer/service-discovery.md). You can also
create a [dashboard](https://docs-xcor.paloaltonetworks.com/observe/dashboards), write your own
[queries](https://docs-xcor.paloaltonetworks.com/investigate/querying), or configure your own
[data visualization panels](https://docs-xcor.paloaltonetworks.com/observe/dashboards/panels). If you need a more
customizable home page for a team or collection, see
[Team and collection home pages](https://docs-xcor.paloaltonetworks.com/administer/collections/home.md).

The service page exposes the queries that it uses for the data visualization panels.
You can copy and paste them into Metrics Explorer or a dashboard you've created and
modify them as needed.

## Service page components

The service page header contains links to the service's related team and a dropdown
to select a different service.

The service page also contains these columns:

* The primary column displays data visualization panels for compute metrics and RPC
  metrics (if available), controls for filtering these panels (including by time
  span), and a list of all [monitors](https://docs-xcor.paloaltonetworks.com/investigate/alerts/monitors) related to the service (along
  with their statuses).
* The sidebar column collects links to related resources, which can include traces
  in the [Trace Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/traces), change events in the
  [Changes Explorer](https://docs-xcor.paloaltonetworks.com/overview/types/change-events.md), logs in the
  [Logs Explorer](https://docs-xcor.paloaltonetworks.com/overview/types/logs.md), and [dashboards](https://docs-xcor.paloaltonetworks.com/observe/dashboards).

Cortex XCOR includes the following default components:

* Compute (cAdvisor)
* RPC (gRPC)
* Istio
* OTel HTTP server metrics

> [!NOTE]
>
> To enable links to Logs Explorer from your service pages, contact
> [Cortex XCOR Support](https://docs-xcor.paloaltonetworks.com/support.md) and provide the following information:
>
> * The name of your organization from your Cortex XCOR URL. For example,
>   *`TENANT`*`.chronosphere.io:443`.
> * The field name in your log data that refers to your service.

## Visualization panels

Each service displays [visualization panels](https://docs-xcor.paloaltonetworks.com/observe/dashboards/panels) populated
with queries for commonly tracked metrics.

* **Compute metrics** panels visualize **CPU Usage**, **Memory Usage**, and
  **Network Usage** for all pods with metrics tagged for this service.
* **RPC** panels visualize **Requests per second**, **Errors per second**, and
  **Duration P99** (slowest request in the 99th percentile of requests). Panels with
  an Yellow alert outline
  alert have truncated queries. Panels with a

  Red warning exclamation

  warning use a query which took too long.

### Filter metrics

When administrators configure org-wide label filters on the **Variables** tab of
**Service Configuration**, each configured label appears as a dropdown on the service
page. To filter metrics by label values:

1. Use the dropdown for a label to choose a value or **All**.
2. Selecting a value filters all queries in the service page's metrics visualization
   panels to display only the metrics with those label values.

   Because the dependency map displays services from trace data, these filters
   don't affect that view.

If any filters are active, they appear as a list of labels and values in the
**Apply global filter** field. To remove a filter, click the
&#x20;cancel button for that filter in the list.

### Interact with panels

A service page's visualization panels display data as time-series line charts, which
are interactive.

* Hold the pointer over lines in a chart to view data at that point.
* Click a line to pin the data view at that point. Click **Show All** in the
  view to toggle between showing only the selected line and all lines at that point
  in time.
* Click and drag a region in the chart to narrow the view to a time range.
  Selecting a time range modifies all panels simultaneously, which helps you correlate
  data across the different types of data displayed on the page.

Use the ** [time range selector](https://docs-xcor.paloaltonetworks.com/navigate/time-ranges.md)**
to select or enter a time range.

#### Annotations

Services can integrate with
[annotations for events](https://docs-xcor.paloaltonetworks.com/investigate/alerts/monitors/monitor-annotations.md).
If your service has [Kube state metrics](https://github.com/kubernetes/kube-state-metrics),
those annotations can display on your service graphs. Annotations display based on a
toggle.

Activating the toggle updates the service's graphs to display annotation marks
&#x20;along the top of each graph where events occurred. Hold
the pointer over an annotation mark to display additional information about the
event, such as the occurrence time, and global filters this event matches.

> [!NOTE]
>
> **Kube Deploy Events** is the only metric configured to use annotations with
> services. To configure additional metrics, contact Cortex XCOR Support.

### Filter panels

You can filter the panels for a service based on the discovered metric labels. For
example, if a service includes a **Compute** panel that includes metric labels like
**container** and **pod**, you can select individual values for that label to display
usage statistics for only those instances.

The default behavior displays **All** values.

To filter panels:

1. In a panel, click the dropdown arrow for the label you want to select values for.
2. Select the values you want to display usage statistics for in the panels.

### Explore queries

Each panel's visualization uses an automatically generated metrics query. You
can't modify the query or visualization type in this view. To edit and inspect
a panel's query and examine its results in a larger view, you can open it in the
[Metrics Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/metrics/explorer.md).

You can also copy the query from the Metrics Explorer and paste it into other tools,
including a visualization panel in a [dashboard](https://docs-xcor.paloaltonetworks.com/observe/dashboards).

Holding the pointer over a chart reveals a  three
vertical dots menu. Click the icon to access options to open the chart's query in
Metrics Explorer, add the chart to a dashboard, or investigate it using Metrics DDx.
See [From another page](https://docs-xcor.paloaltonetworks.com/navigate/notebooks.md#from-another-page) to add the chart to a
notebook, and [common panel elements](https://docs-xcor.paloaltonetworks.com/observe/dashboards/panels#common-panel-elements)
for an explanation of the other available tools.

### Understand trends

Each service has its own dependency map that includes trending requests, errors, and
latencies for that service and upstream and downstream services.

Arrows on connecting edges indicate increases and decreases in trends for duration,
requests, and errors, so you can identify spikes to focus your investigation.
Although the icons are the same, each trend uses a different color for the arrow
icons to visually indicate the trend type. When you select a
[trend statistic](#trend-statistics) from the **Trends** menu, the icons change to
match your selection.

Single, double, and triple arrows indicate different percentages of change. An edge
with a triple arrow indicates a larger trend than an edge with a single arrow:

| Arrow type | Icon | Indication |
| :- | :- | :- |
| Single | ![Single upward arrow](https://mintcdn.com/chronosphere-74b1ef6e/nJIRusRD5xDV1lb9/public/doc-assets/request-up-low.svg?fit=max\&auto=format\&n=nJIRusRD5xDV1lb9\&q=85\&s=c6a87e08bd8d9bf517983676db3f0481) | Change of 0% up to 5% |
| Double | ![Double upward arrow](https://mintcdn.com/chronosphere-74b1ef6e/nJIRusRD5xDV1lb9/public/doc-assets/request-up-medium.svg?fit=max\&auto=format\&n=nJIRusRD5xDV1lb9\&q=85\&s=1c94708f18680d1c4cf5449030f4adea) | Change greater than 5%, up to 15% |
| Triple | ![Triple upward arrow](https://mintcdn.com/chronosphere-74b1ef6e/nJIRusRD5xDV1lb9/public/doc-assets/request-up-high.svg?fit=max\&auto=format\&n=nJIRusRD5xDV1lb9\&q=85\&s=aa35ead0bbf2f0164ae3c4ea7f1568a0) | Change greater than 15% |

The thickness of edges correlate with request volume. The thicker the edge, the
higher the request volume.

Use trends and edge thickness in combination to gauge trend severity. For example, a
thin edge with a triple arrow indicates very few requests, but a high trend increase.
This combination might be less insightful than a thick edge, which on its own might
indicate many requests to a highly used request path.

### Find the root cause

Using the dependency map on its own might be enough to identify where issues are
occurring and which services to investigate. Sometimes, you need more information to
identify the root cause, such as exploring span details to identify issues with a
particular operation in a service.

From a dependency map, you can access options to open a predefined query in Trace
Explorer for the selected service. This capability means you don't have to create a
query without any context and have a starting point to investigate from. Click the
click the  more icon and choose one of these options:

* **Explore trace data** opens Trace Explorer with a predefined query. You can add
  additional search criteria as you [define your search](https://docs-xcor.paloaltonetworks.com/investigate/querying/traces#define-a-search).
* **View full map** opens Trace Explorer, scoped to the
  [topology view](https://docs-xcor.paloaltonetworks.com/investigate/querying/traces/features.md#topology-view). The full
  topology map provides a broader perspective to help identify upstream and
  downstream issues.

### Trend statistics

In the dependency map, hold the pointer over a service to display totals for the
selected trend statistic.

To view more detailed trend statistics, click an individual service in the map or one
of its edges to display incoming and outgoing data, such as requests, errors, leaf
errors, and duration:

* **Requests**: Counts of all spans within the selected group, within the selected time range
  of seconds in the time range. Ranked in descending order.
* **Errors**: The number of spans that indicate an error outcome. Ranked in
  descending order.
* **Leaf errors**: Error spans that have no failing child spans. These spans are
  often the potential cause of a trace's failure. Navigating directly to leaf errors
  helps filter out propagated errors, and provides clearer signals about the source
  of an error that might be causing the entire trace to fail. Ranked in descending
  order.
* **Median duration P50**: Ranks the spans of each group in order of duration, and
  selects the duration of the span in the middle of the list (fiftieth percentile).
  Ranks groups in descending order of this duration.
* **Tail duration P99**: *Tail* refers to the statistical notion of the upper tail of
  a distribution. This statistic ranks the spans of each group in order of duration,
  and selects the duration of the span that's 99% of the way through the list,
  meaning, a span that typically has a high duration. Ranks service and operation in
  descending order of this duration.

Click the  three vertical dots icon next to any
entry to go to
[Cortex XCOR Differential Diagnosis (DDx)](https://docs-xcor.paloaltonetworks.com/investigate/querying/traces/features.md#differential-diagnosis)
or [Trace Explorer](https://docs-xcor.paloaltonetworks.com/investigate/querying/traces).

### Identify issues behind suspicious trends

The dependency map visualizes trends, but understanding what issues are causing
trends is critical to resolving the underlying issue. From a dependency map, you can
use [DDx](https://docs-xcor.paloaltonetworks.com/investigate/analyze/differential-diagnosis/traces.md)
to identify trends and immediately scan through all related tags and values to pinpoint
the exact `tag:value` pairs most closely correlated with suspicious behavior.

When you click a service in a dependency map, trends display for duration, requests,
and errors. From this detailed view, click the  three dots
icon for the statistic you want to run DDx on, and then click
**Differential Diagnosis**.

Cortex XCOR displays the **Differential Diagnosis** panel with the context
you selected in the dependency map. From there, you can select related operations to
refine the query, and select one or more tags to display the distribution of those
`tag:value` pairs across
[several metrics](https://docs-xcor.paloaltonetworks.com/investigate/querying/traces/features.md#differential-diagnosis-metrics)
simultaneously.

## See more details

If your service has **Compute(cAdvisor)** or **RPC(gRPC)** panels, you can click a
**More details** link to open a view with filters scoped to the service page you came
from. These views use the same label filters when they're set on the service page.

For example, clicking the **More details** link in a **Compute(cAdvisor)** panel
opens that view with CPU usage statistics scoped to the service page you came from.

Metrics on the **Compute(cAdvisor)** page are defined in
[Monitoring cAdvisor with Prometheus](https://github.com/google/cadvisor/blob/master/docs/storage/prometheus.md).
Cortex XCOR uses these metrics to display CPU, memory, network, and disk
usage metrics during the selected time period.

The first group of graphs displays the average and maximum values for that metric. In
the **CPU**, **Memory**, **Network**, and **Disk** details sections, the relevant
statics might be further broken down by pod and node if those statistics are
available.

With this information, you can visualize which pods or nodes have the
highest contributions to each statistic.

Use the [**Compare**](https://docs-xcor.paloaltonetworks.com/navigate/time-ranges.md#compare-current-data-to-past-data)
menu to select a second time period to graph against the current selected period.

Drag in any chart to select a time frame across all charts on the page.

## Own dashboards and monitors

> [!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](https://docs-xcor.paloaltonetworks.com/support.md).

Services can own [dashboards](https://docs-xcor.paloaltonetworks.com/observe/dashboards) and
[monitors](https://docs-xcor.paloaltonetworks.com/investigate/alerts). Monitors owned by a service directly affect the
[service's status](https://docs-xcor.paloaltonetworks.com/observe/services#service-status).

The total number of owned and connected items displays next to **Dashboards** or
**All monitors**. For example, a service with one connected dashboard and one owned
dashboard displays `(2)`. Click **Manage** next to either title to open the
management menu. From this menu you can:

* See the number of **Owned** items. Click to manage.
* See the number of
  [**Connections**](https://docs-xcor.paloaltonetworks.com/observe/services/extending-services.md#connected-resources).
  Click to manage.
* Create a **New dashboard** or **New monitor**.

> [tab] Web
>
> For some instances, you can use the Cortex XCOR app to create or edit a
> [monitor](https://docs-xcor.paloaltonetworks.com/investigate/alerts/monitors#create-a-monitor) or
> [dashboard](https://docs-xcor.paloaltonetworks.com/observe/dashboards#create-a-new-dashboard) to assign it to a service.
>
> To add a dashboard or monitor to a service, with the service as the owner:
>
> 1. In the navigation menu, select **Services Services**.
> 2. Select a service.
> 3. Next to **Dashboards** or **All Monitors**, click **Manage** and then **New dashboard**
>    or **New monitor**.
> 4. Populate the form and click **Save**.
>
> The selected service is listed as the owner.

> [tab] Chronoctl
>
> Chronoctl configurations use a `collection` field (previously `collection_slug`),
> which sets a collection `type` and `slug`. When adding a monitor or dashboard to
> a service using Chronoctl, set the `type` to `SERVICE` and the `slug` to the
> service's slug.
>
> ```yaml theme={null}
> collection:
>   type: SERVICE
>   slug: example-service-slug
> ```

> [tab] Terraform
>
> The following samples assume Cortex XCOR has discovered
> the service:
>
> * **Monitor**: To associate a service with a monitor, create or update the
>   monitor using the following code, changing the variables to match your
>   environment's needs.
>
>   ```terraform Terraform example icon="square-terminal" theme={null}
>     # Services are created automatically by the system, this references an existing service
>     data "chronosphere_service" "gateway" {
>       slug = "gateway"
>     }
>
>     resource "chronosphere_monitor" "m" {
>       name = "${var.prefix} Monitor in Gateway Service"
>       collection_id = data.chronosphere_service.gateway.id
>       notification_policy_id = chronosphere_notification_policy.np.id
>
>       query {
>         prometheus_expr = "up{test1=\"test2\"}"
>       }
>
>       series_conditions {
>         condition {
>           severity = "warn"
>           value = 2.0
>           op = "GT"
>         }
>       }
>     }
>   ```
>
> * **Standard dashboard**: To associate a service with a dashboard, create or
>   update the dashboard using the following code, changing the variables to match
>   your environment's needs.
>
>   ```terraform Terraform example icon="square-terminal" theme={null}
>   data "chronosphere_service" "gateway" {
>     slug = "gateway"
>   }
>
>    resource "chronosphere_dashboard" "dash_in_svc" {
>     collection_id = data.chronosphere_service.gateway.id
>     dashboard_json = jsonencode({
>       kind : "Dashboard",
>       metadata : {
>         name : "${var.prefix} Native Dashboard in Gateway Service"
>       }
>       spec : {
>       }
>     })
>   }
>   ```
>
> * **Classic dashboard**: To associate a service with a classic dashboard, create
>   or update the classic dashboard using the following code, changing the
>   variables to match your environment's needs.
>
>   ```terraform Terraform example icon="square-terminal" theme={null}
>   # This assumes the service is created out-of-band (see create-service.sh)
>   data "chronosphere_service" "gateway" {
>     slug = "gateway"
>   }
>   resource "chronosphere_classic_dashboard" "dash_in_svc" {
>     collection_id = data.chronosphere_service.gateway.id
>     dashboard_json = jsonencode({
>       title : "${var.prefix} Dashboard In Gateway Service",
>       panels : [{
>         "gridPos" : {
>           "h" : 12,
>           "w" : 24,
>           "x" : 0,
>           "y" : 0
>         },
>         id : 2,
>         targets : [
>           {
>             expr : "1",
>           }
>         ],
>         title : "Panel Title",
>         type : "graph",
>       }],
>     })
>   }
>   ```


## Related topics

- [Services](https://docs-xcor.paloaltonetworks.com/observe/services.md)
- [Enable change events on service pages](https://docs-xcor.paloaltonetworks.com/observe/enable-events/services.md)
- [Configure services](https://docs-xcor.paloaltonetworks.com/observe/services/configure-services.md)
- [Manage service configuration](https://docs-xcor.paloaltonetworks.com/administer/service-discovery.md)
- [Extend services](https://docs-xcor.paloaltonetworks.com/observe/services/extending-services.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.