# Enabling Pipeline Insights or Deployment Insights or Stage Insights in ISD

Pipeline Insights, Deployment Insights and Stage Insights can be enabled in ISD Spinnaker. This requires few pre-installation  and post installation steps to be followed as given below:

### Pre-Installation

To enable the **Pipeline Insights** and **Stage Insights** (disabled by default) in the ISD, do the following changes in the values.yaml. (The complete values.yaml is available at:&#x20;

<https://github.com/OpsMx/enterprise-spinnaker/tree/isd-spin-2025.03.00/charts/oes>

{% hint style="info" %}
&#x20;Once enabled, Prometheus and Grafana gets installed along with ISD.
{% endhint %}

1. Enable **Centralized Monitoring** by setting the following value to true in the following configuration.

```
# Centralized Monitoring Configuration
   enableCentralMonitoring: true
```

2. Enable **Open Telemetry** by setting the following value to true in the following configuration.

```
openTelemetry: true #Set this to true for displaying metrics data in grafana

```

3. Enable **Grafana** (grafana:enabled: true).  Update the values for domain, root\_url, adminPassword, and grafana host as given below:

```
grafana:
  adminUser: admin
  adminPassword: opsmxadmin123
  grafana.ini:
    server:
      domain: isd.cve.opsmx.net
      root_url: https://isd.cve.opsmx.net/grafana
      serve_from_sub_path: true
    security:
      allow_embedding: true
  username: nonadminuser   #Non-admin username for Grafana UI access
  password: opsmxpassword123  #Non-admin password for Grafana UI acess
  persistence:
    enabled: true
    accessModes:
      - ReadWriteOnce
    size: 10Gi
  ## Below is the block of code for Ingress
  grafana:
    enabled: true
    protocol: https
    host: grafana.cve.opsmx.net

    ingress:
      annotations:
        kubernetes.io/ingress.class: nginx
      tls:
        secretName: grafana-ingress 

```

4. Enable **Prometheus** (prometheus:enabled: true) and also provide the host as given below:

```
#Prometheus URL configuration; url overwhich Prometheus will be accessed
  prometheus:
    enabled: true
    protocol: https
    host: prometheus.cve.opsmx.net
    ingress:
      annotations:
        kubernetes.io/ingress.class: nginx
      tls: 
        secretName: prometheus-ingress

```

### Post Installation

After installation, make the following changes before accessing the insights pages in ISD.

1. Access Grafana using the URL specified in the values.yaml file. (eg: <https://grafana.xxx/grafana>).

{% hint style="info" %}
You need to append “/grafana” to the URL specified in values.yaml (under grafana section “host”)
{% endhint %}

2. Login to the Grafana URL with the given admin credentials as specified in values.yaml (eg: admin / opsmxadmin123)&#x20;
3. Create **DataSource** in Grafana by following the steps given below:

* Click on the **Toggle Menu** and select **Connections**.&#x20;
* Select **Prometheus** → **Add new data source**.
* Provide the **Name** and **Prometheus server URL**(eg: <https://Prometheus>).
* Click **Save**.&#x20;
* You can see the generated UID in the browser URL (eg: bed11ea0-a802-4b67-9646-5d6f2194495f).
* Take a copy of this **DataSource UID** to be replaced in the dashboard json file. &#x20;

4. Import the **Dashboards** in Grafana by following the steps given below:

* Download the dashboard json files (pipelineinsights-dashboard.json and stageinsights-dashboard.json) from this [link](https://github.com/OpsMx/enterprise-spinnaker/tree/v4.0.4.3/charts/oes/charts/grafana/dashboards).&#x20;
* Replace the **datasource-uid-for-isd-insights** value with the **DataSource UID** captured in previous step (3)
* Click on **Toggle Menu** and select **Dashboards**.
* Click on **New** → select **Import**.
* Click on **Upload dashboard JSON file** -> select the modified files and\
  click **Import**.

5. Create a non admin user (user with view\_access) in Grafana.&#x20;

{% hint style="info" %}
Grafana non admin user credentials are used by ISD for auto login (when Pipeline Insights or Stage Insights page is accessed)
{% endhint %}

* Click on the toggle button and select **Administration**.
* Select **Users** → **New User** → enter the username and password (e.g. nonadminuser / opsmxpassword123 ) as provided in the values.yaml file during installation.
* Click **Create User.**&#x20;

### To disable the Insights feature in ISD

The insights feature can be disabled if not required. Do the following changes in the **oes-ui-config** and **oes-audit-service-config** files to disable **Insights using Grafana feature** in ISD.&#x20;

You can find the path to the app-config file is from this [link](https://github.com/OpsMx/enterprise-spinnaker/blob/isd-spin-2025.03.00/charts/oes/config/oes-ui/app-config.json).&#x20;

1. oes-ui-config

{% code overflow="wrap" %}

```
"grafana_enabled": false,
"hide_pipeline_insights": false, 
"hide_stage_insights": true,  
"hide_deployment_insights": false,

"grafanaPipelineInsightsEndpoint": "https://isdhost/grafana/d/pipeline-insight/pipeinsights",
"grafanaStageInsightsEndpoint": "https://isdhost/grafana/d/stage-insight/stageinsights"
"grafanaDeploymentInsightsEndpoint":      
“https://isdhost//grafana/d/deployment-insights/deployment-insights"

```

{% endcode %}

2. oes-audit-service-config

{% code overflow="wrap" %}

```
open-telemetry:
 enabled: false // should be true if we want enable grafana prometheus insights to the customer
 baseUrl: <PROTOCOL>://<ISD-URL> // isd url
 saporUrl: http://sapor-gate:8084 // sapor gate url
```

{% endcode %}

### To configure existing Grafana / Prometheus for the Insights pages

* Configure the existing grafana and prometheus URL's and set **enableCentralMonitoring** to false in the Values.yaml (existing URL's should be present in the same cluster).&#x20;
