Configure server health check probes#
Available on all plans
self-hosted deployments
This page describes how to configure health check probes for a Mattermost server.
Before you begin, you should have a running Mattermost server. If you don’t, you can install Mattermost on various distributions or deploy a Kubernetes cluster with Minikube.
Note
Highly available Mattermost cluster support requires Mattermost Enterprise.
You can perform a health check with the following 2 methods:
Ping the APIv4 endpoint#
You can use the GET /system/ping APIv4 endpoint to check for system health.
A sample request is included below. The endpoint checks if the server is up and healthy based on the configuration setting GoRoutineHealthThreshold
.
If
GoRoutineHealthThreshold
and the number of goroutines on the server exceeds that threshold, the server is considered unhealthy.If
GoRoutineHealthThreshold
is not set or the number of goroutines is below the threshold the server is considered healthy.
This endpoint can also be provided to schedulers like Kubernetes.
import github.com/mattermost/mattermost/tree/master/server/public/model"
Client := model.NewAPIv4Client("https://your-mattermost-url.com")
Client.Login("email@domain.com", "Password1")
// GetPing
status, err := Client.GetPing()
Ping the Mattermost server#
The Mattermost Probe constantly pings a Mattermost server using a variety of probes.
These probes can be configured to verify core features, including sending and receiving messages, joining channels, pinging a login page, and searching of users and channels.
The project is contributed by the Mattermost open source community. Suggestions and contributions for the project are welcome.