Skip to content

Commit 7d824f3

Browse files
Document Observability Integrations (#433)
This has been lagging but it's important to help users understand the config involved and also advertise the functionality.
1 parent d40ceb6 commit 7d824f3

13 files changed

Lines changed: 306 additions & 4 deletions

File tree

generated/routes.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"/getting-started/first-steps/cli-quickstart": {
3131
"relPath": "/getting-started/first-steps/cli-quickstart.md",
32-
"lastmod": "2025-03-12T14:59:41.000Z"
32+
"lastmod": "2025-03-20T18:53:12.000Z"
3333
},
3434
"/getting-started/first-steps/existing-cluster": {
3535
"relPath": "/getting-started/first-steps/existing-cluster.md",
@@ -129,7 +129,7 @@
129129
},
130130
"/plural-features/k8s-upgrade-assistant/addon-compatibilities": {
131131
"relPath": "/plural-features/k8s-upgrade-assistant/addon-compatibilities.md",
132-
"lastmod": "2025-03-13T09:28:46.000Z"
132+
"lastmod": "2025-03-23T01:07:28.000Z"
133133
},
134134
"/plural-features/stacks-iac-management": {
135135
"relPath": "/plural-features/stacks-iac-management/index.md",
@@ -199,6 +199,22 @@
199199
"relPath": "/plural-features/plural-ai/cost.md",
200200
"lastmod": "2025-03-12T14:59:41.000Z"
201201
},
202+
"/plural-features/observability": {
203+
"relPath": "/plural-features/observability/index.md",
204+
"lastmod": "2025-03-25T00:00:37.000Z"
205+
},
206+
"/plural-features/observability/prometheus": {
207+
"relPath": "/plural-features/observability/prometheus.md",
208+
"lastmod": "2025-03-25T00:00:37.000Z"
209+
},
210+
"/plural-features/observability/logging": {
211+
"relPath": "/plural-features/observability/logging.md",
212+
"lastmod": "2025-03-25T00:00:37.000Z"
213+
},
214+
"/plural-features/observability/cost": {
215+
"relPath": "/plural-features/observability/cost.md",
216+
"lastmod": "2025-03-25T00:00:37.000Z"
217+
},
202218
"/plural-features/pr-automation": {
203219
"relPath": "/plural-features/pr-automation/index.md",
204220
"lastmod": "2025-03-12T14:59:41.000Z"
@@ -285,7 +301,7 @@
285301
},
286302
"/deployments/cli-quickstart": {
287303
"relPath": "/getting-started/first-steps/cli-quickstart.md",
288-
"lastmod": "2025-03-12T14:59:41.000Z"
304+
"lastmod": "2025-03-20T18:53:12.000Z"
289305
},
290306
"/deployments/existing-cluster": {
291307
"relPath": "/getting-started/first-steps/existing-cluster.md",
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: OpenCost Configuration
3+
description: Configure cost visibility with OpenCost on Plural
4+
---
5+
6+
## What You'll Get
7+
8+
Plural's leverages OpenCost to gather cost data for any deployed cluster. This works by:
9+
10+
* deploying an opencost instance per cluster, which acts as a lightweight agent exposing no web ui.
11+
* configuring an extractor to periodically scrape that instance and ship the data to our central store for historical retrieval and analysis.
12+
13+
This provides a seamless multi-cluster experience for opencost data, and when combined with Plural's built-in deployment knowledge and AI capabilities, can also automate the remediation of overprovisioning with our PR generation capabilities.
14+
15+
* Displaying saturation data for common compute controllers within Kubernetes, like deployments and statefulsets
16+
* Displaying cluster-level aggregate metrics for CPU, memory, pod saturation, etc.
17+
* Extracting network metrics for service mesh observability, in particular Istio and Cilium both have their standard network metrics shipped to Prometheus. We can use them to provide a holistic network graph and also use that information to inform Plural AI.
18+
19+
Once configured, if you go to a compute-related resource and click on the `Metrics` tab, you'll see:
20+
21+
A Full fleet-wide dashboard for cost information:
22+
23+
![](/assets/observability/fleet-cost.png)
24+
25+
A dashboard for a specific cluster:
26+
27+
![](/assets/observability/cluster-cost.png)
28+
29+
A namespace granularity breakdown of costs in a cluster:
30+
31+
![](/assets/observability/namespace-cost.png)
32+
33+
And recommendations to right-size workloads in a cluster:
34+
35+
![](/assets/observability/cost-recs.png)
36+
37+
## Deploy out of our Service Catalog
38+
39+
Plural ships by default with a full [Service catalog](/plural-features/service-catalog) to easily deploy solutions across your stack, among them a setup of OpenCost. This will:
40+
41+
* set up the opencost agent across your fleet
42+
* configure the kubecost extractors to ship cost data back to Plural
43+
44+
To deploy out of our storage catalog, go to `Service Catalog` -> `devops` -> `kubecost-setup` and fill out the wizard, it requires no advanced configuration and should just require you to provide a branch name for the PR to configure it.
45+
46+
## Manually Configure against an Existing OpenCost Instance
47+
48+
You can also use an existing OpenCost/Kubecost install with Plural for aggregation. To do this, simply make sure the following CRD is installed everywhere (installation of the Plural Operator is required):
49+
50+
```yaml
51+
apiVersion: deployments.plural.sh/v1alpha1
52+
kind: KubecostExtractor
53+
metadata:
54+
name: default
55+
spec:
56+
interval: "1h"
57+
recommendationThreshold: "1"
58+
kubecostPort: 9090
59+
kubecostServiceRef:
60+
name: kubecost-cost-analyzer # this is the kubernetes service hosting the kubecost api
61+
namespace: kubecost
62+
```
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: Observability Configuration
3+
description: Configure metrics and logs provider to directly into the Plural UI
4+
---
5+
6+
Plural has the ability to query multiple backends for standard observability data and integrate them directly into the mainline Plural experience. In particular, these are:
7+
8+
* Prometheus for timeseries metrics
9+
* Elastic (and others) for log aggregation
10+
* Kubecost for kubernetes cost observability
11+
12+
All observability implementations are designed to be multi-cluster by default and we also provide out-of-the-box installs in the event a user still hasn't adopted a proper solution for any of the main observability providers.
13+
14+
There are a few major benefits of integrating this data with Plural:
15+
16+
* Single-Pane-Of-Glass for Operations - a unified infrastructure management and observability platform reduces context switching for engineers, and makes it easier for team-members to ramp with their operational responsibilities.
17+
* AI - this is the most powerful benefit, as Plural gets access to more data, we can integrate it with our unified AI engine and automate more of the tedious root cause analysis and troubleshooting you'd otherwise do manually.
18+
19+
20+
## Plural AI + Observability
21+
22+
Generally, Plural AI is a broad RAG system that ultimately calls into mainline LLMs. This means the more data we can access the more likely we can find that diamond in the rough that solves your specific problem.
23+
24+
In particular, there are a few major workflows our observability integration pairs with Plural AI:
25+
26+
* Log analysis of low-level Kubernetes components: a few tools, especially external-dns and cert-manager, provided very little error reporting outside of their logs. With an easier way to extract these, we can automatically root cause failures around DNS registration and certificate issuance, which are both commong annoyances with Kubernetes operators. This is true of a number of other tools as well, especially solutions like CSI drivers.
27+
* Application Code Failures - common failure modes like failing health checks, 500 error codes, etc, are usually do to bugs in application code and not at the infrastructure level. With a combination of log analysis and searchable PR data, we can RCA these issues and cross reference them to the offending code changes.
28+
29+
## CRD Configurability
30+
31+
For the most part, these settings are entirely configurable via one of our Kubernetes custom resources, `DeploymentSettings`. A kitchen-sink example of this is below:
32+
33+
```yaml
34+
apiVersion: deployments.plural.sh/v1alpha1
35+
kind: DeploymentSettings
36+
metadata:
37+
name: global # this is a singleton resource that is always at this location
38+
namespace: plrl-deploy-operator
39+
spec:
40+
managementRepo: pluralsh/plrl-boot-aws
41+
cost: # configuring recommendations from kubecost data
42+
recommendationCushion: 15
43+
recommendationThreshold: 1
44+
45+
ai:
46+
enabled: true
47+
48+
vectorStore: # elastic can be repurposed as a vector store too
49+
enabled: true
50+
vectorStore: ELASTIC
51+
elastic:
52+
host: https://{your-elastic-fqdn}
53+
user: plrl
54+
index: plrl-ai-vectors
55+
passwordSecretRef:
56+
name: plrl-elastic-user
57+
key: password
58+
59+
logging:
60+
enabled: true
61+
driver: ELASTIC
62+
elastic:
63+
host: https://{your-elastic-fqdn}
64+
user: plrl
65+
index: plrl-logs-*
66+
passwordSecretRef:
67+
name: plrl-elastic-user
68+
key: password
69+
70+
prometheusConnection:
71+
host: https://{your-prometheus-url}
72+
user: plrl
73+
passwordSecretRef:
74+
name: basic-auth-prom
75+
key: password
76+
```
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: ElasticSearch Configuration
3+
description: Configure multi-cluster Log Aggregation with Plural
4+
---
5+
6+
## What You'll Get
7+
8+
Plural's built-in log support allows you to query logs at either the Plural Service or Cluster level, dependent on your permissions to those respective resources. Service logs are relevant for developer personas, whereas cluster logs are usually useful for platform engineers or kubernetes admins.
9+
10+
Our `Logs` tab features all the standard features like text-based search, facet filtering and time filtering, looking something like so:
11+
12+
![](/assets/getting-started/log-tail.png)
13+
14+
15+
And you can tune the log view with the filter modal like:
16+
17+
![](/assets/getting-started/log-filters.png)
18+
19+
20+
In addition to the single-pane-of-glass benefits, log data is an incredibly powerful tool for enhancing the dataset used by Plural AI, and so is highly recommended as an addition to a production deployment of Plural.
21+
22+
## Deploy out of our Service Catalog
23+
24+
Plural ships by default with a full [Service catalog](/plural-features/service-catalog) to easily deploy solutions across your stack, among them a setup of ElasticSearch + Logstach using to support robust multi-cluster log aggregation. This has an additional benefit of also serving as a vector store for additional data used by our AI engine if you wish to enable that. In total this will set up:
25+
26+
* ElasticSearch using the [ECK operator](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-eck.html)
27+
* LogStach (also using ECK) to aggregate logs at the cluster level and ship them to the singular ElasticSearch Instance
28+
29+
{% callout severity="info" %}
30+
The system is made to be modular, and can support other logging backends. If you're interested in using another one, let us know and we'll add it to our roadmap!
31+
{% /callout %}
32+
33+
To deploy out of our storage catalog, go to `Service Catalog` -> `devops` -> `elastic` and fill out the wizard, it should look something like this:
34+
35+
![prometheus-setup](/assets/observability/elastic-setup.png)
36+
37+
{% callout severity="warning" %}
38+
We recommend using at least 100Gi for storage if you have a fairly large fleet, this is simply due to the log volume emitted by Kubernetes being quite large at the baseline. ECK can very easily be tuned post-hoc if you size it too small as well.
39+
40+
Also be sure the cluster you're deploying to has a working ingress setup, since it'll assume external-dns + cert-manager are there to set up DNS and TLS.
41+
{% /callout %}
42+
43+
The generated PR will have configured:
44+
45+
* a deployment of ElasticSearch to store log and vector data
46+
* Logstash for log extraction, filtering and remote shipping to elasticsearch
47+
* the configuration of the setup in the `DeploymentSettings` CRD to register them with Plural
48+
49+
## Custom Resource Configuration
50+
51+
If you were to do this manually with an existing Prometheus setup, you'd need to manually wire configuration like the following:
52+
53+
```yaml
54+
apiVersion: deployments.plural.sh/v1alpha1
55+
kind: DeploymentSettings
56+
metadata:
57+
name: global # this is a singleton resource that is always at this location
58+
namespace: plrl-deploy-operator
59+
spec:
60+
prometheusConnection:
61+
host: https://{your-prometheus-url}
62+
user: plrl # or whatever user you'd want
63+
passwordSecretRef:
64+
name: basic-auth-prom
65+
key: password
66+
```
67+
68+
## ElasticSearch as a Vector Store
69+
70+
One of the reasons we lean on ElasticSearh as a default log store is its a broadly usable data store with recent support for vector search. When this is enabled, Plural AI can start doing the following:
71+
72+
* Vectorize and search historical Pull Requests (gathered from [establishing a SCM webhook](/getting-started/how-to-use/scm-connection#add-an-scm-provider-webhook))
73+
* Vectorize and search historical alert resolutions
74+
* ...and more coming soon!
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Prometheus Configuration
3+
description: Configure multi-cluster Prometheus with Plural
4+
---
5+
6+
## What You'll Get
7+
8+
Plural's leverages Prometheus for a few main purposes:
9+
10+
* Displaying saturation data for common compute controllers within Kubernetes, like deployments and statefulsets
11+
* Displaying cluster-level aggregate metrics for CPU, memory, pod saturation, etc.
12+
* Extracting network metrics for service mesh observability, in particular Istio and Cilium both have their standard network metrics shipped to Prometheus. We can use them to provide a holistic network graph and also use that information to inform Plural AI.
13+
14+
Once configured, if you go to a compute-related resource and click on the `Metrics` tab, you'll see something like:
15+
16+
![](/assets/getting-started/metrics.png)
17+
18+
And cluster saturation views will look like:
19+
20+
![](/assets/getting-started/cluster-metrics.png)
21+
22+
# Deploy out of our Service Catalog
23+
24+
Plural ships by default with a full [Service catalog](/plural-features/service-catalog) to easily deploy solutions across your stack, among them a robust, scale-out setup of Prometheus using [VictoriaMetrics](https://docs.victoriametrics.com/). This solves a number of key problems with mainline Prometheus:
25+
26+
* Horizontal scaling - Prometheus scales only vertically, which is not an appropriate fit for monitoring large sets of kubernetes clusters which are going to emit a very large set of metrics and increases operational burden. VictoriaMetrics supports a horizontally scalable cluster mode, which solves this entirely
27+
* Inefficient agent mode - Prometheus wasn't built for a remote-write model, and its agent mode still requires effectively a local prometheus store on-cluster. `vmagent` is a much better implementation and also adds support for other protocols like statsd. Remote write is necessary for multi-cluster observabilty since you likely cannot ingress into all clusters to perform metrics scrapes.
28+
* Better kubernetes operator implementation - the mainline Prometheus operator has a number of longstanding issues, in particular not supporting volume resizing as discussed [here](https://github.com/prometheus-operator/prometheus-operator/issues/4079)
29+
30+
31+
To deploy out of our storage catalog, go to `Service Catalog` -> `devops` -> `prometheus-setup` and fill out the wizard, it should look something like this:
32+
33+
![prometheus-setup](/assets/observability/prom-setup.png)
34+
35+
{% callout severity="info" %}
36+
Be sure to select a cluster with a working ingress setup, since it'll assume external-dns + cert-manager are there to set up DNS and TLS.
37+
{% /callout %}
38+
39+
The generated PR will have configured:
40+
41+
* a deployment of VictoriaMetrics server to store metrics
42+
* `vmagent` to ship metrics to the server
43+
* the configuration of the setup in the `DeploymentSettings` CRD to register them with Plural
44+
45+
46+
# Custom Resource Configuration
47+
48+
If you were to do this manually with an existing Prometheus setup, you'd need to manually wire configuration like the following:
49+
50+
```yaml
51+
apiVersion: deployments.plural.sh/v1alpha1
52+
kind: DeploymentSettings
53+
metadata:
54+
name: global # this is a singleton resource that is always at this location
55+
namespace: plrl-deploy-operator
56+
spec:
57+
prometheusConnection:
58+
host: https://{your-prometheus-url}
59+
user: plrl
60+
passwordSecretRef:
61+
name: basic-auth-prom
62+
key: password
63+
```
64+
65+
Also we expect a `cluster` label on all prometheus metrics which matches the cluster handle in Plural. If not present, we might not be able to properly correlate metrics with clusters/workloads. This will be configured out-of-the-box by our `vmagent` setup.
268 KB
Loading
335 KB
Loading
396 KB
Loading
296 KB
Loading
322 KB
Loading

0 commit comments

Comments
 (0)