Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions docs/managing-mirrord/admin-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tags:
description: Dashboard for monitoring mirrord usage
---

## Dashboard
# Dashboard

The mirrord Dashboard is a web-based interface for monitoring mirrord usage across your organization. It provides real-time visibility into sessions, users, targets, CI pipelines, and overall adoption trends, all served directly from the license server.

Expand All @@ -31,7 +31,7 @@ Want to see the dashboard in action? Check out our [live playground](https://pla
|-----------|------------|
| ![Dashboard - Dark Mode](admin-dashboard/images/dashboard-dark.png) | ![Dashboard - Light Mode](admin-dashboard/images/dashboard-light.png) |

### Quick Start
## Quick Start

1. Add `dashboard.enabled: true` to your license server Helm values:

Expand Down Expand Up @@ -62,11 +62,11 @@ The dashboard reads from the license server's existing session database, so your
The dashboard does not require authentication beyond network access to the license server. Access control is handled by your cluster networking configuration.
{% endhint %}

### Usage Tab
## Usage Tab

The Usage tab is the main view, showing metrics, session activity, and analytics charts.

#### Metric Cards and Session Activity
### Metric Cards and Session Activity

![Metric cards and session activity table](admin-dashboard/images/metrics-and-activity.png)

Expand All @@ -84,7 +84,7 @@ Use the time range selector in the top-right corner (**7d**, **30d**, **90d**, *

Below the metrics, the **Session Activity** table shows a cross-referenced view of users and their target workloads. Each row shows the user, target, namespace, session count with a visual bar, and total time. The table is searchable and sortable by any column, with pagination for large datasets.

#### Users View
### Users View

![User charts and metrics table](admin-dashboard/images/users-view.png)

Expand All @@ -94,7 +94,7 @@ Switch to the **Users** tab to see user-focused analytics:
- **User Timeline**: Shows when each user was first seen and their most recent activity, giving a quick view of adoption over time.
- **User Metrics** table: A detailed, searchable table with columns for identifier, first active date, last seen date, total sessions, cumulative time, and average duration. Click any column header to sort.

#### Targets View
### Targets View

![Target adoption and namespace breakdown](admin-dashboard/images/targets-view.png)

Expand All @@ -104,7 +104,7 @@ Switch to the **Targets** tab to see target-focused analytics:
- **Sessions by Namespace**: A horizontal bar chart breaking down session distribution across Kubernetes namespaces.
- **Target Metrics** table: A searchable table listing each target workload with its namespace, session count, total time, and number of unique users.

### ROI Calculator
## ROI Calculator

![ROI Calculator](admin-dashboard/images/roi-calculator.png)

Expand All @@ -124,21 +124,21 @@ The **ROI Calculator** tab estimates the time and cost savings from using mirror
- **Annual infrastructure savings**
- **Net Annual ROI** after subtracting the mirrord license cost

### Features
## Features

#### Dark Mode
### Dark Mode

Toggle between light and dark themes using the moon/sun icon in the top-right corner of the app bar. Your preference is saved in the browser's local storage.

#### Manual Sync
### Manual Sync

Click the **Sync** button in the app bar to manually refresh all dashboard data. The last updated timestamp is displayed next to the button.

#### Operator Version
### Operator Version

The operator version is displayed in the app bar for quick reference (e.g., `v3.142.0`).

### Helm Configuration
## Helm Configuration

| Setting | Default | Description |
|---------|---------|-------------|
Expand All @@ -147,7 +147,7 @@ The operator version is displayed in the app bar for quick reference (e.g., `v3.

The chart automatically configures the container port, service port, and required environment variables when `dashboard.enabled` is set to `true`.

### API Endpoints
## API Endpoints

The dashboard consumes two API endpoints from the license server. These are also available for programmatic access:

Expand Down
14 changes: 7 additions & 7 deletions docs/managing-mirrord/license-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ The license server enables you to manage your organization’s seats without sen
This feature is available to users on the Enterprise pricing plan.
{% endhint %}

#### Architecture
### Architecture

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not make this h1?


The license server exposes an API that the operator uses to obtain a license, which the operator requires to run. It also allows the operator to keep track of active users, check and enforce seat counts, and store telemetry data.

Authentication between the operator and license server is done using a license key (chosen by the person setting up the license server) and is not to be confused with the license certificate file provided by MetalBear.

#### Basic Setup
### Basic Setup

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we h1 this then we can h2 "using cluster secret" which is supposed to be under "basic setup" right?


The license server is installable via Helm. First, add the MetalBear Helm repository:

Expand Down Expand Up @@ -77,7 +77,7 @@ kubectl get deployment -n mirrord mirrord-license-server

If your operator(s) are running in a different cluster, make sure the `mirrord-operator-license-server` service is exposed to them via ingress.

##### Using a Cluster Secret
#### Using a Cluster Secret

You can set the license key in a cluster secret within the operator's namespace (`mirrord` by default), and reference it in the license server helm chart via `license.keyRef`. For example, with the following `values.yaml`:

Expand All @@ -104,7 +104,7 @@ The secret itself, which must use the key `OPERATOR_LICENSE_KEY`, can be created
kubectl create secret generic my-cluster-secret -n mirrord --from-literal OPERATOR_LICENSE_KEY=my-very-secret-string
```

##### Using Google Secrets Manager
#### Using Google Secrets Manager

You can fetch the license file from GSM by providing the secret path and service account credentials as follows:

Expand All @@ -129,7 +129,7 @@ sa:
gcpSa: <IAM_SA_NAME>@<IAM_SA_PROJECT_ID>.iam.gserviceaccount.com
```

##### Connecting Operators to the License Server
#### Connecting Operators to the License Server

First update your operator `values.yaml` file ([see this page](../getting-started/quick-start.md#helm) for quickstart helm setup for operator):

Expand All @@ -148,7 +148,7 @@ Then run:
helm install metalbear/mirrord-operator -f ./values.yaml --wait
```

### Getting a Utilisation Report from the License Server
## Getting a Utilisation Report from the License Server

{% hint style="info" %}
This feature requires at least mirrord-operator-license-server Helm chart version **1.4.0**.
Expand Down Expand Up @@ -186,7 +186,7 @@ To get a report:
mirrord exec -- curl "mirrord-operator-license-server.mirrord.svc.cluster.local/api/v1/reports/usage?format=xlsx" --header 'x-license-key: <operator API license key>' --output report.xlsx
```

### Getting Operator Failure Reports from the License Server
## Getting Operator Failure Reports from the License Server

{% hint style="info" %}
This feature requires at least mirrord-operator-license-server Helm chart version **1.56.0**.
Expand Down
28 changes: 14 additions & 14 deletions docs/managing-mirrord/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The mirrord Operator can produce logs in JSON format that can be digested by mos
This feature is available to users on the Team and Enterprise pricing plans.
{% endhint %}

### Functional Logs
## Functional Logs

The following logs are written with log level `INFO`, and can be used for dashboards within monitoring solutions in order to monitor mirrord usage within your organization:

Expand Down Expand Up @@ -51,11 +51,11 @@ Fields:
| http\_filter | the client's configured [HTTP Filter](https://metalbear.com/mirrord/docs/config#feature.network) | `Port Steal` |
| scale\_down | whether the session's target was scaled down | `Copy Target` |

### Prometheus
## Prometheus

The mirrord Operator can expose Prometheus metrics if enabled (the default endpoint is `:9000/metrics`).

#### Helm
### Helm

```yaml
# values.yaml for mirrord-operator helm chart
Expand All @@ -65,14 +65,14 @@ operator:
...
```

#### Manual
### Manual

| env | description | type | default |
| -------------------------- | ------------------------ | ----------------- | -------------- |
| OPERATOR\_METRICS\_ENABLED | enable metrics endpoint | "true" \| "false" | "false" |
| OPERATOR\_METRICS\_ADDR | metrics http server addr | SocketAddr | "[::]:9000" |

#### Exposed metrics
### Exposed metrics

| metric | description | labels | minimum version |
| -------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------- |
Expand All @@ -90,25 +90,25 @@ operator:
| mirrord_previews_create_total | Count of created preview sessions | `target_namespace` `target_kind` `target_name` | operator 3.163.0 |
| mirrord_previews_duration | Histogram for finished preview sessions duration | `target_namespace` `target_kind` `target_name` | operator 3.163.0 |

### OpenTelemetry
## OpenTelemetry

{% hint style="info" %}
The features under the "OpenTelemetry" heading require at least operator chart version 1.46.0.
{% endhint %}

#### Exporting Logs
### Exporting Logs

To export logs from the operator to an endpoint, set `operator.otelLogExportUrl` to the URL in the Operator Helm chart values. You _must_ set this value to export logs. This value does not affect the logs which are printed by the operator to `stdout` and are always enabled.

The log level is `INFO` by default, and can be changed by setting `operator.otelLogLevel` in the Helm chart values (or alternatively by using the `OTEL_RUST_LOG` environment variable in the Operator container), which takes values in the following format: `mirrord={log_level}` (e.g. `mirrord=debug`).

Note that this log level is separate to that defined for logs controlled by `operator.logLevel`, which are printed by the operator to `stdout`.

#### Exporting Traces
### Exporting Traces

To export traces from the operator to an endpoint, set `operator.otelTraceExportUrl` to the URL in the Operator Helm chart values. You _must_ set this value to export traces.

#### Context Propagation
### Context Propagation

{% hint style="info" %}
This feature requires at least mirrord version 3.184.0.
Expand All @@ -129,21 +129,21 @@ The Operator will propagate these values into exported spans for some frequently

For more info about using `traceparent` and `baggage`, see [the OpenTelemetry docs about context propagation](https://opentelemetry.io/docs/concepts/context-propagation/).

### Pre-Built Dashboards
## Pre-Built Dashboards

#### DataDog Dashboard
### DataDog Dashboard

We offer a DataDog dashboard you can import to track statistics.

Download it [here](https://github.com/metalbear-co/docs/tree/main/docs/managing-mirrord/assets/Mirrord_datadog_Operator_Dashboard.json).

#### Grafana Dashboard
### Grafana Dashboard

Alternatively there is a Grafana dashboard you can import to track statistics.

Download it [here](https://github.com/metalbear-co/docs/tree/main/docs/managing-mirrord/assets/Mirrord_grafana_Operator_Dashboard.json).

### fluentd
## fluentd

If you are using fluentd you can add a filter to unpack some values from the "log" message:

Expand All @@ -161,7 +161,7 @@ If you are using fluentd you can add a filter to unpack some values from the "lo

This will expand all the extra fields stored in the "log" field.

#### fluentd + Elasticsearch
### fluentd + Elasticsearch

Assuming you are using `logstash_format true` and the connected mapping will store the extra fields in a `keyword` type, we have a ready made dashboard you can simply import.

Expand Down
20 changes: 10 additions & 10 deletions docs/managing-mirrord/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags:

The mirrord Operator is a Kubernetes operator that runs persistently in your cluster and manages mirrord sessions. It's the central component that enables all **[Teams]** features.

### Why the Operator?
## Why the Operator?

In the open-source version of mirrord, each session is standalone - mirrord injects itself into the local process and creates an agent pod directly. This works well for individual use, but doesn't support coordination between users.

Expand All @@ -20,11 +20,11 @@ The Operator solves this by acting as a centralized control plane:

![mirrord for Teams - Architecture](/docs/overview/teams/operator-architecture.svg)

### Installation
## Installation

You'll need a mirrord for Teams license. [Register here](https://app.metalbear.com) to get started.

#### Helm
### Helm

Add the MetalBear Helm repository:

Expand Down Expand Up @@ -79,11 +79,11 @@ Then install:
helm install -f values.yaml mirrord-operator metalbear/mirrord-operator
```

#### Using an Internal Registry (Optional)
### Using an Internal Registry (Optional)

Using an internal registry reduces startup time, ingress costs, and removes dependency on GitHub's registry.

##### Feature-specific images
#### Feature-specific images

These images are only pulled when the corresponding feature is enabled:

Expand All @@ -92,7 +92,7 @@ These images are only pulled when the corresponding feature is enabled:
| Kafka splitting sidecar | `ghcr.io/metalbear-co/operator-kafka-proxy` | Same as operator | JVM sidecar for Kafka splitting (only when `operator.kafkaSplittingSidecar.enabled` is true). | `operator.kafkaSplittingSidecar.image` |
| MSSQL tools | `ghcr.io/metalbear-co/mssql-tools` | `latest` | Sidecar for MSSQL DB branching (provides `sqlcmd`, `sqlpackage`, `bcp`). | Env `MSSQL_TOOLS_IMAGE` via `operator.extraEnv` |

##### DB branching default database images
#### DB branching default database images

DB branch pods pull a database image matching the engine. These are the defaults when no custom image is specified in the branch config:

Expand All @@ -104,7 +104,7 @@ DB branch pods pull a database image matching the engine. These are the defaults
| MSSQL | `mcr.microsoft.com/mssql/server:{version}` | `operator.mssqlBranchConfig` - `dbPod.image` |
| Redis | `docker.io/library/redis:{version}` | `operator.redisBranchConfig` - `dbPod.image` |

##### Copying images
#### Copying images

We recommend [regctl](https://regclient.org/) for copying multi-arch images:

Expand All @@ -130,7 +130,7 @@ agent:
registry: your-registry/mirrord
```

#### OpenShift
### OpenShift

Apply the following SecurityContextConstraints:

Expand All @@ -152,7 +152,7 @@ users:
- system:serviceaccount:mirrord:default
```

#### GKE Autopilot
### GKE Autopilot

In GKE Autopilot the mirrord Operator can be run as a [customer-owned privileged workload](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/about-autopilot-privileged-workloads#customer-owned-privileged-workloads).

Expand Down Expand Up @@ -212,7 +212,7 @@ agent:
cloud.google.com/generate-allowlist: "true"
```

### Verifying the Installation
## Verifying the Installation

```bash
mirrord operator status
Expand Down
Loading