> For the complete documentation index, see [llms.txt](https://docs.trilio.io/kubernetes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trilio.io/kubernetes/5.0.x/advanced-configuration/observability/observability-of-trilio-with-openshift-monitoring.md).

# Observability of Trilio with Openshift Monitoring

## **Prerequisites**

#### Enabling Monitoring for User-Defined Projects

To ensure that monitoring is enabled for user-defined projects in OpenShift, verify the configuration using the following command:

```
oc -n openshift-monitoring get configmap cluster-monitoring-config
```

The output should contain the following configuration to confirm that user workload monitoring is enabled:

```
apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
data:
  config.yaml: |
    enableUserWorkload: true
```

If `enableUserWorkload` is not set to `true`, update the ConfigMap accordingly to enable monitoring for user-defined projects.

#### Using Alertmanager on OpenShift

For setting up and utilizing Alertmanager on OpenShift, refer to the provided documentation [link](https://docs.openshift.com/container-platform/4.16/observability/monitoring/enabling-alert-routing-for-user-defined-projects.html#enabling-the-platform-alertmanager-instance-for-user-defined-alert-routing_enabling-alert-routing-for-user-defined-projects).

#### Installing the Grafana Operator

To visualize the Trilio dashboard in Grafana, install the Grafana Operator on OpenShift. Follow the installation instructions available in the provided article [link](https://developers.redhat.com/articles/2024/08/19/monitor-openshift-virtualization-using-user-defined-projects-and-grafana).

#### Trilio Dashboard Reference

For information regarding the Trilio Dashboard setup and visualization, refer to the provided reference [link](https://docs.trilio.io/kubernetes/advanced-configuration/observability/logging-monitoring-and-measuring#import-grafana-dashboards).

## **Enable Prometheus Exporter in Openshift**&#x20;

* Enabled ServiceMonitor for Prometheus to export Trilio metrics.

```
   apiVersion: triliovault.trilio.io/v1
   kind: TrilioVaultManager
   metadata:
     labels:
       triliovault: k8s
     name: sample-triliovaultmanager
   spec:
     helmValues:
       urlPath: "/"
     applicationScope: Cluster
     tvkInstanceName: "tvk"
     componentConfiguration:
        exporter:
          serviceMonitor:
            enabled: true

```

<figure><img src="/files/9GmXjAxeKtY2OwbpDxUI" alt=""><figcaption><p>Promethus Target should be there if Service Monitor is enabled for T4K</p></figcaption></figure>

<figure><img src="/files/DEItcmhtgr8Av48srlTR" alt=""><figcaption><p>Trilio Metrics can be find under Metrics</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.trilio.io/kubernetes/5.0.x/advanced-configuration/observability/observability-of-trilio-with-openshift-monitoring.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
