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

# Service pages

export const ServiceNavIcon = props => {
  return <svg viewBox="0 0 20 20" {...props} className="inline-block h-5 w-5 fill-current" aria-label="Services">
      <path d="M0 13.5463C0 13.3708 0.157997 13.2607 0.284979 13.3478L4.18974 16.0263C4.24909 16.067 4.28571 16.1427 4.28571 16.2248V19.7709C4.28571 19.9465 4.12772 20.0566 4.00074 19.9695L0.0959735 17.291C0.0366259 17.2503 0 17.1745 0 17.0925V13.5463Z" />
      <path d="M5.2381 16.2248C5.2381 16.1427 5.27472 16.067 5.33407 16.0263L9.23883 13.3478C9.36581 13.2607 9.52381 13.3708 9.52381 13.5463V17.0925C9.52381 17.1745 9.48718 17.2503 9.42784 17.291L5.52307 19.9695C5.39609 20.0566 5.2381 19.9465 5.2381 19.7709V16.2248Z" />
      <path d="M4.85641 15.0372L8.75079 12.3658C8.87876 12.2781 8.87876 12.0566 8.75079 11.9688L4.85641 9.29746C4.79785 9.25729 4.72596 9.25729 4.6674 9.29746L0.773017 11.9688C0.645052 12.0566 0.645052 12.2781 0.773016 12.3658L4.6674 15.0372C4.72596 15.0774 4.79785 15.0774 4.85641 15.0372Z" />
      <path d="M5.23804 4.279C5.23804 4.10344 5.39603 3.99337 5.52302 4.08048L9.42778 6.75893C9.48713 6.79964 9.52375 6.8754 9.52375 6.95746V10.5036C9.52375 10.6792 9.36575 10.7892 9.23877 10.7021L5.33401 8.02368C5.27466 7.98297 5.23804 7.90721 5.23804 7.82515V4.279Z" />
      <path d="M10.4761 6.95746C10.4761 6.8754 10.5128 6.79964 10.5721 6.75893L14.4769 4.08048C14.6039 3.99337 14.7618 4.10344 14.7618 4.279V7.82515C14.7618 7.9072 14.7252 7.98297 14.6659 8.02368L10.7611 10.7021C10.6341 10.7892 10.4761 10.6792 10.4761 10.5036V6.95746Z" />
      <path d="M10.0944 5.76985L13.9888 3.09851C14.1168 3.01073 14.1168 2.78924 13.9888 2.70147L10.0944 0.0301261C10.0359 -0.010042 9.964 -0.010042 9.90544 0.0301261L6.01105 2.70147C5.88309 2.78924 5.88309 3.01073 6.01105 3.09851L9.90544 5.76985C9.964 5.81002 10.0359 5.81002 10.0944 5.76985Z" />
      <path d="M10.4761 13.5463C10.4761 13.3708 10.6341 13.2607 10.7611 13.3478L14.6658 16.0263C14.7252 16.067 14.7618 16.1427 14.7618 16.2248V19.7709C14.7618 19.9465 14.6038 20.0566 14.4768 19.9695L10.572 17.291C10.5127 17.2503 10.4761 17.1745 10.4761 17.0925V13.5463Z" />
      <path d="M15.7142 16.2248C15.7142 16.1427 15.7508 16.067 15.8101 16.0263L19.7149 13.3478C19.8419 13.2607 19.9999 13.3708 19.9999 13.5463V17.0925C19.9999 17.1745 19.9633 17.2503 19.9039 17.291L15.9991 19.9695C15.8722 20.0566 15.7142 19.9465 15.7142 19.7709V16.2248Z" />
      <path d="M15.3325 15.0372L19.2269 12.3658C19.3548 12.2781 19.3548 12.0566 19.2269 11.9688L15.3325 9.29746C15.2739 9.25729 15.202 9.25729 15.1435 9.29746L11.2491 11.9688C11.1211 12.0566 11.1211 12.2781 11.2491 12.3658L15.1435 15.0372C15.202 15.0774 15.2739 15.0774 15.3325 15.0372Z" />
    </svg>;
};

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](/observe/services) page in Chronosphere Observability
Platform, click any service's **Name** to see that service's detail page.

<Note>
  Service pages are part of the [Services](/observe/services) feature and might not be
  available in your app. For information about enabling this feature in your
  environment, contact [Chronosphere Support](/support).
</Note>

## Edit service information

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

<Tabs>
  <Tab title="Web" id="edit-service-info-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 Chronosphere Observability Platform.
       * **Parent team:** Set a [team](/administer/accounts-teams/teams) to
         own the service.
       * **Select a notification policy:** Choose an optional
         [notification policy](/investigate/alerts/notifications/policies).
       * **Description:** Add a description of your service to help others understand
         the service's purpose.
    3. Click **Save**.
  </Tab>

  <Tab title="API" id="edit-service-info-api">
    To edit the attributes that appear on a service's detail page, use the
    [`CreateServiceAttribute`](/tooling/api-info/definition/operations/CreateServiceAttribute)
    method in the Chronosphere API, which lets you specify custom attributes for a
    given service. After you've created these service attributes, you can use the
    [`UpdateServiceAttribute`](/tooling/api-info/definition/operations/UpdateServiceAttribute)
    method to change them.

    Because the Chronosphere API requires authentication, include an API token with your
    `curl` request, as shown in the following example. For more details, see
    [Create an API token](/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 Observability Platform instance.
    * *`METHOD`*: The HTTP method to use with the request, such as `GET` or `POST`.
    * *`ENDPOINT_PATH`*: The specific endpoint you want to access.
  </Tab>
</Tabs>

If you require more customization than a Chronosphere-provided service page provides,
you can [create your own presentations](/administer/service-discovery). You can also
create a [dashboard](/observe/dashboards), write your own
[queries](/investigate/querying), or configure your own
[data visualization panels](/observe/dashboards/panels). If you need a more
customizable home page for a team or collection, see
[Team and collection home pages](/administer/collections/home).

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](/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](/investigate/querying/traces), change events in the
  [Changes Explorer](/overview/types/change-events), logs in the
  [Logs Explorer](/overview/types/logs), and [dashboards](/observe/dashboards).

Observability Platform 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
  [Chronosphere Support](/support) and provide the following information:

  * The name of your organization from your Observability Platform URL. For example,
    *`MY_COMPANY`*`.chronosphere.io:443`.
  * The field name in your log data that refers to your service.
</Note>

## Visualization panels

Each service displays [visualization panels](/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 <Icon icon="triangle-exclamation" color="#ffb249ff" alt="Yellow alert outline" />
  alert have truncated queries. Panels with a
  <Icon icon="circle-alert" iconType="solid" color="#ee6c6cff" alt="Red warning exclamation" />
  warning use a query which took too long.

### Filter metrics

Service pages support [pinned scopes](/navigate/pinned-scopes). You can filter
metrics by labels and their values. To view and set scopes for available labels:

1. Click the **Pin scope** dropdown to display a list of all labels and
   selectable values for them.
2. Click a label value to select it. 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, selecting scopes
   doesn'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
<Icon icon="x" /> 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 **<Icon icon="clock" /> [time range selector](/navigate/time-ranges)**
to select or enter a time range.

#### Annotations

Services can integrate with
[annotations for events](/investigate/alerts/monitors#use-annotations-with-monitors).
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
<Icon icon="diamond" /> 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 Chronosphere support.
</Note>

### 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](/investigate/querying/metrics/explorer).

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

Holding the pointer over a chart reveals a <Icon icon="ellipsis-vertical" /> 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](/navigate/notebooks#from-another-page) to add the chart to a
notebook, and [common panel elements](/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     | <img className="my-0" src="https://mintcdn.com/chronosphere-74b1ef6e/nJIRusRD5xDV1lb9/public/doc-assets/request-up-low.svg?fit=max&auto=format&n=nJIRusRD5xDV1lb9&q=85&s=c6a87e08bd8d9bf517983676db3f0481" alt="Single arrow icon" width="22" height="22" data-path="public/doc-assets/request-up-low.svg" />                         | Change of 0% up to 5%             |
| Double     | <img className="my-0" src="https://mintcdn.com/chronosphere-74b1ef6e/nJIRusRD5xDV1lb9/public/doc-assets/request-up-medium.svg?fit=max&auto=format&n=nJIRusRD5xDV1lb9&q=85&s=1c94708f18680d1c4cf5449030f4adea" alt="Double arrow icon" width="22" height="22" data-path="public/doc-assets/request-up-medium.svg" /> | Change greater than 5%, up to 15% |
| Triple     | <img className="my-0" src="https://mintcdn.com/chronosphere-74b1ef6e/nJIRusRD5xDV1lb9/public/doc-assets/request-up-high.svg?fit=max&auto=format&n=nJIRusRD5xDV1lb9&q=85&s=aa35ead0bbf2f0164ae3c4ea7f1568a0" alt="Triple arrow icon" width="22" height="22" data-path="public/doc-assets/request-up-high.svg" />                 | 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 <Icon icon="ellipsis-vertical" /> 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](/investigate/querying/traces#define-a-search).
* **View full map** opens Trace Explorer, scoped to the
  [topology view](/investigate/querying/traces/features#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 <Icon icon="ellipsis-vertical" /> three vertical dots icon next to any
entry to go to [differential diagnosis](/investigate/querying/traces/features#differential-diagnosis)
or [trace explorer](/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 [*differential diagnosis*](/investigate/analyze/differential-diagnosis/traces)
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 <Icon icon="ellipsis-vertical" /> three dots
icon for the statistic you want to run differential diagnosis on, and then click
**Differential Diagnosis**.

Observability Platform 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](/investigate/querying/traces/features#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 support pinned scopes.

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).
Observability Platform 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 more clearly visualize which pods or nodes have the
highest contributions to each statistic.

Use the [**Compare**](/navigate/time-ranges#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 Chronosphere Observability Platform users and
  might not be visible in your app. For information about enabling this feature in your
  environment, contact [Chronosphere Support](/support).
</Note>

Services can own [dashboards](/observe/dashboards) and
[monitors](/investigate/alerts). Monitors owned by a service directly affect the
[service's status](/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**](/observe/services/extending-services#connected-resources).
  Click to manage.
* Create a **New dashboard** or **New monitor**.

<Tabs>
  <Tab title="Web" id="web-add-service">
    For some instances, you can use the Observability Platform app to create or edit a
    [monitor](/investigate/alerts/monitors#create-a-monitor) or
    [dashboard](/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, click **<Icon icon="shield-user" /> Go to Admin**,
       then select
       **<ServiceNavIcon /> System Overview <span aria-label="and then">></span> 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>

  <Tab title="Chronoctl" id="chronoctl-add-service">
    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: my-service-slug
    ```
  </Tab>

  <Tab title="Terraform" id="terraform-add-service">
    The following samples assume Chronosphere Observability Platform 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 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 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 theme={null}
      # This assumes the service is created out-of-band (see create-service.sh)
      data "chronosphere_service" "gateway" {
        slug = "gateway"
      }
      resource "chronosphere_grafana_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",
          }],
        })
      }
      ```
  </Tab>
</Tabs>
