Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s
70 lines
5.0 KiB
Plaintext
70 lines
5.0 KiB
Plaintext
---
|
|
title: "Collect performance metrics"
|
|
---
|
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
|
|
<PlanAvailability slug="entry-ent" />
|
|
|
|
System admins can collect and store the [same performance monitoring metrics](/administration-guide/scale/performance-monitoring-metrics) as Prometheus, without having to deploy these third-party tools. Data is collected every minute and is stored in a path you configure. The data is synchronized to either a cloud-based or local file store every hour, and retained for 15 days.
|
|
|
|
Download and share the collected data with Mattermost to understand application performance, troubleshoot system stability and performance, as well as inform route cause analysis.
|
|
|
|
<Tip>
|
|
|
|
Already have Prometheus and Grafana deployed? You can [use these tools to monitor performance of your Mattermost deployment](/administration-guide/scale/deploy-prometheus-grafana-for-performance-monitoring).
|
|
|
|
</Tip>
|
|
|
|
## Mattermost configuration
|
|
|
|
<Note>
|
|
|
|
For Mattermost Cloud deployments, no setup is required. See the [usage](#usage) section below for details on collecting performance metrics.
|
|
|
|
</Note>
|
|
|
|
For a self-hosted Mattermost deployment, a Mattermost system admin must perform the following steps in Mattermost.
|
|
|
|
1. Log in to your Mattermost [workspace](/end-user-guide/end-user-guide-index) as a system admin.
|
|
2. From Mattermost v10.1, you can install the Metrics plugin from the in-product Mattermost Marketplace by selecting the **Product** <img src={useBaseUrl('/img/ui/products_E82F.svg')} alt="Navigate between Channels, collaborative playbooks, and boards using the product menu icon." className="theme-icon" /> icon and selecting **App Marketplace**. Search for **Metrics** and select **Install**.
|
|
3. Go to **System Console \> Plugins \> Plugin Management**. In the **Installed Plugins** section, scroll to **Mattermost Metrics Plugin**, and select **Enable Plugin**.
|
|
4. Specify the path of the time-series database, and select **Save**.
|
|
5. Go to **System Console \> Environment \> Performance Monitoring**, and set **Enable Performance Monitoring** to **true**. Select **Save**.
|
|
6. Go to **System Console \> Environment \> Performance Monitoring**, and set **Enable Client Performance Monitoring** to **true**. This setting is required for the system administrator's performance monitoring product experience. Select **Save**.
|
|
|
|
<Note>
|
|
|
|
For Mattermost deployments prior to v10.1, you must download the latest version of [the plugin binary release](https://github.com/mattermost/mattermost-plugin-metrics/releases), compatible with Mattermost v8.0.1 and later. Go to **System Console \> Plugins \> Plugin Management \> Upload Plugin**, and upload the plugin binary you downloaded.
|
|
|
|
</Note>
|
|
|
|
## Upgrade
|
|
|
|
We recommend upgrading this feature as new versions are released. Generally, updates are seamless and don't interrupt the user experience in Mattermost. Visit the [Releases page](https://github.com/mattermost/mattermost-plugin-metrics/releases) for the latest release, available releases, and compatibiilty considerations.
|
|
|
|
## Usage
|
|
|
|
You need to be a Mattermost system admin to collect performance metrics. Select **Create Dump** to generate dump files.
|
|
|
|
To use the generated dump file, you can simply clone the [Dockprom](https://github.com/stefanprodan/dockprom) repository. Change the Prometheus data volume to point to the dump that you just downloaded. The downloaded file is compressed, so to be able to use it, you need to decompress it first.
|
|
|
|
The volume configuration for Prometheus should look like the code below in the `docker-compose.yml` file:
|
|
|
|
``` yaml
|
|
volumes:
|
|
- ./prometheus:/etc/prometheus
|
|
- /Path/To/Dump/Directory:/prometheus/data
|
|
```
|
|
|
|
Once you set this up, run `docker-compose` as described in [Dockprom Repository](https://github.com/stefanprodan/dockprom?tab=readme-ov-file#install).
|
|
|
|
You can also use our [Mattermost Performance Monitoring v2](https://grafana.com/grafana/dashboards/15582-mattermost-performance-monitoring-v2/) dashboard by simply importing it into Grafana.
|
|
|
|
1. Open Grafana (`<localhost>:3000` by default) and then log into it.
|
|
2. Once you log in, go to the **Plus** <img src={useBaseUrl('/img/ui/plus_F0415.svg')} alt="The Plus icon provides access to channel and direct message functionality." className="theme-icon" /> icon on the left sidebar, and then select **Import**.
|
|
3. Enter the dashboard ID (`15582`) in the **Grafana.com Dashboard** field, and then select **Load** to fetch the dashboard.
|
|
|
|
## What's collected?
|
|
|
|
Mattermost provides [custom metrics](/administration-guide/scale/performance-monitoring-metrics#custom-mattermost-metrics) and [standard Go metrics](/administration-guide/scale/performance-monitoring-metrics#standard-go-metrics) that can be used to monitor your system's performance. Additionally Enterprise customers can use the Metrics plugin to collect [host/system metrics](/administration-guide/scale/performance-monitoring-metrics#hostsystem-metrics) from [node exporter](https://github.com/prometheus/node_exporter) targets to monitor network-related panels for Mattermost Calls.
|