* [MM-71101] Add ConfigStrings snapshot accessor ConfigStrings reads list settings such as DataSourceReplicas. It returns ok=false when the config section is absent or any element is redacted, so a redacted replica DSN cannot be read as a host name. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * [MM-71101] Add database health rules Ports the database checks from the health check script into a new rules/database package: replica sizing, Trace, MaxOpenConns, QueryTimeout, HA failover connection bursts (merged with the pooler check), PostgreSQL version, pool saturation, unused replicas, IP-literal DSN hosts, replica lag monitoring and MaxIdleConns above MaxOpenConns. Rules that read DSNs only report derived facts; no DSN or host leaves the rule. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * [MM-71101] Update health packet fixtures and expectations for database rules The fixture configs gain the SqlSettings and ElasticsearchSettings keys a real packet carries, and the HA fixture raises MaxOpenConns to 200 so the golden set covers DB_HA_FAILOVER_STORM_RISK offline. The mmctl test packet gains the database diagnostics and stats the rules read, and the parity test expects DB_QUERY_TIMEOUT_HIGH from the test store's 60 s timeout. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * [MM-71101] Parse every DSN host and skip non-Postgres version checks hostsFromDSN replaces hostFromDSN and returns every host a DSN names: comma-separated host lists, host/hostaddr query parameters in URL form, and hostaddr in keyword form. DB_CONNECTION_IS_IP fires when any host is an IP; the failover rule treats a DSN as pooled when any host is a pooler. DB_POSTGRES_UNSUPPORTED returns unknown when the diagnostics report a database type other than Postgres, so older MySQL packets no longer raise a Postgres version warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Raise DB_NO_SEARCH_REPLICA threshold to 2M posts Matches the documented point where database search starts to degrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Remove DB_CONNECTION_IS_IP rule An IP address in a DSN is correct for loopback, floating VIPs and k8s services, and harmless on single-node installs, so the rule was mostly noise. hostsFromDSN stays for the failover rule's pooler check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Remove DB_REPLICA_LAG_UNMONITORED rule ReplicaLagSettings only feeds Prometheus gauges, and managed databases already report replica lag, so the rule was an observability nudge with nothing misconfigured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Simplify database health rules and tighten failover storm risk - Drop Snapshot.ConfigStrings; its only caller now just counts entries. - Parse only URL-form DSNs: sanitized config redacts every other form. - DB_HA_FAILOVER_STORM_RISK counts only primary pools in the burst and treats loopback hosts and Unix sockets as a per-node pooler. - DB_POOL_SATURATED checks the unlimited-pool gate before reading diagnostics. - Share the minimum PostgreSQL version via model so sqlstore and DB_POSTGRES_UNSUPPORTED cannot drift apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fire DB_HA_FAILOVER_STORM_RISK when any host bypasses the pooler The driver tries a host list in order, so a direct host in the list can take the full reconnection burst. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Skip DB_NO_SEARCH_REPLICA when database search is disabled DB_POSTGRES_UNSUPPORTED now also reports unknown when the database type is missing. * Base DB_REPLICA_UNUSED on replica online state Open connection counts drop to zero on idle replica pools, so the rule now reads a new replicas_online support packet diagnostic. --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Mattermost is an open core, self-hosted collaboration platform that offers chat, workflow automation, voice calling, screen sharing, and AI integration. This repo is the primary source for core development on the Mattermost platform; it's written in Go and React, runs as a single Linux binary, and relies on PostgreSQL. A new compiled version is released under an MIT license every month on the 16th.
Deploy Mattermost on-premises, or try it for free in the cloud.
Learn more about the following use cases with Mattermost:
Other useful resources:
- Download and Install Mattermost - Install, setup, and configure your own Mattermost instance.
- Product documentation - Learn how to run a Mattermost instance and take advantage of all the features.
- Developer documentation - Contribute code to Mattermost or build an integration via APIs, Webhooks, slash commands, Apps, and plugins.
Table of contents
- Install Mattermost
- Native mobile and desktop apps
- Get security bulletins
- Get involved
- Learn more
- License
- Get the latest news
- Contributing
Install Mattermost
- Download and Install Mattermost Self-Hosted - Deploy a Mattermost Self-hosted instance in minutes via Docker, Ubuntu, or tar.
- Get started in the cloud to try Mattermost today.
- Developer machine setup - Follow this guide if you want to write code for Mattermost.
Other install guides:
- Deploy Mattermost on Docker
- Mattermost Omnibus
- Install Mattermost from Tar
- Ubuntu 20.04 LTS
- Kubernetes
- Helm
- More server install guides
Native mobile and desktop apps
In addition to the web interface, you can also download Mattermost clients for Android, iOS, Windows PC, macOS, and Linux.
Get security bulletins
Receive notifications of critical security updates. The sophistication of online attackers is perpetually increasing. If you're deploying Mattermost it's highly recommended you subscribe to the Mattermost Security Bulletin mailing list for updates on critical security releases.
Get involved
- Contribute to Mattermost
- Find "Help Wanted" projects
- Join Developer Discussion on a Mattermost server for contributors
- Get Help With Mattermost
Learn more
- API options - webhooks, slash commands, drivers, and web service
- See who's using Mattermost
- Browse over 700 Mattermost integrations
License
See the LICENSE file for license rights and limitations.
Get the latest news
- X - Follow Mattermost on X, formerly Twitter.
- Blog - Get the latest updates from the Mattermost blog.
- Facebook - Follow Mattermost on Facebook.
- LinkedIn - Follow Mattermost on LinkedIn.
- Email - Subscribe to our newsletter (1 or 2 per month).
- Mattermost - Join the ~contributors channel on the Mattermost Community Server.
- IRC - Join the #matterbridge channel on Freenode (thanks to matterircd).
- YouTube - Subscribe to Mattermost.
Contributing
Please see CONTRIBUTING.md. Join the Mattermost Contributors server to join community discussions about contributions, development, and more.




