# Observability Plugin

Observability Plugin is used to pull metrics directly from Spinnaker microservices. This plugin increases performance, reduces system load, and provides additional features such as metric filtering.

The Observability plugin works in two key ways:

* It enables customizing the Micrometer registry.
* It exposes an OpenMetrics endpoint for the Micrometer/Spectator metrics, allowing tools such as Prometheus or platforms that query open metrics formats to work without needing a sidecar.

These allow for key improvements in Spinnaker observability, such as removing the service name for each metric so that you can more easily organize and filter metrics for cross-Spinnaker visibility. They also create a more efficient implementation and dramatically reduce CPU and memory usage.

Following is the sequence of activities for enabling the Observability Plugin:

* Update Spinnaker Images
* Configuration to Enable Observability Plugin

### Update the Spinnaker Images

To enable the Observability Plugin metrics we need to update all the spinnaker images with permissions enabled for the Plugin Directory as instructed below:

1. Navigate to ***default/profiles/service-settings***
2. Update all the below images as per the service:<br>

   <pre data-overflow="wrap"><code>artifactId: quay.io/opsmxpublic/ubi8-oes-spin-gate:v3.12.0
   artifactId: quay.io/opsmxpublic/ubi8-spin-igor:v3.12-opt
   artifactId: quay.io/opsmxpublic/ubi8-spin-rosco:v3.12-opt
   artifactId: quay.io/opsmxpublic/ubi8-spin-kayenta:v3.12-opt
   artifactId: quay.io/opsmxpublic/ubi8-spin-echo:v3.12-opt
   artifactId: quay.io/opsmxpublic/ubi8-oes-front50:v3.12-opt
   artifactId: quay.io/opsmxpublic/ubi8-spin-fiat:v3.12-opt
   artifactId: quay.io/opsmxpublic/ubi8-spin-clouddriver:tag-version-8.0.4-apl-shard-all-fix-dockertag-cli
   </code></pre>

### Configuration Update to Enable Observability Plugin

Below configuration instructions need to be followed to Enable Observability Plugin.

1. Clone the repo by using the below command.

   ```
   git clone https://github.com/OpsMx/Redis-For-Clouddriver.git
   ```

2. After cloning the above repo, Navigate to “**ObservabilityPluginConfiguration**” directory and copy the configurations from all the files.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong>: Ensure to Compare the yaml with your current existing configurations and do not overwrite any existing change. Just Copy the Plugin Part</p></div>

3. Update the configuration for all the spinnaker services in order to capture the metrics for every service individually.

4. Navigate to ***default/profiles.***

5. Edit each Individual service-local yaml file and update the below data into it.

   <pre data-overflow="wrap"><code>spinnaker:
     extensibility:
       plugins-root-path: /opt/clouddriver/plugins
       plugins:
         Armory.ObservabilityPlugin:
           enabled: true
           config:
             metrics:
               additionalTags:
                 service: spin-clouddriver-caching
               prometheus:
                 enabled: true
                 meterRegistryConfig:
                   armoryRecommendedFiltersEnabled: true
                   
       repositories:
         armory-observability-plugin-releases:
           url: https://raw.githubusercontent.com/armory-plugins/armory-observability-plugin-releases/master/repositories.json

   management:
     endpoints:
       web:
         # Read the security warning at the start of this section about what gets exposed!!
         exposure.include: health,info,aop-prometheus
   </code></pre>

6. Restart the halyard pod, after updating the above changes.


---

# Agent Instructions: 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:

```
GET https://docs.opsmx.com/opsmx-1/opsmx-context-engine/user-guide/observability-plugin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
