Commit graph

9 commits

Author SHA1 Message Date
Alejandro García Montoro
fa7668ae0d
MM-67668: Replace Promtail with OpenTelemetry collector (#35381)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
* Add container name to Docker logs

This will allow for querying Loki by container's name:

  {job="docker",container_name="mattermost-postgres"}

* Configue Loki to prepare for OTLP ingestion

- Add a volume to Loki container to get the config
- Configure Loki with the expected labels so that we can query by job,
  app, container.name...

* Add OpenTelemetry collector configuration

There are three pipelines:
1. logs/mattermost scrapes the logs from mattermost.log, parsing the
   timestamp and severity, and pushes them to Loki.
2. logs/docker scrapes the Docker logs from *-json.log, parsing the
   timestamp, the log itself and the container name, and pushes them to Loki.
3. metrics/docker scrapes the Docker socket to retrieve the containers'
   uptime values and pushes them to Prometheus.

* Replace Promtail with OpenTelemetry collector

* Update build tooling for OpenTelemetry collector

1. Make sure that the logs directory is created
2. Swap Promtail with OpenTelemetry collector

* Scrape collector to get Docker stats

Prometheus needs to scrape the OpenTelemetry collector in the exposed
port to get the Docker stats, so that we can query the uptime with
metric container_uptime_seconds, which has a container_name label to
filter by container.

* Update Grafana dashboard for Docker health checks

1. Use Prometheus as the datasource in all queries
2. Simplify the mappings to either 0 (offline, red) or 1 (online,
   green).
3. Unify all queries on container_uptime_seconds, filtering by
   container_name, and making sure that the latest value we got is at most
   15 seconds old, so that it does not show stale data.
4. Add Redis health check, that was missing
5. Update the dashboard title to Docker containers

* Tune Loki and OTel collector configs for local dev

- Switch filelog receivers to start_at: beginning so existing logs are
  ingested on collector startup, not just new entries.
- Fix Docker log timestamp layout to use 9s (variable-length nanos)
  instead of 0s (fixed-width), matching actual Docker JSON log format.
- Add ingester max_chunk_age to keep chunks open longer in the
  single-instance dev setup, so that we can ingest older logs (the
  window is max_chunk_age/2).
- Relax Loki limits for local development: allow unordered writes,
  disable old-sample rejection, and raise ingestion rate/burst to 64 MB
  to avoid throttling during bulk ingest.
2026-02-27 16:48:17 +01:00
Harrison Healey
84cf95ff6e
Explicitly name Postgres container volume (#33954)
* Explicitly name Postgres container volume

* Remove unused server/docker-compose.yaml

This file doesn't seem to actually be used. When we run docker compose locally,
it uses docker-compose.makefile.yml merged with the output of
build/docker-compose-generator/main.go.

* Revert "Remove unused server/docker-compose.yaml"

This reverts commit 5a45965217.

* Update volume name
2025-10-02 09:29:00 -04:00
Agniva De Sarker
9dd8c056e7
MM-63368: Remove MySQL (#33458)
https://mattermost.atlassian.net/browse/MM-63368

```release-note
Remove MySQL support from the codebase entirely.
```
2025-07-22 20:40:55 +05:30
enzowritescode
dde07f6a3c
Remove obsolete docker version (#30040)
* Remove obsolete docker version from Docker files and docker composer generator
2025-01-30 12:53:25 -07:00
Claudio Costa
3752518e36
Fix minio Web UI access (#29021) 2024-11-04 09:04:06 -06:00
Agniva De Sarker
75ed2860ac
MM-59934: Add Redis to CI and other improvements (#28164)
- Update library version.
- Added MaxFlush delay to help reduce CPU usage.
- Fall back to LRU cache for the caches which use SCAN.
- Added mattermost-redis and running for all api layer
tests in Postgres.

https://mattermost.atlassian.net/browse/MM-59934
```release-note
NONE
```
2024-09-18 19:13:44 +05:30
Agniva De Sarker
177389d224
MM-53962: Adding ES8 dependency (#24399)
* Adding ES8 dependency

```release-note
NONE
```


Co-authored-by: Mattermost Build <build@mattermost.com>
2024-07-11 13:13:31 +05:30
Jesse Hallam
617053e206
configure Loki for local development (#26997)
* configure Loki for local development

Extend our docker compose setup to include Loki (along with promtail), scraping `logs/*.log` to ingest development logs as well as all logs from running containers.

While we're in here, teach Prometheus to scrape metrics from Docker containers too.

* tweak promtail labels

* document extra services in config.mk

* update home.json
2024-05-16 12:16:08 -03:00
Doug Lauder
c943ed6859
Mono repo -> Master (#22553)
Combines the following repositories into one:

https://github.com/mattermost/mattermost-server
https://github.com/mattermost/mattermost-webapp
https://github.com/mattermost/focalboard
https://github.com/mattermost/mattermost-plugin-playbooks
2023-03-22 17:22:27 -04:00
Renamed from docker-compose.makefile.yml (Browse further)